I think this is related to Class-Path manifest entry present in the
jar. Soft-links gets resolved to the actual file and Class-Path will no
more be valid for your case.
So linking jars like this is not correct? How to overcome this problem?
Thanks,
-Yamini
Sahoo
On Monday 07 June 2010 11:07 PM, Yamini K B wrote:
Hi,
I'm seeing this problem where linking admin-cli.jar from installation
modules dir to admin/cli/target/admin-cli.jar causes the following
error:
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$
rm
admin-cli.jar
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$ ln -s
/sailfin/v3/may6/v3/admin/cli/target/admin-cli.jar admin-cli.jar
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$ cd -
/sailfin/v3/may6/glassfishv3/glassfish/bin
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/bin$ ./asadmin
list-domains
Exception in thread "main" java.lang.NoClassDefFoundError:
org/glassfish/api/admin/InvalidCommandException
Caused by: java.lang.ClassNotFoundException:
org.glassfish.api.admin.InvalidCommandException
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class:
com.sun.enterprise.admin.cli.AsadminMain. Program will exit.
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/bin$ cd -
/sailfin/v3/may6/glassfishv3/glassfish/modules
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$ rm
admin-cli.jar
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$ cp
admin-cli.jar.bak admin-cli.jar
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/modules$ cd -
/sailfin/v3/may6/glassfishv3/glassfish/bin
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/bin$ ./asadmin
list-domains
Name: domain1 Status: Not Running
Command list-domains executed successfully.
yamini@onyx:/sailfin/v3/may6/glassfishv3/glassfish/bin$
Any thoughts?
Thanks,
-Yamini
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: dev-help@glassfish.dev.java.net