users@glassfish.java.net

RAR5036:Resource reference is not defined for JNDI name [jdbc/oracle__nontx

From: <glassfish_at_javadesktop.org>
Date: Fri, 03 Aug 2007 10:28:54 PDT

Hello,

I'm trying to create a fairly simple web/ejb setup, but I've so far been unable to get data from my oracle database. With the logs set to finer, I get the following output (what confuses me about this is that it's looking for a 'jdbc/oracle_nontx" jndi resource...my resource is just called 'jdbc/oracle'):

JServer Release 9.2.0.6.0 - Production;Oracle JDBC driver;9.2.0.8.0;
        ;|connected_user_database_driver
@@@@ Returning sysResourceManager
Pool: resourceClosed: 5
Pool: resourceFreed: 5
login_successful
returning the connector registry
RAR5036:Resource reference is not defined for JNDI name [jdbc/oracle__nontx]
returning the connector registry
Found/returing Connector descriptor in connector registry.
ConnectionMgr: poolName oracle-thinPool txLevel : 1
@@@@ Returning noTxResourceManager
@@@@ Returning noTxResourceManager
NoTxResourceManagerImpl :: enlistResource called
@@@@ Returning noTxResourceManager
NoTxResourceManagerImpl :: delistResource called
Pool: resourceClosed: 6
Pool: resourceFreed: 6
badness
javax.persistence.NoResultException: getSingleResult() did not retrieve any entities.
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.throwNoResultException(EJBQueryImpl.java:223)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:475)
        at com.utc.hs.ear.facade.EarFacadeBean.getAr(EarFacadeBean.java:37)
        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 com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:184)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
        at $Proxy53.getAr(Unknown Source)
        at com.utc.hs.ear.controller.EarManager.loadEar(EarManager.java:63)
        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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:96)
        at javax.faces.component.UICommand.broadcast(UICommand.java:383)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:450)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:759)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)

And here's a snippet of the code that produces this (when arKey is 1 - and I know I have an entry in the db with an arKey of 1):

    @PersistenceContext(unitName="eAR-ejbPU")
    private EntityManager em;
    
    public Ar getAr(Integer arKey) {
        try {
            em.flush();
            Ar ar = (Ar)
            em.createNamedQuery("Ar.findByArkey").
                    setParameter("arkey", arKey).getSingleResult();
            return ar;
        } catch (NoResultException nre) {
            Logger.getAnonymousLogger().log(Level.SEVERE,
                    "badness",
                    nre);
            return null;
        }
    }

Any ideas for a fix?
[Message sent by forum member 'leptogenesis' (leptogenesis)]

http://forums.java.net/jive/thread.jspa?messageID=229402