EJB3.0 - trailblazer - context.lookup results in NameNotFoun
jeff_porter Aug 22, 2005 12:18 PMI've followed the TrailBlazer example from...
http://trailblazer.demo.jboss.com/EJB3Trail/background/intro/index.html
Then applied the fixed from the following post...
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3888831#3888831
I'm not stuck at the point where the code try to lookup the JNDI name, i.e.
Context context = new InitialContext(); authorsBean = (Authors) context.lookup(Authors.class.getName());
This results in a NameNotFoundException from the second line.
I've used the JMXConsole & cant see the Authors class bound to the JNDI tree (this could be me not using the console correctly)
JBoss seems to start up normally...
17:11:55,905 INFO [A] Bound to JNDI name: queue/A 17:11:55,905 INFO [B] Bound to JNDI name: queue/B 17:11:55,915 INFO [C] Bound to JNDI name: queue/C 17:11:55,915 INFO [D] Bound to JNDI name: queue/D 17:11:55,915 INFO [ex] Bound to JNDI name: queue/ex 17:11:55,995 INFO [testTopic] Bound to JNDI name: topic/testTopic 17:11:55,995 INFO [securedTopic] Bound to JNDI name: topic/securedTopic 17:11:55,995 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic 17:11:56,005 INFO [testQueue] Bound to JNDI name: queue/testQueue 17:11:56,105 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093 17:11:56,175 INFO [DLQ] Bound to JNDI name: queue/DLQ 17:11:56,596 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA' 17:11:56,756 INFO [TomcatDeployer] deploy, ctxPath=/authors-web, warUrl=file:/C:/tools/jboss-4.0.2/server/default/tmp/d eploy/tmp52724authors-web-exp.war/ 17:11:57,026 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/tools/jboss-4.0.2/server/default/deplo y/jmx-console.war/ 17:11:57,547 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 17:11:57,858 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009 17:11:57,898 INFO [JkMain] Jk running ID=0 time=0/110 config=null 17:11:57,918 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 22s: 967ms
So I'm not a little suck.
The Author Class looks ok...
import java.util.List; import javax.ejb.Remote; @Remote public interface Authors { public List<Author> getAllAuthors(); public Author addAuthor (String name); public void addArticle(Author author, String title, String body); }
The war file contains on the Servlet, the ejb3 file contains all the other classes.
I'm using...
JBossIDE-1.5M2-Bundle+EJB3-win32.zip
jboss-4.0.2.zip
Can someone suggest some ideas of what I'm doing wrong?