SQLServer driver 2.0 works, but causes exception in SQLServerDictionary on the 
first connection
-----------------------------------------------------------------------------------------------

                 Key: OPENJPA-1359
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1359
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.2.1, 1.2.0
            Reporter: Simone Gianni


The driver itself works with OpenJPA, except that the first time OpenJPA tries 
to obtain a connection it fails with the following exception :

Caused by: java.lang.NumberFormatException: For input string: "JDBC"
        at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.parseInt(Integer.java:497)
        at 
org.apache.openjpa.jdbc.sql.SQLServerDictionary.connectedConfiguration(SQLServerDictionary.java:92)
        at 
org.apache.openjpa.jdbc.sql.DBDictionary.decorate(DBDictionary.java:4157)
        at 
org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)

It seems like this method is trying to determine the diver vendor and database 
version, but fails with vendor/platform informations returned by this driver.

I'm using sqljdbc4.jar and the url in the format jdbc:sqlserver:// .

Despite the "then works" part, this initial exception seriously impairs OpenJPA 
usage with SQLServer in some scnarios, cause it often gets in the way of the 
initial schema analysis.

This has been solved in trunk, the patch could be quite simply backported to 
fix it in 1.2.2 .


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to