Announcement

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

    SmartGWT EE doesn't find JDBC Driver for MSSQL 2005

    Hi everyone,

    I'm getting started with SmartGWT EE and I'm stuck now for quite a few hours on a problem when connecting to a MS SQL Server database
    System:
    - SmartGWT EE 2.4 evaluation version
    - Eclipse Indigo
    - GWT 2.3
    - SQL Server 2005,
    - sqljdbc_3.0.1301.101 from http://www.microsoft.com/downloads/de-de/details.aspx?familyid=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=de
    - Tomcat 7.0 (nothing deployed there yet, only hosted mode so far)
    - FF 5.01

    I started with the built-in-ds sample project and added some code for UI elements, including two buttons for SCEE.openDataSourceConsole() and SCEE.openDataSourceGenerator().

    I also changed the relevant contents of server.properties to
    Code:
    sql.defaultDatabase: SQLServer
    sql.SQLServer.database.type: sqlserver  
    sql.SQLServer.interface.type: driverManager  
    sql.SQLServer.driver: com.microsoft.sqlserver.SQLServerDriver
    sql.SQLServer.driver.url: jdbc:sqlserver://development4:1433;DatabaseName=dev;User=xxx;Password=yyy
    (I read http://forums.smartclient.com/showpo...79&postcount=5 )

    The build path includes all the files from the sample (see screenshot), copied to workspace\built-in-ds\war\WEB-INF\lib and also sqljdbc4.jar
    If it is important: I'm in hosted mode only, so far.

    When I start ISC Admin Console it comes up as expected, but shows the JDBC driver missing (see screenshot).
    For course, when I click "browse" now, I get an error message ("java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver", see screenshot)

    Do you have an idea how to enable the Admin Console and of course the application as well to connect to the SQL Server? (See strack trace when trying to bind a Listbox to the DS).

    I think that it is a minor mistake on by behalf, but I really can't imagine where to put the JDBC jar and where to include it besides the build path. Do I have to put it in a .java file as an import?


    Thanks in advance,
    Blama

    Screenshots:
    http://www8.pic-upload.de/26.07.11/zziutts1zsc.png
    http://www8.pic-upload.de/26.07.11/bwhgh7m3r6p.jpg
    http://www8.pic-upload.de/26.07.11/y478bof6duf.jpg


    Stack trace when trying to bind DS:
    Code:
    [ERROR] [builtinds] - Uncaught exception escaped
    
    16:18:50.223 [ERROR] [builtinds] Uncaught exception escaped
    com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
        at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException: null
        at com.smartgwt.client.widgets.grid.ListGrid.setDataSource(ListGrid.java:12572)
        at com.smartgwt.sample.client.BuiltInDS.bindComponents(BuiltInDS.java:225)
        at com.smartgwt.sample.client.BuiltInDS.access$0(BuiltInDS.java:223)
        at com.smartgwt.sample.client.BuiltInDS$2.onRecordClick(BuiltInDS.java:117)
        at com.smartgwt.client.widgets.grid.events.RecordClickEvent.dispatch(RecordClickEvent.java:98)
        at com.smartgwt.client.widgets.grid.events.RecordClickEvent.dispatch(RecordClickEvent.java:1)
        at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
        at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
        at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
        at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
        at java.lang.Thread.run(Unknown Source)

    #2
    If you haven't already, try placing the file into your project's WEB-INF/lib. Also, about the actual stack trace you're showing, it may not necessarily be related to your driver problem, and the FAQ has a list of steps for troubleshooting this error (DataSource not loading).

    Comment


      #3
      Hi Isomorphic,

      thanks for the quick reply. I was able to solve the problem now.
      The error was - and I really can't imagine how I could not notice it - that I misspelled the JDBC class name in server.properties.

      Old:
      sql.SQLServer.driver: com.microsoft.sqlserver.SQLServerDriver
      Correct:
      sql.SQLServer.driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

      Now the Admin Console says "OK" to my SQL Server connection and - for the 1st time - I'm getting remote data!



      What I noticed when asking my question here:
      - Could you provide a list of allowed "HTML" elements in the forum like CODE (with the square brackets). The FAQ is nicely formatted. It would be easier to read for everyone, if I formatted my question as well.
      - Could you allow the upload of larger image files? I wasn't able to get my screenshots uploaded (no image manipulation tools besides mspaint here) as the files were too big. For the freehoster I used I don't know how long it will keep the files. Would be a pity if users don't find this thread helpful in the future because of missing images.


      Thanks again,
      Blama

      Comment


        #4
        Hello there,

        I want to connect to my sql server 2005 db.In the Admin Console,it says JDBC driver not installed.But I have put the sqljdbc.jar in this location C:\workspace\built-in-ds\war\WEB-INF\lib. other then putting the jar file do i need to do anything else.
        by the way in the server.properties file,there is no mssql.can somebody tell me what do i need to enter here sql.defaultDatabase: #####.

        cheers
        Zolf

        Comment


          #5
          @zaj Check the JDBC driver classname (read posts above) and make sure it's actually present in the .jar file. Then check the server log for a report of what's going wrong.

          Comment


            #6
            Thanks for your feedback.can you please tell me how to check he server logs.

            Comment


              #7
              1) Hit "Debug"->"Debug as Web Application" in Eclipse and see what comes up in the Eclipse console window.
              2) Thanks to GWT's Development Mode Eclipse is now your "server".
              3) Install the GWT developer plugin Addon for FF (see http://groups.google.com/group/google-web-toolkit/msg/800adc685ed6b5f3 for Firefox 9).
              4) Open the URL offered by Eclipse in Firefox.
              5) Set break points in Eclipse, change some code parts and hit F5 in Firefox. See the Development Mode do its magic without actually compiling to JS.

              Best regards,
              Blama

              Comment

              Working...
              X