11 Replies Latest reply on Apr 27, 2010 6:11 PM by karnati

    Deploying seam application on weblogic 10.3.2 application server.

    karnati

      Hi All,


      I'm deploying seam application on weblogic 10.3.2 and getting below errors.


      Caused By: weblogic.deployment.EnvironmentException: Error loading the persistence descriptor
      WEB-INF/lib/jboss-seam-registration.jar!/META-INF/persistence.xml
      from the module jboss-seam-registration.war. See the following stack trace fornested errors: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
      
      C:\bea10.3.2\user_projects\domains\dev_domain\weblogic.utils.classloaders.GenericClassLoader@c3e000 finder:
      weblogic.utils.classloaders.CodeGenClassFinder@c4728f
      annotation: _appsdir_jboss-seam-registration_war@\WEB-INF\lib\jboss-seam-registration.jar!\META-INF\persistence.xml:10:6:10:6:
      problem: cvc-complex-type.2.4a: Expected elements 'non-jta-data-source@http://java.sun.com/xml/ns/persistence
      mapping-file@http://java.sun.com/xml/ns/persistence jar-file@http://java.sun.com/xml/ns/persistence
      class@http://java.sun.com/xml/ns/persistence exclude-unlisted-classes@http://java.sun.com/xml/ns/persistence
      properties@http://java.sun.com/xml/ns/persistence' instead of 'property@http://java.sun.com/xml/ns/persistence'
      here in element persistence-unit@http://java.sun.com/xml/ns/persistence:
      <weblogic.utils.classloaders.GenericClassLoader@c3e000 finder: weblogic.utils.classloaders.CodeGenClassFinder@c4728f
      annotation: _appsdir_jboss-seam-registration_war@/WEB-INF/lib/jboss-seam-registration.jar!/META-INF/persistence.xml:10:6>
      


      Please find persistece.xml file entries as below


      <?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="userDatabase">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>TestDB</jta-data-source>
      <property name="hibernate.dialect" value="org.hibernate.dialect.SybaseDialect"/>
      <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
      </persistence-unit>
      
      </persistence>
      
      



      I created data source with 'TestDB' in weblogic. The same application working good in Tomcat. For deploying into weblogic I created weblogic.xml and weblogic-application.xml files.


      If persistence.xml file entries are wrong in case of weblogic, then please send me sample persistence.xml file.


      Can anyone please let me know where I'm doing wrong and please correct me.


      Thanks in advance.


      Regards,
      Sharath.



        • 1. Re: Deploying seam application on weblogic 10.3.2 application server.

          I have gone through the same pains but came out successful.  We have been using Seam 2.2.0 and WebLogic 10.3 for some time now.


          Here is a sample persistence.xml from our project; the persistence.xml is by far one of the more challenging aspects of getting Seam to work with WebLogic.


          I trust you have setup your JDBC data source via the WLS console?


          Let me know if this helps; I'm willing to assist you as much as possible.  I remember how frustrating this ordeal was and information/help on WLS migration was hard to come by.



          <?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="englinkLocal" transaction-type="RESOURCE_LOCAL">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <jta-data-source>wls-local-h2-ds</jta-data-source>
                <properties>
                  <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                  <property name="hibernate.show_sql" value="false"/>
          
                  <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/>   
          
                  <property name="net.sf.ehcache.configurationResourceName" value="/ehcache2.xml"/>
          
                  <property name="hibernate.cache.use_query_cache" value="true"/>
                  <property name="hibernate.use_second_level_cache" value="true"/>
                  <property name="hibernate.default_batch_fetch_size" value="16"/>
                  <property name="hibernate.generate_statistics" value="true"/>
                  
                   
                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
          
                  <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
          
          <!-- ignore if you're not using Envers -->
                  <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.DefaultComponentSafeNamingStrategy"/>
                    <property name="hibernate.ejb.event.post-insert"
                       value="org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.post-update"
                       value="org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.post-delete"
                       value="org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.pre-collection-update"
                       value="org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.pre-collection-remove"
                       value="org.hibernate.envers.event.AuditEventListener"  />
                  <property name="hibernate.ejb.event.post-collection-recreate"
                       value="org.hibernate.envers.event.AuditEventListener" />
                  <property name="org.hibernate.envers.audit_table_suffix" value="_V" />
                  <property name="org.hibernate.envers.revision_field_name" value="ver_rev" />
          
                </properties>
             </persistence-unit>
          </persistence>
          



          • 2. Re: Deploying seam application on weblogic 10.3.2 application server.

            Also, your components.xml binding to your persistence/entityManager is important.


            Take a look at this snippet from components.xml from our project:

            <persistence:entity-manager-factory name="englinkLocal" auto-create="true"/>

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

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

            • 3. Re: Deploying seam application on weblogic 10.3.2 application server.
              karnati

              Hi Chris,


                 I deployed jsf1.2.war file into weblogic. Now when I tried to run seam application getting below errors



              Apr 6, 2010 11:00:29 AM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Initializing Sun's JavaServer Faces implementation (1.203-b04-FCS) for co
              ntext '/jboss-seam-registration'
              Apr 6, 2010 11:00:30 AM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Completed initializing Sun's JavaServer Faces implementation (1.2
              03-b04-F
              CS) for context '/jboss-seam-registration'
              Apr 6, 2010 11:00:33 AM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Initializing Sun's JavaServer Faces implementation (1.203-b04-FCS) for context '/jboss-seam-registration'
              Apr 6, 2010 11:00:33 AM com.sun.faces.config.ConfigureListener contextInitialized
              INFO: Completed initializing Sun's JavaServer Faces implementation (1.2
              03-b04-F
              CS) for context '/jboss-seam-registration'
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/userprojects/domains/devdomain/servers/AdminServer/tmp/WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/user
              projects/domains/devdomain/servers/AdminServer/tmp/WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/userprojects/domains/devdomain/serv
              ers/AdminServer/tmp/WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/user
              projects/domains/devdomain/serv
              ers/AdminServer/tmp/
              WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/userprojects/domains/devdomain/serv
              ers/AdminServer/tmp/WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
              Apr 6, 2010 11:44:49 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
              INFO: Added Library from: zip:C:/bea10.3.2/user
              projects/domains/devdomain/serv
              ers/AdminServer/tmp/
              WLuser/appsdirjboss-seam-registrationwar/r1lafi/war/WEB
              -INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
              Apr 6, 2010 11:45:00 AM com.sun.faces.lifecycle.InvokeApplicationPhase execute
              WARNING: Could not instantiate Seam component: register
              org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
                      at org.jboss.seam.Component.newInstance(Component.java:2156)
                      at org.jboss.seam.Component.getInstance(Component.java:2021)
                      at org.jboss.seam.Component.getInstance(Component.java:1983)
                      at org.jboss.seam.Component.getInstance(Component.java:1977)
                      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:148)


                      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)
                      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
                      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
              solver.java:64)
                      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                      at org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
                      at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
                      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:27
              6)
                      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.ja
              va:68)
                      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Met
              hodBindingMethodExpressionAdapter.java:88)
                      at com.sun.faces.application.ActionListenerImpl.processAction(ActionList
              enerImpl.java:95)
                      at javax.faces.component.UICommand.broadcast(UICommand.java:387)
                      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)


                      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:7
              56)
                      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
              ionPhase.java:97)
                      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
                      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)


                      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
              (StubSecurityHelper.java:227)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
              tyHelper.java:125)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
              a:292)
                      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
              va:56)
                      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
              ilter.java:27)
                      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
              va:56)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:3592)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
              dSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
              121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
              ervletContext.java:2202)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
              ontext.java:2108)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
              ava:1432)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
              Caused by: javax.naming.NameNotFoundException: While trying to lookup 'RegisterA
              ction.local' didn't find subcontext 'RegisterAction'. Resolved ''; remaining nam
              e 'RegisterAction/local'
                      at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
              NamingNode.java:1139)
                      at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
              a:247)
                      at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
              ava:182)
                      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:20
              6)
                      at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
              ava:254)
                      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
                      at javax.naming.InitialContext.lookup(InitialContext.java:392)
                      at org.jboss.seam.Component.instantiateSessionBean(Component.java:1400)
                      at org.jboss.seam.Component.instantiate(Component.java:1364)
                      at org.jboss.seam.Component.newInstance(Component.java:2134)
                      ... 38 more
              Apr 6, 2010 11:45:00 AM com.sun.faces.lifecycle.LifecycleImpl phase
              WARNING: executePhase(INVOKEAPPLICATION 5,com.sun.faces.context.FacesContextImp
              l@15635fa) threw exception
              javax.faces.FacesException: Could not instantiate Seam component: register
                      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
              ionPhase.java:105)
                      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
                      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)

                      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
              (StubSecurityHelper.java:227)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
              tyHelper.java:125)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
              a:292)
                      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
              va:56)
                      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
              ilter.java:27)
                      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
              va:56)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:3592)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
              dSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
              121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
              ervletContext.java:2202)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
              ontext.java:2108)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
              ava:1432)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
              Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam com
              ponent: register
                      at org.jboss.seam.Component.newInstance(Component.java:2156)
                      at org.jboss.seam.Component.getInstance(Component.java:2021)
                      at org.jboss.seam.Component.getInstance(Component.java:1983)
                      at org.jboss.seam.Component.getInstance(Component.java:1977)
                      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:148)

                      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)
                      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
                      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
              solver.java:64)
                      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                      at org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
                      at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
                      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:27
              6)
                      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.ja
              va:68)
                      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Met
              hodBindingMethodExpressionAdapter.java:88)
                      at com.sun.faces.application.ActionListenerImpl.processAction(ActionList
              enerImpl.java:95)
                      at javax.faces.component.UICommand.broadcast(UICommand.java:387)
                      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)

                      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:7
              56)
                      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
              ionPhase.java:97)
                      ... 18 more
              Caused by: javax.naming.NameNotFoundException: While trying to lookup 'RegisterA
              ction.local' didn't find subcontext 'RegisterAction'. Resolved ''; remaining nam
              e 'RegisterAction/local'
                      at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
              NamingNode.java:1139)
                      at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
              a:247)
                      at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
              ava:182)
                      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:20
              6)
                      at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
              ava:254)
                      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
                      at javax.naming.InitialContext.lookup(InitialContext.java:392)
                      at org.jboss.seam.Component.instantiateSessionBean(Component.java:1400)
                      at org.jboss.seam.Component.instantiate(Component.java:1364)
                      at org.jboss.seam.Component.newInstance(Component.java:2134)
                      ... 38 more
              Apr 6, 2010 11:45:00 AM EDT Error HTTP BEA-101017 ServletContext@19607627app:-appsdir-jboss-eam-registration-war module:jboss-seam-registration.war path:/jboss-seam-registration spec-version:2.5, request: weblogic.servlet.internal.ServletRequestImpl@669c84POST /jboss-seam-registration/register.seam HTTP/1.1Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml-xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, Referer: http://localhost:7001/jboss-seam-registration/register.seam Accept-Language: en-us Content-Type: application/x-www-form-urlencoded UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Content-Length: 180 Connection: Keep-Alive Cache-Control: no-cache Cookie: GUEST-LANGUAGE-ID:en-US; COOKIE
              SUPPORT:true; ADMINCONSOLESESSION:LkpWL7
              HJXjTH8kTdCYpB7qn2HLqp111hH22hJV3H1sJ8JhhlHjRX!-512864410; JSESSIONID:0mLXL7WP7n
              ljLhvdGMBGTky1TLNpkLhgjrngV4v5LGyFsf63t3hQ!-1277131764


              Root cause of ServletException.
              javax.naming.NameNotFoundException: While trying to lookup 'RegisterAction.local
              ' didn't find subcontext 'RegisterAction'. Resolved ''; remaining name 'Register
              Action/local'
                      at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
              NamingNode.java:1139)
                      at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
              a:247)
                      at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
              ava:182)
                      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:20
              6)
                      at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
              ava:254)
                      Truncated. see log file for complete stacktrace





                 I think this is something with ejb-jar.xml and components.xml files.



              Please find ejb-jar.xml as below


                <?xml version="1.0" encoding="UTF-8"?>
              <ejb-jar 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/ejb-jar_3_0.xsd"
                       version="3.0">
                       
                 <interceptors>
                   <interceptor>
                     <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
                   </interceptor>
                 </interceptors>
                 
                 <assembly-descriptor>
                    <interceptor-binding>
                       <ejb-name>RegisterAction</ejb-name>
                              <interceptor-class >org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
                    </interceptor-binding>
                 </assembly-descriptor>
                 
              </ejb-jar>
              
              



              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:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation=
                              "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd 
                               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">
              
                  <core:init jndi-pattern="#{ejbName}/local"/>
              
              </components>
              
              




                 Please check this files and let me know where I'm doing wrong.


                 Thanks for your help.


              Regards,
              Sharath.

              • 4. Re: Deploying seam application on weblogic 10.3.2 application server.
                karnati

                Can anyone please let me know how to correct his problem.


                Deploying seam application on weblogic.


                Thanks,
                Sharath.

                • 5. Re: Deploying seam application on weblogic 10.3.2 application server.

                  Sharath,


                  You'll also need to define the component in your web.xml.


                  Like so:




                  <ejb-local-ref>
                          <ejb-ref-name>#{project.name}/RegisterAction/local</ejb-ref-name>
                          <ejb-ref-type>Session</ejb-ref-type>
                          <local>package.name.to.interface.RegisterActionLocal</local>
                      </ejb-local-ref>






                  You'll need to do this for all EJBs that are called from your JSF pages.


                  Although I'm not 100% sure that the above is the fix to your issue above; Register is one of your own components, right, and not a Seam example component or a Seam embedded component?

                  • 6. Re: Deploying seam application on weblogic 10.3.2 application server.
                    karnati

                    I tried keeping below lines in web.xml file


                       <ejb-local-ref>
                            <ejb-ref-name>#{project.name}/RegisterAction/local</ejb-ref-name>
                            <ejb-ref-type>Session</ejb-ref-type>
                            <local>org.jboss.seam.example.registration.Register</local>
                        </ejb-local-ref>
                    



                    but getting below error


                    Caused By: weblogic.deployment.EnvironmentException: J2EE:160200Error resolvin
                    g ejb-ref '#{project.name}/RegisterAction/local' from module 'jboss-seam-registr
                    ation.war' of application '_appsdir_jboss-seam-registration_war'. The ejb-ref do
                    es not have an ejb-link and the JNDI name of the target bean has not been specif
                    ied. Attempts to automatically link the ejb-ref to its target bean failed becaus
                    e no EJBs in the application were found to implement the 'org.jboss.seam.example
                    .registration.Register' interface. Please link or map this ejb-ref to its target
                     EJB and ensure the interfaces declared in the ejb-ref are correct.
                            at weblogic.deployment.BaseEnvironmentBuilder.autowireEJBRef(BaseEnviron
                    mentBuilder.java:426)
                            at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBu
                    ilder.java:467)
                            at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
                            at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServlet
                    Context.java:3038)
                            at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.
                    java:1382)
                            Truncated. see log file for complete stacktrace
                    >
                    <Apr 8, 2010 8:20:28 AM EDT> <Error> <Deployer> <BEA-149202> <Encountered an exc
                    eption while attempting to commit the 1 task for the application '_appsdir_jboss
                    -seam-registration_war'.>
                    <Apr 8, 2010 8:20:28 AM EDT> <Warning> <Deployer> <BEA-149004> <Failures were de
                    tected while initiating deploy task for application '_appsdir_jboss-seam-registr
                    ation_war'.>
                    <Apr 8, 2010 8:20:28 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for
                    message 149004
                    weblogic.application.ModuleException: Could not setup environment
                            at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.
                    java:1384)
                            at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:416
                    )
                            at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleSta
                    teDriver.java:375)
                            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
                    river.java:83)
                            at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleS
                    tateDriver.java:95)
                            Truncated. see log file for complete stacktrace
                    
                    Caused By: weblogic.deployment.EnvironmentException: J2EE:160200Error resolvin
                    g ejb-ref '#{project.name}/RegisterAction/local' from module 'jboss-seam-registr
                    ation.war' of application '_appsdir_jboss-seam-registration_war'. The ejb-ref do
                    es not have an ejb-link and the JNDI name of the target bean has not been specif
                    ied. Attempts to automatically link the ejb-ref to its target bean failed becaus
                    e no EJBs in the application were found to implement the 'org.jboss.seam.example
                    .registration.Register' interface. Please link or map this ejb-ref to its target
                     EJB and ensure the interfaces declared in the ejb-ref are correct.
                            at weblogic.deployment.BaseEnvironmentBuilder.autowireEJBRef(BaseEnviron
                    mentBuilder.java:426)
                            at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBu
                    ilder.java:467)
                            at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
                            at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServlet
                    Context.java:3038)
                            at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.
                    java:1382)
                            Truncated. see log file for complete stacktrace
                    
                    



                       I'm trying seam example given in below link


                       http://docs.jboss.org/seam/1.0.1.GA/reference/en/html/tutorial.html


                        This is working fine in Tomcat but not in weblogic.


                        Can you please check these errors and let me know how to resolve this...


                        Thanks in advance.


                    Regards,
                    Sharath.




                    • 7. Re: Deploying seam application on weblogic 10.3.2 application server.

                      Sharath,


                      Sorry to hear you're still having issues, but I think we need to get some background information straight.


                      Which version of Seam are you using?  You wrote in your last post that you are using Seam 1.0.1.GA docs, but Seam did not support WebLogic back then (at least not WebLogic 10.3). 


                      Have you also looked at the JEE5 tutorials in the latest Seam documentation?


                      Here is what I did, if it helps...before even attempting to migrate our Seam application from JBoss to WebLogic 10, I first got the JEE5 examples (provided with the Seam distribution) to deploy and work 100%.


                      This helped me understand what can go wrong and how to fix it, not to mention understand how the EAR needs to be packaged.


                      Lastly, in your particular example above, is RegisterAction your class that implements "Register"?  Make sure that the ejb-link is the path to the interface for this RegisterAction bean.

                      • 8. Re: Deploying seam application on weblogic 10.3.2 application server.
                        karnati

                        Hi Chris,


                          Can you please send me your code for deploying sample application on weblogic10.3 which is working good.


                        Thanks,
                        Sharath.




                           

                        • 9. Re: Deploying seam application on weblogic 10.3.2 application server.

                          No, I don't mind - but you'll have to provide your email address so I can send it to you. :)

                          • 10. Re: Deploying seam application on weblogic 10.3.2 application server.
                            karnati

                            Hi Chris,


                              Please send your code with build.xml file to sharath(underscore)reddy21@yahoo.com. Please give me example with persistence of data also...


                               Please add underscore inbetween sharath and reddy...when I add this character it is giving formatting error(missing an underscore)...


                              Thanks for your help.


                            Regards,
                            Sharath.

                            • 11. Re: Deploying seam application on weblogic 10.3.2 application server.
                              karnati

                              Hi All,


                                Can anyone please send me working example, deploying seam framework on weblogic10.3 application server. Please provide the example which is communicating with database...


                                My email id is sharath(underscore)reddy21@yahoo.com


                                Thanks in advance.


                              Regards,
                              Sharath.