1 2 Previous Next 19 Replies Latest reply on Aug 6, 2009 1:59 AM by titou09

    SEAM and WAS 7.0.0.3 - no combination for productive use !?

    cacheup

      Hello,


      we have got a SEAM application (with persistence) running under JBoss smoothly. Trying to get it running under WAS 7.0.0.3 is frustrating and I'm shortly before declaring the combination of SEAM and WebSphere as failed for productive use.
      Here's what I did:
      I downloaded a nightly build of SEAM 2.1.2 to avoid:
      JBSEAM-3570
      JBSEAM-3726
      But now I get:
      java.lang.IllegalAccessError
           at org.jboss.seam.util.ProxyFactory.makeConstructor(ProxyFactory.java:803)


      also listed in:
      http://seamframework.org/Community/IllegalAccessErrorAfterUpgradingTo212CR1


      Hence, there seems to be no SEAM version currently available that is running under WAS 7.0.0.3 without problems.
      For productive use an official release of SEAM is a must ... but this may probably take a couple of months.
      Very disappointing situation.



      Oliver

        • 1. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
          cacheup

          Does anybody have an idea what to do to prevent the
          java.lang.IllegalAccessError at org.jboss.seam.util.ProxyFactory.makeConstructor(ProxyFactory.java:803)


          Regards
          Oliver

          • 2. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?

            Maybe if you post all the stacktrace one someone will be able to help you.

            • 3. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
              titou09

              No problems for us on was for a few apps running on v7.0.0.3 with latest seam 2.1.2 snapshot


              Give us more info, like the structure of your app and some more traces..

              • 4. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                titou09

                Just for info, what version of javassist are you using? we are using version 3.9 here

                • 5. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                  cacheup
                  Hello,

                  first, thanks for the replies. Good to hear that somebody has applications running on WAS 7.0.0.3.
                  Project Structure:
                  EAR project contains:
                  antlr-runtime-3.1.3.jar
                  cglib.jar
                  commons-beanutils.jar
                  commons-collections-3.1.jar
                  concurrent.jar
                  dom4j-1.6.1.jar
                  drools-compiler.jar
                  drools-core.jar
                  hibernate-annotations.jar
                  hibernate-entity-manager.jar
                  hibernate-validator-3.0.0.ga.jar
                  hibernate3.jar
                  javassist-3.9.ga.jar
                  jboss-commons.jar
                  jboss-el.jar
                  jbopss.seam.jar
                  jbpm-jpdl.jar
                  jcifs-1.3.0.jar
                  jta-1.1.jar
                  log4j.dtd
                  log4j.jar
                  mvel14.jar
                  poi-3.0.2-final20080204.jar
                  poi-contrib-3.0.2-final20080204.jar
                  poi-scratchpad-3.0.2-final20080204.jar
                  richfaces-api-3.3.0.GA.jar
                  security.drl
                  slf4j-api-1.5.2.jar

                  the web module contains the subsequent libs:
                  commons-beanutils.jar
                  commons-digester.jar
                  glassX-3.3.0.GA.jar
                  itext.jar
                  jboss-seam-debug.jar
                  jboss-ioc.jar
                  jboss-seam-mail.jar
                  jboss-seam-pdf.jar
                  jboss-seam-remoting.jar
                  jboss-seam-ui.jar
                  jcifs-1.3.0.jar
                  jsf-facelets.jar
                  jstl.jar
                  richfaces-api-3.3.0.GA.jar
                  fichfaces-impl-3.3.0.GA.jar
                  richfaces-ui-3.3.0.GA.jar
                  standard.jar

                  All the java classes are in the EJB Projekt
                  The libs in the EAR are referenced in the WEB and EJB project.


                  Here's the stack trace:

                  `00000008 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Es wurde eine Ausnahme beim Initialisieren des Kontextes abgefangen: {0}
                                                   java.lang.IllegalAccessError
                          at org.jboss.seam.util.ProxyFactory.makeConstructor(ProxyFactory.java:803)
                          at org.jboss.seam.util.ProxyFactory.makeConstructors(ProxyFactory.java:685)
                          at org.jboss.seam.util.ProxyFactory.make(ProxyFactory.java:565)
                          at org.jboss.seam.util.ProxyFactory.createClass3(ProxyFactory.java:346)
                          at org.jboss.seam.util.ProxyFactory.createClass2(ProxyFactory.java:325)
                          at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:284)
                          at org.jboss.seam.Component.createProxyFactory(Component.java:2426)
                          at org.jboss.seam.Component.getProxyFactory(Component.java:1513)
                          at org.jboss.seam.Component.wrap(Component.java:1504)
                          at org.jboss.seam.Component.instantiateJavaBean(Component.java:1442)
                          at org.jboss.seam.Component.instantiate(Component.java:1359)
                          at org.jboss.seam.Component.newInstance(Component.java:2122)
                          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
                          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
                          at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113)
                          at org.jboss.seam.init.Initialization.init(Initialization.java:740)
                          at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
                          at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1591)
                          at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:353)
                          at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:293)
                          at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
                          at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
                          at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:728)
                          at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:613)
                          at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
                          at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1144)
                          at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
                          at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
                          at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:723)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2068)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
                          at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:108)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:935)
                          at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
                          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)`


                  A second one (but I assume the application will run despite of that):
                  00000008 SchemaUpdate  E org.hibernate.tool.hbm2ddl.SchemaUpdate execute could not get database metadata
                                                   java.sql.SQLException: Unsupported use of GenericConnection.  A GenericConnection is provided during application start when creating an EntityManagerFactory for a persistence unit which has configured one of its datasource to be in the component naming context; java:comp/env. During application start, the component naming context will not exist, and the correct datasource cannot be determined. When the persistence unit is used, the proper datasource and connection will be obtained and used.
                          at com.ibm.ws.jpa.management.GenericConnection.unsupportedUseSQLException(GenericConnection.java:584)
                          at com.ibm.ws.jpa.management.GenericConnection.createStatement(GenericConnection.java:151)
                          at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:127)
                          at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:46)
                          at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:39)
                          at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:129)
                          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
                          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
                          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
                          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
                          at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1451)
                          at com.ibm.ws.jpa.management.JPAPUnitInfo.createEntityManagerFactory(JPAPUnitInfo.java:1292)
                          at com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits(JPAPxmlInfo.java:393)
                          at com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit(JPAScopeInfo.java:140)
                          at com.ibm.ws.jpa.management.JPAApplInfo.processModulePUs(JPAApplInfo.java:169)
                          at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule(JPAComponentImpl.java:878)
                          at com.ibm.ws.jpa.management.JPAComponentImpl.stateChanged(JPAComponentImpl.java:722)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1096)
                          at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1296)
                          at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:213)
                          at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:608)
                          at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:723)
                          at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2068)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
                          at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:108)
                          at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:935)
                          at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
                          at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

                  Regards
                  Oliver
                  • 6. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                    jkronegg

                    Using Websphere 7.0.0.3 and Seam 2.1.2-SNAPSHOT from 2009-04-06, and following the Knowledge Base's article Seam and WAS 7.0.0.1, we run WAR and EAR applications without problems.


                    We are using javassist 3.8.


                    ProxyFactory.java:803 uses Javassist code (StackMapTable.Writer), so this may be an issue with the version of javassist. If you are using Eclipse-based IDE, try to locate the StackMapTable class using Ctrl-Shift-T. You may have more than one version of Javassist on the classpath.

                    • 7. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?

                      My native language is not english, and it seems that is your case too, but do understand english, and I do not understand your language (is it german?), and therefore I can not understand your error:


                      
                      webapp E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Es wurde eine Ausnahme beim Initialisieren des Kontextes abgefangen:
                      
                      



                      I have always had a a lot of problem finding solutions to errors that are not in english, that is why I run my java with this options:


                      java -Duser.language=en -Duser.region=US
                      



                      That way, all my errors messages appear in english, and it is easier for my to search for solutions in google, and it easier for others to help me.


                      It is of course possible to translate them manually (from spanish to english in my case) or to use Google translate to do it, but the problem then that if the translation is not equal to the original in english error, I do not find any helpful hits in google.


                      Hope this trick helps you too.


                      Regards,

                      • 8. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                        titou09

                        Oliver, you have many settings problems with the jars in your app setup


                        For example. you should not have jta.jar in the ear nor jstl.jar in web (they are provided by was), you have richfaces-api-3.3.0.GA.jar at two places, you lack the slf4j-log4 implementation jar etc . and I'm quite sure many other jars could be removed (standard.jar? concurrent.jar? cglib etc jboss-ioc, are you using spring? etc...)


                        I suggest you to look at our settings in this thread

                        • 9. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                          cacheup

                          @Denis, I'll have a look at the thread you mentioned. One problem is that I'm no SEAM developer - my task is to get the application running on WAS 7.0.0.3. I received the mentioned application, which runs on JBoss. Thus I lack the insight knowledge of which libs are necessary and which aren't.


                          Regards
                          Oliver

                          • 10. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                            cacheup

                            I have restructured the libs etc. When starting the application I get the following errors:


                            [15.05.09 14:17:49:810 CEST] 00000015 JPAPUnitInfo  E   CWWJP0015E: An error occurred in the org.hibernate.ejb.HibernatePersistence persistence provider when it attempted to create the container entity manager factory for the sample persistence unit. The following error occurred: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
                            [15.05.09 14:17:49:842 CEST] 00000015 JPAPUnitInfo  E   CWWJP0009E: The server cannot create an EntityManagerFactory factory for the sample persistent unit from the org.hibernate.ejb.HibernatePersistence provider in file:/C:/RSA75WS/Test1/sample-ejb/build/classes/ module.
                            



                            When invoking an action in the application i get:


                            [15.05.09 14:21:34:350 CEST] 00000029 BusinessExcep E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "editBillingPage" on bean "BeanId(sample-ear#sample-ejb.jar#BillingManager, 4438620E-0121-4000-E000-150C0A0445A7)". Exception data: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/sampleEntityManagerFactory



                            the persistence.xml is


                            <?xml version="1.0" encoding="UTF-8"?>
                            <!-- Persistence deployment descriptor for dev profile -->
                            <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="sample">
                                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
                                    <jta-data-source>jdbc/coffee</jta-data-source>
                                    <properties>
                                         <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                                        <property name="hibernate.hbm2ddl.auto" value="update"/>
                                        <property name="hibernate.show_sql" value="true"/>
                                        <!--
                                        <property name="jboss.entity.manager.factory.jndi.name" value="java:/sampleEntityManagerFactory"/>
                                         --> 
                                        <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/sampleEntityManagerFactory"/>
                                       
                                        
                                    </properties>
                                </persistence-unit>
                            </persistence>



                            the components.xml is:


                            <?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:drools="http://jboss.com/products/seam/drools"
                                        xmlns:bpm="http://jboss.com/products/seam/bpm"
                                        xmlns:security="http://jboss.com/products/seam/security"
                                        xmlns:mail="http://jboss.com/products/seam/mail"
                                        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/drools http://jboss.com/products/seam/drools-2.0.xsd
                                             http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
                                             http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                                             http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                                             http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
                            
                             
                                 <core:init debug="true" jndi-pattern="java:comp/env/#{ejbName}"/>
                                  
                                  
                               <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid"/>
                               <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:comp/env/sampleEntityManagerFactory"/>                          
                            
                                 <security:identity remember-me="true" jaas-config-name="ldap-security" />
                            
                                 <event type="org.jboss.seam.security.postAuthenticate">
                                      <action execute="#{authenticator.authenticate}"/>
                                 </event> 
                            
                               <event type="org.jboss.seam.security.notLoggedIn">
                                   <action execute="#{redirect.captureCurrentView}"/>
                               </event>
                               <event type="org.jboss.seam.security.loginSuccessful">
                                   <action execute="#{redirect.returnToCapturedView}"/>
                               </event>
                            
                               <mail:mail-session host="XXXXXXX" />
                            
                               
                            </components>



                            What's the cause of the first error?
                            Why can't the EntityManagerFactory be built?


                            Any help is greatly appreciated because I think I may be sucessful.


                            Regards
                            Oliver



                            • 11. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                              ctomc

                              Oliver, one just one thing,


                              you are saying that you are using seam 2.1.2 nightly build. but your components.xml
                              are referencing config for seam 2.0.x...


                              try changing xsd shemas to 2.1 in components.xml and pages.xml
                              maybe it will fix some stuff.


                              and if i may conclude from your story you are running seam 2.0.x application on jboss and works fine.
                              But can you confirm that it works fine on jboss with nightly version of seam 2.1.x(the one you are using on was) also?


                              differences from seam 2.0.x to 2.1.x are quite significant... not just drop-in replacement!



                              regards,
                              Tomaz

                              • 12. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                                cacheup

                                @Tomaz, I switched according to your reply. But without success.
                                Sill have got:


                                 java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:comp/env/sampleEntityManagerFactory



                                Any ideas would be great - the config files are above.


                                Regards
                                Oliver

                                • 13. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                                  ctomc

                                  Hi,


                                  did you change all the config files accoring to manual http://docs.jboss.com/seam/2.1.2.CR1/reference/en-US/html/websphere.html


                                  You have your entityManager refrenced in componets.xml as


                                  "<persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:comp/env/sampleEntityManagerFactory"/> "   
                                  where you say you have your entityManager bound in jndi under name java:comp/env/sampleEntityManagerFactory
                                  check what you have declared in persistence.xml.


                                  the jndi name must be same.


                                  • 14. Re: SEAM and WAS 7.0.0.3 - no combination for productive use !?
                                    cacheup

                                    persistence.xml entry:



                                    <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/sampleEntityManagerFactory"/>



                                    1 2 Previous Next