users@glassfish.java.net

ClassNotFoundException when deploying dutside of glassfishv2

From: <glassfish_at_javadesktop.org>
Date: Sun, 16 Mar 2008 00:10:36 PST

Hi All,

Glassfish v2 is throwing ClassNotFoundException - can't find com.sun.enterprise.deployapi.SunDeploymentFactory when running a standalone java class with classpath pointing to a copy of "appserv-rt.jar" and "javaee.jar" from its local lib directory. These jar files are copied into the local lib from glassfish v2 jars. However, when I try running it with classpath referencing back to glassfish lib directory, this exception is never thrown.

Any help is greatly appreciated.



Below is the exception:
================================================================
org.cf.InitializationException: org.cf.InitializationException: cannot find class [com.sun.enterprise.deployapi.SunDeploymentFactory]
        at org.cf.Cf.loadAndRegisterDeploymentFactory(Clownfish.java:401)
        at org.cf.Cf.initialize(Clownfish.java:80)
        at org.cf.Cf.main(Clownfish.java:588)
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.deployapi.SunDeploymentFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.cf.Cf.loadAndRegisterDeploymentFactory(Clownfish.java:391)



- Cheers
[Message sent by forum member 'lyeung' (lyeung)]

http://forums.java.net/jive/thread.jspa?messageID=264249