It works a bit!
I mean after I changed the classpath in the manifest.mf file of the project
in netbeans (by adding : "Class-Path <files .jar to add>") the initialization
works and the program is launched (I know this because its first line is
"System.out.println("début ...");" and it is displayed in the console.
great success!
but I have this error after :
[olivier_at_localhost ~]$ java -jar
"/home/olivier/NetBeansProjects/YAPS3_and_another_one/dist/YAPS3_and_another_one.jar"
Début ... 29 avr. 2011 14:31:33
com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
INFO: Cannot find javadb client jar file, derby jdbc driver will not be
available by default. access_to_yaps.ServiceLocatorException:
javax.naming.NamingException: Lookup failed for
'ejb/stateless/customer#ejbs.CustomerRemote' in
SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=3700,
java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory,
org.omg.CORBA.ORBInitialHost=localhost,
java.naming.factory.url.pkgs=com.sun.enterprise.naming,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl}
[Root exception is javax.naming.NamingException: ejb ref resolution error for
remote business interfaceejbs.CustomerRemote [Root exception is
java.lang.ClassNotFoundException: ejbs.CustomerRemote]] Exception in thread
"main" java.lang.NoClassDefFoundError: ejbs/CustomerRemote at
access_to_yaps.CustomerDelegate.createCustomer(CustomerDelegate.java:22) at
yaps3_and_another_one.YAPS3_and_another_one.main(YAPS3_and_another_one.java:43)
Caused by: java.lang.ClassNotFoundException: ejbs.CustomerRemote 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:321) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at
java.lang.ClassLoader.loadClass(ClassLoader.java:266) at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334) ... 2 more
obviously the derby files are in the project and even I have this
manifest.mf :
Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by
build Class-Path:
/home/olivier/applications/glassfish-3.1/glassfish/lib/gf-client.jar
/home/olivier/applications/glassfish-3.1/javadb/lib/derby.jar
/home/olivier/applications/glassfish-3.1/javadb/lib/derbyclient.jar
there are two issues :
- 1st : is there an access to the database?
-2nd : the lookup failed.
but here is the bottom lines in netbeans after the start of glassfish:
INFO: Portable JNDI names for EJB CustomerBean :
[java:global/YAPS3_EJB/CustomerBean!ejbs.CustomerRemote,
java:global/YAPS3_EJB/CustomerBean!ejbs.CustomerLocal] INFO:
Glassfish-specific (Non-portable) JNDI names for EJB CustomerBean :
[ejb/stateless/customer, ejb/stateless/customer#ejbs.CustomerRemote]
so I would say the EJBs are fine deployed in glassfish but it is from the
client the problem is.
I seem to have problems with the administration of glassfish (I can't load
the page
http://localhost:4848), I 'm working on it by now.
thank you!
olivier
--
[Message sent by forum member 'lolveley']
View Post: http://forums.java.net/node/796243