[EJB 3.0] - NoSuchObjectException
by nohwal
Hi,
I have a peculiar problem which I am unable to decipher. Please allow me to explain it.
I have an instance of JBoss server running on a box A(IP: 10.8.24.250). On another box B(IP: 10.8.24.236), I am trying to lookup an EJB deployed on the JBoss server on A. The code looks like the following:
|
| import java.util.Hashtable;
|
| import java.net.Socket;
| import javax.ejb.EJBHome;
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.naming.NamingEnumeration;
| import javax.naming.NamingException;
| import javax.rmi.PortableRemoteObject;
|
| public class SchedulerClient
| {
| public static void main(String[] args) throws Exception
| {
| Hashtable props = new Hashtable();
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.PROVIDER_URL, "10.8.24.250:1099");
| InitialContext ctx = new InitialContext(props);
| //Socket sock = new Socket("10.8.24.250", 1099);
| //System.out.println("The socket has been created successfully: "+ sock);
| Object obj = ctx.lookup("com.abc.scheduler.ejb.SchedulerManager");
| SchedulerManagerHome home = (SchedulerManagerHome) PortableRemoteObject.narrow(obj, SchedulerManagerHome.class);
| System.out.println("Got the home object :" + home);
| System.out.println("Got the ejb object :" + home.create());
| }
| }
|
If I run this client application on box A, it works absolutely fine and returns me the correct EJB instance.
However, if I run the same code from machine B, it throws me the following error:
2006-09-14 05:10:27,442 ERROR [com.nubridges.framework.ejb.EJBHomeFactory] Caught Throwable javax.naming.CommunicationException - javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table] - in EJBHomeFactory.lookupHome jn=com.abc.scheduler.ejb.SchedulerManager;hc=com.abc.scheduler.ejb.SchedulerManagerHome
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at SchedulerClient.lookup(...)
I fail to understand the reason. Both the boxes are Linux boxes running with Java 5. The JBoss version in 4.0.2.
One more thing, if both the boxes are windows boxes, the same code works fine on both of them. Any clues what am I doing wrong?
Thanks,
Deepak.
dnohwal(a)yahoo.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975088#3975088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975088
19 years, 2 months
[Messaging, JMS & JBossMQ] - configuring DLQ issues
by brooney
Hey there,
i'm having trouble with JBoss 4.0.1sp1 and the JBoss MQ DLQ failover. i've got a queue configured as shown below in the jbossmq-destinations-service.xml file and the jboss-service.xml file has the DLQ defined. however, when a message is not able to be processed, it gets added back the queue as expected but the RedeliverLimit seems to be ignored and stays on the queue forever until i manually remove it from the queue.
am i missing some configuration here to force it to go to the DLQ after 3 retries?
jbossmq-destinations-service.xml:
| <server>
| <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=myQueue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
| <attribute name="RedeliveryLimit">3</attribute>
| <attribute name="RedeliveryDelay">180000</attribute> <!-- 30 min -->
| <attribute name="SecurityConf">
| <security>
| <role name="guest" read="true" write="true" />
| </security>
| </attribute>
| </mbean>
|
jboss-service.xml
| <!-- ==================================================================== -->
| <!-- System Destinations -->
| <!-- ==================================================================== -->
|
| <!-- Dead Letter Queue -->
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=DLQ">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| </mbean>
|
thanks
ben
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975085#3975085
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975085
19 years, 2 months
[JBoss Seam] - SeamListener problem
by jimcarrey
Hi,
I am using Tomcat, Embeddable EJB 3.0 container and Seam 1.0.1 GA.
At start up, I get:
ERROR 29-09 09:31:52,750 (Log4JLogger.java:error:119) -Exception sending contex
t initialized event to listener instance of class org.jboss.seam.servlet.SeamLis
tener
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1650)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:856)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1305)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1187)
at org.jboss.seam.deployment.Scanner.handleItem(Scanner.java:133)
at org.jboss.seam.deployment.Scanner.handleArchive(Scanner.java:104)
at org.jboss.seam.deployment.Scanner.getClasses(Scanner.java:84)
at org.jboss.seam.init.Initialization.addComponents(Initialization.java:
339)
at org.jboss.seam.init.Initialization.init(Initialization.java:195)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.j
ava:32)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3692)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
127)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693
)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:680
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
My web.xml is the same in the booking example that comes with the seam examples.
Any ideas greatly appreciated?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975083#3975083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975083
19 years, 2 months