10 Replies Latest reply: Feb 3, 2009 7:13 PM by 678096 RSS

    Deploying ear application - migrating from OC4j to Weblogic

    513155
      I am trying to migrate application from OC4J to weblogic server. Apart from usual differences in descriptors, structure of EAR etc. I came across unusual error:


      "both the remote home and remote component interface must be specified. Currently, only one of them is specified"
      It is about deploying session bean. Usual EJB3 stateless session bean with local and remote interface, deployed without any problem on OC4J and JBoss. Of course, I know home interfaces are something to do with EJB 2.1, but this is EJB3 application and, I guess, Weblogic has full support for it. Does it? :)

      Anyway, is there workaround? Or am I missing something? I don't have to tell you what problems we will be facing if I have to restructure whole application with dozens and hundreds of session beans.


      Thanks a lot!
        • 1. Re: Deploying ear application - migrating from OC4j to Weblogic
          Olaf Heimburger-Oracle
          Would you mind to tell us which version of WLS you're talking about?
          --olaf                                                                                                                                                                                   
          • 2. Re: Deploying ear application - migrating from OC4j to Weblogic
            513155
            It is version 10.3, the one that comes with instalation of new JDeveloper 11.
            • 3. Re: Deploying ear application - migrating from OC4j to Weblogic
              Olaf Heimburger-Oracle
              Ok, fine. Could you try to "Run" the session bean?
              --olaf                                                                                                                                                                                                       
              • 4. Re: Deploying ear application - migrating from OC4j to Weblogic
                513155
                Well, I am trying to deploy EAR using Weblogic console. Application has been developed both in Eclipse and JDev, and assembled using Maven, so I am restructuring EAR to fit to Weblogic standards. So far it was OK, application is as standard as possible (complying to EJB3 standard descriptors). Session beans are specified using annotations and standard ejb-jar.xml. Perhaps there is need for additional weblogic specific descriptors apart from standard ejb-jar.xml?
                • 5. Re: Deploying ear application - migrating from OC4j to Weblogic
                  Olaf Heimburger-Oracle
                  OK. I just want to make sure that there are no problems with the deployment descriptors.
                  To pin point the problem do the following in JDeveloper:
                  1. Create a simple EJB 3.0 session bean
                  2. On that session bean create a Sample Java Client.
                  3. Run the Session Bean
                  4. Run the Client
                  5. If both are running fine, compare the deployment descriptors from the sample and your real application.

                  --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
                  • 6. Re: Deploying ear application - migrating from OC4j to Weblogic
                    513155
                    I have, of course, already tried that on a simple case similar to what you suggested. Test application has been built using JDev, and the same problem occurs. Our project needs, because of its modularized structure, ejb-jar.xml so that SSB are visible and EJB links are needed for our applications specific needs.

                    The real problem seems to be that Weblogic treats out deployment descriptor as EJB 2.1, although ejb-jar.xml version clearly states that it is EJB 3.0 as follows:

                    <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"
                    version="3.0" xmlns="http://java.sun.com/xml/ns/javaee">


                    Again, I say, both OC4J and JBoss had no problems of this kind.
                    • 7. Re: Deploying ear application - migrating from OC4j to Weblogic
                      Olaf Heimburger-Oracle
                      Strangely enough, I just did the same twice and could not reproduce your problem. It works like expected with my Integrated WLS.
                      I could send you the sample project, if you drop me a mail.

                      --olaf                                                                                                                                                                                                                                                                                                                                                                                                               
                      • 8. Re: Deploying ear application - migrating from OC4j to Weblogic
                        513155
                        sure thing! You got my mail! Thanks for all help.

                        edit: simple test app iwith empty ejb-jar.xml is deployed with no problems. However, our app still cant be deployed.

                        Edited by: mishaerror on Oct 30, 2008 7:41 AM
                        • 9. Re: Deploying ear application - migrating from OC4j to Weblogic
                          678096
                          Hi,

                          has this been resolved in any way?

                          We're having a very similar kind of problem - 5 of our 6 EJB's deploy fine with just the annotations, but one won't. So we've tried not using the annotations for that one, and using an entry in ejb-jar.xml instead. Even though that file has the EJB3 header, WebLogic calls for both a home and remote interface to be specified, so apparently treats it as EJB 2.1.

                          I'd be grateful for any hint on this.

                          Cheers,
                          Jan
                          • 10. Re: Deploying ear application - migrating from OC4j to Weblogic
                            678096
                            As an update on this, it seems our problem is related to either the file size or the number of methods in the EJB.
                            We moved some of the methods from the problematic EJB into another, smaller one, and now both work.

                            The EJB class had about 36 interface methods, the class file was under 4 kB.

                            Is this a known issue in WebLogic 10.0? Would it help to change to 10.3?
                            I read something about problems with large classfiles and an available patch CR330339, but this is supposed to be relevant only for class files > 40 kB. Our class file is < 4 kB, and even the .java source is just 27 kB.

                            Cheers,
                            Jan