geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Schmidt <schmidt...@gmail.com>
Subject Access to JAXR from an EJB
Date Tue, 30 Aug 2005 08:15:13 GMT
Hi,

I am trying to use the JAXR API and have some problems there. I found a 
GBean reference in the j2ee-server-plan so I figured I should use it 
like this:

In ejb-jar.xml I added a ressource reference:

<resource-ref>
                <res-ref-name>eis/JAXR</res-ref-name>
                <res-type>javax.xml.registry.ConnectionFactory</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

Then I look it up from a Session EJB like this:

Context ic = new InitialContext();
ConnectionFactory factory = (ConnectionFactory) 
ic.lookup("java:comp/env/eis/JAXR");

I think this is where the server throws the following exception:

18:06:13,403 ERROR [JAXRGBean] Error creating ConnectionFactory
javax.xml.registry.JAXRException: Unable to load JAXR 
ConnectionFactoryClass: or
g.apache.ws.scout.registry.ConnectionFactoryImpl
        at 
javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.ja
va:53)
        at 
org.apache.geronimo.webservices.jaxr.JAXRGBean.$getResource(JAXRGBean
.java:62)
        at 
org.apache.geronimo.webservices.jaxr.JAXRGBean$$FastClassByCGLIB$$e9e
91ce5.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:814)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
180)
        at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
175)
        at 
org.apache.geronimo.naming.reference.ResourceReference.getContent(Res
ourceReference.java:53)
        at 
org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContex
t.java:220)
        at 
org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:5
1)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean.connectToRegistry(RegistryBean.j
ava:80)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean.accessRegistry(RegistryBean.java
:61)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean$$FastClassByCGLIB$$c084ceb9.invo
ke(<generated>)
        at 
org.openejb.dispatch.AbstractMethodOperation.invoke(AbstractMethodOpe
ration.java:90)
        at org.openejb.slsb.BusinessMethod.execute(BusinessMethod.java:67)
        at 
org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.j
ava:72)
        at 
org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(Co
mponentContextInterceptor.java:56)
        at 
org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingIn
terceptor.java:81)
        at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
licy.java:119)
        at 
org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
ionContextInterceptor.java:80)
        at 
org.openejb.slsb.StatelessInstanceInterceptor.invoke(StatelessInstanc
eInterceptor.java:98)
        at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
licy.java:140)
        at 
org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
ionContextInterceptor.java:80)
        at 
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionIntercep
tor.java:82)
        at 
org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:234)
        at 
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor
.java:129)
        at 
org.openejb.proxy.SessionEJBLocalObject$$EnhancerByCGLIB$$aab013e7.ac
cessRegistry(<generated>)
        at 
com.ibm.dw.bookshop.web.BookShopServlet.doGet(BookShopServlet.java:59
)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at 
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at 
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.scout.registry.Connec
tionFactoryImpl
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at 
org.apache.geronimo.jetty.JettyClassLoader.loadClass(JettyClassLoader
.java:59)
        at 
javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.ja
va:50)
        ... 49 more
javax.naming.NamingException: could not look up : env/eis/JAXR [Root 
exception i
s java.lang.IllegalStateException: Proxy not returned. Target 
geronimo.server:J2
EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2e
eType=JAXRConnectionFactory,name=eis/JAXR not started]
        at 
org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContex
t.java:222)
        at 
org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:5
1)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean.connectToRegistry(RegistryBean.j
ava:80)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean.accessRegistry(RegistryBean.java
:61)
        at 
com.ibm.dw.bookshop.ejb.RegistryBean$$FastClassByCGLIB$$c084ceb9.invo
ke(<generated>)
        at 
org.openejb.dispatch.AbstractMethodOperation.invoke(AbstractMethodOpe
ration.java:90)
        at org.openejb.slsb.BusinessMethod.execute(BusinessMethod.java:67)
        at 
org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.j
ava:72)
        at 
org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(Co
mponentContextInterceptor.java:56)
        at 
org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingIn
terceptor.java:81)
        at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
licy.java:119)
        at 
org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
ionContextInterceptor.java:80)
        at 
org.openejb.slsb.StatelessInstanceInterceptor.invoke(StatelessInstanc
eInterceptor.java:98)
        at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPo
licy.java:140)
        at 
org.openejb.transaction.TransactionContextInterceptor.invoke(Transact
ionContextInterceptor.java:80)
        at 
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionIntercep
tor.java:82)
        at 
org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:234)
        at 
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor
.java:129)
        at 
org.openejb.proxy.SessionEJBLocalObject$$EnhancerByCGLIB$$aab013e7.ac
cessRegistry(<generated>)
        at 
com.ibm.dw.bookshop.web.BookShopServlet.doGet(BookShopServlet.java:59
)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at 
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at 
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: java.lang.IllegalStateException: Proxy not returned. Target 
geronimo.
server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=ger
onimo,j2eeType=JAXRConnectionFactory,name=eis/JAXR not started
        at 
org.apache.geronimo.naming.reference.ResourceReference.getContent(Res
ourceReference.java:58)
        at 
org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContex
t.java:220)
        ... 39 more

Any idea how to approach this properly?

Regards,

Stefan

Mime
View raw message