-
1. Re: NestedSQLException: Apparently wrong driver class specif
adrian.brock Mar 11, 2005 3:32 PM (in response to wyzhao)It means the driver-class/url are incompatible.
I've also seen this problem when there is an internal problem within the driver,
e.g. classes missing or other bizarre internal error. -
2. Re: NestedSQLException: Apparently wrong driver class specif
chirayath Jan 27, 2006 3:29 AM (in response to wyzhao)Hi,
Put the proper driver jar file in server/default/lib folder of JBoss installation folder.
Regards,
Joby -
3. Re: NestedSQLException: Apparently wrong driver class specif
bhavinpmehta May 24, 2006 10:15 AM (in response to wyzhao)Even I face the same problem
-
4. Re: NestedSQLException: Apparently wrong driver class specif
bhavinpmehta May 24, 2006 10:23 AM (in response to wyzhao)I am also getting the same problem, however , be it the first or the second Time I keep on getting The above error(Apparent wrong driver)
In my case if I connect Directly using DriverManager.getConnection() , then I am able to connect to the DataBase, but when i try using Connection Pooling i.e ds.xml and then Look up, I get this error.
I use following url in ds.xml,
<connection-url>jdbc:microsoft:sqlserver://servername:1433;DatabaseName=dbname;User=uname;Password=pwder</connection-url>
Plese let me know if this is correct or not. I use following jars
1.msbase.jar
2.mssqlserver.jar
3.msutil.jar -
5. Re: NestedSQLException: Apparently wrong driver class specif
bhavinpmehta May 25, 2006 5:11 AM (in response to wyzhao)Hi All,
My Problem is finally resolved. I switched over to jtds drivers (freeware) . I wasted 3 days trying with Microsoft Drivers and it Took only 5 mins for Connection Pooling using jtds drivers. -
6. Re: NestedSQLException: Apparently wrong driver class specif
pakemann Oct 3, 2006 9:07 PM (in response to wyzhao)I was having the same problem and also switched to jtds, but the problem remains.
My connection is failing randomly with "Apparently wrong driver class specified for URL" error.
The connection will fail this way over and over again, then will randomly begin to work. It's maddening! Is anyone else experiencing this?
I am running JBoss on Java 1.506, conncting to MSSQL with jtds 1.2 with the folloding datasource specifier:
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:jtds:sqlserver://192.168.100.100:1433/CADB;tds=8.0;lastupdatecount=true</connection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<user-name>username</user-name>
pwd
<!--
sql to call on an existing pooled connection when it is obtained from pool
-->
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
</local-tx-datasource> -
7. Re: NestedSQLException: Apparently wrong driver class specif
weston.price Oct 3, 2006 9:11 PM (in response to wyzhao)How are you deploying your datasource? Are any of the JDBC jars contained in the lib directory or your WAR? Do any of the JDBC jar files reside in an EAR?
Typically we see this error when a user tries to deploy the jars inside of an application archive and not in the server/server-config/lib directory. -
8. Re: NestedSQLException: Apparently wrong driver class specif
pakemann Oct 3, 2006 9:42 PM (in response to wyzhao)Wow, that was a swift response! Turnaround time of 4 minutes - ought to be in an ad for JBoss....
Indeed, the jar file was being deployed in the WAR module. I removed it from the WAR and put in in the config/lib directory as specified, and it now seems to be working reliably.
Thank you very much for your help. -
9. Re: NestedSQLException: Apparently wrong driver class specif
weston.price Oct 3, 2006 9:46 PM (in response to wyzhao)Not a problem :-)
Note, this is a bug in the DriverManager. Basically what is going on is some heinous cacheing of classes that prevents the class from being loaded. Supposedly this is addressed in JDBC 4.0. Also, the Class.forName("classname") mess goes away. The DriverManager will be able to load the classes automatically without the registration process.
Regards. -
10. Re: NestedSQLException: Apparently wrong driver class specif
lal_praveen Jan 4, 2008 5:46 AM (in response to wyzhao)I am getting this same error. My ear does'nt contain any jdbc.jar files.
Configuration is:jdk1.6.0_03, jboss-4.2.2.GA, MySQL version 5.0.45, MySQL driver
C:\jboss-4.2.2.GA\server\default\lib\mysql-connector-java-5.1.5-bin.jar
Though I am seeing C:\jboss-4.2.2.GA\server\default\tmp\deploy\tmp29174jboss-local-jdbc.rar-contents\jboss-local-jdbc.jar
file in tmp folder. Probably it is used by jboss. I am deploying ear in default server config.
04:23:10,942 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
04:23:10,957 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: com.mysql.jdbc.Driver, url: jdbc:mysql//127.0.0.1:3306/Testworld)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842) -
11. Re: NestedSQLException: Apparently wrong driver class specif
vickyk Jan 4, 2008 6:02 AM (in response to wyzhao)Explain all the steps you have been doing , open a new thread I will address it there .
Your post does not clearly indicate how you are deploying the datasource , explain things in DETAIL and *NEVER* bloat the existing forum thread as it becomes difficult for people to indentify the current issue . -
12. Re: NestedSQLException: Apparently wrong driver class specif
lal_praveen Jan 4, 2008 6:48 PM (in response to wyzhao)Sorry My Bad.
I was not giving correct jdbc url. IO missed : after mysql in url
BAD jdbc:mysql//127.0.0.1:3306/Testworld
Correct jdbc:mysql://127.0.0.1:3306/Testworld -
13. Re: NestedSQLException: Apparently wrong driver class specif
crowse Feb 28, 2008 4:42 PM (in response to wyzhao)In case anyone can get anything useful, I have an ear file that works well and very reliably (over 6 months) on my Linux server running JB 4.2.1.
This ear uses MS sql drivers and connects to MS SQL on mt 2003 SBS server.
When I move THE SAME distros of Java, JBoss, MS SQL drivers ear etc to the 2003 server running as localhost ... or to a DNS name or IP number on the WIn server , I get this message.
Theenvironments couldnt be more similar other than the one is Unix, the other WIn2003.
I'm about to check for copies of the drivers in the ear - they will, of course, be from the SAME DOWNLOAD from MS.
Chris -
14. Re: NestedSQLException: Apparently wrong driver class specif
dagger33 Aug 31, 2008 10:28 AM (in response to wyzhao)I've been having the same problem.
bhavinpmehta's advice solved the problem - so there must definitely be something wrong with some of Microsoft's JDBC drivers somewhere as I'm sure all the connection strings and things were right... *shrug*
This was with version 2.0.1008.2 of the Microsoft SQL Server 2005 driver.