users@glassfish.java.net

RE: Glassfish & database COnnection in Netbeans

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Fri, 16 Oct 2009 12:00:56 +0100

Hi,

 

Here is a copy of the persistence unit.

 

<?xml version="1.0" encoding="UTF-8"?>

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

<persistence-unit name="ENTERPRISE-ejbPU" transaction-type="JTA">

<jta-data-source>jdbc_/EnterpriseDB2</jta-data-source>

<exclude-unlisted-classes>false</exclude-unlisted-classes>

<properties>

<property name="toplink.ddl-generation" value="drop-and-create-tables"/>

<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>

</properties>

</persistence-unit>

</persistence>

 

eve


 
> Date: Thu, 15 Oct 2009 15:32:42 -0700
> From: Marina.Vatkina_at_Sun.COM
> To: users_at_glassfish.dev.java.net
> Subject: Re: Glassfish & database COnnection in Netbeans
>
> Is your resource registered under 'jdbc_/' or 'jdbc/'?
>
> -marina
>
> Eve Pokua wrote:
> > Hello everyone,
> >
> > In version V application server, whenever, I created and made a connection
> > to a database within Netbeans, it was reflected in the admin console as
> > well.
> >
> > Now I get deployment JNDI error -
> >
> > SEVERE: Exception while invoking class
> > org.glassfish.persistence.jpa.JPADeployer prepare method
> > java.lang.RuntimeException: javax.naming.NamingException: Lookup failed
> > for 'jdbc_/ENTERPRISEDB' in SerialContext [Root exception is
> > javax.naming.NameNotFoundException: jdbc_]
> > at
> > org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
> > at
> > org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:113)
> > at
> > org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:84)
> > at
> > org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:118)
> > at
> > com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:603)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:375)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:90)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:164)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:162)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:314)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:339)
> > at
> > org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:162)
> > at
> > com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:603)
> > at
> > com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:251)
> > at
> > com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:174)
> > at
> > org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:270)
> > at
> > com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(CommandRunnerImpl.java:422)
> > at
> > com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:437)
> > at
> > com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:524)
> > at
> > com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:140)
> > at
> > com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:313)
> > at
> > com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:180)
> > 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:208)
> > at
> > com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:752)
> > at
> > com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:660)
> > at
> > com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:911)
> > at
> > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:164)
> > 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.NIOContext.execute(NIOContext.java:510)
> > at
> > com.sun.grizzly.SelectorHandlerRunner.handleSelectedKey(SelectorHandlerRunner.java:357)
> > at
> > com.sun.grizzly.SelectorHandlerRunner.handleSelectedKeys(SelectorHandlerRunner.java:257)
> > at
> > com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:194)
> > at
> > com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:129)
> > at
> > com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
> > at
> > com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
> > at java.lang.Thread.run(Thread.java:619)
> > Caused by: javax.naming.NamingException: Lookup failed for
> > 'jdbc_/ENTERPRISEDB' in SerialContext [Root exception is
> > javax.naming.NameNotFoundException: jdbc_]
> > at
> > com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:439)
> > at javax.naming.InitialContext.lookup(InitialContext.java:392)
> > at javax.naming.InitialContext.lookup(InitialContext.java:392)
> > at
> > com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:202)
> > at
> > com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:431)
> > at
> > org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:222)
> > at
> > org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
> > ... 42 more
> > Caused by: javax.naming.NameNotFoundException: jdbc_
> > at
> > com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252)
> > at
> > com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:171)
> > at
> > com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
> > at
> > com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:100)
> > at
> > com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:427)
> > ... 48 more
> > INFO: Deployment of KAKENTERPRISE done is 2,328 ms
> >
> >
> > When I try to create the connection pool in admin console I get this error -
> >
> > Can't find ConfigModel.Property for attr -isolation-level-guaranteed on
> > interface com.sun.enterprise.config.serverbeans.JdbcConnectionPool
> >
> >
> > I am using the verdor JavaDB (network)
> >
> > and resource type -
> >
> > javax.sql.ConnectionPoolDataSource
> >
> > I like the idea of the updatetool. I believe It works a lot better than
> > the old updatetool in v2.
> >
> > Thanking you
> >
> > eve
> >
> >
> >
> > ------------------------------------------------------------------------
> > Stay in touch with your friends through Messenger on your mobile. Learn
> > more. <http://clk.atdmt.com/UKM/go/174426567/direct/01/>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                                _________________________________________________________________ Chat to your friends for free on selected mobiles http://clk.atdmt.com/UKM/go/174426567/direct/01/
--_4a97f705-42dc-4373-bba9-88c904728410_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<BR>
&nbsp;<BR>
Here&nbsp;is a copy of the persistence unit.<BR>
&nbsp;<BR><SPAN lang=EN>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<BR>
&lt;persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;<BR>
&lt;persistence-unit name="ENTERPRISE-ejbPU" transaction-type="JTA"&gt;<BR>
&lt;jta-data-source&gt;jdbc_/EnterpriseDB2&lt;/jta-data-source&gt;<BR>
&lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;<BR>
&lt;properties&gt;<BR>
&lt;property name="toplink.ddl-generation" value="drop-and-create-tables"/&gt;<BR>
&lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;<BR>
&lt;/properties&gt;<BR>
&lt;/persistence-unit&gt;<BR>
&lt;/persistence&gt;<BR>
&nbsp;<BR>
eve<BR>
</SPAN><BR>&nbsp;<BR>&gt; Date: Thu, 15 Oct 2009 15:32:42 -0700<BR>&gt; From: Marina.Vatkina@Sun.COM<BR>&gt; To: users@glassfish.dev.java.net<BR>&gt; Subject: Re: Glassfish &amp; database COnnection in Netbeans<BR>&gt; <BR>&gt; Is your resource registered under 'jdbc_/' or 'jdbc/'?<BR>&gt; <BR>&gt; -marina<BR>&gt; <BR>&gt; Eve Pokua wrote:<BR>&gt; &gt; Hello everyone,<BR>&gt; &gt; <BR>&gt; &gt; In version V application server, whenever, I created and made a connection<BR>&gt; &gt; to a database within Netbeans, it was reflected in the admin console as <BR>&gt; &gt; well.<BR>&gt; &gt; <BR>&gt; &gt; Now I get deployment JNDI error -<BR>&gt; &gt; <BR>&gt; &gt; SEVERE: Exception while invoking class <BR>&gt; &gt; org.glassfish.persistence.jpa.JPADeployer prepare method<BR>&gt; &gt; java.lang.RuntimeException: javax.naming.NamingException: Lookup failed <BR>&gt; &gt; for 'jdbc_/ENTERPRISEDB' in SerialContext [Root exception is <BR>&gt; &gt; javax.naming.NameNotFoundException: jdbc_]<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.&lt;init&gt;(PersistenceUnitInfoImpl.java:111)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:113)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.PersistenceUnitLoader.&lt;init&gt;(PersistenceUnitLoader.java:84)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:118)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:603)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:375)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:90)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:164)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:162)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:314)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:339)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:162)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:603)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:251)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:174)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:270)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(CommandRunnerImpl.java:422)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:437)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:524)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:140)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:313)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:180)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:208)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:752)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:660)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:911)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:164)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)<BR>&gt; &gt; at com.sun.grizzly.NIOContext.execute(NIOContext.java:510)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.SelectorHandlerRunner.handleSelectedKey(SelectorHandlerRunner.java:357)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.SelectorHandlerRunner.handleSelectedKeys(SelectorHandlerRunner.java:257)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:194)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:129)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)<BR>&gt; &gt; at java.lang.Thread.run(Thread.java:619)<BR>&gt; &gt; Caused by: javax.naming.NamingException: Lookup failed for <BR>&gt; &gt; 'jdbc_/ENTERPRISEDB' in SerialContext [Root exception is <BR>&gt; &gt; javax.naming.NameNotFoundException: jdbc_]<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:439)<BR>&gt; &gt; at javax.naming.InitialContext.lookup(InitialContext.java:392)<BR>&gt; &gt; at javax.naming.InitialContext.lookup(InitialContext.java:392)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:202)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:431)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:222)<BR>&gt; &gt; at <BR>&gt; &gt; org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.&lt;init&gt;(PersistenceUnitInfoImpl.java:108)<BR>&gt; &gt; ... 42 more<BR>&gt; &gt; Caused by: javax.naming.NameNotFoundException: jdbc_<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:171)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:100)<BR>&gt; &gt; at <BR>&gt; &gt; com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:427)<BR>&gt; &gt; ... 48 more<BR>&gt; &gt; INFO: Deployment of KAKENTERPRISE done is 2,328 ms<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; When I try to create the connection pool in admin console I get this error -<BR>&gt; &gt; <BR>&gt; &gt; Can't find ConfigModel.Property for attr -isolation-level-guaranteed on <BR>&gt; &gt; interface com.sun.enterprise.config.serverbeans.JdbcConnectionPool<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; I am using the verdor JavaDB (network)<BR>&gt; &gt; <BR>&gt; &gt; and resource type -<BR>&gt; &gt; <BR>&gt; &gt; javax.sql.ConnectionPoolDataSource<BR>&gt; &gt; <BR>&gt; &gt; I like the idea of the updatetool. I believe It works a lot better than <BR>&gt; &gt; the old updatetool in v2.<BR>&gt; &gt; <BR>&gt; &gt; Thanking you<BR>&gt; &gt; <BR>&gt; &gt; eve<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; Stay in touch with your friends through Messenger on your mobile. Learn <BR>&gt; &gt; more. &lt;http://clk.atdmt.com/UKM/go/174426567/direct/01/&gt;<BR>&gt; <BR>&gt; <BR>&gt; ---------------------------------------------------------------------<BR>&gt; To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net<BR>&gt; For additional commands, e-mail: users-help@glassfish.dev.java.net<BR>&gt; <BR> <br /><hr />Chat to your friends for free on selected mobiles. <a href='http://clk.atdmt.com/UKM/go/174426567/direct/01/' target='_new'>Learn more.</a></body>
</html>
--_4a97f705-42dc-4373-bba9-88c904728410_--