Announcement

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

    RestHandler error with CLOB data

    SmartGWT Power 2.5-NIGHTLY-2011-07-27

    It looks like when I try to use RestHandler to access a datasource with CLOB data, I'm greeted with the following:

    Code:
    === 2011-08-10 17:20:03,988 [l0-4] ERROR RESTHandler - Error executing operation: CandidateProfile_update
    java.lang.ClassCastException: oracle.jdbc.driver.OracleClobReader cannot be cast to java.util.Map
    	at com.isomorphic.xml.XML.recordToXML(XML.java:1010)
    	at com.isomorphic.xml.XML.recordToXML(XML.java:913)
    	at com.isomorphic.xml.XML.recordToXML(XML.java:907)
    	at com.isomorphic.xml.XML.recordsToXML(XML.java:1028)
    	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1148)
    	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
    	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:217)
    	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:165)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.Server.handle(Server.java:324)
    	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    === 2011-08-10 17:20:03,999 [l0-4] DEBUG RPCManager - Content type for RPC transaction: text/html; charset=UTF-8
    === 2011-08-10 17:20:04,004 [l0-4] DEBUG RPCManager - non-DMI response, dropExtraFields: false
    === 2011-08-10 17:20:04,005 [l0-4] ERROR RESTHandler - Top-level servlet error: 
    java.lang.NullPointerException
    	at com.isomorphic.xml.XML.recordToXML(XML.java:949)
    	at com.isomorphic.xml.XML.recordToXML(XML.java:913)
    	at com.isomorphic.xml.XML.recordToXML(XML.java:907)
    	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1152)
    	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
    	at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:665)
    	at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:686)
    	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:223)
    	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:165)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.Server.handle(Server.java:324)
    	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

    #2
    If the CLOB a file? If so, what were you hoping for, base64 encoding or something along those lines?

    Comment


      #3
      No, the CLOB is just character data (text).

      I will need to deal with binary data also, though - and in that case, yes, base64 encoding/decoding is perfect.

      Comment


        #4
        Can you show the DataSource declaration, SQL schema and complete server-side log for the request that leads to this problem?

        Comment


          #5
          Sure.

          Code:
          CREATE TABLE some_table (
              some_id   	NUMBER(9,0),
              some_text 	CLOB
          );
          
          INSERT INTO some_table (some_id, some_text)
          VALUES (100, 'Hello World!');
          
          COMMIT;
          (I did try the following ds definition with some_text defined explicitly as text, with the same result)

          Code:
          <DataSource 
            xmlns="http://www.smartclient.com/schema/datasource"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            ID="SomeTable"
            tableName="SOME_TABLE"
            serverType="sql" 
            autoDeriveSchema="true" >
           
          </DataSource>
          (note that the following also occurs while trying to build up a response to add, updates)

          Code:
          log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
          log4j:WARN Please initialize the log4j system properly.
          log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
          ISC: Configuring log4j from: file:/C:/Development/workspace/scratchpad-mvp4g/target/scratchpad-mvp4g-0.0.1-SNAPSHOT/WEB-INF/classes/log4j.isc.config.xml
          === 2011-08-11 12:56:42,192 [main] INFO  ISCInit - Isomorphic SmartClient Framework - Initializing
          === 2011-08-11 12:56:42,198 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
          === 2011-08-11 12:56:42,328 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/Development/workspace/scratchpad-mvp4g/target/scratchpad-mvp4g-0.0.1-SNAPSHOT/WEB-INF/lib/isomorphic_core_rpc-2.5-NIGHTLY-2011-07-27.jar!/framework.properties
          === 2011-08-11 12:56:42,328 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
          === 2011-08-11 12:56:42,330 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
          === 2011-08-11 12:56:42,337 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/Development/workspace/scratchpad-mvp4g/target/scratchpad-mvp4g-0.0.1-SNAPSHOT/WEB-INF/lib/isomorphic_core_rpc-2.5-NIGHTLY-2011-07-27.jar!/isc_interfaces.properties
          === 2011-08-11 12:56:42,337 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
          === 2011-08-11 12:56:42,340 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Development/workspace/scratchpad-mvp4g/target/scratchpad-mvp4g-0.0.1-SNAPSHOT/WEB-INF/classes/server.properties
          === 2011-08-11 12:56:42,346 [main] INFO  Logger - Logging system started.
          === 2011-08-11 12:56:42,347 [main] INFO  ISCInit - Isomorphic SmartClient Framework (SC_SNAPSHOT-2011-07-27/PowerEdition Deployment 2011-07-27) - Initialization Complete
          === 2011-08-11 12:56:42,349 [main] ERROR ISCInit - Can't find marker file for webRoot: C:/Development/workspace/scratchpad-mvp4g/target/scratchpad-mvp4g-0.0.1-SNAPSHOT/scratchpad/sc for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
          === 2011-08-11 12:56:42,349 [main] INFO  ISCInit - WebRoot auto-detection failed - using container IO
          === 2011-08-11 13:02:37,288 [l0-3] INFO  PoolManager - SmartClient pooling disabled for 'SomeTable' objects
          === 2011-08-11 13:02:37,332 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/builtinTypes.xml: 9ms
          === 2011-08-11 13:02:37,420 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/action.ds.xml: 4ms
          === 2011-08-11 13:02:37,438 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/DataSource.ds.xml: 13ms
          === 2011-08-11 13:02:37,480 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/valueMap.ds.xml: 26ms
          === 2011-08-11 13:02:37,481 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
          === 2011-08-11 13:02:37,532 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/serverObject.ds.xml: 8ms
          === 2011-08-11 13:02:37,542 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
          === 2011-08-11 13:02:37,553 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: serverObject, but got: ServerObject
          === 2011-08-11 13:02:37,660 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/ID
          === 2011-08-11 13:02:37,673 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/DataSourceField.ds.xml: 8ms
          === 2011-08-11 13:02:37,686 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
          === 2011-08-11 13:02:37,747 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/0/field[@name=target]/name
          === 2011-08-11 13:02:37,748 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/0/field[@name=target]/type
          === 2011-08-11 13:02:37,749 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/1/field[@name=name]/name
          === 2011-08-11 13:02:37,749 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/1/field[@name=name]/type
          === 2011-08-11 13:02:37,749 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/2/field[@name=title]/name
          === 2011-08-11 13:02:37,749 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/2/field[@name=title]/type
          === 2011-08-11 13:02:37,751 [l0-3] WARN  Validation - No such type 'boolean', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/multiple
          === 2011-08-11 13:02:37,751 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/name
          === 2011-08-11 13:02:37,751 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/type
          === 2011-08-11 13:02:37,752 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: action, but got: Action
          === 2011-08-11 13:02:37,763 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/scratchpad/sc/system/schema/method.ds.xml: 3ms
          === 2011-08-11 13:02:37,766 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: method, but got: Method
          === 2011-08-11 13:02:37,771 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
          === 2011-08-11 13:02:37,788 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/WEB-INF/ds/SomeTable.ds.xml: 4ms
          === 2011-08-11 13:02:37,863 [l0-3] INFO  SQLDataSource - Deriving dataSource SomeTable from table: SOME_TABLE
          === 2011-08-11 13:02:37,900 [l0-3] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'POLARIS' from system config - using DataSource:  oracle.jdbc.pool.OracleDataSource
          === 2011-08-11 13:02:38,360 [l0-3] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection
          === 2011-08-11 13:02:38,436 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for table: SOME_TABLE
          === 2011-08-11 13:02:38,436 [l0-3] INFO  SQLDSGenerator - =============Using catalog: null
          === 2011-08-11 13:02:38,564 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for SOME_TABLE complete
          === 2011-08-11 13:02:38,626 [l0-3] WARN  SQLDataSource - ds:isc.DataSource.create({
              schema:"POLARIS_OWN",
              dbName:null,
              tableName:"SOME_TABLE",
              ID:"SomeTable_inheritsFrom",
              dataSourceVersion:"1",
              serverType:"sql",
              generatedBy:"SC_SNAPSHOT-2011-07-27/PowerEdition Deployment 2011-07-27",
              fields:[
                  {
                      name:"SOME_ID",
                      type:"float"
                  },
                  {
                      name:"SOME_TEXT",
                      length:4000,
                      type:"text"
                  }
              ]
          })
          
          === 2011-08-11 13:03:24,935 [l0-0] DEBUG RESTHandler - Wrapping json responses:true
          === 2011-08-11 13:03:24,936 [l0-0] DEBUG RESTHandler - Default response data format:xml
          === 2011-08-11 13:03:24,961 [l0-0] INFO  RequestContext - URL: '/restapi/', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0': Moz (Gecko) with Accept-Encoding header
          === 2011-08-11 13:03:24,971 [l0-0] DEBUG RestRequestParser - Parsing xml object: '<?xml version="1.0" encoding="UTF-8"?>
          <request>
              <data>
                  <SomeTable>
                  </SomeTable>
              </data>
              <dataSource>SomeTable</dataSource>
              <operationType>fetch</operationType>
          </request>'
          === 2011-08-11 13:03:24,993 [l0-0] INFO  RESTHandler - Performing 1 operation(s)
          === 2011-08-11 13:03:25,005 [l0-0] DEBUG AppBase - [builtinApplication.SomeTable_fetch] No userTypes defined, allowing anyone access to all operations for this application
          === 2011-08-11 13:03:25,005 [l0-0] DEBUG AppBase - [builtinApplication.SomeTable_fetch] No public zero-argument method named '_SomeTable_fetch' found, performing generic datasource operation
          === 2011-08-11 13:03:25,006 [l0-0] INFO  SQLDataSource - [builtinApplication.SomeTable_fetch] Performing fetch operation with
          	criteria: {}	values: {}
          === 2011-08-11 13:03:25,012 [l0-0] INFO  SQLWhereClause - [builtinApplication.SomeTable_fetch] empty condition
          === 2011-08-11 13:03:25,014 [l0-0] INFO  SQLDataSource - [builtinApplication.SomeTable_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
          === 2011-08-11 13:03:25,275 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.SomeTable_fetch] Returning pooled Connection
          === 2011-08-11 13:03:25,285 [l0-0] INFO  SQLDriver - [builtinApplication.SomeTable_fetch] Executing SQL query on 'POLARIS': SELECT SOME_TABLE.SOME_ID, SOME_TABLE.SOME_TEXT FROM SOME_TABLE WHERE ('1'='1')
          === 2011-08-11 13:03:25,339 [l0-0] INFO  DSResponse - [builtinApplication.SomeTable_fetch] DSResponse: List with 1 items
          === 2011-08-11 13:03:25,340 [l0-0] DEBUG RPCManager - Content type for RPC transaction: text/html; charset=UTF-8
          === 2011-08-11 13:03:25,345 [l0-0] DEBUG RPCManager - non-DMI response, dropExtraFields: false
          === 2011-08-11 13:03:25,357 [l0-0] ERROR RESTHandler - Error executing operation: SomeTable_fetch
          java.lang.ClassCastException: oracle.jdbc.driver.OracleClobReader cannot be cast to java.util.Map
          	at com.isomorphic.xml.XML.recordToXML(XML.java:1010)
          	at com.isomorphic.xml.XML.recordToXML(XML.java:913)
          	at com.isomorphic.xml.XML.recordToXML(XML.java:907)
          	at com.isomorphic.xml.XML.recordsToXML(XML.java:1028)
          	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1148)
          	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
          	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:217)
          	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:165)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
          	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
          	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
          	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
          	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          	at org.mortbay.jetty.Server.handle(Server.java:324)
          	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
          	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
          	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
          	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
          	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
          	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
          	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
          === 2011-08-11 13:03:25,365 [l0-0] DEBUG RPCManager - Content type for RPC transaction: text/html; charset=UTF-8
          === 2011-08-11 13:03:25,371 [l0-0] DEBUG RPCManager - non-DMI response, dropExtraFields: false
          === 2011-08-11 13:03:25,372 [l0-0] ERROR RESTHandler - Top-level servlet error: 
          java.lang.NullPointerException
          	at com.isomorphic.xml.XML.recordToXML(XML.java:949)
          	at com.isomorphic.xml.XML.recordToXML(XML.java:913)
          	at com.isomorphic.xml.XML.recordToXML(XML.java:907)
          	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1152)
          	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
          	at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:665)
          	at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:686)
          	at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:223)
          	at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:165)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
          	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
          	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
          	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
          	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          	at org.mortbay.jetty.Server.handle(Server.java:324)
          	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
          	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
          	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
          	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
          	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
          	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
          	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

          Comment


            #6
            In the absence of any information in the DataSource telling us otherwise, we assume the CLOB is binary data, and RestHandler doesn't currently deal with that (obviously). If it's intended to be string data, you can explicitly declare a field of type string with the name "some_text" and you should see the data returned as a String instead.

            Comment


              #7
              Well, you of course know more about it than I do. But:

              The following excerpt from the attached log would seem to contradict that:

              Code:
              === 2011-08-11 13:02:38,626 [l0-3] WARN  SQLDataSource - ds:isc.DataSource.create({
                  schema:"POLARIS_OWN",
                  dbName:null,
                  tableName:"SOME_TABLE",
                  ID:"SomeTable_inheritsFrom",
                  dataSourceVersion:"1",
                  serverType:"sql",
                  generatedBy:"SC_SNAPSHOT-2011-07-27/PowerEdition Deployment 2011-07-27",
                  fields:[
                      {
                          name:"SOME_ID",
                          type:"float"
                      },
                      {
                          name:"SOME_TEXT",
                          length:4000,
                          type:"text"
                      }
                  ]
              })
              And as I said, I tried to set the type explicitly, with the same result:

              Code:
              <DataSource 
                xmlns="http://www.smartclient.com/schema/datasource"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                ID="SomeTable"
                tableName="SOME_TABLE"
                serverType="sql" 
                autoDeriveSchema="true" >
                
                <fields>
                  <field name="SOME_TEXT" type="text"/>
                </fields>
               </DataSource>

              Comment


                #8
                Hmm, we'll check on this - what's your exact Oracle version and JDBC driver version (and where did you download the JDBC driver from)?

                Comment


                  #9
                  Oracle version 11.1.0.7.0

                  Oracle JDBC driver 11.1.0.7.0

                  http://www.oracle.com/technetwork/da...60-084321.html

                  Code:
                  Manifest-Version: 1.0
                  Implementation-Vendor: Oracle Corporation
                  Implementation-Title: ojdbc6.jar
                  Implementation-Version: Oracle JDBC Driver version - "11.1.0.7.0-Production"
                  Implementation-Time: Thu Aug 28 17:39:02 2008
                  Specification-Vendor: Oracle Corporation
                  Sealed: true
                  Created-By: 1.6.0 (Sun Microsystems Inc.)
                  Specification-Title: Oracle JDBC driver classes for use with JDK6
                  Specification-Version: Oracle JDBC Driver version - "11.1.0.7.0-Production"
                  Main-Class: oracle.jdbc.OracleDriver
                  
                  Name: oracle/sql/converter_xcharset/
                  Sealed: false
                  
                  Name: oracle/sql/
                  Sealed: false
                  
                  Name: oracle/sql/converter/
                  Sealed: false

                  Comment


                    #10
                    Just wondering whether anyone's had a chance to look this over.

                    Comment

                    Working...
                    X