This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195015 - properties of JDBC Resources and Connection Pools in Server-node are empty
Summary: properties of JDBC Resources and Connection Pools in Server-node are empty
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 08:00 UTC by mithridates
Modified: 2011-02-09 10:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mithridates 2011-02-03 08:00:34 UTC
[ BUILD # : 201102020000 ]
[ JDK VERSION : 1.6.22 ]

Using GlassFish 3.0.1.
In the services-window properties of Resources and Connection Pools are empty.
Opening properties on a JDBC Resource shortly displays "fetching data..." in
the poolname-dropdown.
No Pools are selectable, properties of Connection Pools shows an empty
dialogbox.

Problem does not occur with GlassFish 3.1 (b37).
Comment 1 Vince Kraemer 2011-02-03 16:39:05 UTC
Where did you download the 3.0.1 bits from?

I just did...

pulled latest bits from web-main repo
build the bits
start the built bits
used the add server dialog to download and install the 3.0.1 (build 22) bits
started the server with the nodes right-click menu
expanded the nodes down to jdbc/__default
opened the properties for the JDBC Resource
   all properties were visible and 'correct'
selected the DerbyPool node
opened the properties for the JDBC Connection Pool
  all properties were visible and correct.

I am using Mac OS X, with JDK 6 update 22.

Obviously, there is some difference between your configuration or 'steps to reproduce' and mine... but I do not know what it is.

Does your 3.0.1 installation have an admin username and password?

Is the admin listener running under https?

What is the output of the following commands:

asadmin version
asadmin get 'resources.*'
Comment 2 mithridates 2011-02-03 21:46:54 UTC
GlassFish 3.0.1 (b22) was already installed on my system as it's my development server. 
The bits are from glassfish.org.I did not install it from within NB. 
BTW: I can reproduce this behaviour on MacOS / jdk 6 u22 (with GF 3.0.1 already installed, too).
Problem occurs when importing settings from 6.9 as well as working with a clean userdir, adding the server manually.

>Does your 3.0.1 installation have an admin username and password?
No password on both machines.

>Is the admin listener running under https?
No (on both machines)

>What is the output of the following commands:
>asadmin version
Version = Oracle GlassFish Server 3.0.1 (build 22)
Command version executed successfully.
>asadmin get 'resources.*'
You really don't want to see all that stuff ;-)
But "asadmin get 'resources.*' | grep sample" for example gives:
resources.jdbc-connection-pool.DerbyPool.property.DatabaseName=sun-appserv-samples
resources.jdbc-connection-pool.SamplePool.property.DatabaseName=sample
resources.jdbc-connection-pool.SamplePool.property.URL=jdbc:derby://localhost:1527/sample
resources.jdbc-resource.jdbc/sample.enabled=true
resources.jdbc-resource.jdbc/sample.jndi-name=jdbc/sample
resources.jdbc-resource.jdbc/sample.object-type=user
resources.jdbc-resource.jdbc/sample.pool-name=SamplePool

>Obviously, there is some difference between your configuration or 'steps to
>reproduce' and mine... but I do not know what it is.
Maybe I have found something:
Both instances are using Oracle 11g JDBC drivers (ojdbc6.jar) in some connection pools.
Now I just set up a new Domain without Oracle driver and everything works as expected.
Might that help?
Comment 3 Vince Kraemer 2011-02-04 04:49:16 UTC
(In reply to comment #2)
[snip]
> >asadmin get 'resources.*'
> You really don't want to see all that stuff ;-)
> But "asadmin get 'resources.*' | grep sample" for example gives:
> resources.jdbc-connection-pool.DerbyPool.property.DatabaseName=sun-appserv-samples
> resources.jdbc-connection-pool.SamplePool.property.DatabaseName=sample
> resources.jdbc-connection-pool.SamplePool.property.URL=jdbc:derby://localhost:1527/sample
> resources.jdbc-resource.jdbc/sample.enabled=true
> resources.jdbc-resource.jdbc/sample.jndi-name=jdbc/sample
> resources.jdbc-resource.jdbc/sample.object-type=user
> resources.jdbc-resource.jdbc/sample.pool-name=SamplePool

Actually... I would like to see all that stuff...  That is why I asked for it.

> 
> >Obviously, there is some difference between your configuration or 'steps to
> >reproduce' and mine... but I do not know what it is.
> Maybe I have found something:
> Both instances are using Oracle 11g JDBC drivers (ojdbc6.jar) in some
> connection pools.
> Now I just set up a new Domain without Oracle driver and everything works as
> expected.
> Might that help?

Were all the jdbc-connection-pool and jdbc-resouce nodes empty or just some of them?
Comment 4 Vince Kraemer 2011-02-04 05:56:53 UTC
can you attach the ide message log and the server log for one of the times where you try to access the properties and you do not get any data?
Comment 5 mithridates 2011-02-04 08:39:31 UTC
I think I tracked down the cause:
In one of the connection pools we do have a password with a "%". Simply removing the "%" in the password-property of the pool-settings "eliminates" the problem.

To reproduce just create a connection pool with a "%" in password property.

The server log doesn't show anything.

IDE log says:
INFO [glassfish]: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
	at java.net.URLDecoder.decode(URLDecoder.java:168)
	at org.netbeans.modules.glassfish.spi.ServerCommand$GetPropertyCommand.processResponse(ServerCommand.java:297)
	at org.netbeans.modules.glassfish.common.CommandRunner.call(CommandRunner.java:629)
	at org.netbeans.modules.glassfish.common.CommandRunner.call(CommandRunner.java:102)
	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:662)
Caused: java.util.concurrent.ExecutionException
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
[catch] at org.netbeans.modules.glassfish.common.CommandRunner.getResourceData(CommandRunner.java:367)
	at org.netbeans.modules.glassfish.common.nodes.Hk2ResourceNode$2$1.run(Hk2ResourceNode.java:140)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
WARNING [glassfish]: Invalid attribute name pool-name%%%EOL%%%
WARNING [glassfish]: Invalid attribute name enabled%%%EOL%%%
WARNING [glassfish]: Dotted name path applications.application.* not found.%%%EOL%%%
Comment 6 mithridates 2011-02-04 11:30:36 UTC
Addition:
Reproducible with GF 3.1, too.
Comment 7 Vince Kraemer 2011-02-04 17:15:05 UTC
thanks for the additional sleuthing.  I never would have guessed that one.
Comment 8 Quality Engineering 2011-02-05 06:07:51 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/115609d6fff5
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #195015 : double URL decode of a single URL encoded string can causes problems
Comment 9 mithridates 2011-02-05 13:41:14 UTC
Seems to be fixed now. 
Thanks.