I found a regression in nightly build 2010.10.11. In the nightly build I got a NullPointerException with the following server side code:
DMI:
Datasource:
Exception/Log:
With the nighlty build 2010.08.22 the code is working.
Regards
Chris
DMI:
Code:
public DSResponse add(DSRequest dsRequest) throws Exception { DSResponse dsResponse = null; SQLDataSource dsLogin = null; DataSource dsLoginType = null; DataSource dsLoginSkill = null; DataSource dsSystem = null; try { dsLogin = (SQLDataSource) DataSourceManager .get(Consts.DS_SERVER_LOGIN); //NullPointer dsResponse = dsLogin.execute(dsRequest); //some code
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource ID="server_login" serverType="sql" tableName="sdm$vi_web_login"> <fields> <field name="log_sym_id" type="integer" detail="true" /> <field name="log_login" title="Login" type="text" length="200" /> <field name="log_id" type="sequence" sequenceName="sdm$se_login" detail="true" primaryKey="true" /> <field name="log_valid_from" title="Gültig von" type="date" required="true" /> <field name="log_valid_to" title="Gültig bis" type="date" required="true" /> <field name="log_emp_id" type="integer" detail="true" /> <field name="log_sub_sym_id" title="CTI-Standort" type="integer" detail="true" /> <field name="log_lop_id" title="IRRP-Profile" type="integer" detail="true" /> <field name="log_low_id" title="IRRP-Workmode" type="integer" detail="true" /> <field name="log_substation" title="Nebenstelle" type="text" detail="true" /> <field name="log_request_by" title="Anfrage von" type="text" detail="true" /> <field name="log_request_date" title="Anfrage am" type="date"></field> <field name="log_creation_by" title="Erzeugt von" type="text" required="false"></field> <field name="log_creation_date" title="Erzeugt am" type="date" required="false"></field> <field name="log_deletion_by" title="Gelöscht von" type="text" required="false"></field> <field name="log_deletion_date" title="Gelöscht am" type="date" required="false"></field> <field name="log_description" title="Beschreibung" type="text" required="false"></field> <field name="log_is_used_from" title="" type="date" required="false"></field> <field name="log_is_used_to" title="" type="date" required="false"></field> <field name="log_lot_id" title="Logintyp" type="integer" required="true"></field> </fields> </DataSource>
Code:
=== 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - adaptArgsAndInvoke: public com.isomorphic.datasource.DSResponse de.sdom.frontend.server.dmi.AMLoginCreateDMI.add(com.isomorphic.datasource.DSRequest) throws java.lang.Exception requiredArgs: [] optionalArgs: [com.isomorphic.servlet.RequestContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, javax.servlet.http.HttpSession, com.isomorphic.rpc.RPCManager, com.isomorphic.datasource.DSRequest, com.isomorphic.datasource.DataSource, java.sql.Connection, com.isomorphic.log.Logger, java.util.Map] === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: com.isomorphic.servlet.RequestContext fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: javax.servlet.http.HttpServletRequest fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: javax.servlet.http.HttpServletResponse fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: javax.servlet.ServletContext fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: javax.servlet.http.HttpSession fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: com.isomorphic.rpc.RPCManager fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - checking whether type: com.isomorphic.datasource.DSRequest fulfills type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - Successfully adapted optional arg type: com.isomorphic.datasource.DSRequest to type: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - method takes: 1 args. I've assembled: 1 args === 2010-10-13 14:18:25,794 [l0-0] DEBUG Reflection - invoking method: com.isomorphic.datasource.DSResponse de.tmobile.sdom.frontend.server.dmi.AMLoginCreateDMI.add(com.isomorphic.datasource.DSRequest) throws java.lang.Exception with arg types: com.isomorphic.datasource.DSRequest === 2010-10-13 14:18:25,794 [l0-0] DEBUG XML - Parsed XML from C:\DEV\svn\SDOM\trunk\java\frontend\war\ds\server_login.ds.xml: 0ms === 2010-10-13 14:18:25,794 [l0-0] DEBUG DataSource - Creating instance of DataSource 'DataSource' === 2010-10-13 14:18:25,794 [l0-0] DEBUG BasicDataSource - Validating a 'DataSource' at path '' === 2010-10-13 14:18:25,794 [l0-0] DEBUG DataSource - Creating instance of DataSource 'DataSource' === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/ID as DataSource.ID type: string === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/serverType as DataSource.serverType type: string === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/tableName as DataSource.tableName type: string === 2010-10-13 14:18:25,794 [l0-0] DEBUG DataSource - Creating instance of DataSource 'DataSourceField' === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/fields as DataSource.fields type: DataSourceField === 2010-10-13 14:18:25,794 [l0-0] DEBUG BasicDataSource - Validating 20 'DataSourceField's at path '/DataSource[@ID=server_login]/fields' === 2010-10-13 14:18:25,794 [l0-0] DEBUG BasicDataSource - Validating a ... === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/fields/field[@name=log_lot_id]/required as DataSourceField.required type: boolean === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/fields/field[@name=log_lot_id]/title as DataSourceField.title type: string === 2010-10-13 14:18:25,794 [l0-0] DEBUG Validation - Validating field: /DataSource[@ID=server_login]/fields/field[@name=log_lot_id]/type as DataSourceField.type type: string === 2010-10-13 14:18:25,794 [l0-0] DEBUG BasicDataSource - Done validating 20 'DataSourceField's at path '/DataSource[@ID=server_login]/fields': 0ms (avg 0) === 2010-10-13 14:18:25,794 [l0-0] DEBUG BasicDataSource - Done validating a 'DataSource' at path '': 0ms === 2010-10-13 14:18:25,794 [l0-0] DEBUG DataSource - Creating instance of DataSource 'server_login' === 2010-10-13 14:18:25,997 [l0-0] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection === 2010-10-13 14:18:26,013 [l0-0] DEBUG DataSource - Creating instance of DataSource 'login_type' === 2010-10-13 14:18:26,247 [l0-0] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection === 2010-10-13 14:18:26,263 [l0-0] DEBUG DataSource - Creating instance of DataSource 'login_type' === 2010-10-13 14:18:26,544 [l0-0] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection === 2010-10-13 14:18:26,560 [l0-0] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application === 2010-10-13 14:18:26,560 [l0-0] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation === 2010-10-13 14:18:26,560 [l0-0] INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with criteria: {lot_id:11} values: {lot_id:11} === 2010-10-13 14:18:26,560 [l0-0] INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause === 2010-10-13 14:18:26,825 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Returning pooled Connection === 2010-10-13 14:18:26,825 [l0-0] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Oracle': SELECT sdm$vi_web_login_type.lot_name, sdm$vi_web_login_type.lot_display_team, ... sdm$vi_web_login_type.lot_description, sdm$vi_web_login_type.lot_info, sdm$vi_web_login_type.lot_needs_initial_skill FROM sdm$vi_web_login_type WHERE (sdm$vi_web_login_type.lot_id='11') === 2010-10-13 14:18:27,059 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Returning pooled Connection === 2010-10-13 14:18:27,059 [l0-0] INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items === 2010-10-13 14:18:29,714 [l0-0] INFO SQLDataSource - Performing add operation with criteria: {} values: {log_creation_date:new Date(1286972291000),log_creation_by:"ccr_schema",log_valid_from:new Date(1286920800000),log_emp_id:51034,Info:"Anforderung von Mitarbeiter-NT-Accounts nur über Schnelladministration vornehmen.\r\nGenaue Schreibweise, wie bei der Einrichtung durch TSI mitgeteilt, angeben! (Klein und Großschreibung)",log_lot_id:11,log_login:"de\\treptau234",log_sym_id:20,log_valid_to:new Date(2524604400075)} === 2010-10-13 14:18:29,714 [l0-0] INFO SQLValuesClause - Ignored data for non-existent columns: [Info] === 2010-10-13 14:18:29,714 [l0-0] DEBUG SQLValuesClause - Sequences: {log_id=sdm$se_login} === 2010-10-13 14:18:29,745 [l0-0] INFO SQLDriver - Executing SQL update on 'Oracle': INSERT INTO sdm$vi_web_login (log_login, log_creation_date, log_creation_by, log_valid_from, log_sym_id, log_lot_id, log_valid_to, log_emp_id, log_id) VALUES ('de\treptau234', TO_DATE('2010-10-13 14:18:11','YYYY-MM-DD HH24:MI:SS'), 'ccr_schema', TO_DATE('2010-10-13 00:00:00','YYYY-MM-DD HH24:MI:SS'), 20, 11, TO_DATE('2050-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'), 51034, sdm$se_login.NextVal) === 2010-10-13 14:18:30,182 [l0-0] DEBUG SQLDataSource - add operation affected 1 rows === 2010-10-13 14:18:30,198 [l0-0] INFO SQLDriver - Executing SQL query on 'Oracle': SELECT sdm$se_login.CurrVal FROM DUAL === 2010-10-13 14:18:30,416 [l0-0] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection === 2010-10-13 14:18:30,432 [l0-0] INFO SQLDataSource - primaryKeys: {log_id=409510} === 2010-10-13 14:18:32,524 [l0-0] DEBUG DataSourceDMI - Invocation threw exception java.lang.NullPointerException at com.isomorphic.datasource.IncludeFromDefinition.forField(IncludeFromDefinition.java:64) at com.isomorphic.sql.SQLWhereClause.buildExpression(SQLWhereClause.java:486) at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:337) at com.isomorphic.sql.SQLWhereClause.buildCompoundExpression(SQLWhereClause.java:398) at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:343) at com.isomorphic.sql.SQLWhereClause.toString(SQLWhereClause.java:301) at com.isomorphic.sql.SQLWhereClause.getSQLString(SQLWhereClause.java:307) at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:461) at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1370) at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:257) at de.tmobile.sdom.frontend.server.dmi.AMLoginCreateDMI.add(AMLoginCreateDMI.java:91) 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:883) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:575) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1398) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173) at de.tmobile.sdom.frontend.server.servlet.AuthentificationIDACall.handleDSRequest(AuthentificationIDACall.java:91) 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 de.tmobile.sdom.frontend.server.filter.ConnectionFilter.doFilter(ConnectionFilter.java:31) 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-10-13 14:18:32,524 [l0-0] WARN RequestContext - dsRequest.execute() failed: java.lang.NullPointerException at com.isomorphic.datasource.IncludeFromDefinition.forField(IncludeFromDefinition.java:64) at com.isomorphic.sql.SQLWhereClause.buildExpression(SQLWhereClause.java:486) at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:337) at com.isomorphic.sql.SQLWhereClause.buildCompoundExpression(SQLWhereClause.java:398) at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:343) at com.isomorphic.sql.SQLWhereClause.toString(SQLWhereClause.java:301) at com.isomorphic.sql.SQLWhereClause.getSQLString(SQLWhereClause.java:307) at com.isomorphic.sql.SQLDataSource.getLastRow(SQLDataSource.java:461) at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1370) at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:257) at de.tmobile.sdom.frontend.server.dmi.AMLoginCreateDMI.add(AMLoginCreateDMI.java:91) 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:883) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:575) at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1398) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:173) at de.tmobile.sdom.frontend.server.servlet.AuthentificationIDACall.handleDSRequest(AuthentificationIDACall.java:91) 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 de.tmobile.sdom.frontend.server.filter.ConnectionFilter.doFilter(ConnectionFilter.java:31) 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-10-13 14:18:32,524 [l0-0] DEBUG RequestContext - Setting headers to disable caching
Regards
Chris
Comment