persistence@glassfish.java.net

FW: Exception while preparing the app : Invalid resource : jdbc

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Fri, 11 Mar 2011 10:28:06 +0000

Sorry,
I forgot to add the log from server.
[#|2011-03-11T03:34:56.527+0000|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=36;_ThreadName=Thread-1;|Invalid resource : jdbc/_ENTERPRISEDB__pmorg.glassfish.deployment.common.DeploymentException: Invalid resource : jdbc/_ENTERPRISEDB__pm at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662)Caused by: java.lang.RuntimeException: Invalid resource : jdbc/_ENTERPRISEDB__pm at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:539) at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:468) at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63) at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71) at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:154) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:213) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:220) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) ... 29 moreCaused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/_ENTERPRISEDB__pm at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.validateResource(ConnectorResourceAdminServiceImpl.java:272) at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.setResourceInfo(ConnectorResourceAdminServiceImpl.java:253) at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookupDataSourceInDAS(ConnectorResourceAdminServiceImpl.java:243) at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:537) ... 48 more|#]
[#|2011-03-11T03:34:56.613+0000|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=Thread-1;|Exception while preparing the app : Invalid resource : jdbc/_ENTERPRISEDB__pmjava.lang.RuntimeException: Invalid resource : jdbc/_ENTERPRISEDB__pm at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:539) at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:468) at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63) at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71) at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:154) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:119) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:213) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:220) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662)Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/_ENTERPRISEDB__pm at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.validateResource(ConnectorResourceAdminServiceImpl.java:272) at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.setResourceInfo(ConnectorResourceAdminServiceImpl.java:253) at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookupDataSourceInDAS(ConnectorResourceAdminServiceImpl.java:243) at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:537) ... 48 more


Thanks
eve
From: gorgeous65_at_msn.com
To: users_at_glassfish.java.net; ejb_at_glassfish.java.net; persistence_at_glassfish.java.net
Subject: Exception while preparing the app : Invalid resource : jdbc
Date: Fri, 11 Mar 2011 03:56:09 +0000








Hello,
I have just installed the new release of glassfish 3.1 but I am having problemsdeploying my application which was deployed fine on previous version ofglassfish.
I read by Googling -
http://java.net/jira/browse/GLASSFISH-13672
http://javahowto.blogspot.com/2011/02/sample-glassfish-resourcesxml.html
http://blogs.sun.com/vkraemer/entry/supporting_glassfish_resources_xml
that I need to create a glassfish-resources.xml put it somewhere even though I have a persistence.xml file.The application is a full ear. I can see examples of glassfish-resources.xmlbut I am using netbeans 7 beta, so how do I create it and where doI place it in my project?
I have dir -
Enterprise app project Enterprise-app-client ejb-module war

So do I create a META-INF dir in my ejb-module dir and place the glassfish-resources.xml in there?
Please help.
Thanks eve