1 2 Previous Next 15 Replies Latest reply on Jun 9, 2010 8:02 PM by shavo26

    WebLogic 10.3 + Seam integration problems

    rseely.roberto.sogetthis.com

      Hello!  I'm new to Seam, and am running into problems integrating it into WebLogic 10.3.  After completing the instructions at http://docs.jboss.org/seam/2.1.0.SP1/reference/en-US/html/weblogic.html, I had some problems with many classes not being found by WLS, and ultimately wound up changing the build.xml script in the Seam examples directory to include these jars with the .ear deployment:


      <!-- Added to the ear lib directory on build -->
      <fileset id="ear.lib.extras" dir="${seam.dir}">
              <include name="examples/wiki/lib/jboss-archive-browsing.jar" />
              <include name="lib/concurrent.jar" />
              <include name="lib/antlr.jar"/>
              <include name="lib/asm.jar"/>
              <include name="lib/cglib.jar"/>
              <include name="lib/commons-beanutils.jar"/>
              <include name="lib/commons-collections.jar"/>
              <include name="lib/commons-digester.jar"/>
              <include name="lib/commons-fileupload.jar"/>
              <include name="lib/commons-logging.jar"/>
              <include name="lib/commons-logging-api.jar"/>
              <include name="lib/richfaces*.jar" />
              <include name="lib/dom4j.jar"/>
              <include name="lib/hibernate-annotations.jar"/>
              <include name="lib/hibernate-commons-annotations.jar"/>
              <include name="lib/hibernate-entitymanager.jar"/>
              <include name="lib/hibernate-search.jar"/>
              <include name="lib/hibernate-validator.jar"/>
              <include name="lib/hibernate.jar"/>
              <include name="lib/javassist.jar"/>
              <include name="lib/jboss-archive-browsing.jar"/>
              <include name="lib/concurrent.jar"/>
              <include name="lib/jboss-common-core.jar"/>
              <include name="lib/jboss-el.jar"/>
              <include name="lib/log4j.jar"/>
              <include name="lib/lucene-core.jar" />
      </fileset>
      




      That resolved all of my deployment problems, and WLS now shows the deployed application.  When I navigate to http://localhost:7001/seam-booking, though, I get different results in different browsers:


      1) In Firefox, I'm pushed to http://mdurant:7001/seam-booking/debug.seam?cid=5, where Firefox immediately complains that The page isn't redirecting properly;


      2) In IE, the page hangs indefinitely, and if I view source on it, I see a <meta http-equiv="Refresh" content="0; URL=home.seam"> tag inside the <head> tag of an otherwise empty document; and


      3) Opera gives me an open/save dialog for home.seam.


      I'm not sure where to take it from here.  It seems like I shouldn't have needed to make the build.xml changes that I mentioned above, so maybe my problem begins there.  I did go through the instructions twice, and ended at the same result each time.


      Any help is appreciated!


      All best,
      Robert

        • 1. Re: WebLogic 10.3 + Seam integration problems
          rseely.roberto.sogetthis.com

          I should have been clearer here:  This was all for the booking example.  Thanks!

          • 2. Re: WebLogic 10.3 + Seam integration problems
            asookazian

            From the jee5 example's readme.txt:


            WebLogic 10.3
            ---------------------------
            Weblogic support requires some specific patches from Oracle/BEA so that their
            EJB3 support fuctions correctly.  Please refer to the Seam reference guide for 
            additional information.



            from the jpa example's readme.txt:


            WebLogic 10.X:
              * Install WebLogic 10.X
              * Create an hsql datasource called 'seam-jpa-ds" (see reference guide)
              * Deploy Weblogics jsf-1.2.war shared library for JSF 1.2 support. (see reference guide)
              * ant weblogic10
              * Start the WebLogic domain you created or the "examples" domain if installed.
              * Load the admin console http://localhost:7001/console/
              * Deploy dist-weblogic10/jboss-seam-jpa.war
              * Access the app at http://localhost:7001/jboss-seam-jpa/
              * See Weblogic reference guide chapter for full details.

            • 3. Re: WebLogic 10.3 + Seam integration problems
              rseely.roberto.sogetthis.com

              Thanks, Arbi ... I'll give the JPA example a shot, and will post results back.


              I would still like to try to get the booking example working, though, so if anyone else has a thought on why it might deploy but hang indefinitely, I'd still be interested in feedback on that front.

              • 4. Re: WebLogic 10.3 + Seam integration problems
                rseely.roberto.sogetthis.com

                Ignore that last message ... what I meant was the booking example referenced in my link (in /examples/booking).  The /examples/jpa/ folder worked great, though, and I'm up and running.  Thanks again, Arbi!

                • 5. Re: WebLogic 10.3 + Seam integration problems
                  mmaia

                  I have exactly the same problem. Did you manage to solve this issue?


                  tx in advance.

                  • 6. Re: WebLogic 10.3 + Seam integration problems

                    I am using Seam 2.2.0 on WebLogic 10.3.1; you do not need to apply the BEA patches if you are using 10.3 or greater.


                    I agree with your approach of getting the Booking example to work first; that's what I did.


                    It is very important to make sure that your EAR is packaged properly for WLS; I seem to recall that the JEE5 instructions were helpful, but by no means resolved all of the issues that I encountered deploying the /booking example.


                    Do you have any specific errors?  I can try to help as best I can.

                    • 7. Re: WebLogic 10.3 + Seam integration problems
                      shavo26

                      Hi all,
                      I get this same issue when im deploying my ear app on weblogic.
                      Environment:
                      Seam 2.2.0.GA
                      Weblogic 10.3.2
                      JDK 1.6


                      Ive followed the details at:
                      Seam and Weblogic


                      I got the jpa example working but when i try to integrate changes into my own application (CRUD project generated by seam gen) it deploys fine but when i try and access the url on firefox i get The page isn't redirecting properly


                      Anyone know how to fix this?


                      Thanks,
                      Shane.

                      • 8. Re: WebLogic 10.3 + Seam integration problems
                        shavo26

                        Still cant get this work, seriously painful.
                        Im deploying my ear on weblogic 10.3.2. My app was generated via seam-gen. This deploys perfectly on jboss 5. Only when i make some changes and deploy to weblogic does it not work. Ear deploys fine and state is active. When i try and access the url on firefox, i get that error: The page isn't redirecting properly. I see no error in the logs at all.


                        I did get jpa example from seam working on weblogic 10.3.2. 


                        i followed all the steps on seam reference documentation:
                        Setup weblogic jsf support


                        Setup datasource via weblogic console, test connection fine


                        Added weblogic-application.xml and included in ant build.xml


                        Added weblogic.xml


                        Copied over jboss-seam-wls-compatible.jar  and renamed to jboss-seam.jar


                        Added entry in components.xml


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



                        Added entry in web.xml


                         <listener>
                        
                           <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                        
                         </listener>



                        Added entry in persistence.xml



                        <persistence-unit name="weblogic_example" transaction-type="RESOURCE_LOCAL">
                        



                        <property name="hibernate.transaction.manager_lookup_class" 
                        
                           value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>



                        Added in library packages in deployed-jars-ears



                        #-------For weblogic--------#
                        #Use hibernate as JPA provider
                        hibernate-core.jar
                        hibernate-commons-annotations.jar
                        hibernate-annotations.jar
                        hibernate-entitymanager.jar
                        hibernate-validator.jar
                        hibernate-search.jar
                        jboss-common-core.jar
                        commons-logging.jar
                        commons-collections.jar
                        jboss-common-core.jar 
                        lucene-core.jar
                        #Various third party jars that Weblogic needs
                        antlr.jar
                        dom4j.jar
                        el-ri.jar
                        javassist.jar
                        concurrent.jar 



                        Ive ran through this over ten times now, app still deploys fine but get that error when i try and access the url. No exceptions appear in the server log.


                        Help!















                        • 9. Re: WebLogic 10.3 + Seam integration problems
                          shavo26

                          Anyone!?

                          • 10. Re: WebLogic 10.3 + Seam integration problems

                            Shane,


                            First off, part of the problem here is that this forum does not notify repliers to the original thread when there has been a new post.  That aside, you say the app deploys fine.  What is the the context name of the app?  Are you certain you are accessing the right URL?


                            If the page isn't redirecting properly, this (to me) sounds more like a faces-config problem.  Can you post it?

                            • 11. Re: WebLogic 10.3 + Seam integration problems
                              shavo26

                              Thanks so much for the reply Chris.


                              Im definitely accessiing the correct url it is


                              http://localhost:7001/EbusinessHibernate

                              context root is defined in my application.xml and i have other web projects running on weblogic i can access.




                              <module>
                                    <web>
                                       <web-uri>EbusinessHibernate.war</web-uri>
                                       <context-root>/EbusinessHibernate</context-root>
                                    </web>
                                 </module>





                              Faces-config is below:




                              <?xml version='1.0' encoding='UTF-8'?>
                              <faces-config version="1.2"
                                            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-facesconfig_1_2.xsd">
                              
                                 <application>
                                    <locale-config>
                                       <default-locale>en</default-locale>
                                       <supported-locale>bg</supported-locale>
                                       <supported-locale>de</supported-locale>
                                       <supported-locale>en</supported-locale>
                                       <supported-locale>fr</supported-locale>
                                       <supported-locale>it</supported-locale>
                                       <supported-locale>tr</supported-locale>
                                    </locale-config>
                                    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
                                 </application>
                              
                              </faces-config>



                              Components.xml



                              <?xml version="1.0" encoding="UTF-8"?>
                              <components xmlns="http://jboss.com/products/seam/components"
                                          xmlns:core="http://jboss.com/products/seam/core"
                                          xmlns:persistence="http://jboss.com/products/seam/persistence"
                                          xmlns: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:web="http://jboss.com/products/seam/web"
                                          xmlns:transaction="http://jboss.com/products/seam/transaction"
                                          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/persistence http://jboss.com/products/seam/persistence-2.2.xsd
                                               http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                                               http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
                                               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                                               http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                                               http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                                               http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd
                                               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">
                              
                                 <core:init  jndi-pattern="@jndiPattern@"/>
                              
                                 <core:manager concurrent-request-timeout="500"
                                               conversation-timeout="120000"
                                               conversation-id-parameter="cid"
                                               parent-conversation-id-parameter="pid"/>
                              
                                 <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
                                 <web:hot-deploy-filter url-pattern="*.seam"/>
                                 
                                 <transaction:entity-transaction entity-manager="#{entityManager}"/>
                              
                                 <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                                    persistence-unit-jndi-name="java:/EbusinessHibernateEntityManagerFactory"/>
                              
                                 <drools:rule-base name="securityRules">
                                    <drools:rule-files>
                                       <value>/security.drl</value>
                                    </drools:rule-files>
                                 </drools:rule-base>
                              
                                 <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
                              
                                 <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
                              
                                 <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="localhost" port="25"/>
                              
                                 <!-- For use with jBPM pageflow or process management -->
                                 <!--
                                 <bpm:jbpm>
                                    <bpm:process-definitions></bpm:process-definitions>
                                    <bpm:pageflow-definitions></bpm:pageflow-definitions>
                                 </bpm:jbpm>
                                 -->
                              
                              </components>



                              This was a seam generated CRUD app, that i could deploy on jboss and altered to deploy on weblogic.


                              Your help is much appreciated.


                              Thanks,
                              Shane.







                              • 12. Re: WebLogic 10.3 + Seam integration problems

                                Shane,


                                Nothing is popping out to me; though, in components.xml, please add this line:


                                <navigation:pages http-port="7001" https-port="7002"/>


                                Can you post your web.xml and weblogic.xml (separate files)?


                                • 13. Re: WebLogic 10.3 + Seam integration problems
                                  shavo26

                                  Hi Chris,
                                  havent had a chance yet to add in those additions to components.xml.


                                  Here is my web.xml and weblogic.xml


                                  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">
                                  
                                     <!-- RichFaces -->
                                  
                                     <context-param>
                                        <param-name>org.richfaces.SKIN</param-name>
                                        <param-value>blueSky</param-value>
                                     </context-param>
                                  
                                     <!-- Suppress spurious stylesheets -->
                                  
                                     <context-param>
                                        <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                                        <param-value>disable</param-value>
                                     </context-param>
                                  
                                     <context-param>
                                        <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
                                        <param-value>disable</param-value>
                                     </context-param>
                                  
                                     <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->
                                  
                                     <context-param>
                                        <param-name>org.richfaces.LoadStyleStrategy</param-name>
                                        <param-value>ALL</param-value>
                                     </context-param>
                                  
                                     <context-param>
                                        <param-name>org.richfaces.LoadScriptStrategy</param-name>
                                        <param-value>ALL</param-value>
                                     </context-param>
                                  
                                     <!-- Seam -->
                                  
                                     <listener>
                                        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                                     </listener>
                                     
                                     <listener>
                                     <listener-class>com.sun.faces.config.ConfigureListener</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>@debug@</param-value>
                                     </context-param>
                                  
                                     <!-- JSF -->
                                  
                                     <context-param>
                                        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                                        <param-value>.xhtml</param-value>
                                     </context-param>
                                  
                                     <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>
                                  
                                     <security-constraint>
                                        <display-name>Restrict raw XHTML Documents</display-name>
                                        <web-resource-collection>
                                           <web-resource-name>XHTML</web-resource-name>
                                           <url-pattern>*.xhtml</url-pattern>
                                        </web-resource-collection>
                                        <auth-constraint/>
                                     </security-constraint>
                                  
                                     <!-- uncomment <ejb-local-ref> entries when deploying to GlassFish and (optionally) JBoss AS 5 -->
                                     <!--
                                     <ejb-local-ref>
                                        <ejb-ref-name>EbusinessHibernate/AuthenticatorBean/local</ejb-ref-name>
                                        <ejb-ref-type>Session</ejb-ref-type>
                                        <local-home/>
                                        <local>ebusiness.weblogic.action.Authenticator</local>
                                     </ejb-local-ref>
                                     -->
                                  
                                     <!-- Add entries for each EJB session bean which is also a Seam component (not required on JBoss AS) -->
                                  
                                    
                                  
                                  </web-app>



                                  weblogic.xml




                                  <?xml version="1.0" encoding="UTF-8"?>
                                  <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
                                     <library-ref>
                                        <library-name>jsf</library-name>
                                        <specification-version>1.2</specification-version>
                                        <implementation-version>1.2</implementation-version>
                                        <exact-match>false</exact-match>
                                     </library-ref>
                                     <container-descriptor>
                                        <prefer-web-inf-classes>true</prefer-web-inf-classes>
                                     </container-descriptor>
                                  </weblogic-web-app>



                                  Thanks,
                                  Shane.


                                  • 14. Re: WebLogic 10.3 + Seam integration problems
                                    shavo26

                                    Added in navigation element to components.xml chris, still does not work im afraid!

                                    1 2 Previous Next