Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ClassLoading Problems

Hello Community,

I have a Webdynpro-Component (incl. Library-Project) and want to include dynamically Jars on runtime.

e.G. The user uploads a Jar-Archive, which is stored into a database. Now the Jar is loaded with a separate custom URLClassloader. This works fine.

Since I am using a new URLClassloader I pass it the parentclassloader that I get from:

this.getClass().getClassloader()

or Thread.currentThread().getContextClassloader()

The current Parent classloader is:

ApplicationClassloader.

But if a class inside the Jar has references to the Library-Project, the reference to the lib project cant be found (ClassNotFoundException).

How can I access or reference Classes out of the library project?

Is there an alternative approach to achieve a dynamic integration of jars?

Any help is appreciated

Cheers,

Andreas

Not what you were looking for? View more on this topic or Ask a question