zhys513 / jenabean

Automatically exported from code.google.com/p/jenabean
0 stars 0 forks source link

JenaBean should use the current thread's context ClassLoader #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

In some runtime environments (eg. NetBeans Platform), JenaBean has a 
separate ClassLoader from the application classes. Therefore, 
Class.forName(..) is unable to locate those classes.

Spring has a similar problem with the NetBeans hierarchical ClassLoader.

What is the expected output? What do you see instead?

RDF2Bean.load(..) and loadDeep(..) throws ClassNotFoundException:

        at 
org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at thewebsemantic.RDF2Bean.declaredClass(RDF2Bean.java:528)
        at thewebsemantic.RDF2Bean.javaclass(RDF2Bean.java:512)
        at thewebsemantic.RDF2Bean.newInstance(RDF2Bean.java:490)
        at thewebsemantic.RDF2Bean.applyProperties(RDF2Bean.java:439)
        at thewebsemantic.RDF2Bean.testCycle(RDF2Bean.java:400)
        at thewebsemantic.RDF2Bean.toObject(RDF2Bean.java:396)
        at thewebsemantic.RDF2Bean.loadIndividuals(RDF2Bean.java:179)
        at thewebsemantic.RDF2Bean.loadAll(RDF2Bean.java:173)
        at thewebsemantic.RDF2Bean.load(RDF2Bean.java:157)

What version of the product are you using? On what operating system?

JenaBean 0.8 with NetBeans 6.7 and Sun JDK 1.6.0

Please provide any additional information below.

http://wiki.netbeans.org/DevFaqClassLoaders

http://wiki.netbeans.org/NetBeansPlatformWithSpring

Original issue reported on code.google.com by mmoo...@gmail.com on 21 Dec 2009 at 2:14

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in 1.0.6, released to repo

Original comment by thewebse...@gmail.com on 2 Feb 2010 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by thewebse...@gmail.com on 2 Feb 2010 at 9:11