users@glassfish.java.net

Re: Glassfish & 3.0.1 persistence-context-ref-name

From: Mitesh Meswani <mitesh.meswani_at_oracle.com>
Date: Mon, 21 Jun 2010 14:43:46 -0700

>java.lang.RuntimeException: Could not resolve a persistence unit
>corresponding to the persistence-context-ref-name [test] in the scope
>of the module called [lyrix-webapp]. Please verify your application.

Above error implies that your web module "lyrix-webapp" does not have a
persistence unit named "test" visible. Do you have a pu "test" packaged
in your war's "lib"/classes dir or if this is an .ear do you have it
packaged in your ears "lib" dir?

On 6/21/2010 12:43 PM, Dominik Dorn wrote:
> Hello!
>
> After upgrading one of my applications to glassfish 3.0.1 I get the
> following exception when trying to deploy a webapp
>
> [#|2010-06-21T21:34:36.314+0200|SEVERE|glassfish3.0.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=24;_ThreadName=http-thread-pool-4848-(2);|Exception
> while preparing the app
> java.lang.RuntimeException: Could not resolve a persistence unit
> corresponding to the persistence-context-ref-name [test] in the scope
> of the module called [lyrix-webapp]. Please verify your application.
> at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:672)
> at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1038)
> at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:103)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
> at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
> at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
> at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
> at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
> at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
> at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
> at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
> at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
> at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
> at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
> at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
> at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
> at java.lang.Thread.run(Thread.java:636)
> |#]
>
>
> Is there a way to get a more verbose output than just "in the module"?
> This error must happen, when scanning through the files, so it should
> be possible to print the jarName, filename + classname ?
>
> any help appreciated!
>
> Thanks,
> Dominik
>
>