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!
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?
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.
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:
Again, I say, both OC4J and JBoss had no problems of this kind.
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
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.
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.