[jboss-user] [EJB 3.0] - problem looking up my session ejb
cmogentale
do-not-reply at jboss.com
Sun Jun 17 16:12:12 EDT 2007
H i!
i've been experimenting issues for a week while trying to access my session ejb (MediasBean, implements Media) from a jsp page. deployment is successful thought. the jboss server is on my local machine as well as the mysql database in which data is persisted.
this is the error message i encounter at the address http://localhost:8080/medias/index.jsp :
anonymous wrote :
| 21:48:27,747 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 21:48:28,090 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=medias-beans.ejb3,name=MediasBean,service=EJB3 with dependencies:
| 21:48:28,090 INFO [JmxKernelAbstraction] persistence.units:jar=medias-beans.ejb3.jar,unitName=hpdb
| 21:48:28,246 INFO [EJBContainer] STARTED EJB: org.jboss.projectland.MediasBean ejbName: MediasBean
| 21:48:28,331 INFO [EJB3Deployer] Deployed: file:/home/ark/jboss-4.0.5.GA/server/default/deploy/medias-beans.ejb3
| 21:48:28,339 INFO [TomcatDeployer] deploy, ctxPath=/medias, warUrl=.../tmp/deploy/tmp6640medias-exp.war/
| 21:48:47,581 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| javax.naming.NameNotFoundException: org.jboss.projectland.MediasBean not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| ....
|
here is the jsp code :
anonymous wrote :
| <%@ page import = "javax.naming.Context" %>
| <%@ page import = "javax.naming.InitialContext" %>
| <%@ page import = "java.util.Properties" %>
| <%@ page import = "org.jboss.projectland.*" %>
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
| TEST
|
|
| <%
| Context ctx=new InitialContext();
| Medias medias = (Medias) ctx.lookup(MediasBean.class.getName()+"/remote");
| %>
|
here is my MediasBean code :
anonymous wrote :
| package org.jboss.projectland;
| import javax.ejb.Remote;
| @Remote
| public interface Medias {
| public Type_media addTypeMedia(String name);
| public Media addMedia(Type_media typeMedia,String mediaName);
| ...
| }
|
|
jndiview in jboss returns :
anonymous wrote :
| ...
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- MediasBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy73 implements interface org.jboss.projectland.Medias,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
| +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
| ..
|
i can't figure out what's going wrong .. thought i searched a lot . can you help me ?
thanks in advance and keep up the good work.
christophe
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055046#4055046
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055046
More information about the jboss-user
mailing list