0 Replies Latest reply on May 24, 2006 5:35 PM by Marcin Niebudek

    Seam RC3 with EJB3 on Tomcat and MySQL persistence problem

    Marcin Niebudek Newbie

      For few days I've been trying to setup simple test application using Seam RC3, Tomcat 5.5 and MySQL 5.0 (with MySQL Connector/J 3.1.12). I'm new to Seam and EJB3, and I can't figure out where I go wrong.

      My test app consists of two classes:

      @Entity
      @Name("project")
      @Table(name = "projects")
      public class Project implements Serializable {
      
       private static final long serialVersionUID = 4685193177697726683L;
      
       private int id;
       private String name;
      
       @Id @Column(name = "PROJECT_ID")
       public int getId() {
       return id;
       }
       public void setId(int id) {
       this.id = id;
       }
      
       @Column(name = "NAME")
       public String getName() {
       return name;
       }
       public void setName(String name) {
       this.name = name;
       }
      }
      


      @Stateful
      @Name("projectAction")
      public class ProjectActionBean implements ProjectAction {
      
       @In(create = true)
       private EntityManager testDatabase;
      
       @In(create = true)
       private Project project;
      
       public String saveProject() {
       testDatabase.persist( project );
      
       return null;
       }
      
       @Destroy @Remove
       public void destroy() {}
      
      }
      


      my persistance.xml is:

      <persistence>
       <persistence-unit name="testDB">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/testDS</jta-data-source>
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="create-drop" />
       <property name="jboss.entity.manager.jndi.name" value="java:/testDatabase" />
       <property name="jboss.entity.manager.factory.jndi.name" value="java:/testDatabaseFactory" />
       </properties>
       </persistence-unit>
      </persistence>
      


      my jboss-beans.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
       xmlns="urn:jboss:bean-deployer">
      
       <bean name="testDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
       <property name="driverClass">com.mysql.jdbc.Driver</property>
       <property name="connectionURL">jdbc:mysql://localhost:3306/seameval</property>
       <property name="userName">seameval</property>
       <property name="password">***</property>
       <property name="jndiName">java:/testDS</property>
       <property name="minSize">0</property>
       <property name="maxSize">10</property>
       <property name="blockingTimeout">1000</property>
       <property name="idleTimeout">100000</property>
       <property name="transactionManager"><inject bean="TransactionManager"/></property>
       <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
       <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
       </bean>
      
       <bean name="testDS" class="java.lang.Object">
       <constructor factoryMethod="getDatasource">
       <factory bean="testDatasourceBootstrap"/>
       </constructor>
       </bean>
      
      </deployment>
      


      and finally my seam.properties:

      org.jboss.seam.core.init.jndiPattern #{ejbName}/local
      org.jboss.seam.core.init.componentClasses org.jboss.seam.core.Ejb
      org.jboss.seam.core.init.managedPersistenceContexts testDatabase
      testDatabase.persistenceUnitJndiName java:/testDatabaseFactory
      


      When I deploy my app to Tomcat everything looks ok and log says:
      INFO 24-05 23:12:50,765 (FacesConfigurator.java:feedStandardConfig:151) -Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
      INFO 24-05 23:12:51,171 (FacesConfigurator.java:feedClassloaderConfigurations:250) -Reading config jar:file:/C:/Servers/tomcat5.5/webapps/test/WEB-INF/lib/jboss-seam.jar!/META-INF/faces-config.xml
      INFO 24-05 23:12:51,171 (FacesConfigurator.java:feedClassloaderConfigurations:250) -Reading config jar:file:/C:/Servers/tomcat5.5/webapps/test/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
      INFO 24-05 23:12:51,203 (FacesConfigurator.java:feedWebAppConfig:411) -Reading config /WEB-INF/faces-config.xml
      WARN 24-05 23:12:51,265 (LocaleUtils.java:toLocale:52) -Locale name in faces-config.xml null or empty, setting locale to default locale : pl_PL
      INFO 24-05 23:12:51,421 (StartupServletContextListener.java:initFaces:96) -ServletContext 'C:\Servers\tomcat5.5\webapps\test\' initialized.
      INFO 24-05 23:12:51,421 (SeamListener.java:contextInitialized:31) -Welcome to Seam 1.0.0.CR3
      INFO 24-05 23:12:51,437 (Initialization.java:loadFromResource:146) -reading properties from: /seam.properties
      INFO 24-05 23:12:51,437 (Initialization.java:loadFromResource:146) -reading properties from: /jndi.properties
      INFO 24-05 23:12:51,437 (Initialization.java:init:106) -initializing Seam
      INFO 24-05 23:12:51,500 (Component.java:<init>:177) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      INFO 24-05 23:12:51,671 (Component.java:<init>:177) -Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
      INFO 24-05 23:12:51,703 (Component.java:<init>:177) -Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Events
      INFO 24-05 23:12:51,703 (Component.java:<init>:177) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      INFO 24-05 23:12:51,734 (Component.java:<init>:177) -Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
      INFO 24-05 23:12:51,750 (Component.java:<init>:177) -Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
      INFO 24-05 23:12:51,750 (Component.java:<init>:177) -Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
      INFO 24-05 23:12:51,765 (Component.java:<init>:177) -Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrincipal
      INFO 24-05 23:12:51,781 (Component.java:<init>:177) -Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRole
      INFO 24-05 23:12:51,781 (Component.java:<init>:177) -Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
      INFO 24-05 23:12:51,796 (Component.java:<init>:177) -Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
      INFO 24-05 23:12:51,812 (Component.java:<init>:177) -Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
      INFO 24-05 23:12:51,812 (Component.java:<init>:177) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      INFO 24-05 23:12:51,843 (Component.java:<init>:177) -Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
      INFO 24-05 23:12:51,859 (Component.java:<init>:177) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      INFO 24-05 23:12:51,859 (Component.java:<init>:177) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      INFO 24-05 23:12:51,875 (Component.java:<init>:177) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      INFO 24-05 23:12:51,875 (Component.java:<init>:177) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      INFO 24-05 23:12:51,875 (Component.java:<init>:177) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      INFO 24-05 23:12:51,890 (Component.java:<init>:177) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      INFO 24-05 23:12:51,890 (Component.java:<init>:177) -Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
      INFO 24-05 23:12:51,906 (Component.java:<init>:177) -Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
      INFO 24-05 23:12:51,906 (Component.java:<init>:177) -Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
      INFO 24-05 23:12:51,921 (Component.java:<init>:177) -Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages
      INFO 24-05 23:12:51,937 (Component.java:<init>:177) -Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
      INFO 24-05 23:12:51,937 (Component.java:<init>:177) -Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelector
      INFO 24-05 23:12:51,953 (Component.java:<init>:177) -Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
      INFO 24-05 23:12:51,953 (Component.java:<init>:177) -Component: org.jboss.seam.remoting.messaging.subscriptionRegistry, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
      INFO 24-05 23:12:51,968 (Component.java:<init>:177) -Component: org.jboss.seam.debug.introspector, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.debug.Introspector
      INFO 24-05 23:12:52,000 (Component.java:<init>:177) -Component: org.jboss.seam.debug.contexts, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.Contexts
      INFO 24-05 23:12:52,015 (Component.java:<init>:177) -Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Ejb
      INFO 24-05 23:12:52,015 (Component.java:<init>:177) -Component: testDatabase, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
      INFO 24-05 23:12:52,031 (Scanner.java:getClasses:76) -scanning: /C:/Servers/tomcat5.5/webapps/test/WEB-INF/lib/test.jar
      INFO 24-05 23:12:52,031 (Component.java:<init>:177) -Component: project, scope: CONVERSATION, type: ENTITY_BEAN, class: test.Project
      INFO 24-05 23:12:52,046 (Component.java:<init>:177) -Component: projectAction, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: test.ProjectActionBean, JNDI: ProjectActionBean/local
      INFO 24-05 23:12:52,062 (Ejb.java:startup:37) -starting the embedded EJB container
      WARN 24-05 23:12:52,562 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
      INFO 24-05 23:12:52,937 (LocalTxDataSource.java:bindConnectionFactory:117) -Bound datasource to JNDI name 'java:/DefaultDS'
      INFO 24-05 23:12:53,281 (LocalTxDataSource.java:bindConnectionFactory:117) -Bound datasource to JNDI name 'java:/testDS'
      INFO 24-05 23:12:53,750 (Ejb3DescriptorHandler.java:addClassAnnotation:1551) -adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to test.ProjectActionBean org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@1627c16
      INFO 24-05 23:12:53,765 (Ejb3Deployment.java:create:467) -EJB3 deployment time took: 469
      INFO 24-05 23:12:53,796 (MCKernelAbstraction.java:install:84) -installing bean: jboss.j2ee:jar=test,name=ProjectActionBean,service=EJB3 with dependencies:
      INFO 24-05 23:12:54,078 (EJBContainer.java:start:553) -STARTED EJB: test.ProjectActionBean ejbName: ProjectActionBean
      INFO 24-05 23:12:54,093 (Initialization.java:init:111) -done initializing Seam
      


      but when trying to call ProjectActionBean.saveProject method with:
      <h:commandButton value="save..." action="#{projectAction.saveProject}" />
      


      I get exception:
      INFO 24-05 23:24:14,046 (Pages.java:initialize:70) -no pages.xml file found
      INFO 24-05 23:24:14,656 (MyfacesConfig.java:getBooleanInitParameter:133) -No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
      INFO 24-05 23:24:14,656 (MyfacesConfig.java:getBooleanInitParameter:133) -No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
      INFO 24-05 23:24:14,656 (MyfacesConfig.java:getCurrentInstance:119) -Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
      java.lang.IllegalArgumentException: EntityManagerFactory not found
       at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:59)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callComponentMethod(Component.java:1242)
       at org.jboss.seam.Component.callCreateMethod(Component.java:1227)
       at org.jboss.seam.Component.newInstance(Component.java:1216)
       at org.jboss.seam.Component.getInstance(Component.java:1168)
       at org.jboss.seam.Component.getInstance(Component.java:1151)
       at org.jboss.seam.Component.getInstanceToInject(Component.java:1271)
       at org.jboss.seam.Component.injectFields(Component.java:943)
       at org.jboss.seam.Component.inject(Component.java:734)
       at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
       at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
       at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
       at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
       at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
       at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
       at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
       at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
       at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       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.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
       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.invokeInCallerTx(TxPolicy.java:126)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       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.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy24.saveProject(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Unknown Source)
      Caused by: javax.naming.NameNotFoundException: testDatabaseFactory 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:296)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
       at javax.naming.InitialContext.lookup(Unknown Source)
       at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactory(ManagedPersistenceContext.java:85)
       at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:55)
       ... 112 more
      


      Can you tell me where I did a mistake?

      --
      Dinaddan