- This topic has 11 replies, 4 voices, and was last updated 17 years, 7 months ago by
Riyad Kalla.
-
AuthorPosts
-
emocMemberHi Support,
I am following the EJB3 tutorial with the MyEclipse 5.5 version on GlassFish v2-b50g app server. My progress fails at the tutorial’s “Testing the Bean” step. I have given an extract from the configuration log and console log below. How do you run this client?
Thanks, E
MyEclipse Configuration
*** Date: Fri Jul 20 17:17:44 EST 2007
*** Platform Details:
*** System properties:
awt.toolkit=sun.awt.windows.WToolkit
catalina.base=/C:/java/MyEclipse 5.5.1 GA/eclipse/plugins/org.eclipse.tomcat_4.1.130.v20060601/
catalina.home=/C:/java/MyEclipse 5.5.1 GA/eclipse/plugins/org.eclipse.tomcat_4.1.130.v20060601/
catalina.useNaming=true
eclipse.buildId=M20070212-1330
eclipse.commands=-os
win32
-ws
win32
-arch
x86
-launcher
C:\java\MyEclipse 5.5.1 GA\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
bb4_70
-vm
C:\java\MyEclipse 5.5.1 GA\jre\bin\javaw.exeConsole log
20/07/2007 17:10:48 com.sun.ejb.base.sfsb.util.EJBServerConfigLookup needToAddSFSBVersionInterceptors
INFO: EJBServerConfigLookup::==> isClustered:false ; isEJBAvailabilityEnabled: false ; isStoreTypeMemory ==> false ; result: false
20/07/2007 17:10:48 com.sun.enterprise.iiop.J2EEInitializer post_init
INFO: J2EEInitializer: Checking if interceptors need to be added
javax.naming.NameNotFoundException: com.myeclipseide.ejb3.MyBeanRemote not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1820)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1680)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1062)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:194)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:780)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:537)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2541)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:524)[/b][/i]
Riyad KallaMemberEileen,
We’ve been working with the Glassfish team to fix some deployment issues with EARs and EJBs and some of the most recent fixes went into the Build55 nightly. The current release is Build 56 and I would strongly encourage you to try that before trying to trouble shoot anything. Development is pretty active on GF right now:
https://glassfish.dev.java.net/downloads/v2-b56.html
emocMemberHi again,
the tutorial indicates glassfish-2.0b45 was running, so I guess it was working then, however I have now installed build 56 and get different (better?) runtime behaviour.
A RMI error is produced when I do the following:
… from Package Explorer: SampleEJBProject <right click> Run As, RunActivation.main: warning: sun.rmi.activation.execPolicy system
property unspecified and no ExecPermissions/ExecOptionPermissions
granted; subsequent activation attempts may fail due to unsuccessful
ExecPermission/ExecOptionPermission permission checks …refer to 1.4 docoHow do I configure RMI from MyEclipse?
Thanks, Eileen.
Riyad KallaMemberEileen,
I’m glad that your runtime behavior is getting more on track with what you need… any time you run into squirrlyness with GF, try the latest build, they are making lots of changes as they go.As far as RMI, I’m sorry I cannot help there… I haven’t tried setting up an RMI client before, but it isn’t a MyEclipse-specific item. Just from this message:
system
property unspecified and no ExecPermissions/ExecOptionPermissions
granted;looks like a properties file of some type declaring certain permissions is missing.
ylouMemberRiyad,
I used JBOSS 4.2 and myEclipse 5.5.1 and following the EJB3 tutorial. I got an error when I run the client.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:18)
Could you tell us how to deploy the EJB example to JBOSS 4.2 and how to run the client?
I assume we need change a few files.
Thanks.Here is my installation details:
*** Date:
Monday, July 23, 2007 10:02:27 AM CDT** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.5.1 GA
Build id: 20070521-5.5.1-GA*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.5.1 GA
Build id: 20070521-5.5.1-GAEclipse Platform
Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
Build id: M20070212-1330Eclipse RCP
Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
Build id: M20070212-1330Eclipse Java Development Tools
Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
Build id: M20070212-1330Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20070212-1330Eclipse Project SDK
Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
Build id: M20070212-1330Eclipse Graphical Editing Framework
Version: 3.2.2.v20070208
Build id: 20070208-1315Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\MyEclipse 5.5.1 GA\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
1784_70
-vm
C:\MyEclipse 5.5.1 GA\jre\bin\javaw.exe
Riyad KallaMemberYlou,
You will need to search for the correct JNDI information under JBoss, I don’t know what it is.The issue is that the application servers load up the EJBs into a JDNI context under a certain name. And if you want to run a client, you need to connect to the running JNDI instance and request the EJBs out of it.
Every app server does it differently, and with Glassfish, all you have to do is add the appserv-rt.jar file to your classpath, and the client will pickup the JNDI conection information from the properties file in the JAR and use that, making it super simple to use.
With JBoss I don’t know if the same thing will work, or if you need to code the connection properties by hand.
emocMemberHi Support,
I am following the EJB3 tutorial with the MyEclipse 5.5 version on GlassFish v2-b56 app server. My progress fails at the tutorial’s “Testing the Bean” step.
I run this client from … from Package Explorer: SampleEJBProject <right click> Run As, Run
Why am I getting a RMI error and can the MyEclipse Tutorial include more detail on how you are supposed to run this client so the following error does not occur.
Thanks, EA RMI error is produced when I do the following:
Activation.main: warning: sun.rmi.activation.execPolicy system
property unspecified and no ExecPermissions/ExecOptionPermissions
granted; subsequent activation attempts may fail due to unsuccessful
ExecPermission/ExecOptionPermission permission checks
Riyad KallaMemberEileen,
What does your build path look like? Did you include the appserv-rt.jar file from glassfish on your build path for that project?
emocMemberHello Riyad,
the SampleEJBProject build class path looks like:
SampleEJBProject/src
JRE System Library [MyEclipse 5.5.1 GA]
Java EE 5 Libraries
appserv-rt.jar – glassfish\libI now realize the GlassFish v2-b50g and build 56 runtime behaviour is the same. Has the Tutorial been tested since build 45?
When I run from
… Package Explorer: MyBeanClient <right click> Run As, Java App, MyBeanClient, or
… Package Explorer: SampleEJBProject <right click> Run As, Run (with default values)
javax.naming.NameNotFoundException: com.myeclipseide.ejb3.MyBeanRemote not foundBy the way, I now know why the RMI error was generated, and I don’t want the RMI behaviour anyway. When I run from …
… Package Explorer: SampleEJBProject <right click> Run As, Java App, Activation – sun.rmi.server (default value)
the RMI error described above is produced.Thanks for any help or advice, Eileen.
Riyad KallaMemberEileen,
I just tested the EJB 3 Tutorial using Build 57 of Glassfish and it worked fine. I imported the project from the tutorial, pointed the appserv-rt.jar that was already on the build path to the real one under my build 57/lib install dir and then right-clicked on the MyBeanClient class and did Run-As, then in the App Server console it property printed out Hello World!
andresdiegolandaMemberThe reason might be that Eileen didn’t put the @Remote annotation on the remote interface. I did the same mistake and got the same error.
Riyad KallaMemberGood point… Eileen did that help?
-
AuthorPosts