Announcement

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

    #16
    Originally posted by Isomorphic
    Hmm, that message is odd - it suggests that the JDBC driver is returning an OracleClobReader instead of a java.sql.Clob, which is what it's supposed to return. We have not been able to reproduce this problem locally with either ojdbc5.jar or ojdbc14.jar connecting to 10g.

    Could you try changing the type of the field in the .ds.xml file from "text" to "clob", and let us know if that makes the problem go away? Also, what exact version of Oracle are you using?
    I'm using 2012-03-20_v8.2p/PowerEdition and we're migrating to oracle 11g release 2, using ojdbc6_g.jar driver:

    Implementation-Vendor: Oracle Corporation
    Implementation-Title: JDBC debug
    Implementation-Version: 11.2.0.3.0
    Repository-Id: JAVAVM_11.2.0.3.0_LINUX_110823

    and while reading a clob I obtain an OracleClobReader (tested with type="text" or type="clob")

    is it normal?

    the listgrid bound to the datasource which has this clob field works normally.
    But I have a DMI method where I fetch records from the datasource and then I need to convert the clob field to a string...previously I was doing like this:
    Code:
            CharArrayReader richText = (CharArrayReader) map.get("RICH_TEXT");
            if (richText == null) {
                return;
            }
            int ch = 0;
            richText.reset();
            StringBuffer sb = new StringBuffer("");
            while((ch = richText.read()) != -1) {
                sb.append((char) ch);
            }
            richiesta.put(nomeParametro, sb.toString());
    but now I can't cast the OracleClobReader to CharArrayReader, so I'm stuck :-(
    Last edited by claudiobosticco; 29 Mar 2012, 00:10.

    Comment


      #17
      well, after a more careful thinking, casting to a java.io.Reader instead of CharArrayReader, and removing the .reset (which gives an exception in Italian "Contrassegno non valido o non impostato" which sounds something like "marker not set or invalid"), I manage to convert the OracleClobReader to a string.

      But there's another problem, which I wonder if it's a bug (maybe related to the return of an OracleClobReader?):

      if I try to set null in the type="clob" field, I got this exception (with oracle 10g it was working):

      Code:
       
      === 2012-03-29 10:18:45,797 [ec-9] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          criteria:{
              ID_REC:122788
          },
          values:{
              ID_PARAMETRO:"allegato1",
              ID_DOCUMENTO:"proposta",
              ID_REC:122788,
              _selection_84:true,
              RICH_TEXT:null
          },
          operationConfig:{
              dataSource:"PARAMETRI_DOCUMENTI",
              operationType:"update"
          },
          componentId:"gestioneParagrafiPropostaGrid",
          appID:"builtinApplication",
          operation:"PARAMETRI_DOCUMENTI_update",
          oldValues:{
              ID_PARAMETRO:"allegato1",
              ID_DOCUMENTO:"proposta",
              ID_REC:122788,
              _selection_84:true,
              RICH_TEXT:null
          }
      }
      === 2012-03-29 10:18:45,828 [ec-9] INFO  IDACall - Performing 1 operation(s)
      === 2012-03-29 10:18:45,828 [ec-9] DEBUG AppBase - [builtinApplication.PARAMETRI_DOCUMENTI_update] No userTypes defined, allowing anyone access to all operations for this application
      === 2012-03-29 10:18:45,828 [ec-9] DEBUG AppBase - [builtinApplication.PARAMETRI_DOCUMENTI_update] No public zero-argument method named '_PARAMETRI_DOCUMENTI_update' found, performing generic datasource operation
      === 2012-03-29 10:18:45,828 [ec-9] INFO  SQLDataSource - [builtinApplication.PARAMETRI_DOCUMENTI_update] Performing update operation with
      	criteria: {ID_REC:122788}	values: {ID_PARAMETRO:"allegato1",ID_DOCUMENTO:"proposta",ID_REC:122788,_selection_84:true,RICH_TEXT:null}
      === 2012-03-29 10:18:45,844 [ec-9] INFO  SQLValuesClause - [builtinApplication.PARAMETRI_DOCUMENTI_update] Ignored data for non-existent or included columns: [_selection_84]
      === 2012-03-29 10:18:45,891 [ec-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.PARAMETRI_DOCUMENTI_update] Returning pooled Connection
      === 2012-03-29 10:18:45,906 [ec-9] DEBUG SQLTransaction - [builtinApplication.PARAMETRI_DOCUMENTI_update] Started new dbEleven transaction "5662763"
      === 2012-03-29 10:18:45,906 [ec-9] INFO  SQLDriver - [builtinApplication.PARAMETRI_DOCUMENTI_update] Executing SQL update on 'dbEleven': UPDATE DBELEVEN.PARAMETRI_DOCUMENTI SET ID_DOCUMENTO='proposta', ID_PARAMETRO='allegato1', RICH_TEXT=? WHERE (PARAMETRI_DOCUMENTI.ID_REC='122788')
      === 2012-03-29 10:18:45,953 [ec-9] WARN  RequestContext - dsRequest.execute() failed: 
      java.sql.SQLException: Missing IN or OUT parameter at index:: 1
      	at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1994)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4356)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4539)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:5577)
      	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      	at com.isomorphic.sql.SQLDriver.doUpdate(SQLDriver.java:528)
      	at com.isomorphic.sql.SQLDriver.update(SQLDriver.java:482)
      	at com.isomorphic.sql.SQLDriver.executeUpdate(SQLDriver.java:602)
      	at com.isomorphic.sql.SQLDataSource.executeNativeUpdate(SQLDataSource.java:403)
      	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1380)
      	at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:293)
      	at com.isomorphic.sql.SQLDataSource.executeUpdate(SQLDataSource.java:241)
      	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1295)
      	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
      	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1948)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(JSSyntaxScannerFilter.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      === 2012-03-29 10:18:45,953 [ec-9] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2012-03-29 10:18:45,953 [ec-9] DEBUG SQLTransaction - Rolling back dbEleven transaction "5662763"
      === 2012-03-29 10:18:45,969 [ec-9] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      === 2012-03-29 10:18:45,969 [ec-9] DEBUG SQLTransaction - Ending dbEleven transaction "5662763"
      but if I use type="text", then it works

      Comment


        #18
        We have corrected this issue with explicit null values in Clob fields - it will be in tomorrow's (April 10th) nightly builds of 8.3d/3.1d and 8.2p/3.0p

        Comment

        Working...
        X