on 12-19-2007 5:40 AM
Hi Experts,
I want to add a refernce of my EJB DC or correcponding EAR DC to my Java DC.
I am getting a java.lang.NoClassDefFoundError for a EJBHome interface class in my Java DC.
Can you guys help me.
Regards,
Ashish Shah
Hi Ashish,
I'm not sure I got you right in which direction you want to set the reference, but your second sentence would imply that it's from the Java DC to the EAR DC, right? If that's the case, I have further doubts about how you run this Java DC?
Please have a look at this [thread|;. As Ken explained there, you need to create a deployable unit for your Java DC. The only difference is that in NW CE 7.1 you can only create an application (EAR DC) - Library DC is not supported.
HTH!
\-- Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vladmir,
Let me explain my scenario.
1) I have a EJB DC.
2) To Deploy this EJB DC , i have created an EAR DC.
3) To access the methods in EJB DC, i have created a java DC, which acts as java command bean DC.
4) To deploy this Java DC i have created a Java library DC.
5) I am using this java DC from a WebDynpro DC application, in webDynpro application i have added the library reference to the java library DC.
Now i am getting the error "java.lang.NoClassDefFoundError for a EJBHome interface" while calling java command bean from WebDynpro DC.
Now this error seems to be due to the incorrect or missing reference in the java DC to the EJB or EAR DC.
Can you please guide me on what am i missing?
Regards,
Ashish Shah
Hi Valdimir,
Thank you for your suggested solution. I have added reference to EAR DC as you suggested, and now I got "ClassCastException" after looking up the service.
If I look up the service locally, I got ClassCastExceptoin when I try to cast from MyServiceLocalHomeImpl0_0 to MyServiceLocalHome.
If I look up the service remotely, I got ClassCastException when I try to narrow the remote object from MyServiceHome_Stub to MyServiceHome.
Any help is very much appeciated.
Regards,
Van
Hey Ashsih,
Unfortunately you can't call EJB methods from java class which is deployed along with J2EE library DC.
here is the solution for your problem.
1.create 2 public parts(api and sda) for your java classes(command Bean).
2.add both public parts to web Dynpro DC as used DC's.
3.remove the fererence to j2EE DC from your web dynpro DC.
4.add a reference to Ear in your Web Dynpro DC.
5.you no need to deploy the J2EE DC as it is not required.
when you add sda public part to web dynpro DC,web dynpro DC packs the jar file(command beans) in web dynpro ear file and deployes along with it.
hope this solves your problem
With Regards,
Balaram Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.