This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Author

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

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

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

ejbjar:
[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
ult\deploy

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

[java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)

[java] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
[java] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
a:305)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:159)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
t.java:535)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCP
Transport.java:790)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
ransport.java:649)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
PoolExecutor.java:885)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
Executor.java:907)
[java] at java.lang.Thread.run(Thread.java:619)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe
r(StreamRemoteCall.java:255)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa
ll.java:233)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:66
7)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:62
7)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.title.clients.Client_3.main(Client_3.java:17)

BUILD SUCCESSFUL
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: org.jboss.mq.SpyXAConnectionFactory)
+- TransactionPersistenceContextRemote (class: java.lang.Object)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- ExtendedPersistenceContextRemoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
+- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- TransactionPersistenceContextRemoteStatefulProxyFactory (proxy: $Proxy76 implements interface org.jboss.ejb3.ProxyFactory)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- 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: org.jboss.mq.SpyQueue)
| +- testQueue (class: org.jboss.mq.SpyQueue)
| +- ex (class: org.jboss.mq.SpyQueue)
| +- DLQ (class: org.jboss.mq.SpyQueue)
| +- D (class: org.jboss.mq.SpyQueue)
| +- C (class: org.jboss.mq.SpyQueue)
| +- B (class: org.jboss.mq.SpyQueue)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- 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:

titan
|--META-INF
| |- 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..


rgrds,
Khushhal
Ram Venkat
Greenhorn

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..
 
Consider Paul's rocket mass heater.
 
subject: Hi, why am I getting this exception on console
 
Similar Threads
netbeans 5.5 + Jboss 4.0.4 + EJB 3.0
NamingException: Could not dereference object - EJB 3.0 workbook ex05-2
NameNotFoundException in database connectivity with Jboss
ejb 3.0,jboss 4.2.2 netbeans 6.0.1
Null Pointer Exception