cancel
Showing results for 
Search instead for 
Did you mean: 

EJBCollection class not found

Former Member
0 Kudos

Hi,

I have created a web service from a java class. In this java class I call a finder method of a container managed Persistence bean which returns a Collection of remote interfaces.

When I try to run this the web service method complains value='Exception : com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.lang.ClassNotFoundException: com.sap.engine.services.ejb.entity.finder.EJBCollection\r\nFound in negative cache\r\n

This EJBCollection class is in the sapj2eeclient.jar file. I have added it to the classpath and still it complains.

If I try to get a single object it is fine it is only when I am trying to get a collection it complains.

Any ideas as to what I need to include ?

thanks

Padmaja

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I got this error once my problem whas that I was throwing an exception containing another exception.

The other exception was SQLException returned as an Exception. But when it was unpacket at the client side I got the

I/O operation failed : java.lang.ClassNotFoundException

on SQLException because it wasn't included as a type in the webservice.

You might want to check you your returns. You might be returning an EJBCollection wrapped in something else.

Or check the VI for the EJBCollection type.

Hope it helps

- Rasmus

Vlado
Advisor
Advisor
0 Kudos

Hi Padmaja,

Firstly, sorry for the late reply.

Which classpath have you added the sapj2eeclient.jar to? Please give more details what you are doing exactly. You need to add a reference from the application with which the web service is deployed to the application containing the EJB.

Best regards,

Vladimir

Former Member
0 Kudos

As I have created the web service from a Java class I cannot add a reference to that class as I do not have an associated web module from which to add it.

So the question is can I access a entitybean and it methods from a web service endpoint which is created from a Java class?

I tried to add the the sapj2eeclient.jar to the webservie project.

I know this is a server side entity and the classloader doe snto seem to load it.

I also tried to add the add_ejb.jar which also has the EJBCollection to the classpath but even that does not get loaded.

let me know if you need more details

Padmaja

Former Member
0 Kudos

Hi everyone, how did you solve this problem ?

In our case. We have an entity CMP bean in a j2ee application and we are calling it from a DynPage. I can access the findByPrimaryKey (returning one object) method of this bean but not a findByStatus (returning a Collection of objects) method.

i guess it's because the findByStatus is trying to return an EJBCollection. But i don't unterstand what i should do.

i've already added the add_ejb.jar in the ejb project and in the dynpage project, but we're still getting the error...

Thank you,

mejj

Former Member
0 Kudos

Hi Padmaja,

Did you ever sort out this issue?

BRgds,

Simon