cancel
Showing results for 
Search instead for 
Did you mean: 

Public Parts and NoClassDefFound

Former Member
0 Kudos

Hi,

I created an EJB with a public part. in the public part there are two classes.

now I want to use the classes in a WebDynpro-Project (same SC). I added the public parts as used-DC in my WebDynpro-DC and I am able to build and deploy the DC.

But now I get a RuntimeException "NoClassDefFoundError".

Did I forget to add a reference???

Thanks in advance

Jan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jan,

Check if you have deployed the DC containing the EJB as well. Build both the embedder and embedding DCs and deploy them.

You may refer <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c">Using EJBs in Web Dynpro Applications</a> for a better approach.

Bala

Former Member
0 Kudos

Hi Bala,

yes, both DCs are deployed.

I do not want to use the functions of the bean but only access two classes wich are defined in the EJB-Project.

After putting those classes in the public parts of the EJB-Project, I was able to build the WD-Project, but not to run it

regards

Jan

Former Member
0 Kudos

Jan,

Check

1.) If the Public Part is declared to be used only at <i>Build Time</i>!!.

2.) If the <i>ejb.jar </i> file of your EJB project has been added to the classpath of your WD project.

3.) If the WebDynpro sharing reference property of your WD project has a reference to the EJB.

Finally, refer this:

Bala

Former Member
0 Kudos

Bala and Shubham!

the thing I forgot was the sharing reference to the EJB. Now it works.

Thank you both!!

regards

Jan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jan,

Check

1) If you have deployed your EJB on the server.

2) When you created the usage, what dependency you gave (runtime, designtime)

3) You might have to add your EJB as a WebDynpro Reference.

Regards,

Shubham