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.
1. Create a Java EE 5 webapp with WebLogic target 2. Create a persistence unit; as a part of the persistence unit create a new datasource (I used a Derby connection) 3. Deploy the application The data source will not be deployed correctly, because the generated setup/datasource-1-jdbc.xml file does not store the password correctly. Here is what was generated for me: .... <jdbc-driver-params> <url>jdbc:derby://localhost:1527/sample</url> <driver-name>org.apache.derby.jdbc.ClientDriver</driver-name> <properties> <property> <name>user</name> <value>app</value> </property> <property> <name>password</name> <value/> </property> </properties> </jdbc-driver-params> ...
This works ok for me. Either the steps are different or some other part of the IDE (DatasourceUIHelper or DatasourceCustomizer) returns an empty password in certain conditions. I checked the plugin code - I don't see any condition or different condition for password handling compared to other properties.
Now I know more precisely how to reproduce. 1. Create a Java EE web application, use any server that supports datasources 2. Make sure a db connection is registered in the DB explorer. In the properties of this connection, uncheck "Remember password" 3. Restart the IDE 4. Create a persistence unit; as a part of the persistence unit create a new datasource using the connection mentioned in step 2. 5. Look at the generates server resource file The password is written as empty - tested with both GlassFish and WebLogic.
This is an issue in DatabaseConnection.restorePassword() it should set null for not-filled-in password instead of "".