Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » accessing to EJB3-beans on JBoss
accessing to EJB3-beans on JBoss [message #120953] Mon, 10 November 2008 10:09
Denis Kostousov is currently offline Denis KostousovFriend
Messages: 32
Registered: July 2009
Member
I have a project consists two parts: RAP-based web UI part and
EJB3-server part. Second path consists 23 EJB3-application. All works
fine. The UI-part successfully interact with server-part.

Now I need to add some functionality which interact with other ejb3
application on the same server. I create a simple action:

new Action(){
@Override
public void run() {
Logger debugger = Logger.getLogger(this.getClass()); //Log4j logger
String DEBUG_STR = "run: ";
debugger.debug(DEBUG_STR + "start");
debugger.debug(DEBUG_STR + "security manager " +
System.getSecurityManager());
Class<?> forName;
try {
forName =
Class.forName("com.company.docprint.as.mngrs.DocTypeManager ");
debugger.debug(DEBUG_STR + forName);
forName =
Class.forName("com.company.docprint.as.mngrs.DocTypeManagerBean ");
debugger.debug(DEBUG_STR + forName);
forName = Class.forName("org.jboss.ejb3.JBossProxy");
debugger.debug(DEBUG_STR + forName);
forName = Class.forName("javax.ejb.EJBObject");
debugger.debug(DEBUG_STR + forName);
forName = Class.forName("javax.ejb.EJBAccessException");
debugger.debug(DEBUG_STR + forName);
Context ctx = new InitialContext();
Context c0 = (Context) ctx.lookup("DocManagerBean/remote");
//throws exception
// Context c0 = (Context) ctx.lookup("AbonentServer/remote");
// works fine
}
catch (Exception e) {
debugger.debug(DEBUG_STR + e, e);

}
debugger.debug(DEBUG_STR + "stop");
}

}


A exception occurs when I try to run this code fragment from
RAP-application.
If I change

Context c0 = (Context) ctx.lookup("DocManagerBean/remote");

to

Context c0 = (Context) ctx.lookup("AbonentServer/remote");

all works fine. The "AbonentServer" is the EJB3 from old server-part.
If I run the code fragment from JUnit test case - all works fine.

Exception:

javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException:
com.company.docprint.as.mngrs.DocManager (no security manager: RMI class
loader disabled)]
javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException:
com.company.docprint.as.mngrs.DocManager (no security manager: RMI class
loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 30)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:5 89)
at
com.company.project.ui.abonent.AbonentListView$4.run(Abonent ListView.java:118)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:500 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:580)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:497)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:449)
at
org.eclipse.swt.internal.widgets.UntypedEventAdapter.dispatc hEvent(UntypedEventAdapter.java:313)
at
org.eclipse.swt.internal.widgets.UntypedEventAdapter.widgetS elected(UntypedEventAdapter.java:80)
at
org.eclipse.swt.events.SelectionEvent.dispatchToObserver(Sel ectionEvent.java:174)
at org.eclipse.rwt.internal.events.Event.processEvent(Event.jav a:44)
at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.ja va:115)
at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.jav a:155)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.readAndDispa tch(RWTLifeCycle.java:241)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :682)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2388)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2347)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:22 00)
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 com.company.project.ui.rap.Application.createUI(Application. java:15)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:228)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:116)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException:
com.company.docprint.as.mngrs.DocManager (no security manager: RMI class
loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.ja va:531)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoad er.java:628)
at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader .java:294)
at
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalI nputStream.java:238)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.ja va:1500)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.ja va:1463)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStre am.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java :1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java: 348)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePa ir.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:6 54)
... 26 more


Environment:
Eclipse 3.4.1
RAP 1.2M2
Jboss 4.2.1
OS Fedora Linux 8 x86_64
Java 1.5.0_14 x86_64

Where is the problem? Why I can connect to one EJB but can't to other?

--
Denis Kostousov
email: denis.kostousovATgmailDOTcom
jabber: denis.kostousovATgmailDOTcom
fingerprint: D32B A253 F678 9EF1 1079 4F5A 52E1 8EEA FAF9 E1F1
Previous Topic:Multiple bundle location
Next Topic:Questions on p2.director
Goto Forum:
  


Current Time: Thu Apr 18 06:50:58 GMT 2024

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

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

Back to the top