.EAR with .war and .jar Beans not bound
nschweig Oct 8, 2009 1:19 PMHi,
I have got an .EAR that contains a .war and a .jar file.
There appear no errors when I start the server.
First I have to use a bean that puts test-data in my db. Then a exception appears that the bean is not bound.
If I use my application by deploying two separate projects with eclipse everything is fine.
this is my application.xml
<?xml version="1.0" encoding="UTF-8"?> <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5"> <display-name>CMT</display-name> <module> <ejb>CMT_ejb.jar</ejb> </module> <module> <web> <web-uri>CMT_web.war</web-uri> <context-root>CMT_web</context-root> </web> </module> </application>
And this is the output when I start the server:
19:11:49,000 INFO [ServerImpl] Starting JBoss (Microcontainer)... 19:11:49,000 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221) 19:11:49,000 INFO [ServerImpl] Bootstrap URL: null 19:11:49,000 INFO [ServerImpl] Home Dir: C:\jboss-5.0.1.GA 19:11:49,000 INFO [ServerImpl] Home URL: file:/C:/jboss-5.0.1.GA/ 19:11:49,000 INFO [ServerImpl] Library URL: file:/C:/jboss-5.0.1.GA/lib/ 19:11:49,000 INFO [ServerImpl] Patch URL: null 19:11:49,000 INFO [ServerImpl] Common Base URL: file:/C:/jboss-5.0.1.GA/common/ 19:11:49,000 INFO [ServerImpl] Common Library URL: file:/C:/jboss-5.0.1.GA/common/lib/ 19:11:49,015 INFO [ServerImpl] Server Name: default 19:11:49,015 INFO [ServerImpl] Server Base Dir: C:\jboss-5.0.1.GA\server 19:11:49,015 INFO [ServerImpl] Server Base URL: file:/C:/jboss-5.0.1.GA/server/ 19:11:49,015 INFO [ServerImpl] Server Config URL: file:/C:/jboss-5.0.1.GA/server/default/conf/ 19:11:49,015 INFO [ServerImpl] Server Home Dir: C:\jboss-5.0.1.GA\server\default 19:11:49,015 INFO [ServerImpl] Server Home URL: file:/C:/jboss-5.0.1.GA/server/default/ 19:11:49,015 INFO [ServerImpl] Server Data Dir: C:\jboss-5.0.1.GA\server\default\data 19:11:49,015 INFO [ServerImpl] Server Library URL: file:/C:/jboss-5.0.1.GA/server/default/lib/ 19:11:49,015 INFO [ServerImpl] Server Log Dir: C:\jboss-5.0.1.GA\server\default\log 19:11:49,015 INFO [ServerImpl] Server Native Dir: C:\jboss-5.0.1.GA\server\default\tmp\native 19:11:49,015 INFO [ServerImpl] Server Temp Dir: C:\jboss-5.0.1.GA\server\default\tmp 19:11:49,015 INFO [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.0.1.GA\server\default\tmp\deploy 19:11:50,000 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/jboss-5.0.1.GA/server/default/conf/bootstrap.xml 19:11:50,859 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache] 19:11:50,859 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]] 19:11:51,328 INFO [CopyMechanism] VFS temp dir: C:\jboss-5.0.1.GA\server\default\tmp 19:11:51,328 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled. 19:11:52,984 INFO [ServerInfo] Java version: 1.5.0_14,Sun Microsystems Inc. 19:11:52,984 INFO [ServerInfo] Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) 19:11:52,984 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_14-b03,Sun Microsystems Inc. 19:11:52,984 INFO [ServerInfo] OS-System: Windows XP 5.1,x86 19:11:53,031 INFO [JMXKernel] Legacy JMX core initialized 19:11:56,078 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@966905(root=C:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]) 19:11:56,078 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@966905(root=C:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]) 19:11:56,078 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@fd981a{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]} 19:11:58,406 INFO [WebService] Using RMI server codebase: http://localhost:8083/ 19:12:07,531 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core 19:12:07,531 INFO [NativeServerConfig] 3.0.5.GA 19:12:22,281 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@15453997{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/CMT.ear/CMT_ejb.jar/} 19:12:22,281 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@15453997{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/CMT.ear/CMT_ejb.jar/} 19:12:22,281 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@15453997{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/CMT.ear/CMT_ejb.jar/} 19:12:22,281 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@15453997{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/CMT.ear/CMT_ejb.jar/} 19:12:26,390 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector 19:12:26,671 INFO [MailService] Mail Service bound to java:/Mail 19:12:30,468 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this. 19:12:30,484 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent 19:12:30,812 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc. 19:12:30,812 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer 19:12:31,250 INFO [TransactionManagerService] Initializing recovery manager 19:12:31,562 INFO [TransactionManagerService] Recovery manager configured 19:12:31,562 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference 19:12:31,609 INFO [TransactionManagerService] Starting transaction recovery manager 19:12:32,859 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080 19:12:32,875 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009 19:12:32,875 INFO [StandardService] Starting service jboss.web 19:12:32,875 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA 19:12:33,000 INFO [Catalina] Server startup in 307 ms 19:12:33,062 INFO [TomcatDeployment] deploy, ctxPath=/web-console 19:12:35,421 INFO [TomcatDeployment] deploy, ctxPath=/jbossws 19:12:35,531 INFO [TomcatDeployment] deploy, ctxPath=/invoker 19:12:35,859 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml 19:12:35,890 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml 19:12:35,953 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml 19:12:35,984 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml 19:12:36,031 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml 19:12:36,218 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main 19:12:36,265 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created. 19:12:36,281 INFO [RAMJobStore] RAMJobStore initialized. 19:12:36,281 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 19:12:36,281 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2 19:12:36,281 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 19:12:36,515 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=TitanDS' to JNDI name 'java:TitanDS' 19:12:36,656 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=cmt' to JNDI name 'java:cmt' 19:12:36,812 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=databaselogin' to JNDI name 'java:databaselogin' 19:12:36,937 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=handlingtest' to JNDI name 'java:handlingtest' 19:12:37,640 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS' 19:12:38,562 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started 19:12:39,640 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds 19:12:39,640 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@183a9a started 19:12:39,703 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000 19:12:39,703 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover 19:12:39,703 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing 19:12:39,734 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds 19:12:39,734 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@16f803c started 19:12:39,750 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000 19:12:39,781 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds 19:12:39,781 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@4b862 started 19:12:40,015 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA' 19:12:40,062 INFO [TomcatDeployment] deploy, ctxPath=/ 19:12:40,203 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console 19:12:42,187 INFO [JBossASKernel] Created KernelDeployment for: CMT_ejb.jar 19:12:42,187 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=ModelTestHandler,service=EJB3 19:12:42,187 INFO [JBossASKernel] with dependencies: 19:12:42,187 INFO [JBossASKernel] and demands: 19:12:42,187 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,187 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,187 INFO [JBossASKernel] and supplies: 19:12:42,187 INFO [JBossASKernel] jndi:CMT/ModelTestHandler/remote-de.cmt.beans.test.ModelTestRemote 19:12:42,203 INFO [JBossASKernel] jndi:CMT/ModelTestHandler/remote 19:12:42,203 INFO [JBossASKernel] Class:de.cmt.beans.test.ModelTestRemote 19:12:42,203 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=ModelTestHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,203 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=AppointmentHandler,service=EJB3 19:12:42,203 INFO [JBossASKernel] with dependencies: 19:12:42,203 INFO [JBossASKernel] and demands: 19:12:42,203 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,203 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,203 INFO [JBossASKernel] and supplies: 19:12:42,203 INFO [JBossASKernel] jndi:CMT/AppointmentHandler/remote-de.cmt.server.ejb.appointmentManagement.AppointmentHandlerRemote 19:12:42,203 INFO [JBossASKernel] jndi:CMT/AppointmentHandler/remote 19:12:42,203 INFO [JBossASKernel] Class:de.cmt.server.ejb.appointmentManagement.AppointmentHandlerRemote 19:12:42,203 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=AppointmentHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,218 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 19:12:42,218 INFO [JBossASKernel] with dependencies: 19:12:42,218 INFO [JBossASKernel] and demands: 19:12:42,218 INFO [JBossASKernel] jndi:CMT/GroupHandler/remote-de.cmt.server.ejb.groupManagement.GroupHandlerRemote 19:12:42,218 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,218 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,218 INFO [JBossASKernel] and supplies: 19:12:42,218 INFO [JBossASKernel] jndi:CMT/CourseHandler/remote 19:12:42,218 INFO [JBossASKernel] Class:de.cmt.server.ejb.courseManagement.CourseHandlerRemote 19:12:42,218 INFO [JBossASKernel] jndi:CMT/CourseHandler/remote-de.cmt.server.ejb.courseManagement.CourseHandlerRemote 19:12:42,218 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,218 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=EventInformationHandler,service=EJB3 19:12:42,218 INFO [JBossASKernel] with dependencies: 19:12:42,218 INFO [JBossASKernel] and demands: 19:12:42,218 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,218 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,218 INFO [JBossASKernel] and supplies: 19:12:42,218 INFO [JBossASKernel] jndi:CMT/EventInformationHandler/remote-de.cmt.server.ejb.eventInformationManagement.EventInformationHandlerRemote 19:12:42,218 INFO [JBossASKernel] Class:de.cmt.server.ejb.eventInformationManagement.EventInformationHandlerRemote 19:12:42,218 INFO [JBossASKernel] jndi:CMT/EventInformationHandler/remote 19:12:42,234 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=EventInformationHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,234 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 19:12:42,234 INFO [JBossASKernel] with dependencies: 19:12:42,234 INFO [JBossASKernel] and demands: 19:12:42,234 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,234 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,234 INFO [JBossASKernel] and supplies: 19:12:42,234 INFO [JBossASKernel] Class:de.cmt.server.ejb.groupManagement.GroupHandlerRemote 19:12:42,234 INFO [JBossASKernel] jndi:CMT/GroupHandler/remote-de.cmt.server.ejb.groupManagement.GroupHandlerRemote 19:12:42,234 INFO [JBossASKernel] jndi:CMT/GroupHandler/remote 19:12:42,234 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,234 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=UserHandler,service=EJB3 19:12:42,234 INFO [JBossASKernel] with dependencies: 19:12:42,234 INFO [JBossASKernel] and demands: 19:12:42,234 INFO [JBossASKernel] persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,234 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService 19:12:42,234 INFO [JBossASKernel] and supplies: 19:12:42,234 INFO [JBossASKernel] jndi:CMT/UserHandler/remote 19:12:42,234 INFO [JBossASKernel] Class:de.cmt.server.ejb.userManagement.UserHandlerRemote 19:12:42,234 INFO [JBossASKernel] jndi:CMT/UserHandler/remote-de.cmt.server.ejb.userManagement.UserHandlerRemote 19:12:42,234 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=UserHandler,service=EJB3) to KernelDeployment of: CMT_ejb.jar 19:12:42,406 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:42,515 INFO [Version] Hibernate Annotations 3.4.0.GA 19:12:42,546 INFO [Environment] Hibernate 3.3.1.GA 19:12:42,562 INFO [Environment] hibernate.properties not found 19:12:42,562 INFO [Environment] Bytecode provider name : javassist 19:12:42,578 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling 19:12:42,843 INFO [Version] Hibernate Commons Annotations 3.1.0.GA 19:12:42,859 INFO [Version] Hibernate EntityManager 3.4.0.GA 19:12:43,000 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null. 19:12:43,171 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.Course 19:12:43,312 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.Course on table Course 19:12:43,593 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.Appointment 19:12:43,593 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.Appointment on table Appointment 19:12:43,609 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.ContactInformation 19:12:43,609 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.ContactInformation on table ContactInformation 19:12:43,609 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.CmtUser 19:12:43,609 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.CmtUser on table cmtuser 19:12:43,640 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.CmtGroup 19:12:43,640 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.CmtGroup on table CmtGroup 19:12:43,640 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.EventInformation 19:12:43,640 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.EventInformation on table EventInformation 19:12:43,656 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.Role 19:12:43,656 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.Role on table Role 19:12:43,656 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.AppointmentRequest 19:12:43,656 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.AppointmentRequest on table AppointmentRequest 19:12:43,656 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.RoleRequest 19:12:43,656 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.RoleRequest on table RoleRequest 19:12:43,671 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.AppointmentOffer 19:12:43,671 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.AppointmentOffer on table AppointmentOffer 19:12:43,671 INFO [AnnotationBinder] Binding entity from annotated class: de.cmt.server.ejb.persistenceManagement.EventInformationUser 19:12:43,671 INFO [EntityBinder] Bind entity de.cmt.server.ejb.persistenceManagement.EventInformationUser on table EventInformationUser 19:12:43,890 INFO [CollectionBinder] Mapping collection: de.cmt.server.ejb.persistenceManagement.Course.groups -> CmtGroup 19:12:43,906 INFO [Version] Hibernate Validator 3.1.0.GA 19:12:44,062 INFO [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled. 19:12:44,171 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider 19:12:44,187 INFO [InjectedDataSourceConnectionProvider] Using provided datasource 19:12:45,703 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.45-community-nt 19:12:45,703 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.8 ( Revision: ${svn.Revision} ) 19:12:45,750 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect 19:12:45,765 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory 19:12:45,781 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup 19:12:45,781 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup 19:12:45,781 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled 19:12:45,781 INFO [SettingsFactory] Automatic session close at end of transaction: disabled 19:12:45,796 INFO [SettingsFactory] JDBC batch size: 15 19:12:45,796 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled 19:12:45,796 INFO [SettingsFactory] Scrollable result sets: enabled 19:12:45,796 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled 19:12:45,796 INFO [SettingsFactory] Connection release mode: auto 19:12:45,812 INFO [SettingsFactory] Maximum outer join fetch depth: 2 19:12:45,812 INFO [SettingsFactory] Default batch fetch size: 1 19:12:45,812 INFO [SettingsFactory] Generate SQL with comments: disabled 19:12:45,812 INFO [SettingsFactory] Order SQL updates by primary key: disabled 19:12:45,812 INFO [SettingsFactory] Order SQL inserts for batching: disabled 19:12:45,812 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 19:12:45,812 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory 19:12:45,812 INFO [SettingsFactory] Query language substitutions: {} 19:12:45,812 INFO [SettingsFactory] JPA-QL strict compliance: enabled 19:12:45,812 INFO [SettingsFactory] Second-level cache: enabled 19:12:45,812 INFO [SettingsFactory] Query cache: disabled 19:12:45,843 INFO [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge 19:12:45,843 INFO [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider 19:12:45,843 INFO [SettingsFactory] Optimize cache for minimal puts: disabled 19:12:45,843 INFO [SettingsFactory] Cache region prefix: persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:45,843 INFO [SettingsFactory] Structured second-level cache entries: disabled 19:12:45,859 INFO [SettingsFactory] Statistics: disabled 19:12:45,859 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled 19:12:45,859 INFO [SettingsFactory] Default entity-mode: pojo 19:12:45,859 INFO [SettingsFactory] Named query checking : enabled 19:12:45,984 INFO [SessionFactoryImpl] building session factory 19:12:46,593 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:46,593 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} 19:12:46,625 INFO [NamingHelper] Creating subcontext: persistence.unit:unitName=CMT.ear 19:12:46,640 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=CMT.ear/CMT_ejb.jar#cmt 19:12:46,640 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext 19:12:46,718 INFO [SchemaExport] Running hbm2ddl schema export 19:12:46,718 INFO [SchemaExport] exporting generated schema to database 19:12:47,656 INFO [SchemaExport] schema export complete 19:12:47,687 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} 19:12:48,234 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=AppointmentHandler,service=EJB3 19:12:48,265 INFO [EJBContainer] STARTED EJB: de.cmt.server.ejb.appointmentManagement.AppointmentHandler ejbName: AppointmentHandler 19:12:48,328 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=UserHandler,service=EJB3 19:12:48,328 INFO [EJBContainer] STARTED EJB: de.cmt.server.ejb.userManagement.UserHandler ejbName: UserHandler 19:12:48,359 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=EventInformationHandler,service=EJB3 19:12:48,359 INFO [EJBContainer] STARTED EJB: de.cmt.server.ejb.eventInformationManagement.EventInformationHandler ejbName: EventInformationHandler 19:12:48,390 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=GroupHandler,service=EJB3 19:12:48,390 INFO [EJBContainer] STARTED EJB: de.cmt.server.ejb.groupManagement.GroupHandler ejbName: GroupHandler 19:12:48,421 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=ModelTestHandler,service=EJB3 19:12:48,421 INFO [EJBContainer] STARTED EJB: de.cmt.beans.test.ModelTestHandler ejbName: ModelTestHandler 19:12:48,468 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/ModelTestHandler/remote - EJB3.x Default Remote Business Interface CMT/ModelTestHandler/remote-de.cmt.beans.test.ModelTestRemote - EJB3.x Remote Business Interface 19:12:48,546 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/GroupHandler/remote - EJB3.x Default Remote Business Interface CMT/GroupHandler/remote-de.cmt.server.ejb.groupManagement.GroupHandlerRemote - EJB3.x Remote Business Interface 19:12:48,734 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=CMT.ear,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3 19:12:48,734 INFO [EJBContainer] STARTED EJB: de.cmt.server.ejb.courseManagement.CourseHandler ejbName: CourseHandler 19:12:48,781 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/CourseHandler/remote - EJB3.x Default Remote Business Interface CMT/CourseHandler/remote-de.cmt.server.ejb.courseManagement.CourseHandlerRemote - EJB3.x Remote Business Interface 19:12:48,796 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/EventInformationHandler/remote - EJB3.x Default Remote Business Interface CMT/EventInformationHandler/remote-de.cmt.server.ejb.eventInformationManagement.EventInformationHandlerRemote - EJB3.x Remote Business Interface 19:12:48,812 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/UserHandler/remote - EJB3.x Default Remote Business Interface CMT/UserHandler/remote-de.cmt.server.ejb.userManagement.UserHandlerRemote - EJB3.x Remote Business Interface 19:12:48,859 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: CMT/AppointmentHandler/remote - EJB3.x Default Remote Business Interface CMT/AppointmentHandler/remote-de.cmt.server.ejb.appointmentManagement.AppointmentHandlerRemote - EJB3.x Remote Business Interface 19:12:51,078 INFO [TomcatDeployment] deploy, ctxPath=/CMT_web 19:12:55,562 WARN [config] JSF1058: The resource referred to by to-view-id, 'app/eventinformation/show_infopage.jsf', for navigation from '/*', does not start with '/'. This will be added for you, but it should be corrected. 19:12:55,718 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory 19:12:55,734 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.sun.faces.duplicateJARPattern=^tmp\d+(\S*\.jar), com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider, facelets.LIBRARIES=/WEB-INF/facelet_tags/customtags.taglib.xml, com.sun.faces.validateXml=true, facelets.SKIP_COMMENTS=true, facelets.DEVELOPMENT=true, facelets.REFRESH_PERIOD=2, org.richfaces.SKIN=blueSky, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml,/WEB-INF/faces-beans.xml,/WEB-INF/navigation.xml, javax.faces.DEFAULT_SUFFIX=.xhtml, javax.faces.STATE_SAVING_METHOD=client} 19:12:55,734 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity 19:12:55,781 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory 19:12:55,781 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {com.sun.faces.duplicateJARPattern=^tmp\d+(\S*\.jar), com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider, facelets.LIBRARIES=/WEB-INF/facelet_tags/customtags.taglib.xml, com.sun.faces.validateXml=true, facelets.SKIP_COMMENTS=true, facelets.DEVELOPMENT=true, facelets.REFRESH_PERIOD=2, org.richfaces.SKIN=blueSky, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml,/WEB-INF/faces-beans.xml,/WEB-INF/navigation.xml, javax.faces.DEFAULT_SUFFIX=.xhtml, javax.faces.STATE_SAVING_METHOD=client} 19:12:55,796 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity 19:12:55,875 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080 19:12:55,921 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009 19:12:55,937 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 1m:6s:922ms
Then I try to use my session bean to put the data in the database.
InsertTestData.java
public class InsertTestData { public static void main(String[] args) { Context context; try { context = new InitialContext(); ModelTestRemote mTHandler = (ModelTestRemote)context.lookup(ModelTestHandler.RemoteJNDIName); mTHandler.createUser(); mTHandler.createCourses(); mTHandler.createGroups(); mTHandler.createAppointments(); mTHandler.createAppointmentOffers(); } catch (NamingException e) { e.printStackTrace(); throw new RuntimeException(e); } } }
This is the Bean (a part of it with the JNDI-constant):
public @Stateful class ModelTestHandler implements ModelTestRemote { @PersistenceContext(unitName="cmt") EntityManager em; @IgnoreDependency @EJB() private EventInformationHandlerRemote eventInformationHandler; public static final String RemoteJNDIName = ModelTestHandler.class.getSimpleName() + "/remote";
And this is the errors that appears:
javax.naming.NameNotFoundException: ModelTestHandler not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) at org.jnp.server.NamingServer.getObject(NamingServer.java:785) at org.jnp.server.NamingServer.lookup(NamingServer.java:396) at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682) at javax.naming.InitialContext.lookup(InitialContext.java:351) at de.cmt.beans.test.InsertTestData.main(InsertTestData.java:14) Exception in thread "main" java.lang.RuntimeException: javax.naming.NameNotFoundException: ModelTestHandler not bound at de.cmt.beans.test.InsertTestData.main(InsertTestData.java:24) Caused by: javax.naming.NameNotFoundException: ModelTestHandler not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) at org.jnp.server.NamingServer.getObject(NamingServer.java:785) at org.jnp.server.NamingServer.lookup(NamingServer.java:396) at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682) at javax.naming.InitialContext.lookup(InitialContext.java:351) at de.cmt.beans.test.InsertTestData.main(InsertTestData.java:14)
Can anyone please help me?
Thanks a lot
NSchweig