geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toby cabot <t...@caboteria.org>
Subject Re: using resource-ref in web.xml?
Date Thu, 09 Sep 2004 15:09:45 GMT
On Wed, Sep 08, 2004 at 05:31:45PM -0500, David Jencks wrote:
> Don't know about the wiki but it ought to look like this (taken from an  
> openejb example):
>             <resource-ref>
> <ref-name>stateless/references/Resource_manager_access</ref-name>
>                 <target-name>DefaultDatasource</target-name>
>             </resource-ref>

Thanks as always for your help.  With this tip I think that I'm
getting close but still no cigar.  My RA's
connectiondefinition-instance name is "testCF" and if I use:

web.xml:
    <resource-ref>
        <res-ref-name>ra/CF</res-ref-name>
        <res-type>g6o.ra.ConnectionFactory</res-type>
        <res-auth>Application</res-auth>
    </resource-ref>

geronimo-jetty.xml:
    <resource-ref>
        <ref-name>ra/CF</ref-name>
        <target-name>testCF</target-name>
    </resource-ref>

...I can deploy, and the server runs, but I get a NamingException in
the servlet init which I've attached as a postscript.  The strange
part is that if I cut and paste the target name that the exception
message indicated was "not started" into the debug console "Filter
Output" box it shows up as running.  Perhaps there's an issue with the
order in which the components within the ear are being started?  Can I
influence that order somehow?

As an aside, this is a "soft" exception in that Geronimo keeps running
after it happens; even the servlet is running.  If I do something to
cause a different error, i.e. try to look up an obviously bogus JNDI
name, then Geronimo will shut down.

Thanks,
Toby

PS: EJB lookup with an ejb-link works now (didn't before), and I'll
look into the non-ejb-link case.

PPS: stack trace:

javax.naming.NamingException: could not look up : env/ra/CF [Root exception is java.lang.IllegalStateException:
Proxy not returned. Target geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=testCF
not started]
        at org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContext.java:209)
        at org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:55)
        at javax.naming.InitialContext.lookup(InitialContext.java:347)
        at g6o.servlet.Servlet.init(Servlet.java:51)
        at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:226)
        at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:390)
        at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:287)
        at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
        at org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:219)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.doStart(GBeanMBean.java:593)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStart(AbstractManagedObject.java:479)
        at org.apache.geronimo.gbean.jmx.SingleProxy.attemptFullStart(SingleProxy.java:154)
        at org.apache.geronimo.gbean.jmx.SingleProxy.addTarget(SingleProxy.java:119)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanReference.handleNotification(GBeanMBeanReference.java:307)
        at mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$ListenerWrapper.handleNotification(NotificationListenerMBeanServerInterceptor.java:57)
        at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:346)
        at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:320)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.sendNotification(AbstractManagedObject.java:244)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStart(AbstractManagedObject.java:500)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.start(AbstractManagedObject.java:279)
       at org.apache.geronimo.gbean.jmx.AbstractManagedObject.startRecursive(AbstractManagedObject.java:303)
        at org.apache.geronimo.gbean.jmx.GBeanMBean$9.invoke(GBeanMBean.java:940)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:767)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.startRecursive(AbstractManagedObject.java:310)
        at org.apache.geronimo.gbean.jmx.GBeanMBean$9.invoke(GBeanMBean.java:940)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:767)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:226)
        at org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:272)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:148)
Caused by: java.lang.IllegalStateException: Proxy not returned. Target geronimo.server:J2EEServer=geronimo,j2eeType=JCAManagedConnectionFactory,name=testCF
not started
        at org.apache.geronimo.naming.jmx.JMXObjectFactory.getObjectInstance(JMXObjectFactory.java:55)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
        at org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContext.java:205)
        ... 45 more

Mime
View raw message