Announcement

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

    SmartGWTEE, Datasource And Selectitem Criteria Problem

    Hi all,
    I'm trying to execute simple datasource example with form filter and grid.
    Here is my code snippets:
    1. Client Code (UI)
    Code:
    // Form
    DynamicForm searchForm = new DynamicForm();
    searchForm.setAutoFocus(true);
    searchForm.setWidth(700);
    searchForm.setTitleWidth(200);
    
    // Select Item
    SelectItem operatorItem = new SelectItem();
    operatorItem.setTitle("Operator);
    operatorItem.setType("comboBox");
    operatorItem.setName("operatorId");
    
    // Add Select Item into Form.
    searchForm.setFields(operatorItem);
    
    // Set Datasource to SelectItem
    DataSource operatorsDS = DataSource.get("OpersDS");
    operatorItem.setOptionDataSource(persons);
    
    // And the grid
    final ListGrid sessionsGrid = new ListGrid();
    sessionsGrid.setWidth(820);
    sessionsGrid.setHeight(224);
    sessionsGrid.setDataSource(sessionsDS);
    sessionsGrid.setCanEdit(false);
    sessionsGrid.setCanRemoveRecords(false);
    sessionsGrid.setFetchOperation("customSearch");
    
    // search button click.
    buttonItem.addClickHandler(new ClickHandler() {
    			@Override
    			public void onClick(ClickEvent event) {
    				Criteria criteria = sessionsGrid.getCriteria();
    				if (criteria == null) {
    					criteria = new Criteria();
    				}
    				Criteria formCriteria = searchForm.getValuesAsCriteria();
    				criteria.addCriteria(formCriteria);
    				
    				sessionsGrid.invalidateCache();
    				sessionsGrid.filterData(criteria);
    			}
    		});

    That's all into client side,

    Now I've to separate Datasource file.
    1.OpersDS (XML File)
    Code:
    <DataSource ID="OpersDS" serverConstructor="com.isomorphic.jpa.JPADataSource"
    	beanClassName="com.info08.billing.callcenter.shared.entity.Person">
    	<fields>
    		<field name="operatorId" type="integer" hidden="true" primaryKey="true" />
    		<field name="fullPersonName" type="text" title="Person Name"/>		
    	</fields>
    </DataSource>
    2. And grid datasource
    Code:
    <DataSource ID="LogSessions_DataSource" serverType="sql"
    	tableName="info.log_sessions" qualifyColumnNames="false">
    	<fields>
    		<!-- Some Fields Defined Here -->
    	</fields>
    
    	<operationBindings>
    		<operationBinding operationId="customSearch"
    			operationType="fetch"
    			customFields="f1, f2, and so on">
    			<selectClause>
    				f1,
    				f2
    			</selectClause>
    			<tableClause>
    				Tbl1 t1,
    				Tbl2 t2,				
    			</tableClause>
    			<whereClause><![CDATA[ 
    				t1.f3 = t2.f4(+) and 
    				t1.f5 = $criteria.operatorId
    				]]>
    			</whereClause>
    			<groupClause>
    				<!-- group by options -->
    			</groupClause>
    			<orderClause>
    				<!-- order by options -->
    			</orderClause>
    			<groupWhereClause>($defaultWhereClause)</groupWhereClause>
    		</operationBinding>
    	</operationBindings>
    </DataSource>

    That's all

    The Problem :
    If I select something from selectitem search works perfectly and grid is filtered,
    but i have not selected anything from selectitem i got an exception , criteria field is not set. :(

    and i got sql syntax exception.
    What i did wrong ?

    Thanks In advance,

    Regards,
    Paata Lominadze

    #2
    What's the exact exception you're getting? Show the complete server log for the request including the full stack trace (always include this information when posting).

    Comment


      #3
      Originally posted by Isomorphic
      What's the exact exception you're getting? Show the complete server log for the request including the full stack trace (always include this information when posting).
      Ok, Thank you for your quick reply.

      1. Error Trace :
      Code:
      java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
      
      	at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
      	at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
      	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
      	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
      2. Generated SQL
      Code:
      SELECT COUNT(*) FROM (SELECT 
      				p.personnel_id,
      				s.session_id,
      				s.ym,
      				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
      				user_name,
      				s.start_date,
      				s.phone,
      				s.duration,
      				decode(s.hungup,0,'\u10d0\u10d1\u10dd\u10dc\u10d4\u10dc\u10e2\u10db\u10d0',1,'\u10dd\u10de\u10d4\u10e0\u10d0\u10e2\u10dd\u10e0\u10db\u10d0','\u10e3\u10ea\u10dc\u10dd\u10d1\u10d8\u10d0') as hangUp,
      				count(ch.session_id) as chargeCount
      			 FROM 
      				log_sessions s,
      				log_session_charges ch,
      				info.personnel p
      			 WHERE  
      				s.session_id=ch.session_id(+) and 
      				s.start_date > trunc(TO_DATE('2011-04-28 17:56:19','YYYY-MM-DD HH24:MI:SS')) and 
      				s.start_date < trunc(TO_DATE('2011-04-28 17:56:20','YYYY-MM-DD HH24:MI:SS'))+1 and 
      				p.user_name = s.user_name and
      				p.personnel_id = $criteria.personelId
      				
      			 GROUP BY 
      				p.personnel_id,
      				s.session_id,
      				s.ym,
      				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
      				s.start_date,
      				s.phone,
      				s.duration,
      				decode(s.hungup,0,'\u10d0\u10d1\u10dd\u10dc\u10d4\u10dc\u10e2\u10db\u10d0',1,'\u10dd\u10de\u10d4\u10e0\u10d0\u10e2\u10dd\u10e0\u10db\u10d0','\u10e3\u10ea\u10dc\u10dd\u10d1\u10d8\u10d0')
      			) work WHERE (('1'='1'))
      3. Problem :
      Code:
      p.personnel_id = $criteria.personelId

      4. if i select something from selectitem , generated SQL looks like :
      Code:
      SELECT * FROM (SELECT 
      				p.personnel_id,
      				s.session_id,
      				s.ym,
      				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
      				user_name,
      				s.start_date,
      				s.phone,
      				s.duration,
      				decode(s.hungup,0,'\u10d0\u10d1\u10dd\u10dc\u10d4\u10dc\u10e2\u10db\u10d0',1,'\u10dd\u10de\u10d4\u10e0\u10d0\u10e2\u10dd\u10e0\u10db\u10d0','\u10e3\u10ea\u10dc\u10dd\u10d1\u10d8\u10d0') as hangUp,
      				count(ch.session_id) as chargeCount
      			 FROM 
      				log_sessions s,
      				log_session_charges ch,
      				info.personnel p
      			 WHERE  
      				s.session_id=ch.session_id(+) and 
      				s.start_date > trunc(TO_DATE('2011-04-28 17:56:19','YYYY-MM-DD HH24:MI:SS')) and 
      				s.start_date < trunc(TO_DATE('2011-04-28 17:56:20','YYYY-MM-DD HH24:MI:SS'))+1 and 
      				p.user_name = s.user_name and
      				p.personnel_id = 112
      				
      			 GROUP BY 
      				p.personnel_id,
      				s.session_id,
      				s.ym,
      				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
      				s.start_date,
      				s.phone,
      				s.duration,
      				decode(s.hungup,0,'\u10d0\u10d1\u10dd\u10dc\u10d4\u10dc\u10e2\u10db\u10d0',1,'\u10dd\u10de\u10d4\u10e0\u10d0\u10e2\u10dd\u10e0\u10db\u10d0','\u10e3\u10ea\u10dc\u10dd\u10d1\u10d8\u10d0')
      			) work WHERE (('1'='1')) ORDER BY 
      				start_date desc

      here we have correct sql :
      Code:
      p.personnel_id = 112


      Regards
      Paata Lominadze.

      Comment


        #4
        The complete server log for the request means everything logged by the server as the request is processed, not just what you've posted. The most important information is in the parts of the log you've omitted.

        Comment


          #5
          Originally posted by Isomorphic
          The complete server log for the request means everything logged by the server as the request is processed, not just what you've posted. The most important information is in the parts of the log you've omitted.
          Ok sorry for my misunderstood.

          1. full error trace:

          Code:
          === 2011-04-28 18:40:00,717 [l0-9] INFO  RequestContext - URL: '/callcenter/sc/IDACall', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
          === 2011-04-28 18:40:00,733 [l0-9] DEBUG XML - Parsed XML from (in memory stream): 1ms
          === 2011-04-28 18:40:00,736 [l0-9] DEBUG RPCManager - Processing 1 requests.
          === 2011-04-28 18:40:00,737 [l0-9] DEBUG RPCManager - Request #1 (DSRequest) payload: {
              criteria:{
                  startDate:new Date(1304001556000),
                  serviceId:"1",
                  endDate:new Date(1304001556000)
              },
              operationConfig:{
                  dataSource:"LogSessions_DataSource",
                  operationType:"fetch",
                  textMatchStyle:"substring"
              },
              startRow:0,
              endRow:75,
              componentId:"isc_ListGrid_1",
              appID:"builtinApplication",
              operation:"customSearch",
              oldValues:{
                  startDate:new Date(1304001556000),
                  serviceId:"1",
                  endDate:new Date(1304001556000)
              }
          }
          === 2011-04-28 18:40:00,737 [l0-9] INFO  IDACall - Performing 1 operation(s)
          === 2011-04-28 18:40:00,737 [l0-9] DEBUG AppBase - [builtinApplication.customSearch] No userTypes defined, allowing anyone access to all operations for this application
          === 2011-04-28 18:40:00,737 [l0-9] DEBUG AppBase - [builtinApplication.customSearch] No public zero-argument method named '_customSearch' found, performing generic datasource operation
          === 2011-04-28 18:40:00,737 [l0-9] INFO  SQLDataSource - [builtinApplication.customSearch] Performing fetch operation with
          	criteria: {startDate:new Date(1304001556000),serviceId:"1",endDate:new Date(1304001556000)}	values: {startDate:new Date(1304001556000),serviceId:"1",endDate:new Date(1304001556000)}
          === 2011-04-28 18:40:00,738 [l0-9] INFO  SQLDataSource - [builtinApplication.customSearch] derived query: SELECT * FROM (SELECT 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
          				user_name,
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია') as hangUp,
          				count(ch.session_id) as chargeCount
          			 FROM 
          				log_sessions s,
          				log_session_charges ch,
          				info.personnel p
          			 WHERE  
          				s.session_id=ch.session_id(+) and 
          				s.start_date > trunc($criteria.startDate) and 
          				s.start_date < trunc($criteria.endDate)+1 and 
          				p.user_name = s.user_name and
          				p.personnel_id = $criteria.personelId
          				
          			 GROUP BY 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია')
          			) work WHERE ($defaultWhereClause) ORDER BY 
          				start_date desc
          	        
          === 2011-04-28 18:40:00,739 [l0-9] DEBUG SQLDataSource - [builtinApplication.customSearch] Executing row count query: SELECT COUNT(*) FROM (SELECT 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
          				user_name,
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია') as hangUp,
          				count(ch.session_id) as chargeCount
          			 FROM 
          				log_sessions s,
          				log_session_charges ch,
          				info.personnel p
          			 WHERE  
          				s.session_id=ch.session_id(+) and 
          				s.start_date > trunc($criteria.startDate) and 
          				s.start_date < trunc($criteria.endDate)+1 and 
          				p.user_name = s.user_name and
          				p.personnel_id = $criteria.personelId
          				
          			 GROUP BY 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია')
          			) work WHERE ($defaultWhereClause)
          === 2011-04-28 18:40:00,740 [l0-9] DEBUG SQLDataSource - [builtinApplication.customSearch] Eval'd row count query: SELECT COUNT(*) FROM (SELECT 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
          				user_name,
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია') as hangUp,
          				count(ch.session_id) as chargeCount
          			 FROM 
          				log_sessions s,
          				log_session_charges ch,
          				info.personnel p
          			 WHERE  
          				s.session_id=ch.session_id(+) and 
          				s.start_date > trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS')) and 
          				s.start_date < trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS'))+1 and 
          				p.user_name = s.user_name and
          				p.personnel_id = $criteria.personelId
          				
          			 GROUP BY 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია')
          			) work WHERE (('1'='1'))
          === 2011-04-28 18:40:00,781 [l0-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.customSearch] Returning pooled Connection
          === 2011-04-28 18:40:00,782 [l0-9] INFO  SQLDriver - [builtinApplication.customSearch] Executing SQL query on 'Oracle': SELECT COUNT(*) FROM (SELECT 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
          				user_name,
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია') as hangUp,
          				count(ch.session_id) as chargeCount
          			 FROM 
          				log_sessions s,
          				log_session_charges ch,
          				info.personnel p
          			 WHERE  
          				s.session_id=ch.session_id(+) and 
          				s.start_date > trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS')) and 
          				s.start_date < trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS'))+1 and 
          				p.user_name = s.user_name and
          				p.personnel_id = $criteria.personelId
          				
          			 GROUP BY 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია')
          			) work WHERE (('1'='1'))
          === 2011-04-28 18:40:00,785 [l0-9] INFO  SQLDriver - [builtinApplication.customSearch] Execute of select: SELECT COUNT(*) FROM (SELECT 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) ') as
          				user_name,
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია') as hangUp,
          				count(ch.session_id) as chargeCount
          			 FROM 
          				log_sessions s,
          				log_session_charges ch,
          				info.personnel p
          			 WHERE  
          				s.session_id=ch.session_id(+) and 
          				s.start_date > trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS')) and 
          				s.start_date < trunc(TO_DATE('2011-04-28 18:39:16','YYYY-MM-DD HH24:MI:SS'))+1 and 
          				p.user_name = s.user_name and
          				p.personnel_id = $criteria.personelId
          				
          			 GROUP BY 
          				p.personnel_id,
          				s.session_id,
          				s.ym,
          				(s.user_name||' ( '||p.personnel_name||' '||p.personnel_surname||' ) '),
          				s.start_date,
          				s.phone,
          				s.duration,
          				decode(s.hungup,0,'აბონენტმა',1,'ოპერატორმა','უცნობია')
          			) work WHERE (('1'='1')) on db: Oracle threw exception: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
           - assuming stale connection and retrying query.
          === 2011-04-28 18:40:00,837 [l0-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.customSearch] Returning pooled Connection
          === 2011-04-28 18:40:00,844 [l0-9] WARN  RequestContext - dsRequest.execute() failed: 
          java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
          
          	at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
          	at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
          	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
          	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
          	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
          	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
          	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
          	at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
          	at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
          	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
          	at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4219)
          	at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:4348)
          	at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1384)
          	at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
          	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
          	at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
          	at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:267)
          	at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:261)
          	at com.isomorphic.sql.SQLDriver.getScalarResult(SQLDriver.java:354)
          	at com.isomorphic.sql.SQLDriver.executeScalar(SQLDriver.java:559)
          	at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1477)
          	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1287)
          	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:1048)
          	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:1443)
          	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173)
          	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
          	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
          	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
          	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$CachedChain.doFilter(ServletHandler.java:1097)
          	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
          	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
          	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
          	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-04-28 18:40:00,846 [l0-9] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
          === 2011-04-28 18:40:00,846 [l0-9] DEBUG RPCManager - non-DMI response, dropExtraFields: false
          === 2011-04-28 18:40:00,847 [l0-9] INFO  Compression - /callcenter/sc/IDACall: 151 -> 136 bytes
          === 2011-04-28 18:40:02,471 [l0-9] INFO  RequestContext - URL: '/callcenter/sc/skins/Enterprise/images/ListGrid/header_menu.png', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
          === 2011-04-28 18:40:02,472 [l0-9] INFO  Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/Enterprise/images/ListGrid/header_menu.png



          2. Client side stack trace (I've copied this from Development Mode - Eclipse)
          Code:
          18:40:00.929 [ERROR] [callcenter] 18:40:00.901:XRP5:WARN:RPCManager:ORA-00911: invalid character
          , response: {operationId: "customSearch", clientContext: Obj, context: Obj, transactionNum: 3, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[151], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, queueStatus: -1, isDSResponse: true, invalidateCache: false, data: "ORA-00911: invalid character
          ", startRow: 0, endRow: 0, totalRows: 0}
          com.smartgwt.client.core.JsObject$SGWT_WARN: 18:40:00.901:XRP5:WARN:RPCManager:ORA-00911: invalid character
          , response: {operationId: "customSearch", clientContext: Obj, context: Obj, transactionNum: 3, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[151], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, queueStatus: -1, isDSResponse: true, invalidateCache: false, data: "ORA-00911: invalid character
          ", startRow: 0, endRow: 0, totalRows: 0}
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
              at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
              at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
              at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
              at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
              at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
              at java.lang.Thread.run(Thread.java:662)

          Regards,
          Paata Lominadze

          Comment


            #6
            Because there is no personelId in the criteria (as the log shows) $criteria.personelId is going to be placed literally into the criteria and cause this error.

            You need to either:

            1. use Velocity conditionals to avoid generating any SQL if $criteria.personelId is null

            OR

            2. ensure personelId is always in the criteria, even if there's no selection, by either adding client-side logic (eg transformResponse) or server-side logic (a DMI)

            Comment


              #7
              Originally posted by Isomorphic
              Because there is no personelId in the criteria (as the log shows) $criteria.personelId is going to be placed literally into the criteria and cause this error.

              You need to either:

              1. use Velocity conditionals to avoid generating any SQL if $criteria.personelId is null

              OR

              2. ensure personelId is always in the criteria, even if there's no selection, by either adding client-side logic (eg transformResponse) or server-side logic (a DMI)

              Thank you very much for great explanation.
              Velocity conditionals works fine.


              Regards,
              Paata Lominadze,

              Comment

              Working...
              X