Hi Lenny, I have a deployment issue with a jar at the ear's root. So
visibility of it's persistence unit is available to all components of the ear.
The T5-FL component is just a bare T5 app with your additions to pom.xml for
flowlogix library, contributing some realm configuration stuff and the
shiro-users.properties file (as per your wiki page).
This is the layout, and i'm getting errors at the T5 stage of deployment. Just
a default quickstart T5 project for now.
My EAR contains:
/Persistence.jar
\META-INF/persistence.xml
/EJB-JAR.jar (referencing PU)
/RS-EJB.war (referencing PU)
/T5-WAR.war (no reference to PU in any configs, is it in flowlogix?)
/lib (other libs like SLF4J)
The RS EJB is responding, as is the EJB-JAR
What steps will reproduce the problem?
1. Deploying ear file.
2. ear contains persistence.jar at the top ear level (not in /lib), so the
persistence unit is available to all components.
What is the expected output? What do you see instead?
Expect deployment. Seeing an error in relation to the datasource of the
persistence unit - seems to error on look up of name -
java:comp/env/jdbc/noticeofcallsDS - i'm presuming it get's the DS from the
persistence unit, but prefixing java:comp/env/ to the DS name - is it not
looking at java:global/ stuff?
What version of the product are you using? On what operating system?
5.3.6, flowlogix 1.2.2
Please provide any additional information below.
A stack trace,
SEVERE: Error invoking constructor public
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl(org.slf4j.Logger,org.a
pache.tapestry5.ioc.Resource,org.apache.tapestry5.jpa.PersistenceUnitConfigurer,
java.util.Map): java.lang.RuntimeException: java.lang.RuntimeException:
javax.naming.NameNotFoundException: No object bound to name
java:comp/env/jdbc/noticeofcallsDS
SEVERE: Operations trace:
SEVERE: [ 1] Realizing service RegistryStartup
SEVERE: [ 2] Instantiating service RegistryStartup implementation via
org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at
RegistryStartup.java:36) via
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:49)
SEVERE: [ 3] Creating plan to instantiate
org.apache.tapestry5.ioc.internal.services.RegistryStartup via public
org.apache.tapestry5.ioc.internal.services.RegistryStartup(org.slf4j.Logger,java
.util.List)
SEVERE: [ 4] Determining injection value for parameter #2 (java.util.List)
SEVERE: [ 5] Collecting ordered configuration for service RegistryStartup
SEVERE: [ 6] Invoking
org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean)
(at JpaModule.java:183)
SEVERE: [ 7] Realizing service EntityManagerSource
SEVERE: [ 8] Instantiating service EntityManagerSource implementation via
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl(Logger, Resource,
PersistenceUnitConfigurer, Map) (at EntityManagerSourceImpl.java:56) via
org.apache.tapestry5.jpa.JpaModule.bind(ServiceBinder) (at JpaModule.java:44)
SEVERE: [ 9] Invoking constructor
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl(Logger, Resource,
PersistenceUnitConfigurer, Map) (at EntityManagerSourceImpl.java:56) via
org.apache.tapestry5.jpa.JpaModule.bind(ServiceBinder) (at JpaModule.java:44)
(for service 'EntityManagerSource')
SEVERE: Construction of service EntityManagerSource failed: Error invoking
constructor public
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl(org.slf4j.Logger,org.a
pache.tapestry5.ioc.Resource,org.apache.tapestry5.jpa.PersistenceUnitConfigurer,
java.util.Map): java.lang.RuntimeException: java.lang.RuntimeException:
javax.naming.NameNotFoundException: No object bound to name
java:comp/env/jdbc/noticeofcallsDS
org.apache.tapestry5.ioc.internal.OperationException: Error invoking
constructor public
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl(org.slf4j.Logger,org.a
pache.tapestry5.ioc.Resource,org.apache.tapestry5.jpa.PersistenceUnitConfigurer,
java.util.Map): java.lang.RuntimeException: java.lang.RuntimeException:
javax.naming.NameNotFoundException: No object bound to name
java:comp/env/jdbc/noticeofcallsDS
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
at org.apache.tapestry5.ioc.internal.util.ConstructionPlan.createObject(ConstructionPlan.java:60)
at org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:61)
at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
...
...
... 141 more
Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException: No
object bound to name java:comp/env/jdbc/noticeofcallsDS
at org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl.lookupDataSource(PersistenceUnitInfoImpl.java:362)
at org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl.jtaDataSource(PersistenceUnitInfoImpl.java:144)
at org.apache.tapestry5.internal.jpa.PersistenceContentHandler.endElement(PersistenceContentHandler.java:143)
I have a hunch that somewhere in flowlogix, it is only searching within it's
component for some DS - but don't know the internals well enough.
Does this look like a flowlogix bug?
When I deploy the persistence.jar as a dependency of the T5 component (in it's
own WEB-INF/lib from memory), there are no problems with deployment - but I'd
rather use 1 PU if I can get away with it.
Cheers
Chris