Is there any way to check whether my Glassfish acctually see ojdbc6.jar ?
I'm working with Netbeans 7.2.1, with JSF 2, Glassfish 3.1.2 and Oracle 11g. I want to connecto to this database.
So first I need to create connection pool in my Glassfish. I open localhost:4848 set 5 things:
Save, reset server (just for sure), ping.... and the error: Class name is wrong or classpath is not set for: oracle.jdbc.pool.OracleDataSource
What have I already done:
First check for ojdbc jars. From my Oracle dir I copied every jar that has "ojdbc" in name into "C:\glassfish3\glassfish\domains\domain1\lib".
Second, check url properity. Inside Netbeans, switch into Services tab, right click on Databases, New connection... set data to connect (first I have to add, jodbc6.jar.. so I add exactly the same file - from glassfish folder). It works! connection is ok. I looked at Netbeans database url - the same as my url in glassfish gui. I also tried url with \, but it didn't help.
So, what else can it be? Maybe no.1 is not ok. So this is my question: How can I check whether my Glassfish acctually see ojdbc6.jar?
EDIT. When I run Glassfish i get some warnings:
WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@704d54].
WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@704d54] from index [0]
WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer@ed312d] from index [1]
Copy all required jar files(ojdbc6.jar.....) to 'domains\domain1\lib\ext' folder. Then restart your glassfish. Then try to ping from glassfish, it will work
"..But how do you know it is 'ext' folder? And not just 'lib'? One guy says lib, other ext.."
Making the JDBC Driver JAR Files Accessible To integrate the JDBC driver into a GlassFish Server domain, copy the JAR files into the domain-dir/lib directory, then restart the server. This makes classes accessible to all applications or modules deployed on servers that share the same configuration. For more information about GlassFish Server class loaders, see "Class Loaders" in GlassFish Server Open Source Edition Application Development Guide. If you are using an Oracle database with EclipseLink extensions, copy the JAR files into the domain-dir/lib/ext directory, then restart the server. For details, see "Oracle Database Enhancements" in GlassFish Server Open Source Edition Application Development Guide
From here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With