users@glassfish.java.net

Re: Standalone client of GlassFish v3

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Mar 2010 01:49:53 PST

Hi,

I put the complete HelloApp NB6.8 project into previous comment, can you or anyone make a workable model from that? I think it is the most minimal project that could be, please help me resolve this problem.
I saw on the google about thousand request for help in this situation, I do not believe and unable to accept that no solution of a standalone client. If it is possible the GFv3 an unusable and uncomfortable AS for me!

Attila.

HERE IS THE "hellostub_and_testacc.sh"
-------------------------------------------------------------
#!/bin/sh
#asadmin deploy --generatermistubs --retrieve /home/user1/clientstubdir fooapp.ear
echo "get STUB"
/java/sges-v3/glassfish/bin/asadmin get-client-stubs --appname HelloApp /java/projects/HelloApp/dist
echo "start ACC"
cd /java/projects/HelloApp/dist
/java/sges-v3/glassfish/bin/appclient -client HelloAppClient.jar -name HelloApp-app-client
#echo "start EmbeddedACC"
#/java/sges-v3/glassfish/bin/appclient -client HelloAppClient.jar -name HelloApp-app-clemb
echo "start STD"
cd /java/projects/HelloApp/HelloApp-std-client/dist
GF_LIB=/java/sges-v3/glassfish/modules
export GF_LIB
CLASSPATH=$CLASSPATH:$GF_LIB
export CLASSPATH
java -cp $GF_LIB/gf-client.jar:./lib/HelloApp-com.jar -jar HelloApp-std-client.jar
cd /java/projects

HERE IS THE RESULT
----------------------------------
root_at_aszomor:/java/projects# ./hellostub_and_testacc.sh
get STUB
Authentication failed with password from login store: /root/.asadminpass
Enter admin password for user "admin">

Command get-client-stubs executed successfully.
start ACC
2010.03.10. 10:35:01 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
StatelessSession bean says : hello, world!

start STD
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:175)
        at enterprise.hello_stateless_client.StandaloneStatelessJavaClient.returnMessage(StandaloneStatelessJavaClient.java:50)
        at enterprise.hello_stateless_client.StandaloneStatelessJavaClient.main(StandaloneStatelessJavaClient.java:44)
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
        ... 5 more
StatelessSession bean says : null
root_at_aszomor:/java/projects#
[Message sent by forum member 'aszomor' (attila_at_szomor.hu)]

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