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 203945 - JDBC driver not deployed with JDBC resource creation
Summary: JDBC driver not deployed with JDBC resource creation
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: WebLogic (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 09:38 UTC by Jiri Skrivanek
Modified: 2012-12-07 12:06 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182111


Attachments
stacktrace (1.23 KB, text/plain)
2011-10-19 09:38 UTC, Jiri Skrivanek
Details
stacktrace (1.22 KB, text/plain)
2012-12-03 12:59 UTC, Jiri Skrivanek
Details
Server log. (27.26 KB, text/plain)
2012-12-05 08:29 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-10-19 09:38:32 UTC
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)
Comment 1 Jiri Skrivanek 2011-10-19 09:38:37 UTC
Created attachment 112210 [details]
stacktrace
Comment 2 arungupta 2011-11-28 23:00:40 UTC
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.
Comment 3 Petr Hejl 2011-11-30 10:36:58 UTC
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.
Comment 4 arungupta 2011-11-30 22:58:35 UTC
WebLogic 12c

I had to manually add derbyclient.jar to DOMAIN_HOME/lib and restart the server.
Comment 5 arungupta 2012-02-17 11:19:46 UTC
Any updates on this ?

I tried again and derbyclient.jar was not added to the domain/lib directory.
Comment 6 Petr Hejl 2012-11-30 12:55:50 UTC
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
Comment 7 Jiri Skrivanek 2012-12-03 12:59:24 UTC
Created attachment 128770 [details]
stacktrace

I created persistence unit with new data source in already deployed web application (WebLogic server).
Comment 8 Petr Hejl 2012-12-04 15:13:07 UTC
Can you also attach the server log. I guess deployment failed with connection exception on DB, right?
Comment 9 Petr Hejl 2012-12-04 15:18:07 UTC
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
Comment 10 Jiri Skrivanek 2012-12-05 08:29:17 UTC
Created attachment 128870 [details]
Server log.
Comment 11 Petr Hejl 2012-12-05 10:16:50 UTC
Fixed in web-main dfe7c1b22206.
I also filed issue #223296.
Comment 12 Quality Engineering 2012-12-07 02:40:10 UTC
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