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 122053 - [60cat] during deployment NB creates broken jdbc pool in glassfish
Summary: [60cat] during deployment NB creates broken jdbc pool in glassfish
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 18:18 UTC by mariso
Modified: 2008-08-06 23:26 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 mariso 2007-11-15 18:18:04 UTC
[ BUILD # : 200711131200 ]
[ JDK VERSION : 1.6.0_02 ]

I am working on JavaEE app (EJB 3, JPA) that I deploy on glassfish
from NB. I use "jdbc/ctests" datasource for JPA. The problem is that
NB overwrites datasource I have created in glassfish every time I
deploy EAR file. Furthermore NB creates a pool post-gre-sqlPool which
doesnt work because it uses "jdbc/ctests" as "databaseName" property
but my postgresql database has different name. 

It is very very annoying because I create all JDBC resources in
glassfish myself, but NB always screws up those settings. 

<?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="CognitiveTestsPU" transaction-type="JTA">
    <jta-data-source>jdbc/ctests</jta-data-source>
    <properties/>
  </persistence-unit>
</persistence>
Comment 1 Vince Kraemer 2008-02-28 16:36:06 UTC
If you have a sun-resources.xml file in your project, you may want to remove it....  The IDE uses that data to create
the broken resources...

The other choice is to correct the data in that file.
Comment 2 Nitya Doraisamy 2008-02-28 17:32:25 UTC
The sun-resources.xml file if present in the project will update the resources in the server on deploy.
The idea is for the netbeans project to be complete. 
As Vince suggested, you may want to delete the sun-resources.xml file in your project or correct the data. 

The persistence.xml that you attached is pointing to the JDBC resource jdbc/ctests.
This JDBC resource should be pointing to the post-gre-sqlPool which contains info for the database. If the pool is
invalid, it could be a bug.

Please attach your server-resources.xml file and also what the correct information you are expecting to see in the pool
definition to help identify what may be causing creation of invalid post-gre-sqlPool
Comment 3 Vince Kraemer 2008-03-05 21:11:40 UTC
until we get the sun-resources.xml file this should be marked as incomplete...
Comment 4 Nitya Doraisamy 2008-08-06 23:26:44 UTC
Without sun-resources.xml, the problem described cannot be investigated. 
Closing. Please reopen with more info if you continue to see the issue.