-
1. Re: ClassNotFoundException again
beve Oct 10, 2008 7:59 AM (in response to hiningenteki)Hi,
can you check that you have a jbossesb-properties.xml file located in the classpath?
Regards,
/Daniel -
2. Re: ClassNotFoundException again
hiningenteki Oct 10, 2008 8:02 AM (in response to hiningenteki)Sure, it's right there. :) Along with jbossesb-listener.xml, jbossesb-gateway.xml, jboss-esb.xml and several others.
-
3. Re: ClassNotFoundException again
beve Oct 10, 2008 8:20 AM (in response to hiningenteki)The error points to that the property 'org.jboss.soa.esb.registry.implementationClass' does not exist in the jbossesb-properties.xml file, or that the properties file itself is not in located on the classpath.
Can you double check that the above property exists and just make sure that the file is available.
I can reproduce this by using the helloworld quickstart and simply deleting the jbossesb-properties.xml file. You might be able to check you configuration against the quickstart and see if anything differs.
Regards,
/Daniel -
4. Re: ClassNotFoundException again
hiningenteki Oct 10, 2008 10:04 AM (in response to hiningenteki)The point is clear. The file is, well, available, that is, the directory with it is included in the class path (i. e. on the Runtime tab of plugin.xml or simply put in the MANIFEST.MF). The property is in the file, too. For some strange reason, the product doesn't find the file, however. I did experiment, too - I removed the file and obtained the same results.
-
5. Re: ClassNotFoundException again
beve Oct 10, 2008 10:07 AM (in response to hiningenteki)Hmm, strange. Would you be able to send me this so that I can run your example?
Thanks,
/Daniel -
6. Re: ClassNotFoundException again
hiningenteki Oct 10, 2008 10:40 AM (in response to hiningenteki)Well, two things.
1) it's some 15 MB big (with jars);
2) it has several user libraries that point to different folders which you may not happen to have.
If you'd like to check the code and plugin.xml I could strip the project. -
7. Re: ClassNotFoundException again
beve Oct 10, 2008 10:46 AM (in response to hiningenteki)If you'd like to check the code and plugin.xml I could strip the project.
That would be great. Please do that and I'll take a look. -
8. Re: ClassNotFoundException again
hiningenteki Oct 10, 2008 10:57 AM (in response to hiningenteki)The code can be downloaded http://www.zshare.net/download/20328417eed5d557/. It's not the actual project but I copied all necessary stuff in there. The functionality needed is envoked by clicking the envelope icon in the toolbar (MessagePopupAction.java). All files in newtest.test are left intact, i. e. as they are in the actual project. The error is reproduced.
-
9. Re: ClassNotFoundException again
beve Oct 10, 2008 1:27 PM (in response to hiningenteki)I've taken a look and I think the reason for the file not being found is that the code that reads the properties file uses the thread context classloader.
So even though you have specified the location of the jbossesb-properties.xml file correctly using the Bundle-ClassPath header it will still not be picked up.
As a workaround you can set the thread context classloader before creating the ServiceInvoker and resetting it after:ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); ServiceInvoker invoker = new ServiceInvoker(category, service); invoker.deliverAsync(requestMessage); } finally { Thread.currentThread().setContextClassLoader(contextClassLoader); }
This way you are setting the context classloader to the bundle classloader and this should enable the file to be found.
Can you give that a try?
Regards,
/Daniel -
10. Re: ClassNotFoundException again
hiningenteki Oct 13, 2008 1:39 AM (in response to hiningenteki)Hi, Dan,
thanks a lot for your time, I'll try it as soon as possible and give my feedback. :) -
11. Re: ClassNotFoundException again
hiningenteki Oct 13, 2008 5:16 AM (in response to hiningenteki)Well, it doesn't change anything. :( Absolutely the same result.
-
12. Re: ClassNotFoundException again
beve Oct 14, 2008 1:43 AM (in response to hiningenteki)I'll create an example of this when I get the chance. I thought that OSGi classloading was the cause of this but I'd need to try this out.
Regards,
/Daniel -
13. Re: ClassNotFoundException again
hiningenteki Oct 15, 2008 4:02 AM (in response to hiningenteki)I'll be much grateful, Daniel. I haven't found any solution yet, even the official news group of RCP is silent. :(
-
14. Re: ClassNotFoundException again
beve Oct 15, 2008 4:33 AM (in response to hiningenteki)Could you check something for me?
Before you create the ServiceInvoker in you code...can you print the current classes classloader and the context classloader just before that call?
Thanks,
/Daniel