avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Angus" <da...@apache.org>
Subject Classpath question
Date Fri, 31 May 2002 11:41:32 GMT
Guys,
I hate classpath issues, and don't have much of a clue about classloaders.. so bear with me
if I seem slightly at odds with this..

Where can I put jar files, outside of the sar file, and have their contents picked up by the
classloader for this context?
The reason I want to do this is as follows..

I'd like to have a James distribution which is organised to make life easy for mailet developers,
but if the SAR-INF/lib contents are not accessible except when its running, and even then
the work directory name is not predictable, they will need another "visible" copy of the mailet
api to compile against. I'd rather put the Mailet API jar file elsewhere to start with than
distribute two copies.

Next, once some geezer has written his mailets he wants to drop class files or a jar containing
his package into james for testing.

Perhaps for IP reasons, or because they are destined for some other application tarring them
into James is not an option. 

I dont know if there's some way I can configure the James classpath (cf the phoenix one),
I've tried meddling to no avail.

Feel free to talk down to me, as long as it gets me my answer ;-)
d.


PS I've tried putting jars into $PHOENIX_HOME/lib but get this exception:

java.lang.NoClassDefFoundError: org/apache/mailet/MailetContext
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.jav
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at org.apache.avalon.phoenix.components.classloader.PolicyClassLoade
ndClass(PolicyClassLoader.java:98)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at org.apache.avalon.phoenix.tools.verifier.SarVerifier.verifyBlockT
SarVerifier.java:352)
        at org.apache.avalon.phoenix.tools.verifier.SarVerifier.verifyBlocks
(SarVerifier.java:335)
        at org.apache.avalon.phoenix.tools.verifier.SarVerifier.verifySar(Sa
ifier.java:124)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dep
DefaultDeployer.java:281)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dep
ile(DefaultEmbeddor.java:486)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dep
ile(DefaultEmbeddor.java:479)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dep
iles(DefaultEmbeddor.java:467)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dep
efaultApplications(DefaultEmbeddor.java:457)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.exe
(DefaultEmbeddor.java:220)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:151)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:

        at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:95)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:91)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:44)


--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message