Hi,
I am trying to develop J2EE project with JBoss 4.0 as App Server and JDO for database management. I have experiences with JDO but just started in J2EE technology and it seems to be hard part for me.
Now, I have strange issue with JDO objects and don't know where to search for solution.
I wrote an app in JBoss 4.0 and want to use JDO objects in Session Beans. I wrote one Stateless Session bean with such a method:
/**
* @ejb.interface-method
*/
public HashSet getBadania()
{
HashSet r=new HashSet();
Badanie b=new Badanie();
r.add(B);
return r;
}
Now, Badanie class is persistence capable and is inside the same jar as Session Bean class. When I do not enhance PC classes everything here works ok. But if I enhance them (using SunReferenceEnhancer) I get the exception when invoking getBadania() remote method:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerError: Unexpected Error; nested exception is:
java.lang.NoClassDefFoundError: optiquest/db/Badanie
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
(...)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: java.rmi.ServerError: Unexpected Error; nested exception is:
java.lang.NoClassDefFoundError: optiquest/db/Badanie
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:374)
(...)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NoClassDefFoundError: optiquest/db/Badanie
at optiquest.ServerBean.getBadania(ServerBean.java:54)
(...)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
... 24 more
I can look inside ear -> jar file and I see Badanie class.
So what can be the reason?