Menu

Help! sybase connection, getTypeMap() error

davelncn
2006-06-27
2013-04-25
  • davelncn

    davelncn - 2006-06-27

    I was using sqlunit to Test Store Procedures for Sybase 12.5.
    seems Sybase Jconnect not implement connection.getTypeMap() yet.
    anybody knows how to use sqlunit to test Sybase.

    thanks.

    sqlunit-flat:
      [sqlunit] *** Running SQLUnit file: test/sybase/MyTestProcTest.xml
      [sqlunit] Getting connection(DEFAULT)
      [sqlunit] Cannot build Connection (connection-id=null) because The method com.
    sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
    ot be called.
      [sqlunit] sqlunit-ant: Cannot build Connection (connection-id=null) because Th
    e method com.sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed
    and should not be called.
      [sqlunit] Cannot build Connection (connection-id=null) because The method com.
    sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
    ot be called.

    BUILD FAILED

     
    • Sujit Pal

      Sujit Pal - 2006-06-28

      Hi,

      SQLUnit has been used in the past to test Sybase, there are some examples under test/sybase which may help. Also, I dont think getTypeMap() is called when the connection is being built (where the error message is coming from).

      Can you check to see if the driver is correctly specified? Compare it to the examples.

      -sujit

       
    • davelncn

      davelncn - 2006-07-03

      if I create connection object in the application and pass it to sqlunit, it works fine.
      but if I put connection information in the XML file, I hit this problem.
      yes, I was using examples included in the package.

      thanks,

      -dave

       
    • Sujit Pal

      Sujit Pal - 2006-07-05

      Sorry, this was a recent addition, and I did not notice it. It has to do with support for UDTs which has been recently added.

      So the patch I have is to check to see if UDTs have been specified, and only then get the TypeMap for the connection. In case there is an Exception (such as the one thrown by JConnect), then it will give you a warning message saying STRUCTS are not supported.

      The following files have changed. Can you download these, recompile locally and let me know if the errors fixed?

      Commit log:
      Checking in src/net/sourceforge/sqlunit/handlers/StructHandler.java;
      /cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/StructHandler.java,v  <--  StructHandler.java
      new revision: 1.2; previous revision: 1.1
      done
      Checking in src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java;
      /cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java,v  <--  ConnectionHandler.java
      new revision: 1.11; previous revision: 1.10
      done

      Thanks

      -sujit

       
      • tburrell

        tburrell - 2007-11-13

        It appears that the fix for this did not make it into version 5.0.  Version 4.9 does not call getTypeMap when building the connection; however, version 5.0 does and it does NOT avoid the call if there is no UDT.

        Any chance we can find this fix and get it into 5.0?

         
    • davelncn

      davelncn - 2006-07-10

      Hi Sujit,

      it works fine now.

      Thanks,

      dave

       
    • Sujit Pal

      Sujit Pal - 2006-07-10

      Hi Dave,

      Thanks for the update.

      -sujit

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.