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.
Build: NetBeans IDE Dev (Build 201110171706) VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-383, Java(TM) SE Runtime Environment, 1.6.0_26-b03-383-11A511c OS: Mac OS X User Comments: jskrivanek: It happened whle testing on Mac: - create web project with WebLogic server - open New Persistence Unit wizard for previously created web application. - In Data Source combo box select New Data Source. - select default database connection and provide arbitrary JNDI name. - click OK and finish the wizard. Stacktrace: org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException: One or more datasources could not be deployed. Check project configuration. at org.netbeans.modules.j2ee.weblogic9.config.WLDatasourceManager.deployDatasources(WLDatasourceManager.java:132) at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.deployDatasources(ServerInstance.java:758) at org.netbeans.modules.j2ee.deployment.impl.DeploymentHelper.deployDatasources(DeploymentHelper.java:113) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.notifyArtifactsUpdated(TargetServer.java:864) at org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager$DeployTask.notifyServer(DeployOnSaveManager.java:497) at org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager$DeployTask.run(DeployOnSaveManager.java:414)
Created attachment 112210 [details] stacktrace
The WebLogic server console shows the following error: <Nov 28, 2011 2:55:50 PM PST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1322520950352" for task "4". Error is: "weblogic.application.ModuleException: " weblogic.application.ModuleException: at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:337) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100) at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172) at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:167) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35) Truncated. see log file for complete stacktrace Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: org.apache.derby.jdbc.ClientDriver at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:313) at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:78) at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:135) at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:887) at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:236) Truncated. see log file for complete stacktrace GlassFish has an option "Enable JDBC Driver Deployment" and this should exist for WebLogic as well.
Jirko, it looks like the project has been deployed already. Is that right? Arun, what WebLogic version do you use? The driver deployment is performed for WL as well. Can you check the driver jar is properly placed to domain_path/lib? The server should be restarted due to this during the deployment. If the jar is not there or server is not restarted it is NB issue. Otherwise it is WL isssue.
WebLogic 12c I had to manually add derbyclient.jar to DOMAIN_HOME/lib and restart the server.
Any updates on this ? I tried again and derbyclient.jar was not added to the domain/lib directory.
Please provide exact steps to reproduce. What I did: 1) created WebProject with WebLogic 12.1.1 clean domain 2) created entity classes from DB using the sample DB from GF (so it is derby) 3) deployed the app during that there is "Deploying JDBC driver to..." in ant output 4) derbyclient.jar is present in lib folder in the domain directory The only thing I can think of in Arun's case is that: 1) there is a derby jdbc driver on the server somewhere so the IDE is not deploying it 2) this driver/jar is somehow corrupted or wrong as the weblogic is complaining in the log
Created attachment 128770 [details] stacktrace I created persistence unit with new data source in already deployed web application (WebLogic server).
Can you also attach the server log. I guess deployment failed with connection exception on DB, right?
There are imo 3 options: 1) do not use Exceptions.printStackTrace(), just log it and let the deployment fail (in status bar). 2) custom dialog (may be obtrusive on DoS) 3) rephrase the message to instruct the user to check the server log
Created attachment 128870 [details] Server log.
Fixed in web-main dfe7c1b22206. I also filed issue #223296.
Integrated into 'main-golden', will be available in build *201212070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/dfe7c1b22206 User: Petr Hejl <phejl@netbeans.org> Log: #203945 - JDBC driver not deployed with JDBC resource creation