cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ejb-jar.xml

Former Member
0 Kudos

Dear Experts,

I am doing the J2EE application migration from JBoss to Web AS 7.1. I am using NWDS for CE to build and to deploy this application. I have done this with non-dc type J2ee projects and I was able to deploy the application. But when I converted these into DC type projects, I have encountered a problem.

Here I created the DC type EJB module and I copied the bean classes from the non-dc project into EJB dc under ejbmodule, after build I was able to see all the packages which contains the classes are packed into ejb_client.jar entity under client public part, but when I copied the contents into the ejb-jar.xml file, build was successful but some of the packages were missed. If I leave the ejb-jar.xml without any entities, all the class files are packaged into the client.jar.

I added this EJB DCs public parts as dependencies in the Web Module DC. So it is throwing errors because of missing class files.

What could be the problem? Kindly suggest me to resolve this issue.

Thanks and Regards,

Karthik

Accepted Solutions (0)

Answers (1)

Answers (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Karthik,

Question is, which classes are "missing" in the client jar? Are these bean classes or bean interfaces or some additional (helper) classes?

I'd assume that bean classes are left out of the client public part as they should not be needed by referring modules.

Regards,

\-- Vladimir

Former Member
0 Kudos

Hi Vladimir,

Some of them are bean classes and some are helper classes, but the bean interfaces are exist.

These missed class files are compulsory to build the web module.

Regards,

Karthik

Vlado
Advisor
Advisor
0 Kudos

Hi Karthik,

This is correct. By default only bean interfaces are exposed into the client PP. In general, there is no need for the bean classes to be visible to the client.

If you need to add some additional classes to the PP, you can do that manually.

HTH!

\-- Vladimir

Former Member
0 Kudos

Hi Vladimir,

Yes. I have done that way, I kept the sources in a java dc project and generated a public part using them. Then I added this as depedency to the web module, now it is accepting the class file references. I am able to make the deployment.

but the deployment finished with a warning, the warning is :

Initialization of servlet StartupServlet failed. Check init() method of servlet. Error is: javax.servlet.ServletException: Error initializing.

what could be the reason for this?

Regards,

Karthik

Vlado
Advisor
Advisor
0 Kudos

Hi Karthik,

No need to create separate Java DC but anyway - check for more info in the server trace file:

/usr/sap/<SID>/<instance>/j2ee/cluster/server<N>/log/defaultTrace.trc.

HTH!

\-- Vladimir

Former Member
0 Kudos

Hi Vladimir,

My problem is solved. There are some property files in the ejb module and these were not able to load because of incorrect classpath. I changed them and now it is deployed without warning.

Thanks for your suggestions,

Kind Regards,

Karthik