netbeans IDE: how to delete data source
Asked Answered
M

5

6

I have a Java Web application that contains a Persistence unit. In this persistence unit I can select an existing data source or create a new data source. When I run this web application on the build in glassfish server, the data source is created on the build in glassfish server. Also a connection pool is created.

I can delete the data source and / or connection pool on the build in glassfish server. This does not delete the data source from the Netbeans IDE. When I run the web application again, the data sources and connection pools are recreated.

How can I delete the data source and connection pools in the netbeans IDE? I can't find this functionality anywhere.

I want to delete the existing data sources and connection pools because I have an problem with a new data source / connection pool. To make sure that there is no mix up happening somewhere between the data sources / connection pools I want to remove the old ones that I am not using anymore.

Mora answered 7/3, 2012 at 13:16 Comment(0)
H
5

The file you are looking for is called glassfish-resources.xml (or sun-resources.xml). It stores all the server resources that are deployed with your application. It can be found in the setup directory of your project (in Netbeans "Files" tag).

Hally answered 7/3, 2012 at 13:43 Comment(0)
C
8

You have to go to services window (Ctrl + 5) and expand Severs > GlassFish Server (version) > Resources > JDBC Resources and locate the unnecessary data sources. Right click and select Unregister. This will remove appearing it in all the Netbeans Projects.

Counterpane answered 7/9, 2012 at 10:6 Comment(0)
H
5

The file you are looking for is called glassfish-resources.xml (or sun-resources.xml). It stores all the server resources that are deployed with your application. It can be found in the setup directory of your project (in Netbeans "Files" tag).

Hally answered 7/3, 2012 at 13:43 Comment(0)
F
1

NetBeans takes the Data Sources from the GlassFish. You can find/edit the domain.xml. Alternatively, you can edit via GF's admin console.

Fennelflower answered 20/9, 2013 at 15:10 Comment(1)
deleting in the glassfish admin console worked for me, this can be accessed through the GUIBenjamin
M
1

Go to context.xml and remove the line containing "Resource" entry .

Then remove the corresponding "resource-ref" entry from web.xml.

Then clean and build the project.

This has solved the data source problem for me.

Manouch answered 26/10, 2013 at 5:29 Comment(0)
A
0

I am using netbeans 8.0.2

In projects tab of left most panel search your project tree. There is a node other resources. Traverse this node please. glassfish-resources.xml is a leaf there under the setup. I found all the jdbc and other resources there.

Means Other Resources -> setup -> glassfish-resources.xml

enter image description here

Affricative answered 11/6, 2015 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.