1 2 3 4 Previous Next 49 Replies Latest reply on Feb 15, 2008 9:27 AM by jbalunas Go to original post
      • 30. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
        jbalunas


        OK - I did not need the j2ee.jar in my application lib dir.

        But could you post your components.xml file - I'm curious whats in there.

        Thanks,
        Jay

        • 31. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
          nandhu

          Thanks Jay , here is my components.xml.

          <?xml version="1.0" encoding="UTF-8"?>
          <components xmlns="http://jboss.com/products/seam/components"
          xmlns:core="http://jboss.com/products/seam/core"
          xmlns:persistence="http://jboss.com/products/seam/persistence"
          xmlns:transaction="http://jboss.com/products/seam/transaction"
          xmlns:security="http://jboss.com/products/seam/security"
          xmlns:web="http://jboss.com/products/seam/web"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation=
          "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
          http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
          http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
          http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
          http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">

          <core:manager conversation-timeout="120000"
          concurrent-request-timeout="500"
          conversation-id-parameter="cid"/>


          <persistence:entity-manager-factory name="bookingDatabase"/>

          <persistence:managed-persistence-context name="em"
          auto-create="true"
          entity-manager-factory="#{bookingDatabase}"/>

          <security:identity authenticate-method="#{authenticator.authenticate}"/>

          <!-- WAS requires the filter to be mapped to a suffix, so can't use built in Seam filter -->
          <web:ajax4jsf-filter disabled="true" />

          • 32. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
            jbalunas

            Are you running Seam 2.0.1.GA? That does not look like the components.xml that shipped with it.

            One difference is the ajax filter is not needed anymore because of one of the customer properties in the doc.

            I double checked the jee5 example last night and it worked fine. The JPA example I'll double check again today.

            • 33. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
              jbalunas

              This morning I ran a clean install of websphere + ejb3fp, seam 2.0.1.GA to double check my instructions. The exact steps I followed are below.

              Note that I am seeing the "Found unrecognized persistence provider "org.hibernate.ejb.HibernatePersistence" in place of OpenJPA provider. This provider's properties will not be used." warning in the system err log when this *is* working. This caused no issues for running the application. From my research with websphere there is some confusion on what this means. Some believe that this is just a warning and when the app runs it is using hibernate as it should - based on when class loaders are started and used. Others believe that it is really using openJPA and ignoring hibernate. From what I read this message can be avoided by creating a websphere "shared library" that has all the hibernate requirements and then associate it with the application (removing the same jars from the war).

              Because I just completed these instructions for the reference docs I wanted to spend some extra time since you were having issues with them.

              Let me know if you are still having problems. You might also want to try removing any other test applications that installed that may be using the same datasource, or tables - maybe they are causing conflicts. As I said the docs and steps below (same ones) are with a clean install.

              I hope this helps,
              Jay

              *Steps I followed on my linux machine*
              * Clean install of Websphere 6.1.09 and ejb feature pack + 6.1.0.13 patch (included with ejb3fp)
              no sample apps
              admin login set
              * Augmented the default profile with the ejb3 fp features
              * Clean install of Seam 2.0.1ga
              * Went to admin console
              set custom properties
              *restarted
              had to restart again because ports did not free up
              * built JPA example ant websphere61
              * Deployed following doc
              Changed web module class loader first
              Then the application's - it took it first time - without file modification
              * restart
              * Went to http://localhost:9082/jboss-seam-jpa/index.html and everything worked :)

              * Got following in error log see notes above:
              [2/8/08 11:06:53:610 EST] 00000015 SystemErr R WARNING: Found unrecognized persistence provider "org.hibernate.ejb.HibernatePersistence" in place of OpenJPA provider. This provider's properties will not be used.

              * Went to admin console stopped and started app got exceptions
              * restarted
              *Went to admin console and looked around
              *Went back to http://localhost:9082/jboss-seam-jpa/index.html and everything worked.

              • 34. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                jbalunas

                Update - for the jee5 example I updated the docs. I missed a required jar "jboss-archive-browsing.jar". I also clarified restarting the server after deployments and updates. This seemed to really effect behavior.

                -Jay

                • 35. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                  nandhu

                  BTW I took the jpa example out of seam 2.0.1 GA and ran the test. I am still getting the class casterror ,
                  bTW my index pages work all the time, the error I am getting is when I am logging in.
                  Also I notificed transaction type changed from JTA to LOCAL in the persistence .xml and its causing an error

                  [2/9/08 9:23:36:390 CST] 0000001e SeamPhaseList E org.jboss.seam.jsf.SeamPhaseListener beforePhase uncaught exception
                  java.lang.IllegalStateException: Could not start transaction
                  at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:581)
                  at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:312)
                  at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
                  at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
                  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
                  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:990)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:931)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                  at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                  at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                  at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                  at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:768)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:676)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:499)
                  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
                  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
                  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
                  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
                  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
                  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
                  at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
                  at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
                  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
                  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
                  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
                  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
                  Caused by: java.lang.ClassCastException: org.jboss.seam.persistence.EntityManagerFactory incompatible with javax.persistence.EntityManagerFactory
                  at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:236)
                  at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:79)
                  at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:618)
                  at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                  at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                  at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
                  at org.jboss.seam.Component.unwrap(Component.java:2108)

                  • 36. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                    nandhu

                    Jay
                    After few more restarts and cleaning , I got rid of class cast error , but it is still pointing to open jpa. Here are logs at startup

                    [2/9/08 10:33:25:125 CST] 00000015 Contexts I org.jboss.seam.contexts.Contexts startup starting up: org.jboss.seam.security.facesSecurityEvents
                    [2/9/08 10:33:25:125 CST] 00000015 Contexts I org.jboss.seam.contexts.Contexts startup starting up: bookingDatabase
                    [2/9/08 10:33:25:468 CST] 00000015 SystemOut O 15 WARN [server.startup : 1] openjpa.Runtime - The property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".
                    [2/9/08 10:33:25:500 CST] 00000015 Initializatio I org.jboss.seam.init.Initialization init done initializing Seam.


                    Then I hit the index page , seems to be fine , but can't proceed further , here are the errors


                    [2/9/08 10:33:50:375 CST] 0000001d LRUMapCacheFa I org.ajax4jsf.cache.LRUMapCacheFactory createCache Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
                    [2/9/08 10:33:50:375 CST] 0000001d LRUMapCacheFa I org.ajax4jsf.cache.LRUMapCacheFactory createCache Creating LRUMap cache instance of default capacity
                    [2/9/08 10:33:50:390 CST] 0000001d SeamFilter I org.jboss.seam.servlet.SeamFilter init Initializing filter: org.jboss.seam.web.exceptionFilter
                    [2/9/08 10:33:50:390 CST] 0000001d SeamFilter I org.jboss.seam.servlet.SeamFilter init Initializing filter: org.jboss.seam.web.redirectFilter
                    [2/9/08 10:33:50:390 CST] 0000001d SeamFilter I org.jboss.seam.servlet.SeamFilter init Initializing filter: org.jboss.seam.web.multipartFilter
                    [2/9/08 10:33:50:437 CST] 0000001d lifecycle I JSF1027: [jboss-seam-jpaWAR.war] The ELResolvers for JSF were not registered with the JSP container.
                    [2/9/08 10:33:50:718 CST] 0000001d Contexts I org.jboss.seam.contexts.Contexts startup starting up: org.jboss.seam.web.session
                    [2/9/08 10:33:50:718 CST] 0000001d Contexts I org.jboss.seam.contexts.Contexts startup starting up: org.jboss.seam.security.identity
                    [2/9/08 10:33:50:859 CST] 0000001d SystemOut O 25406 INFO [WebContainer : 0] openjpa.Runtime - Starting OpenJPA 1.0.1
                    [2/9/08 10:33:50:921 CST] 0000001d SeamPhaseList E org.jboss.seam.jsf.SeamPhaseListener beforePhase uncaught exception
                    java.lang.IllegalStateException: Could not start transaction
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:581)
                    at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:312)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
                    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
                    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:990)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:931)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:768)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:676)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:499)
                    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
                    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
                    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
                    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
                    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
                    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
                    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
                    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
                    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
                    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
                    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
                    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
                    Caused by: <openjpa-1.0.1-r420667:592145 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.
                    at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:72)
                    at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:803)
                    at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:568)
                    at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1221)
                    at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:476)
                    at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:401)
                    at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:102)
                    at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:82)
                    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:861)
                    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:852)
                    at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:630)
                    at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
                    at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
                    at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
                    at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:40)
                    at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:30)
                    at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:79)
                    at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:618)
                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                    at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
                    at org.jboss.seam.Component.unwrap(Component.java:2108)
                    at org.jboss.seam.Component.getInstance(Component.java:1887)
                    at org.jboss.seam.Component.getInstance(Component.java:1840)
                    at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                    at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                    at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
                    at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
                    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
                    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
                    at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                    at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                    at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
                    at org.jboss.seam.transaction.EntityTransaction.initEntityManager(EntityTransaction.java:67)
                    at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:79)
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:576)
                    ... 46 more

                    [2/9/08 10:33:50:937 CST] 0000001d SeamPhaseList E org.jboss.seam.jsf.SeamPhaseListener beforePhase swallowing exception
                    java.lang.IllegalStateException: Could not start transaction
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:581)
                    at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:312)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
                    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
                    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:990)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:931)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:768)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:676)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:499)
                    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
                    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
                    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
                    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
                    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
                    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
                    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
                    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
                    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
                    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
                    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
                    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
                    Caused by: <openjpa-1.0.1-r420667:592145 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.
                    at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:72)
                    at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:803)
                    at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:568)
                    at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1221)
                    at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:476)
                    at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:401)
                    at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:102)
                    at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:82)
                    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:861)
                    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:852)
                    at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:630)
                    at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
                    at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
                    at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
                    at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:40)
                    at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:30)
                    at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:79)
                    at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:618)
                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                    at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
                    at org.jboss.seam.Component.unwrap(Component.java:2108)
                    at org.jboss.seam.Component.getInstance(Component.java:1887)
                    at org.jboss.seam.Component.getInstance(Component.java:1840)
                    at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                    at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                    at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
                    at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
                    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
                    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
                    at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                    at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                    at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
                    at org.jboss.seam.transaction.EntityTransaction.initEntityManager(EntityTransaction.java:67)
                    at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:79)
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:576)
                    ... 46 more

                    • 37. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                      jbalunas

                      Hello,

                      The change from JTA to RESOURCE_LOCAL. in the persistence.xml is because we wanted to use JPA transactions for the example - previously it was using JTA.

                      Take a look at Chapter 8 of reference guide for some more info on the config.

                      Do you have "<transaction:entity-transaction entity-manager="#{em}"/>" in your components.xml file? This is what will work together with JPA setting.

                      Also so you have any openJPA properties set? It seems to be complaining about one that is set.

                      -Jay

                      • 38. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                        nandhu

                        Jay
                        Thanks, Here is my components.xml file.

                        <?xml version="1.0" encoding="UTF-8"?>
                        <components xmlns="http://jboss.com/products/seam/components"
                        xmlns:core="http://jboss.com/products/seam/core"
                        xmlns:persistence="http://jboss.com/products/seam/persistence"
                        xmlns:transaction="http://jboss.com/products/seam/transaction"
                        xmlns:security="http://jboss.com/products/seam/security"
                        xmlns:web="http://jboss.com/products/seam/web"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
                        http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
                        http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                        http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
                        http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
                        http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">

                        <core:manager conversation-timeout="120000"
                        concurrent-request-timeout="500"
                        conversation-id-parameter="cid"/>

                        <transaction:entity-transaction entity-manager="#{em}"/>

                        <persistence:entity-manager-factory name="bookingDatabase"/>

                        <persistence:managed-persistence-context name="em" auto-create="true"
                        entity-manager-factory="#{bookingDatabase}"/>

                        <security:identity authenticate-method="#{authenticator.authenticate}"/>




                        I don't have openJPA properties, all I doing in building the war and deploying it to websphere, if its mentioning about openJPA where do I check for that ?

                        • 39. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                          jbalunas

                          Your components.xml file looks good. As for the openJpa properties that would be in the persistence.xml file. If you are just building and the 201_ga release it should be correct.

                          I'm not sure where to go from here - right now. What OS or JVM are you using? I did mine on linux. Also if JPA transactions are not important to you - you could try changing to JTA in persistence.xml file and see what is different. Or following chapter 8 you could turn off transactions all together.

                          The frustrating part is that this all worked for me following the steps I have in the doc and this forum. Software (containers, and frameworks) are funny that way :)

                          -Jay

                          • 40. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                            nandhu

                            Jay
                            OS - Windows
                            JVM - IBM JDK 5

                            Here is my persistence.xml

                            <?xml version="1.0" encoding="UTF-8"?>
                            <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                            version="1.0">
                            <persistence-unit name="bookingDatabase" transaction-type="RESOURCE_LOCAL">
                            org.hibernate.ejb.HibernatePersistence
                            <jta-data-source>DefaultDatasource</jta-data-source>

                            <!-- From WAS 6.1.0.9, the embedded DB is switched to the same Derby DB in Glassfish -->






                            </persistence-unit>



                            I am just really frustrated with Websphere, its never easy to get it working

                            • 41. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                              jbalunas

                              Agree with Websphere - everything seemed a little (or a lot) harder than it needed to be.

                              Try putting the complete persistence.xml file from the release back in. That is how I have it running. Not to mention that one of the people on the websphere forums thought that when the application was actually loaded and running that it would be using hibernate. So if none of the hibernate values are there, maybe it reverts to openJPA.

                              Its a long shot but give it a try. Put this back in the build, update the app through the admin console, then restart. Good luck.

                              <?xml version="1.0" encoding="UTF-8"?>
                              <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                               version="1.0">
                               <persistence-unit name="bookingDatabase" transaction-type="RESOURCE_LOCAL">
                               <provider>org.hibernate.ejb.HibernatePersistence</provider>
                               <jta-data-source>DefaultDatasource</jta-data-source>
                               <properties>
                               <!-- From WAS 6.1.0.9, the embedded DB is switched to the same Derby DB in Glassfish -->
                               <property name="hibernate.dialect" value="GlassfishDerbyDialect"/>
                               <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                               <property name="hibernate.show_sql" value="true"/>
                               <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
                               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
                               </properties>
                               </persistence-unit>
                              </persistence>
                              


                              • 42. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                                nandhu

                                Jay
                                My Persistence.xml looks exactly the same as yours, when I posted it for reply , it did cut the properties tag off.

                                • 43. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                                  jbalunas

                                  That explains my confusion then :)

                                  When I get a chance I'll try websphere on windows. I can't really do that this week though. Its possible that there are different behaviors.

                                  The only other thing I can think of right now is to check the various logs under:
                                  WebSphere/AppServer1/profiles/AppSrv01/logs directory. I found the "ffdc" directory under that directory. It contains individual log files for some errors that don't show in the system out or err logs.

                                  Good luck and let me know how it goes. I'll also check windows when I can.

                                  -Jay

                                  • 44. Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
                                    ioannis

                                    I have the same problem, I get the same ClassCastException. I am using the Seam 2.0.1.GA jpa example application.

                                    I have a WAS 6.1.0.13 EJB3 server on windows. I tried setting the classloader to application first for both web module and application. That did not help, even after restarts I still get the errors. I then deployed the application to another WAS server with same version but on linux and this time it worked.

                                    Then I tried to port this to my own application. I have used the same components.xml and persistence.xml files that come with the jpa example. This application is deployed as an EAR file though. I got the same ClassCastException on Windows (as I expected) but I also got it on the linux server.

                                    Any ideas? Any hope of fixing this in Seam (even if the problem is with WAS) to make it more stable.

                                    Is there any other way to get hold of the EntityManager in my application on WAS (other than @PersistenceContext in an EJB)?


                                    Thanks