dev@glassfish.java.net

Re: error creating jdbc connection pool

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Tue, 09 Nov 2010 07:24:50 -0800

On 11/7/10 9:56 PM, Jagadish Prasath Ramu wrote:
> Ping seems to be enabled by default even though it was not actually set.
> Probably, due to the following issue which is fixed now.
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=14320
>
> w.r.t ping failure, this seems to be because, each property in the
> "properties" tab is set individually by REST (instead of a batch update
> using hk2 transaction) resulting in configuration change event which
> in-turn results in pool recreation for each addition of property. With
> ping=true, before databaseName property is set, following exception is
> seen.

? REST can pass all params of a given cli I think...Unless there is a
bug for prorerties handling?
...Maybe the Admin gui is doing it in 2 steps instead of 1?
Jason?


Ludo
> "Connection could not be allocated because: Required Derby DataSource
> property
> databaseName not set"
>
> I did not see the following exception in my installation (OS : Suse) of NB 7.0 M2 with GF b24.
> "Exception
> while visiting com/sun/gjc/spi/ManagedConnectionFactory.class of size 30141"
> Jerome/Hong might know about this.
>
> Thanks,
> -Jagadish
>
>
>
> On Sun, 2010-11-07 at 18:08 -0800, Bill Shannon wrote:
>> I tried to create a new JDBC connection pool using the admin console.
>> I'm new to this, so I don't really know what I'm doing. I got this error:
>>
>> Ping Connection Pool for WinePool is Failed. Ping failed Exception -
>> Connection could not be allocated because: Unable to open file /_cpds_0 : null
>> Please check the server.log for more details.
>>
>> "is Failed"? Maybe "has failed" would be better?
>>
>> "file /_cpds_0" : null"?
>>
>> What does this mean?
>>
>> I created a connection to this database in NetBeans, which lists it as:
>>
>> jdbc:derby://nissan:1527/wine [shannon on SHANNON]
>>
>> In the admin console I have these properties set:
>> User = shannon
>> DatabaseName = wine
>> Password =<the password for shannon>
>> ServerName = nissan
>>
>> Everything else is the default.
>>
>> The server.log file says:
>>
>> [#|2010-11-07T17:53:59.268-0800|SEVERE|glassfish3.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=14;_ThreadName=Thread-1;|Exception
>> while visiting com/sun/gjc/spi/ManagedConnectionFactory.class of size 30141
>> java.lang.ArrayIndexOutOfBoundsException: 88
>> at java.util.ArrayList.add(ArrayList.java:352)
>> at
>> org.glassfish.hk2.classmodel.reflect.impl.TypeImpl.addMethod(TypeImpl.java:82)
>> at
>> org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor.visitMethod(ModelClassVisitor.java:206)
>> at org.objectweb.asm.ClassReader.accept(Unknown Source)
>> at org.objectweb.asm.ClassReader.accept(Unknown Source)
>> at org.glassfish.hk2.classmodel.reflect.Parser$4.on(Parser.java:214)
>> at
>> org.glassfish.hk2.classmodel.reflect.util.JarArchive.onSelectedEntries(JarArchive.java:120)
>> at
>> org.glassfish.hk2.classmodel.reflect.util.DirectoryArchive.parse(DirectoryArchive.java:96)
>> at
>> org.glassfish.hk2.classmodel.reflect.util.DirectoryArchive.onSelectedEntries(DirectoryArchive.java:82)
>> at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:198)
>> at org.glassfish.hk2.classmodel.reflect.Parser.access$000(Parser.java:59)
>> at org.glassfish.hk2.classmodel.reflect.Parser$2.call(Parser.java:161)
>> at org.glassfish.hk2.classmodel.reflect.Parser$2.call(Parser.java:154)
>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> at java.lang.Thread.run(Thread.java:619)
>> |#]
>>
>> [#|2010-11-07T17:54:00.283-0800|INFO|glassfish3.1|org.hibernate.validator.engine.resolver.DefaultTraversableResolver|_ThreadID=14;_ThreadName=Thread-1;|Instantiated
>> an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.|#]
>>
>> [#|2010-11-07T17:54:00.550-0800|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=14;_ThreadName=Thread-1;|RAR8054:
>> Exception while creating an unpooled [test] connection for pool [ WinePool ],
>> Connection could not be allocated because: Required Derby DataSource property
>> databaseName not set.|#]
>>
>> [#|2010-11-07T17:54:00.885-0800|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=14;_ThreadName=Thread-1;|RAR8054:
>> Exception while creating an unpooled [test] connection for pool [ WinePool ],
>> Connection could not be allocated because: Unable to open file /_cpds_0 : null|#]
>>
>> [#|2010-11-07T17:54:00.887-0800|SEVERE|glassfish3.1|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=14;_ThreadName=Thread-1;|The
>> RuntimeException could not be mapped to a response, re-throwing to the HTTP
>> container
>> org.glassfish.admin.rest.CliFailureException: Ping Connection Pool for WinePool
>> is Failed. Ping failed Exception - Connection could not be allocated because:
>> Unable to open file /_cpds_0 : null Please check the server.log for more details.
>> at
>> org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGet(TemplateCommandGetResource.java:83)
>> at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>>
>> What did I do wrong?
>>
>> This is from b24 bundled with NetBeans 7.0 M2.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>