views:

383

answers:

1

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

A: 

Have you tried with the trailing slash

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

Or does it only work with jar names if given via the MANIFEST file, and not with directory name.

JoseK
For jar files, it doesn't work too. Trailing slash didn't help. It looks like that classpath from manifest file is for some reason ignored. Thanks for reply
qjeta
To rule out, the final MANIFEST is packaged under META-INF/ right?Can you follow this example http://stackoverflow.com/questions/1272648/need-to-read-own-jars-manifest-and-not-root-classloaders-manifest and force the loading of MANIFEST and check the classpath as it's attribute?
JoseK
I have ear which contains war. in manifest files of both is written classpath to my directory. getFinderClassPath() contains path to my directory just when manifest fie is inside war (ear's manifest file seems to influence nothing). When I printout Class-Path attributes from all Manifest files, there is not path to my directory
qjeta