File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Hi, why am I getting this exception on console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Hi, why am I getting this exception on console " Watch "Hi, why am I getting this exception on console " New topic

Hi, why am I getting this exception on console

khushhal yadav
Ranch Hand

Joined: Jun 20, 2007
Posts: 242

Output in console:

Buildfile: build.xml

[mkdir] Created dir: H:\workbook\ex04_1\build
[mkdir] Created dir: H:\workbook\ex04_1\build\classes
[echo] It starts now

[echo] compilng starts here
[javac] Compiling 11 source files to H:\workbook\ex04_1\build\classes
[echo] compilng ends here

[jar] Building jar: H:\workbook\ex04_1\build\titan.jar
[copy] Copying 1 file to H:\jboss\jboss-4.2.2.GA\jboss-4.2.2.GA\server\defa

[java] javax.naming.NameNotFoundException: TravelAgentRemote not bound
[java] at org.jnp.server.NamingServer.getBinding(

[java] at org.jnp.server.NamingServer.getBinding(

[java] at org.jnp.server.NamingServer.getObject(
[java] at org.jnp.server.NamingServer.lookup(
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
[java] at java.lang.reflect.Method.invoke(
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
[java] at sun.rmi.transport.Transport$
[java] at Method)
[java] at sun.rmi.transport.Transport.serviceCall(
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCP
[java] at sun.rmi.transport.tcp.TCPTransport$
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
[java] at java.util.concurrent.ThreadPoolExecutor$
[java] at
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
[java] at sun.rmi.server.UnicastRef.invoke(
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(
[java] at org.jnp.interfaces.NamingContext.lookup(
[java] at javax.naming.InitialContext.lookup(
[java] at com.title.clients.Client_3.main(

Total time: 8 seconds

My http://localhost:8080/jmx-console/HtmlAdaptor looks like this

Global JNDI Namespace
+- TravelAgentRemote (proxy: $Proxy91 implements interface com.title.travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy)
+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy47 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+- HTTPXAConnectionFactory (class:
+- TransactionPersistenceContextRemote (class: java.lang.Object)
+- ConnectionFactory (class:
+- ExtendedPersistenceContextRemoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
+- UserTransactionSessionFactory (proxy: $Proxy14 implements interface
+- HTTPConnectionFactory (class:
+- XAConnectionFactory (class:
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- TransactionPersistenceContextRemoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
+- UserTransaction (class:
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- ExtendedPersistenceContextRemote (class: java.lang.Object)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- persistence.units:jar=titan.jar,unitName=titan (class: org.hibernate.impl.SessionFactoryImpl)
+- queue (class: org.jnp.interfaces.NamingContext)
| +- A (class:
| +- testQueue (class:
| +- ex (class:
| +- DLQ (class:
| +- D (class:
| +- C (class:
| +- B (class:
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class:
| +- testTopic (class:
| +- securedTopic (class:
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy48 implements interface org.jboss.console.manager.PluginManagerMBean)
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)

My Client Class is like this:

My Bean class is like this:

My Remote interface is like this:

My persistence.xml looks like this:

My jboss.xml is like this:

And my titan.ear folder structure is like this:

| |- persistence.xml
| |- jboss.xml
|- class files with proper pckg structure

Rest things are set in class path via an ant file

Please let me know..

Ram Venkat

Joined: Nov 28, 2007
Posts: 29
place jboss.xml in your ejb-jar like jboss.xml

Ram Venkat<br />----------<br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 5 (In Process..)
khushhal yadav
Ranch Hand

Joined: Jun 20, 2007
Posts: 242

Thanks a lot Ram, it's working now..
I agree. Here's the link:
subject: Hi, why am I getting this exception on console
It's not a secret anymore!