Thanks Jim and Bill for your responses, unfortunately your suggestions
haven't worked for me. I get "bean not bound" consistently with any/all of
the changes suggested. I'd love to use JBoss 7, but I have to deploy this
app along some legacy setup and ears on JBoss 5 that it's simply
prohibitive to port to v7 right now.

Does ejb registration/binding order matter here? and if so, how can I
change it?  This is what I see just before the error (note that RestfulBean
depends on EventReportBean and XMLUtilBean, and this latter is added after
RestfulBean):


2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) installing bean:
jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=EventReportBean,service=EJB3
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   with dependencies:
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and demands:
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jboss.ejb:service=EJBTimerService
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)
persistence.unit:unitName=VOLTP.ear/lib/voltp-jpa-1.0-SNAPSHOT.jar#VOLTP
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and supplies:
2012-05-29 08:42:58,325 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)
jndi:VOLTP/EventReportBean/local-com.acme.voltp.session.EventReportLocal
2012-05-29 08:42:58,326 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/EventReportBean/remote
2012-05-29 08:42:58,326 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/EventReportBean/local
2012-05-29 08:42:58,326 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Class:com.acme.voltp.session.EventReportLocal
2012-05-29 08:42:58,326 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Added
bean(jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=EventReportBean,service=EJB3)
to KernelDeployment of: voltp-ejbs-1.0-SNAPSHOT.jar
2012-05-29 08:42:58,326 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) installing bean:
jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=RestfulBean,service=EJB3
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   with dependencies:
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and demands:
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/XMLUtilBean/local-com.acme.voltp.util.XMLUtilLocal
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)
jndi:VOLTP/EventReportBean/local-com.acme.voltp.session.EventReportLocal
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jboss.ejb:service=EJBTimerService
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and supplies:
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/RestfulBean/remote
2012-05-29 08:42:58,327 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/RestfulBean/local-com.acme.voltp.session.RestfulLocal
2012-05-29 08:42:58,328 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/RestfulBean/local
2012-05-29 08:42:58,328 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Class:com.acme.voltp.session.RestfulLocal
2012-05-29 08:42:58,328 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Added
bean(jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=RestfulBean,service=EJB3)
to KernelDeployment of: voltp-ejbs-1.0-SNAPSHOT.jar
2012-05-29 08:42:58,328 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) installing bean:
jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=XMLUtilBean,service=EJB3
2012-05-29 08:42:58,328 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   with dependencies:
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and demands:
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jboss.ejb:service=EJBTimerService
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main)   and supplies:
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/XMLUtilBean/local-com.acme.voltp.util.XMLUtilLocal
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/XMLUtilBean/local
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) jndi:VOLTP/XMLUtilBean/remote
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Class:com.acme.voltp.util.XMLUtilLocal
2012-05-29 08:42:58,329 INFO  [org.jboss.ejb3.deployers.JBossASKernel]
(main) Added
bean(jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=XMLUtilBean,service=EJB3)
to KernelDeployment of: voltp-ejbs-1.0-SNAPSHOT.jar
2012-05-29 08:42:58,330 WARN
 [org.jboss.ejb3.interceptor.InterceptorInfoRepository] (main)
EJBTHREE-1852: InterceptorInfoRepository is deprecated
2012-05-29 08:42:58,332 INFO
 [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy
AbstractBeanMetaData@aba5b9{name=jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=XMLUtilBean,service=EJB3_endpoint
bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl
properties=[container] constructor=null autowireCandidate=true}
2012-05-29 08:42:58,332 INFO
 [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy
AbstractBeanMetaData@1f97b85{name=jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=EventReportBean,service=EJB3_endpoint
bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl
properties=[container] constructor=null autowireCandidate=true}
2012-05-29 08:42:58,332 INFO
 [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy
AbstractBeanMetaData@3bb6f9{name=jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=RestfulBean,service=EJB3_endpoint
bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl
properties=[container] constructor=null autowireCandidate=true}
2012-05-29 08:42:58,400 INFO  [org.jboss.ejb3.session.SessionSpecContainer]
(main) Starting
jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=XMLUtilBean,service=EJB3
2012-05-29 08:42:58,401 INFO  [org.jboss.ejb3.EJBContainer] (main) STARTED
EJB: com.acme.voltp.util.XMLUtilBean ejbName: XMLUtilBean
2012-05-29 08:42:58,421 INFO
 [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (main)
Binding the following Entries in Global JNDI:

VOLTP/XMLUtilBean/local - EJB3.x Default Local Business Interface
VOLTP/XMLUtilBean/local-com.acme.voltp.util.XMLUtilLocal - EJB3.x Local
Business Interface

2012-05-29 08:42:58,830 INFO
 [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy,
ctxPath=/webservices
2012-05-29 08:43:00,118 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webservices]]
(main) Exception sending context initialized event to listener instance of
class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
java.lang.RuntimeException: javax.naming.NameNotFoundException: RestfulBean
not bound



I'm using RestEasy 2.2.2.GA. I know it's not the latest, but this version
was working before for me on the same environment, so I didn't want to
change another variable at least before I make this work.



On Thu, May 24, 2012 at 6:04 PM, Rogelio Flores <rogelio.flo...@gmail.com>wrote:

> Ok, looks like I have a problem others have reported before, but still
> can't make it work (I also didn't see how to search this mailing list for
> old messages).
>
> I have a RESTful service running off a SLSB as explained here:
>
> http://docs.jboss.org/resteasy/docs/2.0.0.GA/userguide/html/RESTEasy_EJB_Integration.html
>
> The worst thing is that I had it working before, but this project got
> converted to Spring and then back to JEE again, and as far as I can tell,
> this is the same config and code I had when it was running correctly, but
> obviously I might have missed something.
>
> This is my web.xml:
>
>    <context-param>
>       <param-name>resteasy.jndi.resources</param-name>
>       <param-value>VOLTP/RestfulBean/local</param-value>
>    </context-param>
>    <listener>
>       <listener-class>
>          org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
>       </listener-class>
>    </listener>
>    <servlet>
>       <servlet-name>Resteasy</servlet-name>
>       <servlet-class>
>          org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
>       </servlet-class>
>    </servlet>
>    <servlet-mapping>
>       <servlet-name>Resteasy</servlet-name>
>       <url-pattern>/*</url-pattern>
>    </servlet-mapping>
>    <context-param>
>       <param-name>resteasy.scan</param-name>
>       <param-value>true</param-value>
>    </context-param>
>
> My Bean is declared with:
> @Stateless
> public class RestfulBean implements RestfulLocal {...
>
> and ResfulLocal looks like this:
>
> @Local
> @Path("/")
> public interface RestfulLocal {
>
>
> The error I get:
>
> 2012-05-24 17:41:15,217 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webservices]]
> (main) Exception sending context initialized event to listener instance of
> class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
> java.lang.RuntimeException: Class is not a root resource.  It, or one of
> its interfaces must be annotated with @Path: $Proxy409 implements:
>  com.acme.session.RestfulLocal
>         at
> org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:104)
>         at
> org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:83)
>         at
> org.jboss.resteasy.core.ResourceMethodRegistry.addJndiResource(ResourceMethodRegistry.java:57)
>         at
> org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:350)
>         at
> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225)
>         at
> org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
>         at
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
>         at
> org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
>         at
> org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
>         at
> org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
>         at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
> ...
>
>
> I also added a jboss-web.xml as suggested here (I didn't use it before
> although I remember playing with it at some point when I first had this app
> working):
> https://community.jboss.org/thread/165368
>
> <?xml version="1.0" encoding="UTF-8"?>
> <jboss-web>
>
>  
> <depends>jboss.j2ee:ear=VOLTP.ear,jar=voltp-ejbs-1.0-SNAPSHOT.jar,name=RestfulBean,service=EJB3</depends>
> </jboss-web>
>
> but didn't work; I get the message above. Actually, before adding this
> file, I got a "Resource not bound", but I also got the message above.
>
> I can see that the SLSB is registered correctly with JNDI when the error
> above happens, and it obviously has the Path annotation.
>
>
>
> Can anyone suggest something else? I've tried everything I can think of
> and getting nowhere. Thanks.
>
> Using JBoss 5.1.0.GA
>
>
> BTW, this app was also working fine with Spring (web.xml was different
> because it was sourcing the spring config and was using Spring Beans
> instead, etc).
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to