OpenEMPI EJB test

  10 posts   Feedicon  
Replies: 9 - Last Post: February 06, 2012 04:36
by: Csaba Toth
showing 1 - 10 of 10
 
Posted: July 23, 2010 21:01 by Csaba Toth
Hi Odysseas,
I need help with OpenEMPI. I try to run the SimpleTest in the openempi-ear
module, but it throws an exception.

First it threw a NullPointerException, because the Context was null in the
ServiceLocator.java, and when the code reached a call like this:
SecurityService securityService = (SecurityService)
context.lookup("openempi-2.0/SecurityService/remote");

it resulted in a Null pointer exception. I changed the getInitialContext
function in ServiceLocator to static, and I call it during the
AbstractEJBTestCase.setUp(). This way I got rid of the null pointer, but I
still have an exception when the code reaches that context.lookup:

javax.naming.NameNotFoundException: openempi-2.0 not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.openhie.openempi.ejb.util.ServiceLocator.getSecurityService(ServiceLocator.java:30)
at
org.openhie.openempi.ejb.util.AbstractEJBTestCase.getSecurityService(AbstractEJBTestCase.java:58)
at org.openhie.openempi.ejb.util.SimpleTest.testHello(SimpleTest.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:77)
at org.openhie.openempi.ejb.util.SimpleTest.main(SimpleTest.java:35)
.javax.naming.NameNotFoundException: openempi-2.0 not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.openhie.openempi.ejb.util.ServiceLocator.getSecurityService(ServiceLocator.java:30)
at
org.openhie.openempi.ejb.util.AbstractEJBTestCase.getSecurityService(AbstractEJBTestCase.java:58)
at
org.openhie.openempi.ejb.util.SimpleTest.getSessionKey(SimpleTest.java:85)
at
org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:77)
at org.openhie.openempi.ejb.util.SimpleTest.main(SimpleTest.java:35)
javax.naming.NameNotFoundException: openempi-2.0 not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.openhie.openempi.ejb.util.ServiceLocator.getPersonManagerService(ServiceLocator.java:23)
at
org.openhie.openempi.ejb.util.AbstractEJBTestCase.getPersonManagerService(AbstractEJBTestCase.java:50)
at
org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:77)
at org.openhie.openempi.ejb.util.SimpleTest.main(SimpleTest.java:35)

How can I get this test working? I googled a lot, but everybody talks
about only datasource type JNDI naming problems. They tune service.xml and
jboss-service.xml (in the JBoss/Tomcat), and sometimes web.xml and
jboss-web.xml. I'm totally lost between the xmls and don't know what to
do. First I tried to deploy the webapp war, then I also tried to run the test
after deploying the openempi-ear, which in theory contains the
openempi-ejb also. JBoss 4.x web admin interface is lamer than JBoss 5.x, so it's hard to tell what's going on.

Does this test run in your environment?
Can you give some directions on what to do?
I think I have to configure JNDI naming somehow, but what xml file and
where to edit: I do not know.

Thanks,
Csaba
 
Posted: July 24, 2010 00:39 by Csaba Toth
Odysseas's answer:

Hi Csaba,

After you deploy the ear file on your JBoss server instance, bring up
the JMX console and check to see if the module has been deployed. The
JMX console is
available at http://localhost:8080/jmx-console/ by default. Look for the
service service=JNDIView (or something like that). Select that service
and run the list operation on the
JMX bean. This should list the contents of the JNDI space of the server.
You should see the entry for the OpenEMPI service.

On my server I have the following entries (among others) in my JNDI
space which implies that the ServiceLocator should be using
openempi-2.0.6 instead of the default of openempi-2.0. If you don't
mind, enter a defect in JIVE so that we can make it configurable in the
next release.

By the way, thanks for all that input you gave me in your prior email
regarding the work you did on OpenEMPI. If you decide to contribute any
of it back, we can merge it into a future release.

Odysseas

Global JNDI Namespace

+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy47 implements interface
org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface
org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class:
javax.naming.LinkRef)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy15 implements
interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- openempi-2.0.6 (class: org.jnp.interfaces.NamingContext)
 
Posted: July 24, 2010 15:45 by Csaba Toth
In order for the EJB interface to work someone need to deploy the ear, the webapp war doesn't contain the EJB part.
In my case for some reason openempi-2.0.5 does not present in the Global JNDI Namespace, so at first I need to find out the reason fro that and fix it in my system.
 
Posted: July 25, 2010 23:48 by Csaba Toth
When I deploy my ear, only this happens:
INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 20s:48ms
INFO [EARDeployer] Init J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
INFO [EARDeployer] Started J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear

while the normal output of the JBoss should be:
18:43:14,107 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 20s:48ms
18:45:34,877 INFO [EARDeployer] Init J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
18:45:45,497 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.google.gwt.junit.server.JUnitHostImpl
18:45:45,736 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
18:45:45,745 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=SecurityServic
e,service=EJB3 with dependencies:
18:45:45,792 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.security.SecurityServiceBean ejbName: SecurityService
18:45:45,920 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
18:45:45,920 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonQuerySer
vice,service=EJB3 with dependencies:
18:45:45,936 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonQueryServiceBean ejbName: PersonQueryService
18:45:45,956 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
18:45:45,957 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonManagerS
ervice,service=EJB3 with dependencies:
18:45:45,969 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonManagerServiceBean ejbName: PersonManagerService
18:45:45,979 INFO [EJB3Deployer] Deployed: fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp929054328523159039openempi-2.0.5.ear-contents/openem
pi-ejb-2.0.5.jar
18:45:45,994 INFO [TomcatDeployer] deploy, ctxPath=/openempi-admin, warUrl=.../tmp/deploy/tmp929054328523159039openempi-2.0.5.ear-contents/
openempi-webapp-web-2.0.5-exp.war/
18:45:53,334 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_1_0_, this_.audit_event_type_code as audit2_1_0_, this_.au
dit_event_type_description as audit3_1_0_, this_.audit_event_type_name as audit4_1_0_ from audit_event_type this_
18:45:55,981 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_40_0_, this_.audit_event_type_code as audit2_40_0_, this_.
audit_event_type_description as audit3_40_0_, this_.audit_event_type_name as audit4_40_0_ from audit_event_type this_
18:45:56,695 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_79_0_, this_.audit_event_type_code as audit2_79_0_, this_.
audit_event_type_description as audit3_79_0_, this_.audit_event_type_name as audit4_79_0_ from audit_event_type this_
18:45:56,781 INFO [EARDeployer] Started J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear

I'll try to compile a clean 2.0.6 source on my machine and see if it works
 
Posted: July 26, 2010 22:47 by Csaba Toth
I checked out a clean 2.0.6-development branch, and I discovered, that it doesn't have an application.xml file in the openempi/ear/src/main/application/META-INF/ folder, it only has the jboss-app.xml there. If I clean my source and do a full build without that file, I can deploy it manually into my JBoss server, and the EJBs will appear in the JNDI name tree. However, I still have problems, I'll talk about in my next post.

Global JNDI Namespace

...
+- openempi-2.0.5 (class: org.jnp.interfaces.NamingContext)
| +- PersonManagerService (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy67 implements interface org.openhie.openempi.ejb.person.PersonManagerService,interface org.jboss.ejb3.JBossProxy)
| +- PersonQueryService (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy71 implements interface org.openhie.openempi.ejb.person.PersonQueryService,interface org.jboss.ejb3.JBossProxy)
| +- SecurityService (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy74 implements interface org.openhie.openempi.ejb.security.SecurityService,interface org.jboss.ejb3.JBossProxy)
...

JBoss startup:
17:36:00,959 INFO [EARDeployer] Init J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
17:36:09,502 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.google.gwt.junit.server.JUnitHostImpl
17:36:09,912 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
17:36:09,921 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonManagerS
ervice,service=EJB3 with dependencies:
17:36:09,968 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonManagerServiceBean ejbName: PersonManagerService
17:36:10,063 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
17:36:10,063 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonQuerySer
vice,service=EJB3 with dependencies:
17:36:10,075 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonQueryServiceBean ejbName: PersonQueryService
17:36:10,093 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
17:36:10,093 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=SecurityServic
e,service=EJB3 with dependencies:
17:36:10,101 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.security.SecurityServiceBean ejbName: SecurityService
17:36:10,110 INFO [EJB3Deployer] Deployed: fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp5167540436836976148openempi-2.0.5.ear-contents/opene
mpi-ejb-2.0.5.jar
17:36:10,128 INFO [TomcatDeployer] deploy, ctxPath=/openempi-admin, warUrl=.../tmp/deploy/tmp5167540436836976148openempi-2.0.5.ear-contents
/openempi-webapp-web-2.0.5-exp.war/
17:36:13,522 INFO [STDOUT] 17:36:13,517 WARN ConfigurationFactory:127 - No configuration found. Configuring ehcache from ehcache-failsafe.
xml found in the classpath: jar:fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp5167540436836976148openempi-2.0.5.ear-contents/openempi-webapp-
web-2.0.5-exp.war/WEB-INF/lib/ehcache-1.4.1.jar!/ehcache-failsafe.xml
17:36:16,304 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_1_0_, this_.audit_event_type_code as audit2_1_0_, this_.au
dit_event_type_description as audit3_1_0_, this_.audit_event_type_name as audit4_1_0_ from audit_event_type this_
17:36:18,978 INFO [STDOUT] 17:36:18,977 WARN ConfigurationFactory:127 - No configuration found. Configuring ehcache from ehcache-failsafe.
xml found in the classpath: jar:fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp5167540436836976148openempi-2.0.5.ear-contents/openempi-webapp-
web-2.0.5-exp.war/WEB-INF/lib/ehcache-1.4.1.jar!/ehcache-failsafe.xml
17:36:18,993 INFO [STDOUT] 17:36:18,992 WARN CacheManager:309 - Creating a new instance of CacheManager using the diskStorePath "C:\Users\
ctoth\AppData\Local\Temp\" which is already used by an existing CacheManager.
The source of the configuration was classpath.
The diskStore path for this CacheManager will be set to C:\Users\ctoth\AppData\Local\Temp\\ehcache_auto_created_1280183778992.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache co
nfiguration (ehcache.xml) for each CacheManager instance.
17:36:19,470 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_42_0_, this_.audit_event_type_code as audit2_42_0_, this_.
audit_event_type_description as audit3_42_0_, this_.audit_event_type_name as audit4_42_0_ from audit_event_type this_
17:36:19,930 INFO [STDOUT] 17:36:19,929 WARN ConfigurationFactory:127 - No configuration found. Configuring ehcache from ehcache-failsafe.
xml found in the classpath: jar:fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp5167540436836976148openempi-2.0.5.ear-contents/openempi-webapp-
web-2.0.5-exp.war/WEB-INF/lib/ehcache-1.4.1.jar!/ehcache-failsafe.xml
17:36:19,935 INFO [STDOUT] 17:36:19,933 WARN CacheManager:309 - Creating a new instance of CacheManager using the diskStorePath "C:\Users\
ctoth\AppData\Local\Temp\" which is already used by an existing CacheManager.
The source of the configuration was classpath.
The diskStore path for this CacheManager will be set to C:\Users\ctoth\AppData\Local\Temp\\ehcache_auto_created_1280183779933.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache co
nfiguration (ehcache.xml) for each CacheManager instance.
17:36:20,247 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_83_0_, this_.audit_event_type_code as audit2_83_0_, this_.
audit_event_type_description as audit3_83_0_, this_.audit_event_type_name as audit4_83_0_ from audit_event_type this_
17:36:20,303 INFO [EARDeployer] Started J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
 
Posted: July 26, 2010 22:59 by Csaba Toth
First problem: if I want to deploy this application.xml-less ear using JBoss, I get this exception:

org.jboss.deployment.DeploymentException: No META-INF/application.xml found
at org.jboss.deployment.EARDeployer.init(EARDeployer.java:146)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
 
Posted: July 26, 2010 23:18 by Csaba Toth
But I'm desperate, so I started JBoss manually and deployed the openempi.ear manually, outside of Eclipse.
Now if I run openempi\ejb\src\test\java\org\openhie\openempi\ejb\util\SimpleTest.java, the following things happen.
(Note: I modified the JNDI name in the ServiceLocator.java, and added ".5", to get "openempi-2.0.5")
First the testAddPerson starts and it wants to get a session key. For this it gets the SecurityService, which is now successful. But now comes the authentication:
"String sessionKey = securityService.authenticate("admin", "admin");"
and I get an EJBException exception:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist

More detailed:

javax.ejb.EJBException: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist; nested exception is: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createApplicationContext(ContextJndiBeanFactoryLocator.java:102)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createBeanFactory(ContextJndiBeanFactoryLocator.java:90)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:68)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:118)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:66)
at org.openhie.openempi.ejb.BaseSpringInjectableBean.init(BaseSpringInjectableBean.java:45)
at org.openhie.openempi.ejb.SpringInjectionInterceptor.myBeanInterceptor(SpringInjectionInterceptor.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
at $Proxy0.authenticate(Unknown Source)
at org.openhie.openempi.ejb.util.SimpleTest.getSessionKey(SimpleTest.java:86)
at org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
at $Proxy0.authenticate(Unknown Source)
at org.openhie.openempi.ejb.util.SimpleTest.getSessionKey(SimpleTest.java:86)
at org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createApplicationContext(ContextJndiBeanFactoryLocator.java:102)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createBeanFactory(ContextJndiBeanFactoryLocator.java:90)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:68)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:118)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:66)
at org.openhie.openempi.ejb.BaseSpringInjectableBean.init(BaseSpringInjectableBean.java:45)
at org.openhie.openempi.ejb.SpringInjectionInterceptor.myBeanInterceptor(SpringInjectionInterceptor.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
javax.ejb.EJBException: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist; nested exception is: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createApplicationContext(ContextJndiBeanFactoryLocator.java:102)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createBeanFactory(ContextJndiBeanFactoryLocator.java:90)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:68)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:118)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:66)
at org.openhie.openempi.ejb.BaseSpringInjectableBean.init(BaseSpringInjectableBean.java:45)
at org.openhie.openempi.ejb.SpringInjectionInterceptor.myBeanInterceptor(SpringInjectionInterceptor.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
at $Proxy0.authenticate(Unknown Source)
at org.openhie.openempi.ejb.util.SimpleTest.getSessionKey(SimpleTest.java:86)
at org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
at $Proxy0.authenticate(Unknown Source)
at org.openhie.openempi.ejb.util.SimpleTest.getSessionKey(SimpleTest.java:86)
at org.openhie.openempi.ejb.util.SimpleTest.testAddPerson(SimpleTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.io.FileNotFoundException: class path resource [applicationContext-resources.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createApplicationContext(ContextJndiBeanFactoryLocator.java:102)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.createBeanFactory(ContextJndiBeanFactoryLocator.java:90)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:68)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:118)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:66)
at org.openhie.openempi.ejb.BaseSpringInjectableBean.init(BaseSpringInjectableBean.java:45)
at org.openhie.openempi.ejb.SpringInjectionInterceptor.myBeanInterceptor(SpringInjectionInterceptor.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)

How can I resolve these?
These xmls are in the core module's resource section, and I think they should present in the war file residing in the ear package. Should I supply own resources for this test?
 
Posted: January 31, 2012 22:53 by prami
Hi ,
I am new to open empi and facing the below issue while deploying jboss server.
please help me to know the best solution to come out of this issue.


here is the log:

2012-01-30 18:58:26,789 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42P01
2012-01-30 18:58:26,789 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: relation "audit_event_type" does not exist
2012-01-30 18:58:26,790 DEBUG [org.hibernate.jdbc.ConnectionManager] transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
2012-01-30 18:58:26,791 DEBUG [org.springframework.orm.hibernate3.SessionFactoryUtils] Closing Hibernate Session
2012-01-30 18:58:26,791 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2012-01-30 18:58:26,791 DEBUG [org.hibernate.jdbc.ConnectionManager] transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
2012-01-30 18:58:26,809 ERROR [org.openhie.openempi.context.Context] Failed while setting up the context for OpenEMPI: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'context' defined in URL [file:CHmmmopenpixpdq/2012/openempi-2.2.0-openempi/openempi-2.2.0/conf/applicationContext-service.xml]: Cannot resolve reference to bean 'auditEventService' while setting bean property 'auditEventService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditEventService' defined in URL [file:CHmmmopenpixpdq/2012/openempi-2.2.0-openempi/openempi-2.2.0/conf/applicationContext-service.xml]: Invocation of init method failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'context' defined in URL [file:CHmmmopenpixpdq/2012/openempi-2.2.0-openempi/openempi-2.2.0/conf/applicationContext-service.xml]: Cannot resolve reference to bean 'auditEventService' while setting bean property 'auditEventService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditEventService' defined in URL [file:CHmmmopenpixpdq/2012/openempi-2.2.0-openempi/openempi-2.2.0/conf/applicationContext-service.xml]: Invocation of init method failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)

would be greatly appreciate someone can look into this and get back to me.

Thank you
prameela
pothuguntap@gmail.com



 
Posted: February 06, 2012 04:36 by Csaba Toth
This error message means that the database of the test probably doesn't have the right schema.
What commands you issue when you get this? Which OpenEMPI version do you use? Are you sure you use the same version of database schema as the version of the OpenEMPI? (although that relation is there since early versions of OpenEMPI).

You say that you get this error message when you deploy? What series of actions you did?
 
Posted: July 27, 2010 16:42 by Csaba Toth
Ok, so I moved these files from core/src/test/resources to ejb/src/test/reosurces:
applicationContext-resources.xml
applicationContext-test.xml
jdbc.properties
log4j.xml
mail.properties

But I still get the exceptions about missing application-*.xml files and such. But if I move these files to ejb/src/main/resources instead of test resources, then I can get things to work, although there are still problems, for example blocking service is not started and stuff.
I don't think that it is good to move these files to ejb/src/main/resources, and seemingly it's not perfect (certain not started core services), but what can I do? Instead of moving files can I just tweak the classpath somehow? Where/how/what to set it???

Debug output for testHello (if I uncomment getPersonManagerService):
DEBUG - org.openhie.openempi.ejb.util.ServiceLocator.getSecurityService(29) | Looking up an instance of the person using: SecurityService/remote
DEBUG - org.openhie.openempi.ejb.util.ServiceLocator.getSecurityService(31) | Obtained an instance of the security service: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=SecurityService,service=EJB3
Obtained a session key of 784DCA6A610540B1EB6D0893A92CF15B
DEBUG - org.openhie.openempi.ejb.util.ServiceLocator.getPersonManagerService(22) | Looking up an instance of the person manager using: PersonManagerService/remote
DEBUG - org.openhie.openempi.ejb.util.ServiceLocator.getPersonManagerService(24) | Obtained an instance of the person manager service: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonManagerService,service=EJB3


debug output in the JBoss console (remember, that I can only deploy the ear manually, because Eclipse plugin misses the application.xml):
11:37:01,386 INFO [EARDeployer] Init J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
11:37:12,169 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.google.gwt.junit.server.JUnitHostImpl
11:37:12,367 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
11:37:12,375 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonManagerS
ervice,service=EJB3 with dependencies:
11:37:12,420 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonManagerServiceBean ejbName: PersonManagerService
11:37:12,488 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
11:37:12,489 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=PersonQuerySer
vice,service=EJB3 with dependencies:
11:37:12,500 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.person.PersonQueryServiceBean ejbName: PersonQueryService
11:37:12,519 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
11:37:12,520 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=openempi-2.0.5.ear,jar=openempi-ejb-2.0.5.jar,name=SecurityServic
e,service=EJB3 with dependencies:
11:37:12,528 INFO [EJBContainer] STARTED EJB: org.openhie.openempi.ejb.security.SecurityServiceBean ejbName: SecurityService
11:37:12,536 INFO [EJB3Deployer] Deployed: fileHmmmCHmmmjboss/server/default/tmp/deploy/tmp7307290186688511560openempi-2.0.5.ear-contents/opene
mpi-ejb-2.0.5.jar
11:37:12,549 INFO [TomcatDeployer] deploy, ctxPath=/openempi-admin, warUrl=.../tmp/deploy/tmp7307290186688511560openempi-2.0.5.ear-contents
/openempi-webapp-web-2.0.5-exp.war/
11:37:21,886 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_1_0_, this_.audit_event_type_code as audit2_1_0_, this_.au
dit_event_type_description as audit3_1_0_, this_.audit_event_type_name as audit4_1_0_ from audit_event_type this_
11:37:23,821 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_42_0_, this_.audit_event_type_code as audit2_42_0_, this_.
audit_event_type_description as audit3_42_0_, this_.audit_event_type_name as audit4_42_0_ from audit_event_type this_
11:37:25,643 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_83_0_, this_.audit_event_type_code as audit2_83_0_, this_.
audit_event_type_description as audit3_83_0_, this_.audit_event_type_name as audit4_83_0_ from audit_event_type this_
11:37:25,700 INFO [EARDeployer] Started J2EE application: fileHmmmCHmmmjboss/server/default/deploy/openempi-2.0.5.ear
11:37:45,055 INFO [STDOUT] DEBUG - org.openhie.openempi.ejb.SpringInjectionInterceptor.myBeanInterceptor(33) | Doing the AroundInvoke for b
ean: class org.openhie.openempi.ejb.security.SecurityServiceBean
11:37:45,056 INFO [STDOUT] DEBUG - org.openhie.openempi.ejb.BaseSpringInjectableBean.init(43) | init invoked.
11:37:46,930 INFO [STDOUT] INFO - org.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(34) | Transaction strategy: o
rg.springframework.orm.hibernate3.SpringTransactionFactory
11:37:46,932 INFO [STDOUT] INFO - org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(33) | No Transactio
nManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:37:47,757 INFO [STDOUT] DEBUG - org.openhie.openempi.ejb.BaseSpringInjectableBean.onEjbCreate(37) | onEjbCreate was invoked via SpringIn
jectionInterceptor. The bean factory is org.springframework.context.support.ClassPathXmlApplicationContext@3ac52ffa: display name [org.sprin
gframework.context.support.ClassPathXmlApplicationContext@3ac52ffa]; startup date [Tue Jul 27 11:37:45 CDT 2010]; root of context hierarchy
11:37:48,134 INFO [STDOUT] DEBUG - org.openhie.openempi.configuration.Configuration.loadConfigurationFromSource(303) | Checking for presenc
e of the configuration in file: C:\jboss\bin\mpi-config.xml
11:37:48,136 INFO [STDOUT] INFO - org.openhie.openempi.configuration.Configuration.loadConfigurationFromSource(305) | Loading configuration
from file: C:\jboss\bin\mpi-config.xml
11:37:48,545 INFO [STDOUT] TRACE - org.openhie.openempi.configuration.Configuration.processBlockingConfiguration(217) | Looking for blockin
g field named custom1
11:37:48,586 INFO [STDOUT] INFO - org.openhie.openempi.configuration.Configuration.init(64) | System configuration: org.openhie.openempi.co
nfiguration.Configuration@4bb32c5[customFields=[org.openhie.openempi.configuration.CustomField@1e0225f0[fieldName=custom1,sourceFieldName=fa
milyName,transformationFunctionNameGrinoubleMetaphone], org.openhie.openempi.configuration.CustomField@1f08bef4[fieldName=custom2,sourceFieldN
ame=givenName,transformationFunctionNameGrinoubleMetaphone], org.openhie.openempi.configuration.CustomField@77309516[fieldName=bcustom1,source
FieldName=familyName,transformationFunctionName=FastNgrammingBloomFilter], org.openhie.openempi.configuration.CustomField@168c147c[fieldName
=bcustom2,sourceFieldName=givenName,transformationFunctionName=FastNgrammingBloomFilter]]]
11:37:48,602 INFO [STDOUT] DEBUG - org.openhie.openempi.matching.fellegisunter.ProbabilisticMatchingService.loadConfiguration(424) | Connot
load configuration because the Context.Configuration is null
11:37:48,622 INFO [STDOUT] TRACE - org.openhie.openempi.blocking.impl.BlockingServiceImpl.init(47) | Initializing the Blocking Service
11:37:48,695 INFO [STDOUT] TRACE - org.openhie.openempi.blocking.impl.BlockingBypassServiceImpl.init(38) | Initializing the Blocking Bypass
Service
11:37:48,808 INFO [STDOUT] INFO - org.openhie.openempi.service.impl.AuditEventServiceImpl.init(27) | Initializing the Audit Event Service.
11:37:48,954 INFO [STDOUT] DEBUG - org.hibernate.jdbc.AbstractBatcher.log(401) | select this_.audit_event_type_cd as audit1_1_0_, this_.aud
it_event_type_code as audit2_1_0_, this_.audit_event_type_description as audit3_1_0_, this_.audit_event_type_name as audit4_1_0_ from audit_
event_type this_
11:37:48,957 INFO [STDOUT] Hibernate: select this_.audit_event_type_cd as audit1_1_0_, this_.audit_event_type_code as audit2_1_0_, this_.au
dit_event_type_description as audit3_1_0_, this_.audit_event_type_name as audit4_1_0_ from audit_event_type this_
11:37:49,034 INFO [STDOUT] DEBUG - org.openhie.openempi.service.impl.AuditEventServiceImpl.init(33) | Built the map of audit event types wi
th count of 10
11:37:49,058 INFO [STDOUT] DEBUG - org.openhie.openempi.ejb.security.SecurityServiceBean.authenticate(36) | Received an authentication requ
est from user admin
11:37:49,060 INFO [STDOUT] TRACE - org.openhie.openempi.context.Context.getUserContext(87) | userContext is null. Creating new userContext
11:37:49,062 INFO [STDOUT] TRACE - org.openhie.openempi.context.Context.setUserContext(96) | Setting user context org.openhie.openempi.cont
ext.UserContext@3ea948c2
11:37:49,096 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(54) | begin
11:37:49,161 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(59) | current autocommit status: true
11:37:49,164 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(62) | disabling autocommit
11:37:49,170 INFO [STDOUT] DEBUG - org.openhie.openempi.service.impl.UserManagerImpl.authenticate(86) | Authentication request for user with username: admin
11:37:49,184 INFO [STDOUT] DEBUG - org.hibernate.jdbc.AbstractBatcher.log(401) | select user0_.id as id17_, user0_.account_expired as accou
nt2_17_, user0_.account_locked as account3_17_, user0_.address as address17_, user0_.city as city17_, user0_.country as country17_, user0_.p
ostal_code as postal7_17_, user0_.province as province17_, user0_.credentials_expired as credenti9_17_, user0_.email as email17_, user0_.acc
ount_enabled as account11_17_, user0_.first_name as first12_17_, user0_.last_name as last13_17_, user0_.password as password17_, user0_.pass
word_hint as password15_17_, user0_.phone_number as phone16_17_, user0_.username as username17_, user0_.version as version17_, user0_.websit
e as website17_ from app_user user0_ where user0_.username=?
11:37:49,187 INFO [STDOUT] Hibernate: select user0_.id as id17_, user0_.account_expired as account2_17_, user0_.account_locked as account3_
17_, user0_.address as address17_, user0_.city as city17_, user0_.country as country17_, user0_.postal_code as postal7_17_, user0_.province
as province17_, user0_.credentials_expired as credenti9_17_, user0_.email as email17_, user0_.account_enabled as account11_17_, user0_.first
_name as first12_17_, user0_.last_name as last13_17_, user0_.password as password17_, user0_.password_hint as password15_17_, user0_.phone_n
umber as phone16_17_, user0_.username as username17_, user0_.version as version17_, user0_.website as website17_ from app_user user0_ where
user0_.username=?
11:37:49,546 INFO [STDOUT] DEBUG - org.hibernate.jdbc.AbstractBatcher.log(401) | select roles0_.user_id as user1_1_, roles0_.role_id as rol
e2_1_, role1_.id as id16_0_, role1_.description as descript2_16_0_, role1_.name as name16_0_ from user_role roles0_ left outer join role rol
e1_ on roles0_.role_id=role1_.id where roles0_.user_id=?
11:37:49,547 INFO [STDOUT] Hibernate: select roles0_.user_id as user1_1_, roles0_.role_id as role2_1_, role1_.id as id16_0_, role1_.descrip
tion as descript2_16_0_, role1_.name as name16_0_ from user_role roles0_ left outer join role role1_ on roles0_.role_id=role1_.id where role
s0_.user_id=?
11:37:49,773 INFO [STDOUT] TRACE - org.openhie.openempi.dao.hibernate.UserDaoHibernate.loadUserByUsername(97) | User admin has authority: R
OLE_ADMIN
11:37:49,775 INFO [STDOUT] TRACE - org.openhie.openempi.dao.hibernate.UserDaoHibernate.loadUserByUsername(97) | User admin has authority: R
OLE_USER
11:37:49,781 INFO [STDOUT] DEBUG - org.openhie.openempi.service.impl.UserManagerImpl.authenticate(99) | Encrypted password is d033e22ae348a
eb5660fc2140aec35850c4da997 as opposed to d033e22ae348aeb5660fc2140aec35850c4da997
11:37:49,783 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.commit(103) | commit
11:37:49,794 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(193) | re-enabling autocommit
11:37:49,795 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.commit(116) | committed JDBC Connection
11:37:49,799 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(54) | begin
11:37:49,849 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(59) | current autocommit status: true
11:37:49,850 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.begin(62) | disabling autocommit
11:37:49,853 INFO [STDOUT] DEBUG - org.openhie.openempi.dao.hibernate.UserSessionDaoHibernate.saveUserSession(47) | Saving session record:
org.openhie.openempi.model.UserSession@3f7a04af[sessionId=<null>,sessionKey=784DCA6A610540B1EB6D0893A92CF15B,user=org.openhie.openempi.model
.User@2984747e[username=admin,enabled=true,accountExpired=false,credentialsExpired=false,accountLocked=false],dateCreated=Tue Jul 27 11:37:4
9 CDT 2010]
11:37:49,858 INFO [STDOUT] DEBUG - org.hibernate.jdbc.AbstractBatcher.log(401) | select nextval ('public.user_session_seq')
11:37:49,859 INFO [STDOUT] Hibernate: select nextval ('public.user_session_seq')
11:37:49,919 INFO [STDOUT] DEBUG - org.openhie.openempi.dao.hibernate.UserSessionDaoHibernate.saveUserSession(49) | Finished saving the ses
sion.
11:37:49,922 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.commit(103) | commit
11:37:49,933 INFO [STDOUT] DEBUG - org.hibernate.jdbc.AbstractBatcher.log(401) | insert into user_session (date_created, session_key, user_
id, session_id) values (?, ?, ?, ?)
11:37:49,933 INFO [STDOUT] Hibernate: insert into user_session (date_created, session_key, user_id, session_id) values (?, ?, ?, ?)
11:37:50,253 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(193) | re-enabling autocommit
11:37:50,255 INFO [STDOUT] DEBUG - org.hibernate.transaction.JDBCTransaction.commit(116) | committed JDBC Connection
11:37:50,258 INFO [STDOUT] DEBUG - org.openhie.openempi.context.UserContext.authenticate(43) | Authentication request succeeded for user ad
min
showing 1 - 10 of 10
Replies: 9 - Last Post: February 06, 2012 04:36
by: Csaba Toth
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close