classpath and class loading on weblogic

Posted by qjeta on Stack Overflow See other posts from Stack Overflow or by qjeta
Published on 2010-03-12T09:34:03Z Indexed on 2010/03/12 9:37 UTC
Read the original article Hit count: 467

Filed under:
|

Hello,

I am trying to create and load dynamically classes in weblogic (10.3.2.0). It is ADF application which I deploy to the weblogic server.

When I print

((GenericClassLoader)this.getClass().getClassLoader()).getFinderClassPath()

I see the path to my directory (of course not just this path)

C:\...\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\tmp\_WL_user\test\753the\dynamicClasses

(I have added directory dynamicClasses to manifest for deployment WAR profile). In this directory I create class files. I have checked it, files are really created there. When I try to load created class with the same classloader, for which I have printed classpath, ClassNotFoundException is thrown.

It knows the path to the directory with classes and to jar file, but it doesn't load classes.

With URLClassLoader I can load classes. But I need so that my classes would be seen by the classes loaded "usual" way.

I am able to run it correctly just with system CLASSPATH.

Please, do you know an explanation? Is the manifest file in WAR the wrong place for specifiing classpath?

Thank you in advance

Qjeta

© Stack Overflow or respective owner

Related posts about classpath

Related posts about weblogic