6 Replies Latest reply on Apr 22, 2008 6:02 PM by Balvindar Dhaliwal

    Seam and trinidad on Weblogic 10 MP1

    Balvindar Dhaliwal Newbie

      Hello,


      I am trying to get the seamdiscs example working. It uses trinidad.


      The war/WEB-INF includes
      a4j-trinidad.jar
      concuurent.jar
      jboss-seam-debug.jar
      jboss-seam-ui.jar
      jsf-faceletes.jar
      jsf-impl.jar
      richfaces-impl.jar
      trinidad-api-1.2.7.jar
      trinidad-impl-1.2.7.jar


      Ear/lib contains:
      hibernate.jar
      hibernate-commons-annotations.jar
      hibernate-annotations.jar
      hibernate-entitymanager.jar
      hibernate-validator.jar
      jboss-common-core.jar
      cglib.jar
      asm.jar
      antlr.jar
      commons-beanutils.jar
      commons-digester.jar
      commons-logging.jar
      commons-collections.jar
      log4j.jar
      concurrent.jar
      javassist.jar
      dom4j.jar


      web.xml:


      
      <?xml version="1.0" ?>
      
      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
      
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      
        version="2.5">
      
      
        <context-param>
      
          <param-name>org.richfaces.SKIN</param-name>
      
          <param-value>blueSky</param-value>
      
        </context-param>
      
      
        <!-- Seam -->
      
      
        <listener>
      
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
      
        </listener>
      
      
        <filter>
      
          <filter-name>Seam Filter</filter-name>
      
          <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
      
        </filter>
      
      
        <filter-mapping>
      
          <filter-name>Seam Filter</filter-name>
      
          <url-pattern>/*</url-pattern>
      
        </filter-mapping>
      
      
        <servlet>
      
          <servlet-name>Seam Resource Servlet</servlet-name>
      
          <servlet-class>
      
            org.jboss.seam.servlet.SeamResourceServlet
      
          </servlet-class>
      
        </servlet>
      
      
        <servlet-mapping>
      
          <servlet-name>Seam Resource Servlet</servlet-name>
      
          <url-pattern>/seam/resource/*</url-pattern>
      
        </servlet-mapping>
      
      
        <!-- Facelets development mode (disable in production) -->
      
      
        <context-param>
      
          <param-name>facelets.DEVELOPMENT</param-name>
      
          <param-value>true</param-value>
      
        </context-param>
      
      
        <!-- JSF -->
      
      
        <context-param>
      
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      
          <param-value>.xhtml</param-value>
      
        </context-param>
      
      
        <!--
      
        <listener>
      
          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
      
        </listener>    
      
        -->
      
      
        <servlet>
      
          <servlet-name>Faces Servlet</servlet-name>
      
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      
          <load-on-startup>1</load-on-startup>
      
        </servlet>
      
      
        <servlet-mapping>
      
          <servlet-name>Faces Servlet</servlet-name>
      
          <url-pattern>*.seam</url-pattern>
      
        </servlet-mapping>
      
      
        <!-- Trinidad - as suggested by a4j-trinidad example-->
      
      
        <context-param>
      
          <param-name>
      
            org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
      
          </param-name>
      
          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      
        </context-param>
      
      
        <filter>
      
          <filter-name>Trinidad</filter-name>
      
          <filter-class>
      
            org.apache.myfaces.trinidad.webapp.TrinidadFilter
      
          </filter-class>
      
        </filter>
      
      
        <filter-mapping>
      
          <filter-name>Trinidad</filter-name>
      
          <url-pattern>*.seam</url-pattern>
      
        </filter-mapping>
      
      
        <context-param>
      
          <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
      
          <param-value>false</param-value>
      
        </context-param>
      
      
        <servlet>
      
          <servlet-name>Trinidad Resources</servlet-name>
      
          <servlet-class>
      
            org.apache.myfaces.trinidad.webapp.ResourceServlet
      
          </servlet-class>
      
        </servlet>
      
      
        <servlet-mapping>
      
          <servlet-name>Trinidad Resources</servlet-name>
      
          <url-pattern>/adf/*</url-pattern>
      
        </servlet-mapping>
      
      
        <context-param>
      
          <param-name>
      
            org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION
      
          </param-name>
      
          <param-value>true</param-value>
      
        </context-param>
      
      
      
        <!-- JEE5 EJB3 names -->
      
        
      
              
      
        
      
        <ejb-local-ref>       
      
          <ejb-ref-name>jboss-seam-discs/ArtistHomeImpl/local</ejb-ref-name>       
      
          <ejb-ref-type>Session</ejb-ref-type>       
      
          <local>org.jboss.seam.example.seamdiscs.action.ArtistHome</local>       
      
          <ejb-link>ArtistHomeImpl</ejb-link>    
      
        </ejb-local-ref>    
      
        
      
        
      
      
      
      </web-app>
      
      
      
      



      The error is related to picking up the ArtistHomeImpl bean.


      I get the following error:


      
      <21-Apr-2008 09:31:05 o'clock BST> <Error> <Deployer> <BEA-149265> <Failure occu
      
      rred in the execution of deployment request with ID '1208766631888' for task '1'
      
      . Error is: 'weblogic.application.ModuleException: Exception preparing module: E
      
      JBModule(jboss-seam-discs.jar)
      
      [EJB:011023]An error occurred while reading the deployment descriptor. The error
      
       was:
      
       org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl$1 : org/apache/myfaces/t
      
      rinidad/model/ChildPropertyTreeModel.'
      
      weblogic.application.ModuleException: Exception preparing module: EJBModule(jbos
      
      s-seam-discs.jar)
      
      [EJB:011023]An error occurred while reading the deployment descriptor. The error
      
       was:
      
       org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl$1 : org/apache/myfaces/t
      
      rinidad/model/ChildPropertyTreeModel.
      
              at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:399)
      
      
              at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
      
      leListenerInvoker.java:93)
      
              at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
      
      oymentCallbackFlow.java:360)
      
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      
      river.java:26)
      
              at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
      
      loymentCallbackFlow.java:56)
      
              Truncated. see log file for complete stacktrace
      
      java.lang.NoClassDefFoundError: org/jboss/seam/example/seamdiscs/action/ArtistHo
      
      meImpl$1 : org/apache/myfaces/trinidad/model/ChildPropertyTreeModel
      
              at java.lang.ClassLoader.defineClass1(Native Method)
      
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
      
      4)
      
              at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericCla
      
      ssLoader.java:338)
      
              at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
      
      ClassLoader.java:291)
      
              Truncated. see log file for complete stacktrace
      
      



      I also tried including trinidad on the jee5/booking example. I got the following error:


      
      
      java.lang.IllegalStateException: No RenderingContext 
      
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeBegin(CoreRenderer.java:194) 
      
      at org.apache.myfaces.trinidadinternal.renderkit.htmlBasic.HtmlFormRenderer.encodeBegin(HtmlFormRenderer.java:56) 
      
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788) 
      
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884) 
      
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892) 
      
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) 
      
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) 
      
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216) 
      
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) 
      
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) 
      
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) 
      
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) 
      
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) 
      
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) 
      
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) 
      
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) 
      
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) 
      
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) 
      
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68) 
      
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) 
      
      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.ExceptionFilter.doFilter(ExceptionFilter.java:64) 
      
      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.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307) 
      
      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.web.LoggingFilter.doFilter(LoggingFilter.java:58) 
      
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) 
      
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) 
      
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) 
      
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238) 
      
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195) 
      
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138) 
      
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) 
      
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) 
      
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) 
      
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) 
      
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) 
      
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26) 
      
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) 
      
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393) 
      
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 
      
      at weblogic.security.service.SecurityManager.runAs(Unknown Source) 
      
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140) 
      
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046) 
      
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) 
      
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) 
      
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) 
      
      
      
      



      Please advise.


      Thanks in advance,
      Balvindar


        • 1. Re: Seam and trinidad on Weblogic 10 MP1
          Balvindar Dhaliwal Newbie

          I have altered the libraries in the build.xml.


          Now, when the ear is deployed, it does not throw any exceptions. Howevere when I go to the home page, I get a NameNotFoundException when it tries to construct the artistHome Bean.


          Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jboss-seam-discs.ArtistHomeImpl/local' didn't find subcontext 'jboss-seam-discs'. Resolved ''; remaining name 'jboss-seam-discs/ArtistHomeImpl/local'
          
               at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1138)
          
               at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:246)
          
               at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
          
               at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:205)
          
               at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
          
               at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
          
               at javax.naming.InitialContext.lookup(InitialContext.java:351)
          
               at org.jboss.seam.Component.instantiateSessionBean(Component.java:1287)
          
               at org.jboss.seam.Component.instantiate(Component.java:1273)
          
               at org.jboss.seam.Component.newInstance(Component.java:1966)
          
          
          




          Again this looks like a config issue. Any ideas


          Regards,
          Balvindar

          • 2. Re: Seam and trinidad on Weblogic 10 MP1
            Jay Balunas Novice

            For your first problem - did you have to move some the trinidad api jar into the EAR lib, or were more jars needed?


            For the second issue:



            • Can you see the EJB in the weblogic admin console?  If you can it should show the JNDI that it is registered to. 

            • What is set in your components.xml for JNDI path?

            • Were there any other issues during deployment, maybe not exceptions but errors?

            • 3. Re: Seam and trinidad on Weblogic 10 MP1
              Balvindar Dhaliwal Newbie

              Hi,


              I changed the components.xml, now I get a different exception relating to EntityManager:


              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:security="http://jboss.com/products/seam/security"
              
                   xmlns:persistence="http://jboss.com/products/seam/persistence"
              
                   xmlns:web="http://jboss.com/products/seam/web"
              
                   xmlns:framework="http://jboss.com/products/seam/framework"
              
                   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/security http://jboss.com/products/seam/security-2.0.xsd
              
                               http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
              
                               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd 
              
                               http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd 
              
                               http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd">
              
              
                   <!-- <core:init debug="false" jndi-pattern="@jndiPattern@" /> -->
              
                    <core:init jndi-pattern="java:comp/env/jboss-seam-discs/#{ejbName}/local" debug="true"/>
              
              
                    
              
              
              
                   <core:manager concurrent-request-timeout="500"
              
                        conversation-timeout="120000" 
              
                        conversation-id-parameter="cid"/>
              
              
                    
              
                   <persistence:managed-persistence-context name="entityManager"
              
                        auto-create="true"
              
                        persistence-unit-jndi-name="java:/seamdiscsEntityManagerFactory" />
              
                    
              
              
                    
              
                    
              
              
                   <security:identity
              
                        authenticate-method="#{authenticator.authenticate}" />
              
              
                  <event type="org.jboss.seam.security.notLoggedIn">
              
                      <action execute="#{redirect.captureCurrentView}"/>
              
                  </event>
              
                  
              
                  <event type="org.jboss.seam.security.loginSuccessful">
              
                      <action execute="#{redirect.returnToCapturedView}"/>
              
                  </event>
              
                   
              
                   <framework:entity-query name="discs" ejbql="select disc from Disc disc" order="disc.name ASC" max-results="5"/>
              
                   
              
                   <framework:entity-query name="artists" ejbql="select artist from Artist artist" order="artist.name DESC" max-results="5">
              
                    <framework:restrictions>
              
                      <value>lower(artist.name) like lower(concat(#{exampleArtist.name}, '%'))</value>
              
                    </framework:restrictions>
              
                  </framework:entity-query>
              
                   
              
                   <framework:entity-query name="allArtists" ejbql="select artist from Artist artist" order="artist.name"/>
              
                   
              
                   <framework:entity-home entity-class="org.jboss.seam.example.seamdiscs.model.Disc" name="discHome"/>
              
                   
              
                   <factory name="disc" value="#{discHome.instance}"/>
              
                
              
                  <component name="exampleArtist" class="org.jboss.seam.example.seamdiscs.model.Artist" scope="session" />
              
              
              </components>
              
              
              



              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="seamdiscs">
              
                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
              
                    <!-- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> -->
              
                    <jta-data-source>gpbcsDataSource</jta-data-source>
              
                    <properties>
              
              
                       <!-- The following two properties are for WebLogic Server 10 -->
              
                       <property name="hibernate.dialect" 
              
                            value="org.hibernate.dialect.PostgreSQLDialect"/>
              
                       <property name="hibernate.transaction.manager_lookup_class" 
              
                          value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
              
              
              
                               
              
                       <!-- <property name="hibernate.hbm2ddl.auto" value="create-drop"/> -->
              
                       <property name="hibernate.show_sql" value="true"/>
              
                       <property name="jboss.entity.manager.factory.jndi.name" value="java:/seamdiscsEntityManagerFactory"/>
              
                       <property name="hibernate.transaction.flush_before_completion" value="true"/>
              
                       <property name="hibernate.cache.provider_class" 
              
                            value="org.hibernate.cache.HashtableCacheProvider"/>
              
                    </properties>
              
                 </persistence-unit>
              
              </persistence>
              
              
              


              I am getting a exception related to the EntityManager, it does not recognise java:/seamdiscsEntityManagerFactory, which is defined in components.xml and persistence.xml.


              The exception is:


              
              javax.ejb.EJBTransactionRolledbackException: EJB Exception: ; nested exception is: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:/seamdiscsEntityManagerFactory
              
                   at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:791)
              
                   at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
              
                   at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:421)
              
                   at weblogic.ejb.container.internal.StatefulLocalObject.postInvokeTxRetry(StatefulLocalObject.java:86)
              
                   at org.jboss.seam.example.seamdiscs.action.ArtistHomeImpl_w8ixis_ArtistHomeImpl.create(ArtistHomeImpl_w8ixis_ArtistHomeImpl.java:656)
              
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              
                   at java.lang.reflect.Method.invoke(Method.java:585)
              
                   at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
              
                   at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
              
                   at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
              
                   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              
                   at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
              
                   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              
                   at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              
                   at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
              
                   at org.javassist.tmp.java.lang.Object_$$_javassist_1.create(Object_$$_javassist_1.java)
              
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              
                   at java.lang.reflect.Method.invoke(Method.java:585)
              
                   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.callCreateMethod(Component.java:2005)
              
                   at org.jboss.seam.Component.newInstance(Component.java:1976)
              
                   at org.jboss.seam.Component.getInstance(Component.java:1873)
              
                   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.parser.AstValue.getValue(AstValue.java:63)
              
                   at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              
                   at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
              
                   at org.jboss.seam.navigation.Param.getStringValueFromModel(Param.java:133)
              
                   at org.jboss.seam.navigation.Pages.getStringValuesFromModel(Pages.java:697)
              
                   at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:63)
              
                   at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
              
                   at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
              
                   at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
              
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
              
                   at org.richfaces.renderkit.html.ToolBarGroupRenderer.encodeChildren(ToolBarGroupRenderer.java:77)
              
                   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
              
                   at org.richfaces.renderkit.html.ToolBarRendererBase.encodeChildren(ToolBarRendererBase.java:81)
              
                   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              
                   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              
                   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              
                   at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              
                   at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
              
                   at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:174)
              
                   at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
              
                   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              
                   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              
                   at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
              
                   at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
              
                   at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
              
                   at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
              
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
              
                   at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
              
                   at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
              
                   at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
              
                   at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
              
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
              
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              
                   at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
              
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              
                   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.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              
                   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.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.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              
                   at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
              
                   at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
              
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
              
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
              
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              
                   at weblogic.security.service.SecurityManager.runAs(Unknown Source)
              
                   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
              
                   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
              
                   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
              
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
              
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
              
              
              
              On jndi tree, I see gpbcsDataSource, weblogic and ejb. Under deployments, I see the jboss-seam-discs_ear (autodeployed).
              
              
              


              Please advise how I can correctly configure the EntityManager?


              Thanks,
              Balvindar

              • 4. Re: Seam and trinidad on Weblogic 10 MP1
                Jay Balunas Novice

                The problem to me looks like configuring Weblogic correctly so that  an entitiy manager is available.


                The following code snip from your persistence.xml does nothing because it is jboss specific. 


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



                Check the weblogic docs for how to install or access an entitymanagerfactory.


                If you can not get an entitymanagerfactory from weblogic then try the following:


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



                Which will use seams entity manager factory.

                • 5. Re: Seam and trinidad on Weblogic 10 MP1
                  Balvindar Dhaliwal Newbie

                  Hi,


                  When I add:


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



                  With org.apache.openjpa.persistence.PersistenceProviderImpl provider, I get the following exception:


                  
                  
                  javax.ejb.EJBTransactionRolledbackException: EJB Exception: ; nested exception is: java.lang.RuntimeException: could not proxy delegate
                  
                       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:791)
                  
                       at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
                  
                       at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:421)
                  
                       at weblogic.ejb.container.internal.StatefulLocalObject.postInvokeTxRetry(StatefulLocalObject.java:86)
                  
                       at org.jboss.seam.example.seamdiscs.action.ArtistHomeImpl_w8ixis_ArtistHomeImpl.create(ArtistHomeImpl_w8ixis_ArtistHomeImpl.java:656)
                  
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  
                       at java.lang.reflect.Method.invoke(Method.java:585)
                  
                       at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                  
                       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                  
                       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                  
                       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                  
                       at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
                  
                       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                  
                       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                  
                       at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                  
                       at org.javassist.tmp.java.lang.Object_$$_javassist_1.create(Object_$$_javassist_1.java)
                  
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  
                       at java.lang.reflect.Method.invoke(Method.java:585)
                  
                       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.callCreateMethod(Component.java:2005)
                  
                       at org.jboss.seam.Component.newInstance(Component.java:1976)
                  
                       at org.jboss.seam.Component.getInstance(Component.java:1873)
                  
                       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.parser.AstValue.getValue(AstValue.java:63)
                  
                       at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                  
                       at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
                  
                       at org.jboss.seam.navigation.Param.getStringValueFromModel(Param.java:133)
                  
                       at org.jboss.seam.navigation.Pages.getStringValuesFromModel(Pages.java:697)
                  
                       at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:63)
                  
                       at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
                  
                       at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
                  
                       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
                  
                       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
                  
                       at org.richfaces.renderkit.html.ToolBarGroupRenderer.encodeChildren(ToolBarGroupRenderer.java:77)
                  
                       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                  
                       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                  
                       at org.richfaces.renderkit.html.ToolBarRendererBase.encodeChildren(ToolBarRendererBase.java:81)
                  
                       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                  
                       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                  
                       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
                  
                       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                  
                       at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
                  
                       at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:174)
                  
                       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                  
                       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                  
                       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                  
                       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                  
                       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                  
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                  
                       at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
                  
                       at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
                  
                       at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                  
                       at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                  
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
                  
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
                  
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
                  
                       at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
                  
                       at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                  
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
                  
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                  
                       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                  
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  
                       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.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                  
                       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.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.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                  
                       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                  
                       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                  
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
                  
                       at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
                  
                       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
                  
                       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
                  
                       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                  
                       at weblogic.security.service.SecurityManager.runAs(Unknown Source)
                  
                       at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
                  
                       at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
                  
                       at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
                  
                       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
                  
                       at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
                  
                  



                  With org.hibernate.ejb.HibernatePersistence provider, it complains about:


                  
                  WARNING: Found unrecognized persistence provider "org.hibernate.ejb.HibernatePer
                  
                  sistence" in place of OpenJPA provider.  This providers properties will not be u
                  
                  sed.
                  
                  WARNING: Found unrecognized persistence provider "org.hibernate.ejb.HibernatePer
                  
                  sistence" in place of OpenJPA provider.  This providers properties will not be u
                  
                  sed.
                  
                  <21-Apr-2008 20:18:30 o'clock BST> <Warning> <HTTP> <BEA-101162> <User defined l
                  
                  istener org.jboss.seam.servlet.SeamListener failed: javax.persistence.Persistenc
                  
                  eException: org.hibernate.AnnotationException: java.lang.NoSuchMethodException:
                  
                  org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.Resourc
                  
                  eBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hiberna
                  
                  te.annotations.common.reflection.ReflectionManager).
                  
                  javax.persistence.PersistenceException: org.hibernate.AnnotationException: java.
                  
                  lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.l
                  
                  ang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator
                  
                  , java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
                  
                          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
                  
                  258)
                  
                          at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hib
                  
                  ernatePersistence.java:120)
                  
                          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
                  
                  java:83)
                  
                          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.
                  
                  java:60)
                  
                          at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFa
                  
                  ctory(EntityManagerFactory.java:81)
                  
                  



                  Please advise.


                  Thanks,
                  Balvindar

                  • 6. Re: Seam and trinidad on Weblogic 10 MP1
                    Balvindar Dhaliwal Newbie

                    Hi,


                    Since I have had these odd errors with seamdiscs which I believe are related to the entitymanager than trinidad, will need to research the entitymanager more before I proceed.


                    In the meantime, I have resorted back to the booking example. I have got it working with trinidad. I copied all the trinidad configs from seamdiscs, also used the 1.2.1 trinidad api, impl and a4j-trinidad libs. In the faces-config.xml, just included:


                    
                    
                     <!-- Trinidad support -->
                    
                        <application>
                    
                            <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
                    
                        </application>
                    
                    
                    
                    



                    Are most trinidad components supported by seam, and integrate well with richfaces?


                    Thanks,
                    Balvindar