Announcement

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

    SQLDataSource Bug

    Edit: it is not a bug! I've picked up only one jar from the snapshot -> not supported!

    I'm working with SmartClient 8.0 Power. Due to this bug http://forums.smartclient.com/showthread.php?t=16840
    I need to use the isomorphic_core_rpc.jar from a nightly build.
    I've tried the SNAPSHOT-2011-07-05 and SmartClient_SC_SNAPSHOT-2011-06-07 (the older I have got), but they seem to introduce a bug.

    As you can see in the test case, it generates a select with a () where clause:
    SELECT SUPPLYITEM.ITEMID, SUPPLYITEM.ITEMNAME FROM SUPPLYITEM WHERE ()
    Code:
    <%@ page contentType="text/html; charset=UTF-8"%>
    <%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %>
    <HTML><HEAD><TITLE>test</TITLE>
    <isomorphic:loadISC skin="Graphite"/>
    </HEAD><BODY>
    <SCRIPT>
    isc.Page.setAppImgDir("../graphics/");
    <isomorphic:XML>
    
    <DataSource>
        <loadID>QUEUEDORDERITEM</loadID>
    </DataSource>
    
    <DataSource>
        <loadID>SUPPLYITEM</loadID>
    </DataSource>
    
    
    <ListGrid dataSource="QUEUEDORDERITEM" ID="ListGrid0" autoDraw="false">
        <fields>
            <ListGridField name="ITEMID" title="Itemid">
                <optionDataSource>SUPPLYITEM</optionDataSource>
                <valueField>ITEMID</valueField>
                <displayField>ITEMNAME</displayField>
            </ListGridField>
        </fields>
        <listEndEditAction>next</listEndEditAction>
        <showFilterEditor>true</showFilterEditor>
        <canEdit>true</canEdit>
        <autoFetchData>true</autoFetchData>
        <canRemoveRecords>true</canRemoveRecords>
        <xsi:type>ListGrid</xsi:type>
    </ListGrid>
    
    
    <DataView ID="DataView0" overflow="hidden" autoDraw="true">
        <members><Canvas ref="ListGrid0"/>
        </members>
        <width>100%</width>
        <height>100%</height>
    </DataView>
    
    
    </isomorphic:XML></SCRIPT>
    </BODY></HTML>
    QUEUEDORDERITEM.ds.xml :
    Code:
    <DataSource
        ID="QUEUEDORDERITEM"
        serverType="sql"
        tableName="QUEUEDORDERITEM"
         dbName="dbInviti" 
    >
        <fields>
            <field name="PK" type="sequence" primaryKey="true" hidden="true" />
            <field name="ITEMID" type="integer" foreignKey="SUPPLYITEM.ITEMID" title="Item Name"/>
        </fields>
        
        
    </DataSource>
    SUPPLYITEM.DS.XML :
    Code:
    <DataSource
        ID="SUPPLYITEM"
        serverType="sql"
        tableName="SUPPLYITEM"
         dbName="dbInviti" 
    >
        <fields>
            <field name="ITEMID"      type="sequence" hidden="true"       primaryKey="true"/>
            <field name="ITEMNAME"    type="text"     length="128"        required="true"/>
        </fields>
    </DataSource>
    client side log:
    Code:
    16:13:27.421:INFO:Log:initialized
    16:13:27.421:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined.  Returning 500
    16:13:27.421:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was written out -- value cannot be determined.  Returning 500
    16:13:27.562:WARN:AutoObserver:Use addInterfaceProperties() to add methods to interface [Class AutoObserver]
    16:13:28.859:INFO:Log:isc.Page is loaded
    16:13:29.453:XRP8:WARN:RPCManager:ORA-00936: espressione mancante
    , response: {operationId: "custom",
    clientContext: Obj,
    context: Obj,
    transactionNum: 0,
    httpResponseCode: 200,
    httpResponseText: "//isc_RPCResponseStart-->[{endRow:3,queu..."[575],
    xmlHttpRequest: Obj,
    transport: "xmlHttpRequest",
    status: -1,
    clientOnly: undef,
    httpHeaders: Obj,
    isStructured: true,
    callbackArgs: null,
    results: Obj,
    queueStatus: -1,
    isDSResponse: true,
    invalidateCache: false,
    data: "ORA-00936: espressione mancante
    "}
    server side log:
    Code:
    === 2011-07-05 16:02:49,390 [c-23] DEBUG RPCManager - Processing 3 requests.
    === 2011-07-05 16:02:49,390 [c-23] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
        },
        operationConfig:{
            dataSource:"QUEUEDORDERITEM",
            operationType:"fetch",
            textMatchStyle:"substring"
        },
        startRow:0,
        endRow:75,
        componentId:"ListGrid0",
        appID:"builtinApplication",
        operation:"QUEUEDORDERITEM_fetch",
        oldValues:{
        }
    }
    === 2011-07-05 16:02:49,390 [c-23] DEBUG RPCManager - Request #2 (DSRequest) payload: {
        criteria:"",
        operationConfig:{
            dataSource:"SUPPLYITEM",
            operationType:"fetch"
        },
        appID:"builtinApplication",
        operation:"SUPPLYITEM_fetch",
        oldValues:""
    }
    === 2011-07-05 16:02:49,390 [c-23] DEBUG RPCManager - Request #3 (DSRequest) payload: {
        criteria:{
        },
        operationConfig:{
            dataSource:"SUPPLYITEM",
            operationType:"fetch",
            textMatchStyle:"startsWith"
        },
        componentId:"isc_PickListMenu_0",
        appID:"builtinApplication",
        operation:"SUPPLYITEM_fetch",
        oldValues:{
        }
    }
    === 2011-07-05 16:02:49,390 [c-23] INFO  IDACall - Performing 3 operation(s)
    === 2011-07-05 16:02:49,390 [c-23] DEBUG AppBase - [builtinApplication.QUEUEDORDERITEM_fetch] No userTypes defined, allowing anyone access to all operations for this application
    === 2011-07-05 16:02:49,390 [c-23] DEBUG AppBase - [builtinApplication.QUEUEDORDERITEM_fetch] No public zero-argument method named '_QUEUEDORDERITEM_fetch' found, performing generic datasource operation
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] Performing fetch operation with
    	criteria: {}	values: {}
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLWhereClause - [builtinApplication.QUEUEDORDERITEM_fetch] empty condition
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    === 2011-07-05 16:02:49,390 [c-23] DEBUG SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
    === 2011-07-05 16:02:49,390 [c-23] DEBUG SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] Eval'd row count query: SELECT COUNT(*) FROM QUEUEDORDERITEM WHERE ('1'='1')
    === 2011-07-05 16:02:49,390 [c-23] DEBUG PoolableSQLConnectionFactory - [builtinApplication.QUEUEDORDERITEM_fetch] Returning pooled Connection
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLDriver - [builtinApplication.QUEUEDORDERITEM_fetch] Executing SQL query on 'dbInviti': SELECT COUNT(*) FROM QUEUEDORDERITEM WHERE ('1'='1')
    === 2011-07-05 16:02:49,390 [c-23] WARN  SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] DataSource 'QUEUEDORDERITEM': sqlPaging was explicitly specified as 'sqlLimit', but the underlying database (oracle) does not support SQL limit queries.  Falling back to 'jdbcScroll'
    === 2011-07-05 16:02:49,390 [c-23] DEBUG SQLDataSource - [builtinApplication.QUEUEDORDERITEM_fetch] JDBC driver windowed select rows 0->75, result size 75. Query: SELECT QUEUEDORDERITEM.ITEMID, QUEUEDORDERITEM.PK FROM QUEUEDORDERITEM WHERE ('1'='1')
    === 2011-07-05 16:02:49,390 [c-23] INFO  DSResponse - [builtinApplication.QUEUEDORDERITEM_fetch] DSResponse: List with 3 items
    === 2011-07-05 16:02:49,390 [c-23] DEBUG AppBase - [builtinApplication.SUPPLYITEM_fetch] No userTypes defined, allowing anyone access to all operations for this application
    === 2011-07-05 16:02:49,390 [c-23] DEBUG AppBase - [builtinApplication.SUPPLYITEM_fetch] No public zero-argument method named '_SUPPLYITEM_fetch' found, performing generic datasource operation
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLDataSource - [builtinApplication.SUPPLYITEM_fetch] Performing fetch operation with
    	criteria: ""	values: ""
    === 2011-07-05 16:02:49,390 [c-23] INFO  SQLDataSource - [builtinApplication.SUPPLYITEM_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    === 2011-07-05 16:02:49,406 [c-23] DEBUG PoolableSQLConnectionFactory - [builtinApplication.SUPPLYITEM_fetch] Returning pooled Connection
    === 2011-07-05 16:02:49,406 [c-23] INFO  SQLDriver - [builtinApplication.SUPPLYITEM_fetch] Executing SQL query on 'dbInviti': SELECT SUPPLYITEM.ITEMID, SUPPLYITEM.ITEMNAME FROM SUPPLYITEM WHERE ()
    === 2011-07-05 16:02:49,421 [c-23] INFO  SQLDriver - [builtinApplication.SUPPLYITEM_fetch] Execute of select: SELECT SUPPLYITEM.ITEMID, SUPPLYITEM.ITEMNAME FROM SUPPLYITEM WHERE () on db: dbInviti threw exception: java.sql.SQLSyntaxErrorException: ORA-00936: espressione mancante
     - assuming stale connection and retrying query.
    === 2011-07-05 16:02:49,421 [c-23] DEBUG PoolableSQLConnectionFactory - [builtinApplication.SUPPLYITEM_fetch] Returning pooled Connection
    === 2011-07-05 16:02:49,437 [c-23] WARN  RequestContext - dsRequest.execute() failed: 
    java.sql.SQLSyntaxErrorException: ORA-00936: espressione mancante
    
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:452)
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400)
    	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:884)
    	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:471)
    	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:199)
    	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:535)
    	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:197)
    	at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1165)
    	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1444)
    	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1662)
    	at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:8752)
    	at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:8966)
    	at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1965)
    	at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1695)
    	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    	at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
    	at com.isomorphic.sql.SQLDriver.executeQuery(SQLDriver.java:552)
    	at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:375)
    	at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:370)
    	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1291)
    	at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:280)
    	at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:224)
    	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1154)
    	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:1653)
    	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 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 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 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)
    === 2011-07-05 16:02:49,437 [c-23] DEBUG AppBase - [builtinApplication.SUPPLYITEM_fetch] No userTypes defined, allowing anyone access to all operations for this application
    === 2011-07-05 16:02:49,437 [c-23] DEBUG AppBase - [builtinApplication.SUPPLYITEM_fetch] No public zero-argument method named '_SUPPLYITEM_fetch' found, performing generic datasource operation
    === 2011-07-05 16:02:49,437 [c-23] INFO  SQLDataSource - [builtinApplication.SUPPLYITEM_fetch] Performing fetch operation with
    	criteria: {}	values: {}
    === 2011-07-05 16:02:49,437 [c-23] INFO  SQLWhereClause - [builtinApplication.SUPPLYITEM_fetch] empty condition
    === 2011-07-05 16:02:49,437 [c-23] INFO  SQLDataSource - [builtinApplication.SUPPLYITEM_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    === 2011-07-05 16:02:49,437 [c-23] DEBUG PoolableSQLConnectionFactory - [builtinApplication.SUPPLYITEM_fetch] Returning pooled Connection
    === 2011-07-05 16:02:49,437 [c-23] INFO  SQLDriver - [builtinApplication.SUPPLYITEM_fetch] Executing SQL query on 'dbInviti': SELECT SUPPLYITEM.ITEMID, SUPPLYITEM.ITEMNAME FROM SUPPLYITEM WHERE ('1'='1')
    === 2011-07-05 16:02:49,437 [c-23] INFO  DSResponse - [builtinApplication.SUPPLYITEM_fetch] DSResponse: List with 6 items
    Last edited by claudiobosticco; 5 Jul 2011, 23:43. Reason: it is not a bug

    #2
    You could get this effect by mixing .jars from different versions, or by using client code from one version and server code from another.

    Let us know if you believe that there is a problem with the latest code, with no mixed versions or stale files, and with your browser cache cleared before the test.

    Comment


      #3
      You're right, previously I've picked up only isomorphic_core_rpc.jar :-(

      now it's working, thank you very much!

      Comment

      Working...
      X