Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SQL Server 2005 JDBC Driver & JDK 1.6

    I am evaluating smartclient pro 7 RC1 and am attempting to create a new database connection in the developer console. I've read the threads about the class changes for SQL 2005 and made the changes. I've copied the sqljdbc.jar and sqljdbc4.jar files to my C:\Install\SmartGWT Pro\smartclientRuntime\WEB-INF\lib folder. I have JDK 1.6 installed and when

    I test the database in the developer console it gives this error:

    Failure: Unable to connect error from driver: java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use sqljdbc4.jar class library which provides support for JDBC 4.0.

    I'm new to this and can't figure out how to tell it to use the right jar.

    #2
    Possibly those two .jars define alternate versions of the same class, in which case, you only want sqljdbc4.jar in your classpath and not the other .jar.

    Comment


      #3
      Thanx. That was exactly the problem. I removed the sqljdbc.jar file from the lib folder and it worked as advertised.

      Comment


        #4
        Trouble creating data source from SQL Server 2005 tables

        Test data sources all worked great. Love Visual Builder. Got my SQL Server 2005 JDBC driver installed and working. Created a new database in the developer console pointed at my sql server. Started Visual builder and sucessfully created a new datasource from one of the tables in my SQL Server. Worked great. Problem is when I try to create another datasource from the same database just pointing at different table (existing SQL table isomorphic rad). I select the table from the list of tables in my database, the Finding records that match your criteria dialog comes up and it just hangs there forever. Table only has 2200 records. Security is not an issue. No errors generated, it just hangs. I'm just trying to use the wizard to hook a sample app to our tables to prove to my boss that this really works for us.

        Server console log for this:

        === 2009-11-19 09:50:43,795 [sor3] DEBUG PoolableSQLConnectionFactory - [adminCo
        nsole.Authors-dbBrowser_fetch] DriverManager fetching connection for Title via j
        dbc url jdbc:sqlserver://xxx.xx.x.xxx:1433;DatabaseName=Title;User=WebUser;Passw
        ord=xxx
        === 2009-11-19 09:50:43,811 [sor3] DEBUG PoolableSQLConnectionFactory - [adminCo
        nsole.Authors-dbBrowser_fetch] Returning pooled Connection
        === 2009-11-19 09:50:43,811 [sor3] INFO SQLDriver - [adminConsole.Authors-dbBro
        wser_fetch] Executing SQL query on 'Title': SELECT COUNT(*) FROM Authors WHERE (
        '1'='1')
        === 2009-11-19 09:50:43,811 [sor3] DEBUG SQLServerDriver - [adminConsole.Authors
        -dbBrowser_fetch] SQL Server version is 9.00.4053
        === 2009-11-19 09:50:43,811 [sor3] DEBUG SQLDataSource - [adminConsole.Authors-d
        bBrowser_fetch] Using PK as default sorter: AuthorID
        === 2009-11-19 09:50:43,811 [sor3] DEBUG SQLServerDriver - [adminConsole.Authors
        -dbBrowser_fetch] BLAHBLAH -- SELECT ALastName, mostRecentTitle, UKBio, Link, mo
        stRecentPubDate, Email, FullName, AFirstName, AuthorID, tstamp, Pic, Bio FROM (S
        ELECT ALastName, mostRecentTitle, UKBio, Link, mostRecentPubDate, Email, FullNam
        e, AFirstName, AuthorID, tstamp, Pic, Bio, ROW_NUMBER() OVER (ORDER BY x.AuthorI
        D) AS rowID FROM (SELECT TOP 100 PERCENT Authors.ALastName, Authors.mostRecentT
        itle, Authors.Link, Authors.UKBio, Authors.Email, Authors.mostRecentPubDate, Aut
        hors.FullName, Authors.AFirstName, Authors.AuthorID, Authors.tstamp, Authors.Pic
        , Authors.Bio FROM Authors WHERE ('1'='1')) x) y WHERE y.rowID BETWEEN 1 AND 76
        === 2009-11-19 09:50:43,827 [sor3] DEBUG SQLDataSource - [adminConsole.Authors-d
        bBrowser_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT AL
        astName, mostRecentTitle, UKBio, Link, mostRecentPubDate, Email, FullName, AFirs
        tName, AuthorID, tstamp, Pic, Bio FROM (SELECT ALastName, mostRecentTitle, UKBio
        , Link, mostRecentPubDate, Email, FullName, AFirstName, AuthorID, tstamp, Pic, B
        io, ROW_NUMBER() OVER (ORDER BY x.AuthorID) AS rowID FROM (SELECT TOP 100 PERCEN
        T Authors.ALastName, Authors.mostRecentTitle, Authors.Link, Authors.UKBio, Auth
        ors.Email, Authors.mostRecentPubDate, Authors.FullName, Authors.AFirstName, Auth
        ors.AuthorID, Authors.tstamp, Authors.Pic, Authors.Bio FROM Authors WHERE ('1'='
        1')) x) y WHERE y.rowID BETWEEN 1 AND 76
        === 2009-11-19 09:50:43,827 [sor3] DEBUG PoolableSQLConnectionFactory - [adminCo
        nsole.Authors-dbBrowser_fetch] DriverManager fetching connection for Title via j
        dbc url jdbc:sqlserver://xxx.xx.x.xxxx:1433;DatabaseName=Title;User=WebUser;Passw
        ord=xxx
        === 2009-11-19 09:50:43,842 [sor3] DEBUG PoolableSQLConnectionFactory - [adminCo
        nsole.Authors-dbBrowser_fetch] Returning pooled Connection
        === 2009-11-19 09:50:43,842 [sor3] INFO DSResponse - [adminConsole.Authors-dbBr
        owser_fetch] DSResponse: List with 76 items
        === 2009-11-19 09:50:43,858 [sor3] DEBUG RPCManager - Content type for RPC trans
        action: text/plain; charset=UTF-8
        === 2009-11-19 09:50:43,858 [sor3] DEBUG RPCManager - non-DMI response, dropExtr
        aFields: false
        === 2009-11-19 09:50:43,858 [sor3] INFO Compression - /tools/visualBuilder/vbOp
        erations.jsp: 65380 -> 12046 bytes

        Comment


          #5
          What's the type of the "Pic" field, is that a SQL blob containing image data? Our auto-generator should be skipping columns it won't be able to display but perhaps it didn't recognize that SQL type as dangerous. Can you show the table schema?

          Comment

          Working...
          X