Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4688

With Derby 10.6 and higher, selecting object columns from system tables ERROR XN020: Error marshalling or unmarshalling a user defined type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.7.1.1
    • None
    • Network Client
    • Low
    • Release Note Needed, Repro attached, Workaround attached
    • Embedded/Client difference, Regression

    Description

      If derby.jar is not in the classpath when a client selects an object from a system table, for example selecting ALIASINFO from SYS.SYSALIASES an error will result, eg.
      ERROR XN020: Error marshalling or unmarshalling a user defined type: org.apache.
      derby.catalog.types.RoutineAliasInfo

      To reproduce, put only derbyclient.jar and derbytools.jar in your classpath and connect to a running server and run:
      ij> connect 'jdbc:derby://localhost:1527/wombat;create=trrue';
      ij> select * from sys.sysaliases
      > > ;
      ALIASID |ALIAS

      SCHEMAID JAVACLASSNAME
      & & SYST& ALIASINFO SPECIFICNAME

      --------------------------------------------------------------------------------
      --------------------------------------------------------------------------------
      --------------------------------------------------------------------------------
      --------------------------------------------------------------------------------
      --------------------------------------------------------------------------------
      --------------------------------------------------------------------------------
      ------
      ERROR XN020: Error marshalling or unmarshalling a user defined type: org.apache.
      derby.catalog.types.RoutineAliasInfo
      ij>

      With the 10.5 client it gives the text of the procedure or function definition for ALIASINFO may have been useful to someone, e.g.
      SQLCAMESSAGE(IN SQLCODE INTEGER,IN SQLERRML SMALLINT,IN SQLERRMC VARCHAR(2400),I
      N SQLERRP CHAR(8),IN SQLERRD0 INTEGER,IN SQLERR&

      I am not sure what can or should be done about this issue. Workaround include:

      • Cast the value to LONG VARCHAR in the query.
      • Put the server jars in the classpath if you want to use the objects.
      • Remove extraneous columns if they are not used.

      I am not sure what can or should be done about this issue, but a release note would at least help mitigate it.

      Attachments

        1. derby-4688_diff_try1.txt
          12 kB
          Lily Wei
        2. releaseNote.html
          6 kB
          Richard N. Hillegas
        3. ReproDerby4688.java
          4 kB
          Lily Wei

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kmarsden Katherine Marsden
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: