I am getting an NPE attempting to validate a field.
Note that this field is required="true", and it has two <validtor>'s defined. Remove either of the <validator>'s does not improve the condition - I have to remove the <validators/> block completely in order for it to work properly. This was working find with SmartClient 10.1-p20151218, but appears to be broken in "SmartClient Version: v10.1p_2016-02-12/Enterprise Deployment (built 2016-02-12)" (I also tried several versions from earlier this month, and they all break here as well).
I have a field in my datasource defined like so:
The custom validator is pretty simple, but uses a complex regex. However this NPE shows up using the built-in isUnique validator as well.
Here's the stack trace:
Note that this field is required="true", and it has two <validtor>'s defined. Remove either of the <validator>'s does not improve the condition - I have to remove the <validators/> block completely in order for it to work properly. This was working find with SmartClient 10.1-p20151218, but appears to be broken in "SmartClient Version: v10.1p_2016-02-12/Enterprise Deployment (built 2016-02-12)" (I also tried several versions from earlier this month, and they all break here as well).
I have a field in my datasource defined like so:
Code:
<field name="EMAIL" title="Email" type="text" length="320" required="true" width="192"> <validators> <validator type="serverCustom"> <serverObject lookupStyle="new" className="my.validators.EmailValidator" /> <errorMessage>Please enter a valid email address.</errorMessage> </validator> <validator type="isUnique" errorMessage="This email address is already in our system. Please use a different email address"/> </validators> </field>
Here's the stack trace:
Code:
=== 2016-02-14 01:39:24,682 [ec-5] DEBUG AppBase - [builtinApplication.UserManagement_validate] No public zero-argument method named '_UserManagement_validate' found, performing generic datasource operation === 2016-02-14 01:39:24,684 [ec-5] WARN RequestContext - dsRequest.execute() failed: java.lang.NullPointerException at com.isomorphic.datasource.BasicDataSource.getSimpleTypeValidators(BasicDataSource.java:2626) at com.isomorphic.datasource.BasicDataSource.makeType(BasicDataSource.java:2536) at com.isomorphic.datasource.ValidationContext.getCustomSimpleType(ValidationContext.java:349) at com.isomorphic.datasource.BasicDataSource.getSimpleType(BasicDataSource.java:2605) at com.isomorphic.datasource.BasicDataSource.getType(BasicDataSource.java:2577) at com.isomorphic.datasource.BasicDataSource.getFieldType(BasicDataSource.java:2324) at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:2019) at com.isomorphic.datasource.BasicDataSource.validateFieldValue(BasicDataSource.java:2003) at com.isomorphic.datasource.BasicDataSource.toRecord(BasicDataSource.java:1367) at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:1304) at com.isomorphic.datasource.BasicDataSource.toRecords(BasicDataSource.java:1265) at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:3577) at com.isomorphic.datasource.DataSource.validateDSRequest(DataSource.java:3522) at com.isomorphic.datasource.DataSource.execute(DataSource.java:2210) at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:735) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:652) at com.isomorphic.application.AppBase.execute(AppBase.java:493) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2694) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:228) at my.CustomIDACall.handleDSRequest(CustomIDACall.java:44) at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:187) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:152) at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.isomorphic.servlet.NoCacheFilter._doFilter(NoCacheFilter.java:60) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:122) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:170) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java) at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:42) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Comment