Announcement

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

    SmartGwt EE, insert into ERROR

    Hello All,

    I'm using MS-SQL 2005 DB, Smart GWT EE 2.2 (eval 2010-05-18)
    when i do edit , it works OK.
    when i do insert, it works, the DB is updated, but the grid still marks the row as not saved yet (blue font) and i get the following exception on the log file of the tomcat:

    === 2010-05-19 14:43:37,218 [55-1] INFO SQLDriver - [builtinApplication.worldDS_add] Executing SQL update on 'SQLServer': INSERT INTO worldDS (countryName, area, countryCode, continent, government, capital) VALUES ('Jordan', 4.2, '975', 'Asia', 'Kingdom', 'Amman')
    === 2010-05-19 14:43:37,218 [55-1] DEBUG SQLDataSource - [builtinApplication.worldDS_add] add operation affected 1 rows
    === 2010-05-19 14:43:37,218 [55-1] INFO SQLDriver - [builtinApplication.worldDS_add] Executing SQL query on 'SQLServer': SELECT SCOPE_IDENTITY()
    === 2010-05-19 14:43:37,218 [55-1] WARN RequestContext - dsRequest.execute() failed:
    java.lang.NullPointerException
    at com.isomorphic.sql.SQLServerDriver.fetchLastPrimaryKeys(SQLServerDriver.java:174)
    at com.isomorphic.sql.SQLDataSource.getLastPrimaryKeys(SQLDataSource.java:490)
    at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:377)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1217)
    at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:243)
    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:1298)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
    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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    at java.lang.Thread.run(Thread.java:619)

    i have attached the entry point class ( the only class in the project), the server property file, web xml and the DS xml file.

    Please help!

    Thanks
    Ahmad

    EDIT::
    here is the DB table script :

    USE [smartGWT]
    GO
    /****** Object: Table [dbo].[worldDS] Script Date: 05/19/2010 16:50:15 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[worldDS](
    [PK] [int] IDENTITY(1,1) NOT NULL,
    [CountryName] [nvarchar](150) NOT NULL,
    [Area] [float] NULL,
    [GDP] [float] NULL,
    [Continent] [nvarchar](150) NULL,
    [CountryCode] [nvarchar](150) NULL,
    [Independence] [datetime] NULL,
    [Government] [nvarchar](150) NULL,
    [Capital] [nvarchar](150) NULL,
    [Population] [int] NULL,
    [Member_G8] [bit] NULL,
    CONSTRAINT [PK_worldDS] PRIMARY KEY CLUSTERED
    (
    [PK] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    Attached Files
    Last edited by ahmad.igbaria; 19 May 2010, 05:52.

    #2
    We have tried to duplicate this problem with both the current SmartClient mainline and the specific SmartGWT EE build you refer to, using your exact table definition, and connecting to both SQL Server 2005 and SQL Server 2008. We are unable to reproduce it.

    The error you are getting would seem to imply that the SELECT SCOPE_IDENTITY() you can see in the log immediately above the error is returning null. This is not supposed to happen; according to the documentation, SCOPE_IDENTITY() only returns null if there has been no INSERT in the current scope, which is not the case here (as you state, the record is inserted into the table).

    There is a known parallelism bug with SCOPE_IDENTITY() in SQL Server 2005 which is conceivably at the heart of this (discussed here). Can you try setting your maximum degree of parallelism to 1 and let us know if that solves the problem? Either way, please post the exact edition and version number of your database server.

    Comment


      #3
      Hi,

      first i want to ask, did my code worked in your machine?

      yes i have set the maximum degree of parallelism to 1, but it gave the save result. (DB added new record with new ID, the grid font is still blue, if i edit the new row in the grid, a new row in the DB will be created, when i do refresh to the page , i will see the 2 new rows , edited1 and edited2, which were the same row before)

      I'm attaching a screen-shots of my server info
      Attached Files

      Comment


        #4
        Hi Isomorphic,

        I'm trying to switch from mysql 5 to sqlserver 2008 (10.0.1600) but get the same error. New row is inserted into the DB (including key) but I get an exception.

        Connection is over TCPIP from MacOS to WINXP.
        SmartClient Version: SC_SNAPSHOT-2010-07-17/EVAL Deployment
        Microsoft SQL Server JDBC Driver 3.0 (sqljdbc4.jar)
        Java 1.6.0_20

        ***************************************************

        In the Admin Console I get the message: (after click browse on table)
        An error occurred when executing this operation on the server.
        Exception details are as follows:
        com.microsoft.sqlserver.jdbc.SQLServerException: Can't convert from from "char" in "SMALLINT".

        The strange thing is that there is no column of type "char". only nvarchar, datetime and int.

        ***************************************************

        The PK
        <field detail="false" title="pkID" primaryKey="true" name="pkid" type="sequence"></field>
        is from typ INT.

        Do you have any hints for solving the problem?


        ***************************************************

        === 2010-07-29 00:43:45,608 [l0-2] INFO SQLDriver - [builtinApplication.DSB2BFH_add] Executing SQL update on 'SQLServer': INSERT INTO dbo.B2B_FH (..........
        === 2010-07-29 00:43:45,630 [l0-2] DEBUG SQLDataSource - [builtinApplication.DSB2BFH_add] add operation affected 1 rows
        === 2010-07-29 00:43:45,630 [l0-2] INFO SQLDriver - [builtinApplication.DSB2BFH_add] Executing SQL query on 'SQLServer': SELECT SCOPE_IDENTITY()
        === 2010-07-29 00:43:45,633 [l0-2] WARN RequestContext - dsRequest.execute() failed:
        java.lang.NullPointerException
        at com.isomorphic.sql.SQLServerDriver.fetchLastPrimaryKeys(SQLServerDriver.java:176)
        at com.isomorphic.sql.SQLDataSource.getLastPrimaryKeys(SQLDataSource.java:506)
        at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:393)
        at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1230)
        at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:249)
        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:1336)
        at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
        at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
        at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

        Thanks,
        Timo

        Comment


          #5
          Did you generate this table via the Admin Console or is it a pre-existing table? If it's pre-existing, please show the SQL schema.

          What exact steps are you taking in the Admin Console when you see that error?

          Can you show the complete logs for the interaction that ends in an NPE. Note, the NPE means basically that "SELECT SCOPE_IDENTITY()" returned nothing. This is not supposed to happen if the insert succeeds, which it appears to have according to the logs you've shared so far.

          Comment


            #6
            Hi Isomorphic,

            Originally posted by Isomorphic
            What exact steps are you taking in the Admin Console when you see that error?
            ---- WIN XP ----
            1) download/install Microsoft® SQL Server 2008 Express with Advanced Services (10.00.1600) from http://www.microsoft.com/downloads/d...0-1311d670e336 ON >>Windows XP<<
            2) activate TCP/IP connections from remote machine on port 1433
            3) restart sqlserver
            4) create new database with one table named "test2" (@attachment createTableTEST2.txt)

            ---- MAC OS ----

            5) unpack new tomcat 6.0.24
            6) download/unpack last version of sgwt http://www.smartclient.com/builds/sm...al/2010-07-30/
            7) download/unpack Microsoft SQL Server JDBC Driver 3.0 from http://www.microsoft.com/downloadS/d...displaylang=en
            8) copy sqljdbc4.jar! (because of the jre6) to apache-tomcat-6.0.24/lib
            9) copy your showcase.war to apache-tomcat-6.0.24/webapps
            10) start tomcat
            11) start http://localhost:8080/showcase/showc...minConsole.jsp
            12) changed Database "SQLServer" settings (attachment Screen shot 2010-07-30 at 22.17.34.png):
            a) Driver Implementer: com.microsoft.sqlserver.jdbc.SQLServerDriver
            b) Driver URL: jdbc:sqlserver://.....
            13) click sat As Default Database (1), save (2), restart tomcat (3) and restart browser (4)
            14) click button browse
            15) clicking on the left side to the table test2 and the error appears (attachment Screen shot conversion.png)

            Code:
            === 2010-07-30 21:48:30,335 [80-6] DEBUG PoolableSQLConnectionFactory - DriverManager fetching connection for SQLServer via jdbc url jdbc:sqlserver://WINXP:1433;databaseName=payf;User=sa;Password=xx
            === 2010-07-30 21:48:30,336 [80-6] DEBUG PoolableSQLConnectionFactory - Passing JDBC URL only to getConnection
            === 2010-07-30 21:48:30,370 [80-6] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection
            === 2010-07-30 21:48:30,370 [80-6] WARN  SQLDSGenerator - Fetching column metadata for table: test2
            === 2010-07-30 21:48:30,370 [80-6] WARN  SQLDSGenerator - =============Using catalog: payf
            === 2010-07-30 21:48:30,721 [80-6] DEBUG RPCDMI - Invocation threw exception
            com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from char to SMALLINT is unsupported.
            	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
            	at com.microsoft.sqlserver.jdbc.DataTypes.throwConversionError(DataTypes.java:1117)
            	at com.microsoft.sqlserver.jdbc.IntColumnIdentityFilter.apply(SQLServerDatabaseMetaData.java:2320)
            	at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:114)
            	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1981)
            	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1966)
            	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getObject(SQLServerResultSet.java:2255)
            	at com.isomorphic.sql.SQLTransform.toAttributeMap(SQLTransform.java:83)
            	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:457)
            	at com.isomorphic.sql.SQLTransform.toListOfMapsOrBeans(SQLTransform.java:291)
            	at com.isomorphic.sql.SQLTransform.toListOfMaps(SQLTransform.java:269)
            	at com.isomorphic.sql.SQLTransform.toListOfMaps(SQLTransform.java:214)
            	at com.isomorphic.sql.SQLMetaData.getColumnMetaData(SQLMetaData.java:299)
            	at com.isomorphic.sql.SQLDSGenerator.getFieldsFromTable(SQLDSGenerator.java:321)
            	at com.isomorphic.sql.SQLDSGenerator.generate(SQLDSGenerator.java:169)
            	at com.isomorphic.sql.SQLDataSource.getConfigFromTable(SQLDataSource.java:1942)
            	at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:1890)
            	at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:1869)
            	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:39)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            	at java.lang.reflect.Method.invoke(Method.java:597)
            	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
            	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:734)
            	at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:305)
            	at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
            	at org.apache.jsp.showcase.tools.adminConsoleOperations_jsp._jspService(adminConsoleOperations_jsp.java:104)
            	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
            	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
            	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
            	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
            	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
            	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
            	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
            	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
            	at java.lang.Thread.run(Thread.java:637)
            Originally posted by Isomorphic
            Did you generate this table via the Admin Console or is it a pre-existing table? If it's pre-existing, please show the SQL schema.
            I have tried both.

            1) i changed the server.property configuration from mysql in sqlserver within my sgwt project (properties from adminConsole)
            sql.SQLServer.driver.networkProtocol: tcp
            sql.SQLServer.interface.credentialsInURL: true
            sql.SQLServer.driver.serverName: Embedded in JDBC URL
            sql.SQLServer.driver.url: jdbc:sqlserver://WINXP:1433;databaseName=payf;User=sa;Password=...
            sql.SQLServer.driver.context: _container_
            sql.SQLServer.interface.type: driverManager
            sql.SQLServer.driver.driverType: thin
            sql.SQLServer.autoJoinTransactions: true
            sql.SQLServer.driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
            sql.SQLServer.database.type: sqlserver

            2) i converted the mysql table B2B_FH into sql server (@attachment createTableB2B_FH.txt and DSB2BFH.ds.xml)
            3) I changed the values for the two attributes, everything else remained the same:
            a) schema
            b) dbName from Mysql to SQLServer


            Originally posted by Isomorphic
            Can you show the complete logs for the interaction that ends in an NPE. Note, the NPE means basically that "SELECT SCOPE_IDENTITY()" returned nothing. This is not supposed to happen if the insert succeeds, which it appears to have according to the logs you've shared so far.
            Code:
            === 2010-07-30 23:31:20,440 [0-11] INFO  IDACall - Performing 1 operation(s)
            === 2010-07-30 23:31:20,442 [0-11] DEBUG AppBase - [builtinApplication.DSB2BFH_add] No userTypes defined, allowing anyone access to all operations for this application
            === 2010-07-30 23:31:20,442 [0-11] DEBUG AppBase - [builtinApplication.DSB2BFH_add] No public zero-argument method named '_DSB2BFH_add' found, performing generic datasource operation
            === 2010-07-30 23:31:20,442 [0-11] INFO  SQLDataSource - [builtinApplication.DSB2BFH_add] Performing add operation with
            	criteria: {}	values: {technicalfieldlastupdate:new Date(1280525480441),technicalfieldcreated:new Date(1280525480441),filedttm:new Date(1280525478000),filebusdt:new Date(1280440800000),filecycleno:4,fileref:"EBASCF1007302331",rcvginst:"AAV",sndginst:"EBADDDD",ftype:"SCF",srvcid:"SCT",routingind:"DIR",SCHEMATYP:"EBA",tstcode:"T",client:"HVB",useridLastupdate:"test",useridCreator:"test",technicalfieldautocreated:"false",environment:"Test",archive:"false"}
            === 2010-07-30 23:31:20,443 [0-11] DEBUG SQLValuesClause - [builtinApplication.DSB2BFH_add] Sequences: {pkid=__default}
            === 2010-07-30 23:31:20,444 [0-11] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BFH_add] DriverManager fetching connection for SQLServer via jdbc url jdbc:sqlserver://WINXP:1433;databaseName=payf;User=sa;Password=xxx
            === 2010-07-30 23:31:20,444 [0-11] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BFH_add] Passing JDBC URL only to getConnection
            === 2010-07-30 23:31:20,471 [0-11] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BFH_add] Returning pooled Connection
            === 2010-07-30 23:31:20,471 [0-11] INFO  SQLDriver - [builtinApplication.DSB2BFH_add] Executing SQL update on 'SQLServer': INSERT INTO dbo.B2B_FH (useridLastupdate, fileref, technicalfieldautocreated, client, useridCreator, technicalfieldlastupdate, technicalfieldcreated, filedttm, routingind, filecycleno, environment, rcvginst, tstcode, sndginst, archive, srvcid, ftype, SCHEMATYP, filebusdt) VALUES ('test', 'EBASCF1007302331', 'false', 'HVB', 'test', '2010-07-30 23:31:20.441', '2010-07-30 23:31:20.441', '2010-07-30 23:31:18.0', 'DIR', 4, 'Test', 'aabbc', 'T', 'EBADDDD', 'false', 'SCT', 'SCF', 'EBA', '2010-07-30 00:00:00.0')
            === 2010-07-30 23:31:20,486 [0-11] DEBUG SQLDataSource - [builtinApplication.DSB2BFH_add] add operation affected 1 rows
            === 2010-07-30 23:31:20,488 [0-11] INFO  SQLDriver - [builtinApplication.DSB2BFH_add] Executing SQL query on 'SQLServer': SELECT SCOPE_IDENTITY()
            === 2010-07-30 23:31:20,490 [0-11] DEBUG DataSourceDMI - Invocation threw exception
            java.lang.NullPointerException
            	at com.isomorphic.sql.SQLServerDriver.fetchLastPrimaryKeys(SQLServerDriver.java:176)
            	at com.isomorphic.sql.SQLDataSource.getLastPrimaryKeys(SQLDataSource.java:515)
            	at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:402)
            	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1239)
            	at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
            	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:1382)
            	at com.payf.server.ds.DataSourceAccess.addRecord(DataSourceAccess.java:57)
            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            	at java.lang.reflect.Method.invoke(Method.java:597)
            	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
            	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
            	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
            	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
            	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
            	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
            	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.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
            	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:355)
            	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at com.payf.server.authentication.payfConcurrentSessionFilter.doFilter(payfConcurrentSessionFilter.java:80)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
            	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
            	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)
            === 2010-07-30 23:31:20,491 [0-11] WARN  RequestContext - dsRequest.execute() failed: 
            java.lang.NullPointerException
            	at com.isomorphic.sql.SQLServerDriver.fetchLastPrimaryKeys(SQLServerDriver.java:176)
            	at com.isomorphic.sql.SQLDataSource.getLastPrimaryKeys(SQLDataSource.java:515)
            	at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:402)
            	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1239)
            	at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
            	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:1382)
            	at com.payf.server.ds.DataSourceAccess.addRecord(DataSourceAccess.java:57)
            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            	at java.lang.reflect.Method.invoke(Method.java:597)
            	at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
            	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
            	at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
            	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
            	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
            	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
            	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.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
            	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:355)
            	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at com.payf.server.authentication.payfConcurrentSessionFilter.doFilter(payfConcurrentSessionFilter.java:80)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
            	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
            	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)
            === 2010-07-30 23:31:20,492 [0-11] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
            === 2010-07-30 23:31:20,492 [0-11] DEBUG RPCManager - non-DMI response, dropExtraFields: false

            I hope that this information help.
            Cheers,
            Timo
            Attached Files
            Last edited by tmoes; 1 Aug 2010, 01:40.

            Comment


              #7
              Hello Isomorphic,

              can you give me feedback on this issue, please.
              It is very important for me to know when the problem can be solved.

              Thanks,
              Timo

              Comment


                #8
                It turns out that SCOPE_IDENTITY() is completely broken in all JDBC drivers from Microsoft since one released in 2000 which can no longer be downloaded from Microsoft (yes, really).

                Download 2.3, we implemented a workaround there.

                Comment


                  #9
                  many thanks for the workaround, it works now.
                  I also love microsoft for the great work and compatibility. :-)

                  Comment


                    #10
                    hi Isomorphic,

                    it's me again :-) Unfortunately I have found a new sqlserver/sgwt bug.

                    I try to describe it:
                    After an update of the Listgrid sentence, the user-specific data (from DMI Method) can not be displayed.
                    (http://www.smartclient.com/smartgwtee/showcase/#sql_user_specific_data_gridview) In my case, the time of last update is inject.

                    The update functions very well only the values of the DMI Call are not indicated.

                    SQL Server 2008
                    Code:
                    === 2010-08-10 19:10:09,034 [l0-4] INFO  IDACall - Performing 1 operation(s)
                    === 2010-08-10 19:10:09,034 [l0-4] DEBUG AppBase - [builtinApplication.DSB2BBH_update] No userTypes defined, allowing anyone access to all operations for this application
                    === 2010-08-10 19:10:09,034 [l0-4] DEBUG AppBase - [builtinApplication.DSB2BBH_update] No public zero-argument method named '_DSB2BBH_update' found, performing generic datasource operation
                    === 2010-08-10 19:10:09,035 [l0-4] INFO  SQLDataSource - [builtinApplication.DSB2BBH_update] Performing update operation with
                    									criteria: {pkid:691}	values: {fkbhid:767,bhtyp:"pacs_008",client:"TST",useridCreator:"test",ttintrbksttlmamt:55.0,ttintrbksttlmamtccy:"EUR",technicalfieldlastupdate:new Date(1281460193000),technicalfieldcreated:new Date(1281460193000),credttm:new Date(1281460193000),orgnlNbOfTxs:1,intrbksttlmdt:new Date(1281391200000),sttlminfclrsysprtry:"ST2",SCHEMATYP:"EBA",sttlminfsttlmmtd:"CLRG",useridLastupdate:"test",msgid:"EBASCF1008101909GH0001",technicalfieldautocreated:false,rowID:1,bhversion:"2010",instdagtfininstnidbic:"HYVEDEM0",environment:"Test",technicalfieldtxcounter:0,pkid:691,archive:false,ftype:"SCF",nboftxs:1,_selection_38:true}
                    === 2010-08-10 19:10:09,035 [l0-4] INFO  SQLValuesClause - [builtinApplication.DSB2BBH_update] Ignored data for non-existent columns: [rowID, _selection_38]
                    === 2010-08-10 19:10:09,036 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update] DriverManager fetching connection for mainDataBase via jdbc url jdbc:sqlserver://......:1433;databaseName=payf;User=sa;Password=payf
                    === 2010-08-10 19:10:09,036 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update] Passing JDBC URL only to getConnection
                    === 2010-08-10 19:10:09,065 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update] Returning pooled Connection
                    === 2010-08-10 19:10:09,065 [l0-4] INFO  SQLDriver - [builtinApplication.DSB2BBH_update] Executing SQL update on 'mainDataBase': UPDATE payf.B2B_BH SET fkbhid=767, msgid='EBASCF1008101909GH0001', useridLastupdate='test', technicalfieldautocreated='false', client='TST', bhtyp='pacs_008', useridCreator='test', ttintrbksttlmamt=55.0, technicalfieldlastupdate='2010-08-10 19:09:53.0', ttintrbksttlmamtccy='EUR', technicalfieldcreated='2010-08-10 19:09:53.0', credttm='2010-08-10 19:09:53.0'  WHERE (B2B_BH.pkid='691')
                    === 2010-08-10 19:10:09,075 [l0-4] DEBUG SQLDataSource - [builtinApplication.DSB2BBH_update] update operation affected 1 rows
                    === 2010-08-10 19:10:09,075 [l0-4] INFO  SQLDataSource - [builtinApplication.DSB2BBH_update] primaryKeys: {pkid=0}
                    === 2010-08-10 19:10:09,075 [l0-4] INFO  SQLDataSource - [builtinApplication.DSB2BBH_update] mainDataBase getLastRow(): using default operationBinding
                    === 2010-08-10 19:10:09,076 [l0-4] DEBUG AppBase - [builtinApplication.DSB2BBH_update, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                    === 2010-08-10 19:10:09,076 [l0-4] DEBUG AppBase - [builtinApplication.DSB2BBH_update, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                    === 2010-08-10 19:10:09,076 [l0-4] INFO  SQLDataSource - [builtinApplication.DSB2BBH_update, builtinApplication.null] Performing fetch operation with
                    									criteria: {pkid:0}	values: {pkid:0}
                    === 2010-08-10 19:10:09,077 [l0-4] INFO  SQLDataSource - [builtinApplication.DSB2BBH_update, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE B2B_BH.client = $session.client AND B2B_BH.environment = $session.environment  AND ($defaultWhereClause)
                    === 2010-08-10 19:10:09,077 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update, builtinApplication.null] DriverManager fetching connection for mainDataBase via jdbc url jdbc:sqlserver://poweruser.doesntexist.org:1433;databaseName=payf;User=sa;Password=payf
                    === 2010-08-10 19:10:09,077 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update, builtinApplication.null] Passing JDBC URL only to getConnection
                    === 2010-08-10 19:10:09,101 [l0-4] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSB2BBH_update, builtinApplication.null] Returning pooled Connection
                    === 2010-08-10 19:10:09,101 [l0-4] INFO  SQLDriver - [builtinApplication.DSB2BBH_update, builtinApplication.null] Executing SQL query on 'mainDataBase': SELECT B2B_BH.ctrlsum, B2B_BH.client, B2B_BH.bhtyp, B2B_BH.orgnlMsgId, B2B_BH.grpSts, B2B_BH.userdefinedfields4, B2B_BH.userdefinedfields3, B2B_BH.ttintrbksttlmamt, B2B_BH.technicalfieldlastupdate, B2B_BH.userdefinedfields5, B2B_BH.technicalfieldcreated, B2B_BH.userdefinedfields2, B2B_BH.orgnlNbOfTxs, B2B_BH.userdefinedfields1, B2B_BH.nbOfTxsPerSts2DtldNbOfTxs, B2B_BH.sttlminfclrsysprtry, B2B_BH.SCHEMATYP, B2B_BH.msgid, B2B_BH.technicalfieldautocreated, B2B_BH.status, B2B_BH.nbOfTxsPerSts2DtldSts, B2B_BH.stsRsnInfRsnCd, B2B_BH.environment, B2B_BH.pkid, B2B_BH.ftype, B2B_BH.fkbhid, B2B_BH.stsRsnInfOrgtrIdOrgIdBICOrBEI, B2B_BH.useridCreator, B2B_BH.ttintrbksttlmamtccy, B2B_BH.conf, B2B_BH.credttm payf.B2B_BH WHERE B2B_BH.client = 'TST' AND B2B_BH.environment = 'Test'  AND ((B2B_BH.pkid='0'))
                    === 2010-08-10 19:10:09,225 [l0-4] INFO  DSResponse - [builtinApplication.DSB2BBH_update, builtinApplication.null] DSResponse: List with 0 items
                    === 2010-08-10 19:10:09,226 [l0-4] INFO  DSResponse - [builtinApplication.DSB2BBH_update] DSResponse: List with 0 items
                    === 2010-08-10 19:10:09,226 [l0-4] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                    === 2010-08-10 19:10:09,227 [l0-4] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                    === 2010-08-10 19:10:09,227 [l0-4] INFO  Compression - /payfXMLCreator/payfxmlcreator/sc/IDACall: 105 -> 104 bytes
                    As you can see after the update, the Primary Key is set to ZERO. (2010-08-10 19:10:09,076)
                    Thus, the updated values are not transmitted to the GUI. (2010-08-10 19:10:09,225)

                    Screenshot before Update: (Screen shot 2010-08-10 at 20.36.33.png)
                    Screenshot after Update: (Screen shot 2010-08-10 at 20.37.11.png)

                    With mysql, there is no such problem.

                    Can you fix this?

                    Thanks,
                    Timo
                    Attached Files

                    Comment


                      #11
                      This has been fixed, please grab the next nightly. Thanks for the clear logs and complete information.

                      Comment


                        #12
                        works very well. thanks for the quick fix

                        Comment

                        Working...
                        X