Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Using RAP with EJB3 on JBoss 4.2 (Version 2)
Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91462] Tue, 03 June 2008 13:01 Go to next message
Tobias bergtholdt is currently offline Tobias bergtholdtFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

now from scratch...

1. HelloWorld EJB is Running on Jboss 4.2
2. I implemented a Simple EJB Client on the Rap Side using the Example
From the RAP FAQ ->
http://wiki.eclipse.org/RapFaq#How_do_I_make_remote_calls_to _EJB.27s_deployed_on_Jboss_4.x_AS

3. I included the following jars to my RAP application classpath:
- jboss-remoting.jar
- jboss-serialization.jar
- jbosssx.jar
- jboss-transaction.jar
- jboss.jar
- jbossall-client.jar
- jboss-ejb3-client
- jnp-client.jar

4. Here is my Ejb Clientcode:

package hello;
import java.util.Hashtable;
import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class HelloWorldClient {
public String sayHello() {
Hashtable<String, String> props = new Hashtable<String, String>();



//Properties props = new Properties();
props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url", "jnp://localhost:1099");
props.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");

InitialContext context;

try{
context = new InitialContext(props);
}catch (NamingException e){
throw new RuntimeException("fail to get initial context",e);
}
try{
//HelloWorld hello =
(HelloWorld)context.lookup("HelloWorld/HelloWorldImpl/remote ");
HelloWorld hello =
(HelloWorld)context.lookup("RapEjbServer/HelloWorldImpl/remote ");
//System.out.println(hello.hello("World"));
return "Hello RAP EJB !!!";
}catch (NamingException e){
throw new RuntimeException("fail while ejb lookup",e);
}
}
}

5. Here ist the Exception i get:
-> Caused by: javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager: RMI
class loader disabled)]

6. the complete stack trace:
osgi> 03.06.2008 15:00:16 org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.x
03.06.2008 15:00:16 org.mortbay.util.Container start
INFO: Started
org.eclipse.equinox.http.jetty.internal.Servlet25Handler@2c35e
03.06.2008 15:00:16 org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
03.06.2008 15:00:17 org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:1727
03.06.2008 15:00:17 org.mortbay.util.Container start
INFO: Started org.mortbay.http.HttpServer@141b571
java.lang.RuntimeException: fail while ejb lookup
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
at
rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWorkbenchWindowAdvisor.java:33)
at
org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindow.java:1158)
at
org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
at
org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbenchWindow(Workbench3xImplementation.java:29)
at
org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670)
at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
at
org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackManager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThreadWithFakeContext(UICallBackServiceHandler.java: 423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICallBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(StartupThreading.java:55)
at
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java:952)
at
org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1793)
at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:1729)
at
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(WorkbenchConfigurer.java:188)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:790)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:1335)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackManager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThreadWithFakeContext(UICallBackServiceHandler.java: 423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICallBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThreading.java:110)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:408)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
at rapclient2.Application.createUI(Application.java:17)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:230)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:116)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
at javax.naming.InitialContext.lookup(Unknown Source)
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
... 39 more
Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no security
manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
... 42 more
!SESSION 2008-06-03 15:00:15.157
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -dev
file:C:/JBOSS/rap_workspace/.metadata/.plugins/org.eclipse.p de.core/RapClient2/dev.properties
-os win32 -ws win32 -arch x86 -console -consolelog

!ENTRY org.eclipse.rap.ui 4 0 2008-06-03 15:00:22.939
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: fail while ejb lookup
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
at
rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWorkbenchWindowAdvisor.java:33)
at
org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindow.java:1158)
at
org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
at
org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbenchWindow(Workbench3xImplementation.java:29)
at
org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670)
at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
at
org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackManager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThreadWithFakeContext(UICallBackServiceHandler.java: 423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICallBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(StartupThreading.java:55)
at
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java:952)
at
org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1793)
at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:1729)
at
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(WorkbenchConfigurer.java:188)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:790)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:1335)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackManager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThreadWithFakeContext(UICallBackServiceHandler.java: 423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICallBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThreading.java:110)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:408)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
at rapclient2.Application.createUI(Application.java:17)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:230)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:116)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
at javax.naming.InitialContext.lookup(Unknown Source)
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
... 39 more
Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no security
manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
... 42 more
Re: Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91728 is a reply to message #91462] Wed, 04 June 2008 09:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

do you have any java.security.policy settings in place?


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Tobias Bergtholdt [mailto:tobias.bergtholdt@gmail.com]
Bereitgestellt: Dienstag, 3. Juni 2008 15:02
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Using RAP with EJB3 on JBoss 4.2 (Version 2)
Betreff: Using RAP with EJB3 on JBoss 4.2 (Version 2)


Hi,

now from scratch...

1. HelloWorld EJB is Running on Jboss 4.2 2. I implemented a Simple EJB
Client on the Rap Side using the Example From the RAP FAQ ->
http://wiki.eclipse.org/RapFaq#How_do_I_make_remote_calls_to _EJB.27s_dep
loyed_on_Jboss_4.x_AS

3. I included the following jars to my RAP application classpath:
- jboss-remoting.jar
- jboss-serialization.jar
- jbosssx.jar
- jboss-transaction.jar
- jboss.jar
- jbossall-client.jar
- jboss-ejb3-client
- jnp-client.jar

4. Here is my Ejb Clientcode:

package hello;
import java.util.Hashtable;
import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class HelloWorldClient {
public String sayHello() {
Hashtable<String, String> props = new Hashtable<String,
String>();



//Properties props = new Properties();
props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url",
"jnp://localhost:1099");
props.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");

InitialContext context;

try{
context = new InitialContext(props);
}catch (NamingException e){
throw new RuntimeException("fail to get initial
context",e);
}
try{
//HelloWorld hello =
(HelloWorld)context.lookup("HelloWorld/HelloWorldImpl/remote ");
HelloWorld hello =
(HelloWorld)context.lookup("RapEjbServer/HelloWorldImpl/remote ");
//System.out.println(hello.hello("World"));
return "Hello RAP EJB !!!";
}catch (NamingException e){
throw new RuntimeException("fail while ejb lookup",e);
}
}
}

5. Here ist the Exception i get:
-> Caused by: javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
RMI class loader disabled)]

6. the complete stack trace:
osgi> 03.06.2008 15:00:16 org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.x
03.06.2008 15:00:16 org.mortbay.util.Container start
INFO: Started
org.eclipse.equinox.http.jetty.internal.Servlet25Handler@2c35e
03.06.2008 15:00:16 org.mortbay.util.Container start
INFO: Started HttpContext[/,/]
03.06.2008 15:00:17 org.mortbay.http.SocketListener start
INFO: Started SocketListener on 0.0.0.0:1727
03.06.2008 15:00:17 org.mortbay.util.Container start
INFO: Started org.mortbay.http.HttpServer@141b571
java.lang.RuntimeException: fail while ejb lookup
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
at
rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWo
rkbenchWindowAdvisor.java:33)
at
org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindo
w.java:1158)
at
org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
at
org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbe
nchWindow(Workbench3xImplementation.java:29)
at
org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670
)
at
org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
at
org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954
)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
ading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
anager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
adWithFakeContext(UICallBackServiceHandler.java:423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
lBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(Star
tupThreading.java:55)
at
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java
:952)
at
org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1
793)
at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:172
9)
at
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(Workbenc
hConfigurer.java:188)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor
..java:790)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:133
5)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
ading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
anager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
adWithFakeContext(UICallBackServiceHandler.java:423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
lBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThr
eading.java:110)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
at
org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:
288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:4
08)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
at rapclient2.Application.createUI(Application.java:17)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
Manager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
va:230)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
WTLifeCycle.java:116)
at java.lang.Thread.run(Unknown Source) Caused by:
javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:

RMI class loader disabled)]
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
at javax.naming.InitialContext.lookup(Unknown Source)
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
... 39 more
Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no
security
manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown
Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at
org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
... 42 more
!SESSION 2008-06-03 15:00:15.157
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -dev
file:C:/JBOSS/rap_workspace/.metadata/.plugins/org.eclipse.p de.core/RapC
lient2/dev.properties
-os win32 -ws win32 -arch x86 -console -consolelog

!ENTRY org.eclipse.rap.ui 4 0 2008-06-03 15:00:22.939 !MESSAGE Unhandled
event loop exception !STACK 0
java.lang.RuntimeException: fail while ejb lookup
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
at
rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWo
rkbenchWindowAdvisor.java:33)
at
org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindo
w.java:1158)
at
org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
at
org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbe
nchWindow(Workbench3xImplementation.java:29)
at
org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670
)
at
org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
at
org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954
)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
ading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
anager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
adWithFakeContext(UICallBackServiceHandler.java:423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
lBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(Star
tupThreading.java:55)
at
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java
:952)
at
org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1
793)
at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:172
9)
at
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(Workbenc
hConfigurer.java:188)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor
..java:790)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:133
5)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
ading.java:32)
at
org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
anager.java:134)
at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
at
org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
adWithFakeContext(UICallBackServiceHandler.java:423)
at
org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
lBack.java:44)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
at
org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThr
eading.java:110)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
at
org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:
288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:4
08)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
at rapclient2.Application.createUI(Application.java:17)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
Manager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
va:230)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
WTLifeCycle.java:116)
at java.lang.Thread.run(Unknown Source) Caused by:
javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:

RMI class loader disabled)]
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
at javax.naming.InitialContext.lookup(Unknown Source)
at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
... 39 more
Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no
security
manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown
Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at
org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
... 42 more
Re: Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91785 is a reply to message #91728] Wed, 04 June 2008 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: e.komissarov.telecom-m.com

Use

context = context.lookup("HelloWorld");
context = context.lookup("HelloWorldImpl);
HelloWorld hello = (HelloWorld) context.lookup("remote");

or add to project jndi.properties file

Frank Appel пишет:
> Hi,
>
> do you have any java.security.policy settings in place?
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Tobias Bergtholdt [mailto:tobias.bergtholdt@gmail.com]
> Bereitgestellt: Dienstag, 3. Juni 2008 15:02
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: Using RAP with EJB3 on JBoss 4.2 (Version 2)
> Betreff: Using RAP with EJB3 on JBoss 4.2 (Version 2)
>
>
> Hi,
>
> now from scratch...
>
> 1. HelloWorld EJB is Running on Jboss 4.2 2. I implemented a Simple EJB
> Client on the Rap Side using the Example From the RAP FAQ ->
> http://wiki.eclipse.org/RapFaq#How_do_I_make_remote_calls_to _EJB.27s_dep
> loyed_on_Jboss_4.x_AS
>
> 3. I included the following jars to my RAP application classpath:
> - jboss-remoting.jar
> - jboss-serialization.jar
> - jbosssx.jar
> - jboss-transaction.jar
> - jboss.jar
> - jbossall-client.jar
> - jboss-ejb3-client
> - jnp-client.jar
>
> 4. Here is my Ejb Clientcode:
>
> package hello;
> import java.util.Hashtable;
> import java.util.Properties;
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
>
> public class HelloWorldClient {
> public String sayHello() {
> Hashtable<String, String> props = new Hashtable<String,
> String>();
>
>
>
> //Properties props = new Properties();
> props.put("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> props.put("java.naming.provider.url",
> "jnp://localhost:1099");
> props.put(Context.URL_PKG_PREFIXES,
> "org.jboss.naming:org.jnp.interfaces");
>
> InitialContext context;
>
> try{
> context = new InitialContext(props);
> }catch (NamingException e){
> throw new RuntimeException("fail to get initial
> context",e);
> }
> try{
> //HelloWorld hello =
> (HelloWorld)context.lookup("HelloWorld/HelloWorldImpl/remote ");
> HelloWorld hello =
> (HelloWorld)context.lookup("RapEjbServer/HelloWorldImpl/remote ");
> //System.out.println(hello.hello("World"));
> return "Hello RAP EJB !!!";
> }catch (NamingException e){
> throw new RuntimeException("fail while ejb lookup",e);
> }
> }
> }
>
> 5. Here ist the Exception i get:
> -> Caused by: javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
> RMI class loader disabled)]
>
> 6. the complete stack trace:
> osgi> 03.06.2008 15:00:16 org.mortbay.http.HttpServer doStart
> INFO: Version Jetty/5.1.x
> 03.06.2008 15:00:16 org.mortbay.util.Container start
> INFO: Started
> org.eclipse.equinox.http.jetty.internal.Servlet25Handler@2c35e
> 03.06.2008 15:00:16 org.mortbay.util.Container start
> INFO: Started HttpContext[/,/]
> 03.06.2008 15:00:17 org.mortbay.http.SocketListener start
> INFO: Started SocketListener on 0.0.0.0:1727
> 03.06.2008 15:00:17 org.mortbay.util.Container start
> INFO: Started org.mortbay.http.HttpServer@141b571
> java.lang.RuntimeException: fail while ejb lookup
> at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
> at
> rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWo
> rkbenchWindowAdvisor.java:33)
> at
> org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindo
> w.java:1158)
> at
> org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
> at
> org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbe
> nchWindow(Workbench3xImplementation.java:29)
> at
> org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670
> )
> at
> org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
> at
> org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954
> )
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
> ading.java:32)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
> anager.java:134)
> at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
> adWithFakeContext(UICallBackServiceHandler.java:423)
> at
> org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
> lBack.java:44)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
> at
> org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(Star
> tupThreading.java:55)
> at
> org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java
> :952)
> at
> org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1
> 793)
> at
> org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:172
> 9)
> at
> org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(Workbenc
> hConfigurer.java:188)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor
> .java:790)
> at
> org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:133
> 5)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
> ading.java:32)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
> anager.java:134)
> at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
> adWithFakeContext(UICallBackServiceHandler.java:423)
> at
> org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
> lBack.java:44)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
> at
> org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThr
> eading.java:110)
> at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
> at
> org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:
> 288)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:4
> 08)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
> at rapclient2.Application.createUI(Application.java:17)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
> Manager.java:92)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
> va:230)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
> WTLifeCycle.java:116)
> at java.lang.Thread.run(Unknown Source) Caused by:
> javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
>
> RMI class loader disabled)]
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
> ... 39 more
> Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no
> security
> manager: RMI class loader disabled)
> at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
> at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown
> Source)
> at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
> at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
> Source)
> at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.rmi.MarshalledObject.get(Unknown Source)
> at
> org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
> ... 42 more
> !SESSION 2008-06-03 15:00:15.157
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_05
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
> Command-line arguments: -dev
> file:C:/JBOSS/rap_workspace/.metadata/.plugins/org.eclipse.p de.core/RapC
> lient2/dev.properties
> -os win32 -ws win32 -arch x86 -console -consolelog
>
> !ENTRY org.eclipse.rap.ui 4 0 2008-06-03 15:00:22.939 !MESSAGE Unhandled
> event loop exception !STACK 0
> java.lang.RuntimeException: fail while ejb lookup
> at hello.HelloWorldClient.sayHello(HelloWorldClient.java:33)
> at
> rapclient2.ApplicationWorkbenchWindowAdvisor.preWindowOpen(A pplicationWo
> rkbenchWindowAdvisor.java:33)
> at
> org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpening(Wo rkbenchWindo
> w.java:1158)
> at
> org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:355)
> at
> org.eclipse.ui.internal.tweaklets.Workbench3xImplementation. createWorkbe
> nchWindow(Workbench3xImplementation.java:29)
> at
> org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workben ch.java:1670
> )
> at
> org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1 668)
> at
> org.eclipse.ui.internal.Workbench$16.runWithException(Workbe nch.java:954
> )
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
> ading.java:32)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
> anager.java:134)
> at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
> adWithFakeContext(UICallBackServiceHandler.java:423)
> at
> org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
> lBack.java:44)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
> at
> org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExc eptions(Star
> tupThreading.java:55)
> at
> org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Wo rkbench.java
> :952)
> at
> org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Work bench.java:1
> 793)
> at
> org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:172
> 9)
> at
> org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow(Workbenc
> hConfigurer.java:188)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor
> .java:790)
> at
> org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:133
> 5)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThre
> ading.java:32)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync (UICallBackM
> anager.java:134)
> at org.eclipse.swt.widgets.Display$2.run(Display.java:645)
> at
> org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler. runNonUIThre
> adWithFakeContext(UICallBackServiceHandler.java:423)
> at
> org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeC ontext(UICal
> lBack.java:44)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:643)
> at
> org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThr
> eading.java:110)
> at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2314)
> at
> org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 05)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:
> 288)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:4
> 08)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:157)
> at rapclient2.Application.createUI(Application.java:17)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
> Manager.java:92)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
> va:230)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
> WTLifeCycle.java:116)
> at java.lang.Thread.run(Unknown Source) Caused by:
> javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
>
> RMI class loader disabled)]
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 86)
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 27)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at hello.HelloWorldClient.sayHello(HelloWorldClient.java:29)
> ... 39 more
> Caused by: java.lang.ClassNotFoundException: hello.HelloWorld (no
> security
> manager: RMI class loader disabled)
> at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
> at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown
> Source)
> at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
> at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown
> Source)
> at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.rmi.MarshalledObject.get(Unknown Source)
> at
> org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
> at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 10)
> ... 42 more
>
>
>
>
>
Re: Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91853 is a reply to message #91728] Wed, 04 June 2008 14:27 Go to previous messageGo to next message
Tobias bergtholdt is currently offline Tobias bergtholdtFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

I use JBoss in default configuration as it is. -> no security.
But what is with the Jetty security settings? Pherhaps the Problem is that
the Jetty Server requires a security authorization?

I tested the EJB with a Simple Java EJB Client with the same settings as
the RAP Ejb Client. The Java Ejb Client is fine.

Here the Code from the JAva Ejb Client...

package hello;
import java.util.Properties;

import javax.naming.InitialContext;

public class HelloWorldClient {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url", "jnp://localhost:1099");
InitialContext context = new InitialContext(props);
//HelloWorld hello =
(HelloWorld)context.lookup("HelloWorld/HelloWorldImpl/remote ");
HelloWorld hello =
(HelloWorld)context.lookup("RapEjbServer/HelloWorldImpl/remote ");

System.out.println(hello.hello("JavaClient"));
}
}

@Eugene Komissarov your suggestion is not working
-> context = context.lookup("HelloWorld"); because itŽs not possible to
convert the Object to an Initial Context !
Re: Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91899 is a reply to message #91853] Thu, 05 June 2008 05:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

hm -it's been since I've worked with EJBs. Did you read
http://wiki.eclipse.org/RapFaq#How_do_I_make_remote_calls_to _EJB.27s_dep
loyed_on_Jboss_4.x_AS?

Seems to me that the Context.URL_PKG_PREFIXES parameter is not set in
your example - don't know if that makes any differences.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Tobias Bergtholdt [mailto:tobias.bergtholdt@gmail.com]
Bereitgestellt: Mittwoch, 4. Juni 2008 16:27
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Using RAP with EJB3 on JBoss 4.2 (Version 2)
Betreff: Re: Using RAP with EJB3 on JBoss 4.2 (Version 2)


Hi,

I use JBoss in default configuration as it is. -> no security.
But what is with the Jetty security settings? Pherhaps the Problem is
that the Jetty Server requires a security authorization?

I tested the EJB with a Simple Java EJB Client with the same settings as
the RAP Ejb Client. The Java Ejb Client is fine.

Here the Code from the JAva Ejb Client...

package hello;
import java.util.Properties;

import javax.naming.InitialContext;

public class HelloWorldClient {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url",
"jnp://localhost:1099");
InitialContext context = new InitialContext(props);
//HelloWorld hello =
(HelloWorld)context.lookup("HelloWorld/HelloWorldImpl/remote ");
HelloWorld hello =
(HelloWorld)context.lookup("RapEjbServer/HelloWorldImpl/remote ");

System.out.println(hello.hello("JavaClient"));
}
}

@Eugene Komissarov your suggestion is not working
-> context = context.lookup("HelloWorld"); because itŽs not possible to
convert the Object to an Initial Context !
Re: Using RAP with EJB3 on JBoss 4.2 (Version 2) [message #91958 is a reply to message #91899] Thu, 05 June 2008 15:24 Go to previous message
Tobias bergtholdt is currently offline Tobias bergtholdtFriend
Messages: 13
Registered: July 2009
Junior Member
Hi

yes I read the FAQ. And I think that iŽm doing exactly the same. except
that IŽm using EJB 3 and not EJB 2.

I have added the props.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces"); statement

but I have the same resault as before...

Caused by: javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: hello.HelloWorld (no security manager:
RMI class loader disabled)]


So have anyvody any idea how to fix that problem ????
Previous Topic:Right-menu in Text
Next Topic:Use TableViewer with Virtual and DeferredContentProvider problem
Goto Forum:
  


Current Time: Thu Sep 26 03:55:51 GMT 2024

Powered by FUDForum. Page generated in 0.03956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top