Announcement

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

    Problem with integration SmartClient and PostgresSQL

    Be sure your post includes:

    1. SmartClient_v90p_2013-07-24

    2. browser Chrome 28.0.1500.72 m

    3. Log Developer console:
    18:01:23.823:INFO:Log:initialized
    18:01:24.223:INFO:Log:isc.Page is loaded
    18:01:57.200:MUP0:WARN:Button:isc_DatabaseBrowser_0_selectButton:Widget initialized with explicitly specified 'enabled' property. This property has been deprecated - use 'disabled' instead.
    18:01:57.659:MUP0:WARN:RecordEditor:isc_DatabaseBrowser_0_dataGridfilterEditor:No editable fields in this record editor. Check the 'canFilter' property for each field in isc_DatabaseBrowser_0_dataGrid
    18:02:07.395:MDN7:WARN:RecordEditor:isc_DatabaseBrowser_0_dataGridfilterEditor:ListGrid showing inline editor. Unable to get a pointer to the edit form item for field:null
    18:02:11.282:XRP9:WARN:RPCManager:An error occurred when executing this operation on the server.
    Exception details are as follows:

    java.lang.Exception: table USER does not exist or contains no columns.undefined - response: {operationId: "custom",
    clientContext: undef,
    context: Obj,
    transactionNum: 6,
    httpResponseCode: 200,
    httpResponseText: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//isc_RPCResponseSta..."[260],
    xmlHttpRequest: [object XMLHttpRequest],
    transport: "xmlHttpRequest",
    status: -1,
    clientOnly: undef,
    httpHeaders: Obj,
    isStructured: true,
    callbackArgs: null,
    results: Obj,
    data: "An error occurred when executing this op..."[168]}
    -----------------
    Problem:
    I have a problem. I’m new in SmartClient JS SDK.
    I created tables in PastgreSQL DB v9.2.
    Before I put ‘postgresql-9.2-1003.jdbc4.jar’ driver into SDK/WEB_INF/lib folder.
    In Admin Console I created a connection with database. When I made ‘Test’ – all was OK.
    But in database Browser when I clicked table name, I see:
    ‘Java.lang.Exception: table USERS does not exist or contains no columns’.
    USER – the name of table.
    After click OK in warning massage, I could see columns in the Tables&Views, but there are ‘No items to show’ on the screen.
    Help me connect PostgreSQL. I did all by reference guide.

    Help me!

    #2
    Please post the server-side log for the failing request and also your DataSource definition (always do this).

    Comment


      #3
      Originally posted by Isomorphic View Post
      Please post the server-side log for the failing request and also your DataSource definition (always do this).
      server.properties
      sql.PG_DB_1.driver.databaseName: PG_DB_1
      sql.PG_DB_1.driver: org.postgresql.Driver
      sql.PG_DB_1.driver.portNumber: 5432
      sql.PG_DB_1.interface.credentialsInURL: true
      sql.PG_DB_1.driver.name: Postgresql
      sql.PG_DB_1.driver.user: postgres
      sql.PG_DB_1.driver.password: 1234
      sql.PG_DB_1.driver.context: _container_
      sql.PG_DB_1.driver.networkProtocol: tcp
      sql.PG_DB_1.driver.driverName: postgresql
      sql.PG_DB_1.database.type: postgresql
      sql.PG_DB_1.interface.type: driverManager
      sql.PG_DB_1.pool.enabled: true
      sql.PG_DB_1.driver.serverName: localhost

      server-side log
      === 2013-07-27 07:58:08,120 [sor4] DEBUG BuiltinRPC - Testing DB connection for database: PG_DB_1
      === 2013-07-27 07:58:08,120 [sor4] DEBUG PoolableSQLConnectionFactory - DriverManager fetching connection for PG_DB_1 via jdbc url jdbc:postgresql://localhost:5432/PG_DB_1?user=postgres&password=200274
      === 2013-07-27 07:58:08,120 [sor4] DEBUG PoolableSQLConnectionFactory - Passing JDBC URL only to getConnection
      === 2013-07-27 07:58:08,138 [sor4] DEBUG PoolableSQLConnectionFactory - makeObject() created a pooled Connection '1756702151'
      === 2013-07-27 07:58:08,145 [sor4] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1756702151"
      === 2013-07-27 07:58:10,189 [sor4] DEBUG RPCManager - Request #1 (RPCRequest) data: {
      appID:"isc_builtin",
      className:"com.isomorphic.tools.BuiltinRPC",
      methodName:"getTables",
      arguments:[
      "sql",
      "PG_DB_1",
      true,
      true,
      null,
      null,
      null,
      null
      ],
      is_ISC_RPC_DMI:true
      }
      === 2013-07-27 07:58:13,671 [sor4] DEBUG RPCManager - Request #1 (RPCRequest) data: {
      appID:"isc_builtin",
      className:"com.isomorphic.tools.BuiltinRPC",
      methodName:"getDataSourceJSONFromTable",
      arguments:[
      "USERS",
      "sql",
      "PG_DB_1",
      "USERS$64s"
      ],
      is_ISC_RPC_DMI:true
      }
      === 2013-07-27 07:58:13,722 [sor4] INFO SQLDSGenerator - Fetching column metadata for table: USERS
      === 2013-07-27 07:58:13,722 [sor4] INFO SQLDSGenerator - =============Using catalog: PG_DB_1
      === 2013-07-27 07:58:13,733 [sor4] INFO SQLDSGenerator - Fetching column metadata for USERS complete
      === 2013-07-27 07:58:13,733 [sor4] DEBUG RPCDMI - Invocation threw exception
      === 2013-07-27 07:58:13,745 [sor4] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2013-07-27 07:58:13,746 [sor4] INFO Compression - /tools/adminConsoleOperations.jsp: 261 -> 202 bytes
      === 2013-07-27 07:59:12,439 [sor4] INFO RequestContext - URL: '/tools/adminConsoleOperations.jsp', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 07:59:12,442 [sor4] DEBUG XML - Parsed XML from (in memory stream): 1ms
      === 2013-07-27 07:59:12,444 [sor4] DEBUG RPCManager - Processing 1 requests.
      === 2013-07-27 07:59:12,444 [sor4] DEBUG RPCManager - Request #1 (RPCRequest) data: {
      appID:"isc_builtin",
      className:"com.isomorphic.tools.BuiltinRPC",
      methodName:"getFieldsFromTable",
      arguments:[
      "USERS",
      null,
      null,
      "PG_DB_1"
      ],
      is_ISC_RPC_DMI:true
      }
      === 2013-07-27 07:59:12,465 [sor4] INFO SQLDSGenerator - Fetching column metadata for table: USERS
      === 2013-07-27 07:59:12,466 [sor4] INFO SQLDSGenerator - =============Using catalog: PG_DB_1
      === 2013-07-27 07:59:12,475 [sor4] INFO SQLDSGenerator - Fetching column metadata for USERS complete
      === 2013-07-27 08:00:31,602 [sor4] DEBUG BuiltinRPC - Testing DB connection for database: PG_DB_1
      === 2013-07-27 08:00:31,602 [sor4] DEBUG PoolableSQLConnectionFactory - DriverManager fetching connection for PG_DB_1 via jdbc url jdbc:postgresql://localhost:5432/PG_DB_1?user=postgres&password=200274
      === 2013-07-27 08:00:31,602 [sor4] DEBUG PoolableSQLConnectionFactory - Passing JDBC URL only to getConnection
      === 2013-07-27 08:00:31,621 [sor4] DEBUG PoolableSQLConnectionFactory - makeObject() created a pooled Connection '1942055309'
      === 2013-07-27 08:00:31,629 [sor4] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1942055309"
      === 2013-07-27 08:00:36,461 [sor4] INFO SQLDSGenerator - Fetching column metadata for table: USERS
      === 2013-07-27 08:00:36,462 [sor4] INFO SQLDSGenerator - =============Using catalog: PG_DB_1
      === 2013-07-27 08:00:36,474 [sor4] INFO SQLDSGenerator - Fetching column metadata for USERS complete
      === 2013-07-27 08:00:39,911 [sor4] INFO SQLDSGenerator - Fetching column metadata for table: USERS
      === 2013-07-27 08:00:39,911 [sor4] INFO SQLDSGenerator - =============Using catalog: PG_DB_1
      === 2013-07-27 08:00:39,918 [sor4] INFO SQLDSGenerator - Fetching column metadata for USERS complete
      === 2013-07-27 08:00:39,944 [sor4] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1277635074"
      === 2013-07-27 08:00:39,945 [sor4] DEBUG RPCDMI - rpc returned data
      === 2013-07-27 08:00:39,945 [sor4] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2013-07-27 08:00:39,946 [sor4] INFO Compression - /tools/adminConsoleOperations.jsp: 184 -> 143 bytes
      === 2013-07-27 08:01:05,882 [sor4] INFO RequestContext - URL: '/isomorphic/skins/Enterprise/images/TreeGrid/file.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 08:01:05,885 [sor4] INFO Download - done streaming: C:/MY/SmartClient_v90p_2013-07-24/smartclientSDK/isomorphic/skins/Enterprise/images/TreeGrid/file.png
      === 2013-07-27 08:01:05,886 [sor3] INFO Download - done streaming: C:/MY/SmartClient_v90p_2013-07-24/smartclientSDK/isomorphic/skins/Enterprise/images/TreeGrid/folder_open.png
      === 2013-07-27 08:01:05,886 [sor8] INFO Download - done streaming: C:/MY/SmartClient_v90p_2013-07-24/smartclientSDK/isomorphic/skins/Enterprise/images/TreeGrid/opener_opened.png
      === 2013-07-27 08:01:49,818 [sor8] INFO Download - Returning 304: Not modified on conditional get of: C:\MY\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\development\ISC_ServerLogViewer.js
      === 2013-07-27 08:01:49,853 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 08:01:49,859 [sor8] INFO Compression - /isomorphic/IDACall: 81 -> 86 bytes
      === 2013-07-27 08:01:49,917 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 08:01:49,945 [sor8] INFO Compression - /isomorphic/IDACall: 153743 -> 10654 bytes
      === 2013-07-27 08:02:12,207 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 08:02:12,208 [sor8] DEBUG IDACall - Header Name:Value pair: host:localhost:8080
      === 2013-07-27 08:02:12,208 [sor8] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
      === 2013-07-27 08:02:12,209 [sor8] DEBUG IDACall - Header Name:Value pair: content-length:675
      === 2013-07-27 08:02:12,209 [sor8] DEBUG IDACall - Header Name:Value pair: origin:http://localhost:8080
      === 2013-07-27 08:02:12,209 [sor8] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
      === 2013-07-27 08:02:12,209 [sor8] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
      === 2013-07-27 08:02:12,210 [sor8] DEBUG IDACall - Header Name:Value pair: accept:*/*
      === 2013-07-27 08:02:12,210 [sor8] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8080/isomorphic/system/helpers/Log.html
      === 2013-07-27 08:02:12,210 [sor8] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip,deflate,sdch
      === 2013-07-27 08:02:12,210 [sor8] DEBUG IDACall - Header Name:Value pair: accept-language:en-US,en;q=0.8
      === 2013-07-27 08:02:12,210 [sor8] DEBUG IDACall - Header Name:Value pair: cookie:isc_cState=ready; JSESSIONID=E3E0CB54EC303D84549D519C3C168BDA; GLog=%7B%0D%20%20%20%20left%3A1%2C%20%0D%20%20%20%20top%3A1%2C%20%0D%20%20%20%20width%3A966%2C%20%0D%20%20%20%20height%3A651%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Anull%0D%7D
      === 2013-07-27 08:02:12,211 [sor8] DEBUG IDACall - session exists: E3E0CB54EC303D84549D519C3C168BDA
      === 2013-07-27 08:02:12,211 [sor8] DEBUG IDACall - remote user: null
      === 2013-07-27 08:02:12,215 [sor8] DEBUG XML - Parsed XML from (in memory stream): 2ms
      === 2013-07-27 08:02:12,216 [sor8] DEBUG RPCManager - Processing 1 requests.
      === 2013-07-27 08:02:12,217 [sor8] DEBUG RPCManager - Request #1 (RPCRequest) data: {
      appID:"isc_builtin",
      className:"builtin",
      methodName:"areServerTimingsTracked",
      arguments:[
      ],
      is_ISC_RPC_DMI:true
      }
      === 2013-07-27 08:02:12,218 [sor8] INFO IDACall - Performing 1 operation(s)
      === 2013-07-27 08:02:12,220 [sor8] DEBUG RPCDMI - appConfig: isc.Application.create({
      rpcBindings:[
      {
      ID:"builtin",
      className:"com.isomorphic.rpc.BuiltinRPC",
      visibleMethods:[
      {
      name:"downloadWSDL"
      },
      {
      name:"downloadClientContent"
      },
      {
      name:"downloadClientExport"
      },
      {
      name:"xmlToJS"
      },
      {
      name:"uploadProgressCheck"
      },
      {
      name:"saveFile"
      },
      {
      name:"appendToFile"
      },
      {
      name:"loadFile"
      },
      {
      name:"deleteFile"
      },
      {
      name:"loadSharedXML"
      },
      {
      name:"saveSharedXML"
      },
      {
      name:"getAvailableScriptEngines"
      },
      {
      name:"devConsoleEvalServerScript"
      },
      {
      name:"evalJava"
      },
      {
      name:"getLogNames"
      },
      {
      name:"getLogEntries"
      },
      {
      name:"getLogThresholds"
      },
      {
      name:"setLogThreshold"
      },
      {
      name:"getPdfObject"
      },
      {
      name:"exportImage"
      },
      {
      name:"areServerTimingsTracked"
      },
      {
      name:"trackServerTimings"
      }
      ]
      },
      {
      ID:"builtin_tools",
      className:"com.isomorphic.tools.BuiltinRPC",
      visibleMethods:[
      {
      name:"getDataSourceFromTable"
      },
      {
      name:"getDataSourceJSONFromTable"
      },
      {
      name:"getDataSourceFromHibernateMapping"
      },
      {
      name:"getDataSourceJSONFromHibernateMapping"
      },
      {
      name:"getTables"
      },
      {
      name:"getFieldsFromTable"
      },
      {
      name:"getBeanFields"
      },
      {
      name:"getHibernateBeans"
      },
      {
      name:"getDatabaseProductNameAndVersion"
      },
      {
      name:"getDatabaseTableTypes"
      },
      {
      name:"setAttributes"
      },
      {
      name:"clearAttributes"
      },
      {
      name:"getAttributes"
      },
      {
      name:"getAttribute"
      },
      {
      name:"getDataSourceConfigFromJavaClass"
      },
      {
      args:"cName",
      language:"groovy",
      name:"getJavaSource",
      script:"\n if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\"); \n //import org.apache.bcel.Repository;\n\n try {\n return org.apache.bcel.Repository.lookupClass(cName).toString();\n } catch (Throwable e) {\n return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n }\n "
      },
      {
      name:"loadDataSource"
      },
      {
      name:"dsFromXML"
      },
      {
      name:"dsConfigFromXML"
      },
      {
      name:"getDefinedDataSources"
      }
      ]
      },
      {
      ID:"builtin_adminconsole",
      className:"com.isomorphic.tools.AdminConsole",
      visibleMethods:[
      {
      name:"getDefinedDatabases"
      },
      {
      name:"testDB"
      },
      {
      name:"saveDBConfig"
      },
      {
      name:"setDefaultDB"
      },
      {
      name:"importDataSources"
      },
      {
      name:"discoverJNDIDatabases"
      }
      ]
      }
      ]
      })

      === 2013-07-27 08:02:12,237 [sor8] DEBUG RPCDMI - rpc returned RPCResponse
      === 2013-07-27 08:02:12,238 [sor8] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2013-07-27 08:02:12,239 [sor8] INFO Compression - /isomorphic/IDACall: 68 -> 74 bytes
      === 2013-07-27 08:02:13,086 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
      === 2013-07-27 08:02:13,092 [sor8] INFO Compression - /isomorphic/IDACall: 81 -> 86 bytes
      === 2013-07-27 08:02:13,127 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header

      Comment


        #4
        The log shows that we ask Postgres for a list of tables, and it includes "USERS", but when we ask Postgres for the columns it says there aren't any.

        This might be because the username/password you are using is not allowed to access table metadata. Or it could be a bug in Postgres or your JDBC driver.

        Regardless, you should probably go ahead and try a manual ds.xml definition targeting the "USERS" table and see if that works normally.

        Comment


          #5
          Error when I try to create data source from visual builder:
          java.lang.Exception: table USERS does not exist or contains no columns.
          at com.isomorphic.sql.SQLDSGenerator.getFieldsFromTable(SQLDSGenerator.java:335)
          at com.isomorphic.sql.SQLDSGenerator.generate(SQLDSGenerator.java:173)
          at com.isomorphic.sql.SQLDataSource.getConfigFromTable(SQLDataSource.java:2906)
          at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:2855)
          at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:2839)
          at com.isomorphic.tools.BuiltinRPC.getDataSourceFromTable(BuiltinRPC.java:100)
          at com.isomorphic.tools.BuiltinRPC.getDataSourceJSONFromTable(BuiltinRPC.java:120)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:972)
          at com.<br><br>...(2507 bytes truncated - set isc.RPCManager.maxErrorMessageLength > 1000 to see more or check the Developer Console for full error)...


          server log:
          23:12:07.626:MUP3:WARN:DSWizard:isc_DSWizard_0:for page: 0 got pageId: StartPage called enter function: enterStartPage, view is: [TreePalette ID:isc_DSWizard_0_dsTypePicker]
          23:12:23.430:MUP4:WARN:Button:isc_DatabaseBrowser_0_selectButton:Widget initialized with explicitly specified 'enabled' property. This property has been deprecated - use 'disabled' instead.
          23:12:23.617:MUP4:WARN:RecordEditor:isc_DatabaseBrowser_0_dataGridfilterEditor:No editable fields in this record editor. Check the 'canFilter' property for each field in isc_DatabaseBrowser_0_dataGrid
          23:12:31.269:MDN5:WARN:RecordEditor:isc_DatabaseBrowser_0_dataGridfilterEditor:ListGrid showing inline editor. Unable to get a pointer to the edit form item for field:null
          23:12:33.470:XRP3:WARN:RPCManager:java.lang.Exception: table USERS does not exist or contains no columns.
          at com.isomorphic.sql.SQLDSGenerator.getFieldsFromTable(SQLDSGenerator.java:335)
          at com.isomorphic.sql.SQLDSGenerator.generate(SQLDSGenerator.java:173)
          at com.isomorphic.sql.SQLDataSource.getConfigFromTable(SQLDataSource.java:2906)
          at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:2855)
          at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:2839)
          at com.isomorphic.tools.BuiltinRPC.getDataSourceFromTable(BuiltinRPC.java:100)
          at com.isomorphic.tools.BuiltinRPC.getDataSourceJSONFromTable(BuiltinRPC.java:120)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:972)
          at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:804)
          at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:309)
          at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
          at org.apache.jsp.tools.visualBuilder.vbOperations_jsp._jspService(vbOperations_jsp.java:85)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(JSSyntaxScannerFilter.java:251)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
          at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
          at java.lang.Thread.run(Thread.java:722)
          undefined - response: {operationId: "custom",
          clientContext: undef,
          context: Obj,
          transactionNum: 11,
          httpResponseCode: 200,
          httpResponseText: "//isc_RPCResponseStart-->[{status:-1,dat..."[3702],
          xmlHttpRequest: [object XMLHttpRequest],
          transport: "xmlHttpRequest",
          status: -1,
          clientOnly: undef,
          httpHeaders: Obj,
          isStructured: true,
          callbackArgs: null,
          results: Obj,
          data: "java.lang.Exception: table USERS does no..."[3507]}

          Comment


            #6
            I tried to connect my postgres database using jdbc driver and NetBeans. From NetBeans driver works properly. I could see table's rows and modify it.
            I think problem somewhere in SmartClient connection.

            It is very strange. From Admin console I could see that connection is correct. In Database browser I see tables but I couldn't see rows. Although the error message says:

            "An error occurred when executing this operation on the server.
            Exception details are as follows:
            java.lang.Exception: table USER does not exist or contains no columns."

            But I see the name of columns in Database browser...

            I tried different ways to create database connection, using different computers but had the same result.

            Comment


              #7
              I installed MySQL DB and made the connection from Admin console. Connection work fine. I could see tables content.
              Postgres connection doesn't work.

              Comment


                #8
                manual ds.xml definition doesn't work (PostgreSQL DB)

                usersDS.ds.xml

                <DataSource ID="usersDS" dataFormat="iscServer" serverType="sql" dbName="PG_DB_1" schema="public" tableName="USERS" autoDeriveSchema="true">
                <fields>
                <field name="USER_ID" type="character" length="20" title="ID" primaryKey="true"/>
                <field name="USER_NAME" type="character" length="100" title="NAME"/>
                <field name="USER_TYPE" type="character" length="100" title="TYPE"/>
                </fields>
                </DataSource>
                --------------------------------------
                Server log:
                === 2013-07-29 15:05:06,681 [sor4] INFO RequestContext - URL: '/MY/index.jsp', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                === 2013-07-29 15:05:06,686 [sor4] DEBUG PoolableDataSourceFactory - Discarding stale DataSource of type 'usersDS'
                === 2013-07-29 15:05:06,687 [sor4] DEBUG ProcessedFileCache - STALE object for file 'D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\shared\ds\usersDS.ds.xml', reloading (file timestamp 1375110298049, cache timestamp 1375110225046)
                === 2013-07-29 15:05:06,690 [sor4] DEBUG XML - Parsed XML from D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\shared\ds\usersDS.ds.xml: 1ms
                === 2013-07-29 15:05:06,692 [sor4] INFO SQLDataSource - Deriving dataSource usersDS from table: USERS
                === 2013-07-29 15:05:06,693 [sor4] DEBUG SQLConnectionManager - Borrowed connection '100812213'
                === 2013-07-29 15:05:06,693 [sor4] INFO SQLDSGenerator - Fetching column metadata for table: USERS
                === 2013-07-29 15:05:06,693 [sor4] INFO SQLDSGenerator - =============Using catalog: PG_DB_1
                === 2013-07-29 15:05:06,697 [sor4] INFO SQLDSGenerator - Fetching column metadata for USERS complete
                === 2013-07-29 15:05:06,697 [sor4] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "100812213"
                === 2013-07-29 15:05:06,697 [sor4] ERROR LoadDSTag - Exception while attempting to process a loadDS tag.
                === 2013-07-29 15:05:25,888 [sor4] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                === 2013-07-29 15:05:25,898 [sor4] INFO Compression - /isomorphic/IDACall: 81 -> 86 bytes
                === 2013-07-29 15:05:25,961 [sor4] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                ------------------
                what am I doing wrong?

                Comment


                  #9
                  index.jsp

                  <%@ taglib uri="isomorphic" prefix="isomorphic" %>
                  <HTML>
                  <HEAD>
                  <isomorphic:loadISC skin="standard"/>
                  </HEAD>
                  <BODY>
                  <SCRIPT>
                  <isomorphic:loadDS ID="usersDS"/>
                  </SCRIPT>
                  <script src="users.js"></script>
                  </BODY>
                  </HTML>
                  ---------------------------------

                  users.js

                  isc.ListGrid.create({
                  ID: "usersList",
                  left: 50, top: 50,
                  width: 500,
                  dataSource: usersDS
                  });

                  isc.DynamicForm.create({
                  ID: "usersForm",
                  left: 50, top: 200,
                  width: 300,
                  dataSource: usersDS
                  });

                  Comment


                    #10
                    autoDeriveSchema="true" is going to run into the same problem with retrieving table metadata you had before, so remove that attribute to test whether you can retrieve just the data.

                    However we may know what the problem is - it looks like you may have created this table with something like:

                    Code:
                    create table "USERS" ...
                    .. the quotes around "USERS" causes the database to treat the table name as case sensitive, and in this case our code must use uppercase USERS. Whereas if you had done:

                    Code:
                    create table USERS ...
                    .. then our code *must* use lowercase "users" - uppercase "USERS" would be rejected by Postgres.

                    As you can see, this creates a dilemma in our server framework and in any code that accessed your tables - we don't know whether to take your "USERS" table name as really uppercase or not. Best practice is to simply not quote your table names when creating tables.

                    Comment


                      #11
                      Thank You. It solve the problem.
                      I created tables from pgAdmin III, not from direct SQL.
                      When I input USER, it generates sql: create table "USER".
                      If I input direct SQL: create table USER, it creates table user.
                      So the right way to create tables in Postgre is use only lowercase in the name of tables, colums and constraints.

                      Comment


                        #12
                        I created users.ds.xml using VisualBuilder:
                        <DataSource
                        schema="public"
                        testFileName="users.data.xml"
                        dbName="PG_DB_1"
                        tableName="users"
                        ID="users"
                        dataSourceVersion="1"
                        generatedBy="v9.0p_2013-07-24/EVAL Deployment 2013-07-24"
                        serverType="sql"
                        >
                        <fields>
                        <field sqlType="char" primaryKey="true" sqlLength="20" name="user_id" length="20" type="text"></field>
                        <field sqlType="char" sqlLength="100" name="user_name" length="100" type="text"></field>
                        <field sqlType="char" sqlLength="100" name="type" length="100" type="text"></field>
                        </fields>
                        </DataSource>

                        And I'm trying to see table user from ListGrid:

                        index.jsp
                        <%@ taglib uri="isomorphic" prefix="isomorphic" %>
                        <HTML>
                        <HEAD>
                        <isomorphic:loadISC skin="standard"/>
                        </HEAD>
                        <BODY>
                        <SCRIPT>
                        <isomorphic:loadDS ID="users"/>
                        </SCRIPT>
                        <script src="users.js"></script>
                        </BODY>
                        </HTML>

                        users.js

                        isc.ListGrid.create({
                        ID: "usersList",
                        left: 50, top: 50,
                        width: 500,
                        dataSource: users
                        });

                        Browser shows empty Listgrid and message 'No items to show'.
                        From Admin console I see table content.
                        ---------------------------------
                        server log:
                        === 2013-07-30 10:08:42,661 [sor7] INFO RequestContext - URL: '/MY/index.jsp', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                        === 2013-07-30 10:08:42,666 [sor7] INFO JSSyntaxScannerFilter - /MY/index.jsp: scanning <script> tags in html output
                        === 2013-07-30 10:08:42,668 [sor7] INFO Compression - /MY/index.jsp: 2247 -> 672 bytes
                        === 2013-07-30 10:08:42,731 [sor7] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Core.js
                        === 2013-07-30 10:08:42,737 [sor2] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Forms.js
                        === 2013-07-30 10:08:42,766 [sor4] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Foundation.js
                        === 2013-07-30 10:08:42,767 [sor3] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Containers.js
                        === 2013-07-30 10:08:42,770 [sor6] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Grids.js
                        === 2013-07-30 10:08:42,799 [sor8] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_DataBinding.js
                        === 2013-07-30 10:08:43,053 [sor4] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\system\modules\ISC_Drawing.js
                        === 2013-07-30 10:08:43,054 [sor6] INFO JSSyntaxScannerFilter - /MY/users.js: scanning js source
                        === 2013-07-30 10:08:43,058 [sor8] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\skins\standard\load_skin.js
                        === 2013-07-30 10:08:43,083 [sor8] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\skins\standard\skin_styles.css
                        === 2013-07-30 10:08:43,147 [sor8] INFO Download - Returning 304: Not modified on conditional get of: D:\SmartClient\SmartClient_v90p_2013-07-24\smartclientSDK\isomorphic\skins\standard\images\blank.gif
                        === 2013-07-30 10:08:48,950 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                        === 2013-07-30 10:08:48,959 [sor8] INFO Compression - /isomorphic/IDACall: 81 -> 86 bytes
                        === 2013-07-30 10:08:49,037 [sor8] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36': Safari with Accept-Encoding header
                        ----------
                        Help me solve this problem

                        Comment


                          #13
                          See this FAQ for a comprehensive list of ways you can get your DataSource loading wrong (it applies to SmartClient as well as SmartGWT).

                          Comment


                            #14
                            Thank you. I missed
                            usersList.fetchData();

                            Comment

                            Working...
                            X