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

    WebLogic 10.3 + Seam integration problems

    Robert Seely Newbie

      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" />

      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,

        • 1. Re: WebLogic 10.3 + Seam integration problems
          Robert Seely Newbie

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

          • 2. Re: WebLogic 10.3 + Seam integration problems
            Arbi Sookazian Master

            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
              Robert Seely Newbie

              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
                Robert Seely Newbie

                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
                  Marcos Maia Newbie

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

                  tx in advance.

                  • 6. Re: WebLogic 10.3 + Seam integration problems
                    Chris Simons Expert

                    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
                      shane lee Newbie

                      Hi all,
                      I get this same issue when im deploying my ear app on weblogic.
                      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?


                      • 8. Re: WebLogic 10.3 + Seam integration problems
                        shane lee Newbie

                        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


                        Added entry in persistence.xml

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

                        <property name="hibernate.transaction.manager_lookup_class" 

                        Added in library packages in deployed-jars-ears

                        #-------For weblogic--------#
                        #Use hibernate as JPA provider
                        #Various third party jars that Weblogic needs

                        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.


                        • 10. Re: WebLogic 10.3 + Seam integration problems
                          Chris Simons Expert


                          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
                            shane lee Newbie

                            Thanks so much for the reply Chris.

                            Im definitely accessiing the correct url it is


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


                            Faces-config is below:

                            <?xml version='1.0' encoding='UTF-8'?>
                            <faces-config version="1.2"
                                          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">


                            <?xml version="1.0" encoding="UTF-8"?>
                            <components xmlns="http://jboss.com/products/seam/components"
                                            "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"
                               <!-- 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"
                               <drools:rule-base name="securityRules">
                               <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 type="org.jboss.seam.security.loginSuccessful">
                                  <action execute="#{redirect.returnToCapturedView}"/>
                               <mail:mail-session host="localhost" port="25"/>
                               <!-- For use with jBPM pageflow or process management -->

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

                            Your help is much appreciated.


                            • 12. Re: WebLogic 10.3 + Seam integration problems
                              Chris Simons Expert


                              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
                                shane lee Newbie

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

                                Here is my web.xml and weblogic.xml


                                <?xml version="1.0" ?>
                                <web-app xmlns="http://java.sun.com/xml/ns/javaee"
                                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                                   <!-- RichFaces -->
                                   <!-- Suppress spurious stylesheets -->
                                   <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->
                                   <!-- Seam -->
                                      <filter-name>Seam Filter</filter-name>
                                      <filter-name>Seam Filter</filter-name>
                                      <servlet-name>Seam Resource Servlet</servlet-name>
                                      <servlet-name>Seam Resource Servlet</servlet-name>
                                   <!-- Facelets development mode (disable in production) -->
                                   <!-- JSF -->
                                      <servlet-name>Faces Servlet</servlet-name>
                                      <servlet-name>Faces Servlet</servlet-name>
                                      <display-name>Restrict raw XHTML Documents</display-name>
                                   <!-- uncomment <ejb-local-ref> entries when deploying to GlassFish and (optionally) JBoss AS 5 -->
                                   <!-- Add entries for each EJB session bean which is also a Seam component (not required on JBoss AS) -->


                                <?xml version="1.0" encoding="UTF-8"?>
                                <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
                                   xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">


                                • 14. Re: WebLogic 10.3 + Seam integration problems
                                  shane lee Newbie

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

                                  1 2 Previous Next