details: I'm trying to use Jalapeno framework to connect my RCP app with Cache' database. After connection established, I'm trying to get all data from table exactly like in Jalapeno manual:
if (objManager==null) return;
DBClass cortege = null;
try {
Iterator terms = objManager.openByQuery(DBClass.class, null, null);
System.out.println("terms ok");
while (terms.hasNext()){
System.out.println("has next");
cortege = (DBClass)terms.next();
}
this code compiling, running and trowing exception
java.lang.RuntimeException: myPluginId.views.DBClass
at com.intersys.objects.POJOIterator.next(POJOIterator.java:75)
...skip...
Caused by: java.lang.ClassNotFoundException: myPlugin.views.DBClass
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:129)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.jalapeno.runtime.ObjectCopierToPojo.detach(ObjectCopierToPojo.java:76)
at com.jalapeno.runtime.ObjectCopierToPojo.findPojo(ObjectCopierToPojo.java:472)
at com.intersys.classes.CacheRootObject.detach(CacheRootObject.java:255)
at com.intersys.classes.Persistent.detach(Persistent.java:567)
at com.intersys.objects.POJOIterator.next(POJOIterator.java:59)
at terms.next(); I can't get it at all... instance of class DBClass was just created, but class cannot be loaded. then I've tried to place this code in simple java application (not eclipse rcp) and all went ok. so I think some Eclipse part blocking class loading.
also i've tried to load class before calling terms.next();
Bundle b = Platform.getBundle("myPluginId");
try {
b.loadClass("DBClass");
} catch (ClassNotFoundException e) {
System.out.println("no class");
e.printStackTrace();
}
and got same error. class can not be loaded. so, is it known problem? is there a solution? =============================================== after some research updating the question: How to make Jalapeno plugin to load class from My plugin?