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.
Created attachment 142682 [details] Attaching server logs, persistence.xml, POM.xml and glassfishserver-resources.xml Getting below error when trying to deploy from netbeans. Connection pool is successfully getting created but not JDBC datasource Attaching server logs, persistence.xml, POM.xml and glassfishserver-resources.xml to share the config and error message. BELOW ARE VERSION Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1 Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\krithu\AppData\Roaming\NetBeans\7.4 Cache directory: C:\Users\krithu\AppData\Local\NetBeans\Cache\7.4 GlassFish Server Open Source Edition 4.0 (build 89)
Also note, when you search the internet - several folks are facing this issue but not clear what solution works.
Also check the bug https://netbeans.org/bugzilla/show_bug.cgi?id=235220
I added new datasource from the Projects like mentioned in the below
https://netbeans.org/bugzilla/show_bug.cgi?id=235220 as suggested by pjiricka@netbeans.org sj-nb@netbeans.org TomasKraus@netbeans.org
if it's server deployment error, main issue should be somewhere in ds creation, in case if it was created with nb, it should be deployed, otherwise error is expected. It's not clear what actions "I added new datasource from the Projects like mentioned in the below" are behind this. I need steps how ds was created.
Refer to attached bitmap, showing how datasource was created - which auto created persistence.xml in "other sources/src/main/resources/META-INF" and glassfishserver-resoruces.xml in "other sources/setup". Only change I made was adding app scope (java:app) to JNDI-Name in glassfishserver-resoruces.xml, if I don't do that was getting someother error.
Created attachment 142685 [details] Datasource Creations
I see jdbc connections usage in attached screenshot, there are no traces of and ds creation.
I can re-create the DS and get the traces. Please let me know if you need NB or Glasfish server logs/traces - also location of logs/traces files.
So far, only steps to create ds are required, including project type, server selection.
Created attachment 142691 [details] All the requested logs
Server is Glassfish 4.0 and Java EE 7
not logs was requested. but I see glassfish.xml is present and it should be deployed and ds should be created on server side, but persistence.xml use happyhourDB when server.log have failure on happyhourDB_pm ds, I don't understand why _pm is added. can you provide complete project sample?
from what I see, there is no issue on netbeans side as all nb configuration is with happyhourDB and gf search for wrong resource, it may be either an issue in gf or in gf configuration. If you see there is an issue in nb, can you say what should be fixed/changed in this case?
Created attachment 142695 [details] Attaching the project
Attached the project, please check if it is Java resource
Ich have the same problem or at leadt a similar problem. This stackoverflow thread describes it exactly: http://stackoverflow.com/questions/18647551/netbeans-ant-script-creates-a-persistence-xml-if-it-is-missing
last one reference is for ant project when intial one is fo maven, it should be different. also I don't see a problem on stack... as it copy already existent persistence.xml to build project if it wasn't copied sopmehow else, statement regarding "create" is wrong.
regarding intial problem, I see some references after web search with similar problems, and for some it's related to some server configuration problems, in this case nb may not do anything/
sorry, still have no ideas what is wrong with nb, do you have mysql driver configured properly for gf installation?
I have a similar problem, but *only* when executing a unit test within the project. Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) User directory: C:\Users\Pierre\AppData\Roaming\NetBeans\8.0.2 Cache directory: C:\Users\Pierre\AppData\Local\NetBeans\Cache\8.0.2 Using Glasfishserver 4.1 and Derby and Apache Derby 10.8.3.2 - (1557835) jan 04, 2015 1:00:37 PM org.glassfish.deployment.admin.DeployCommand execute SEVERE: Exception while preparing the app : Invalid resource : jdbc/LADLM__pm com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/LADLM__pm at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81) at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62) at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136) at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589) at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517) at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63) at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71) at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722) at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133) at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:109) at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:138) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:134) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:127) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at Services.ArtiestFacadeRESTTest.testEdit_GenericType(ArtiestFacadeRESTTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter.run(JUnit4TestMethodAdapter.java:105) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1179) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1030) jan 04, 2015 1:00:43 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer INFO: [EJBContainerProviderImpl] Cleaning up on failure ... jan 04, 2015 1:00:43 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown INFO: JMXStartupService and JMXConnectors have been shut down. jan 04, 2015 1:00:43 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown INFO: JMXStartupService and JMXConnectors have been shut down. jan 04, 2015 1:00:43 PM com.sun.enterprise.v3.server.AppServerStartup stop INFO: Shutdown procedure finished
I also have this problem. i "solved" in this way: renamed the datasource and the jdbc connection in glassfish __datasourcename the same datasource but with two underscore. it works, but it's ridicolous.