Apache Isis: Java Type mapping failed - java

I have one problem with the open source estatio (that is built based on apache isis)
I've export data base schema first in DDL file. After that I have imported the DDL file in PostgresSQL 9.5. The application can be started. And some of fixture can be executed. The problem I have in "Estatio Demo Fixture". The application seems to import few fixtures until the application try to import org.estatio.fixture.financial.BankAccountForAcmeNl.
Following exception occurs:
Stack trace:
org.apache.wicket.WicketRuntimeException
Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.apache.wicket.ajax.markup.html.form.AjaxButton$1#4c421e92 on component [IndicatingAjaxButton [Component id = okButton]] threw an exception
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:268)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
Caused by:
java.lang.reflect.InvocationTargetException
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
Caused by:
java.lang.NumberFormatException
For input string: "nextvalIncodeCommunications.CommunicationChannel_id_seq::regclass"
java.lang.NumberFormatException#forInputString(NumberFormatException.java:65)
java.lang.Long#parseLong(Long.java:589)
java.lang.Long#valueOf(Long.java:803)
org.datanucleus.store.rdbms.mapping.datastore.BigIntRDBMSMapping#setObject(BigIntRDBMSMapping.java:187)
org.datanucleus.store.rdbms.mapping.java.DatastoreIdMapping#setObject(DatastoreIdMapping.java:53)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObjectAsNull(PersistableMapping.java:346)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObject(PersistableMapping.java:317)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObject(PersistableMapping.java:300)
org.datanucleus.store.rdbms.sql.SQLStatementHelper#applyParametersToStatement(SQLStatementHelper.java:228)
org.datanucleus.store.rdbms.query.JDOQLQuery#performExecute(JDOQLQuery.java:609)
org.datanucleus.store.query.Query#executeQuery(Query.java:1855)
org.datanucleus.store.query.Query#executeWithMap(Query.java:1762)
org.datanucleus.api.jdo.JDOQuery#executeWithMap(JDOQuery.java:346)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#getResults(PersistenceQueryFindUsingApplibQueryProcessor.java:117)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#process(PersistenceQueryFindUsingApplibQueryProcessor.java:57)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#process(PersistenceQueryFindUsingApplibQueryProcessor.java:41)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#processPersistenceQuery(PersistenceSession.java:606)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#access$000(PersistenceSession.java:147)
org.apache.isis.core.runtime.system.persistence.PersistenceSession$1#execute(PersistenceSession.java:567)
org.apache.isis.core.runtime.system.persistence.PersistenceSession$1#execute(PersistenceSession.java:564)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:188)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:178)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#findInstancesInTransaction(PersistenceSession.java:563)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#firstMatchingQuery(PersistenceSession.java:535)
org.apache.isis.core.runtime.services.persistsession.PersistenceSessionServiceInternalDefault#firstMatchingQuery(PersistenceSessionServiceInternalDefault.java:176)
org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault#firstMatch(DomainObjectContainerDefault.java:534)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannelOwnerLinkRepository#findByCommunicationChannel(CommunicationChannelOwnerLinkRepository.java:65)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#getOwnerLink(CommunicationChannel.java:253)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#removeOwnerLink(CommunicationChannel.java:246)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#setOwner(CommunicationChannel.java:241)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannelRepository#newPostal(CommunicationChannelRepository.java:73)
org.estatio.fixture.party.OrganisationAbstract#createCommunicationChannels(OrganisationAbstract.java:90)
org.estatio.fixture.party.OrganisationAbstract#createOrganisation(OrganisationAbstract.java:69)
org.estatio.fixture.party.OrganisationForAcmeNl#execute(OrganisationForAcmeNl.java:30)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:576)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:544)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChild(FixtureScript.java:532)
org.estatio.fixture.financial.BankAccountForAcmeNl#execute(BankAccountForAcmeNl.java:42)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:576)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:544)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChild(FixtureScript.java:532)
org.estatio.fixturescripts.EstatioDemoFixture#execute(EstatioDemoFixture.java:72)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#access$200(FixtureScript.java:253)
org.apache.isis.applib.fixturescripts.FixtureScript#run(FixtureScript.java:828)
org.apache.isis.applib.fixturescripts.FixtureScripts#runFixtureScript(FixtureScripts.java:391)
org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault#runFixtureScript(FixtureScriptsDefault.java:108)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#invokeMethodElseFromCache(ActionInvocationFacetForDomainEventAbstract.java:407)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$2#execute(ActionInvocationFacetForDomainEventAbstract.java:261)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$2#execute(ActionInvocationFacetForDomainEventAbstract.java:222)
org.apache.isis.applib.services.iactn.Interaction#executeInternal(Interaction.java:173)
org.apache.isis.applib.services.iactn.Interaction#execute(Interaction.java:143)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#doInvoke(ActionInvocationFacetForDomainEventAbstract.java:310)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$1#execute(ActionInvocationFacetForDomainEventAbstract.java:164)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:142)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:132)
org.apache.isis.core.runtime.services.persistsession.PersistenceSessionServiceInternalDefault#executeWithinTransaction(PersistenceSessionServiceInternalDefault.java:181)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#invoke(ActionInvocationFacetForDomainEventAbstract.java:160)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#executeInternal(ObjectActionDefault.java:400)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#execute(ObjectActionDefault.java:389)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#executeWithRuleChecking(ObjectActionDefault.java:370)
org.apache.isis.viewer.wicket.model.models.ActionModel#executeAction(ActionModel.java:491)
org.apache.isis.viewer.wicket.model.models.ActionModel#load(ActionModel.java:469)
org.apache.isis.viewer.wicket.model.models.ActionModel#load(ActionModel.java:81)
org.apache.wicket.model.LoadableDetachableModel#getObject(LoadableDetachableModel.java:135)
org.apache.isis.viewer.wicket.model.models.ActionModel#execute(ActionModel.java:597)
org.apache.isis.viewer.wicket.ui.components.actions.ActionFormExecutorStrategy#obtainResultAdapter(ActionFormExecutorStrategy.java:72)
org.apache.isis.viewer.wicket.ui.panels.FormExecutorDefault#obtainResultAdapter(FormExecutorDefault.java:498)
org.apache.isis.viewer.wicket.ui.panels.FormExecutorDefault#executeAndProcessResults(FormExecutorDefault.java:129)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#onOkSubmittedOf(PromptFormAbstract.java:228)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#access$000(PromptFormAbstract.java:60)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract$1#onSubmit(PromptFormAbstract.java:122)
org.apache.wicket.ajax.markup.html.form.AjaxButton$1#onSubmit(AjaxButton.java:113)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter#onSubmit(AjaxFormSubmitBehavior.java:215)
org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1307)
org.apache.wicket.markup.html.form.Form#process(Form.java:976)
org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:77)
org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:797)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onEvent(AjaxFormSubmitBehavior.java:171)
org.apache.wicket.ajax.AjaxEventBehavior#respond(AjaxEventBehavior.java:155)
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onRequest(AbstractDefaultAjaxBehavior.java:601)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
The id of CommunicationChanel is described like following in DB: "id int4 NOT NULL DEFAULT nextval('"IncodeCommunications"."CommunicationChannel_id_seq"'::regclass)"
The Id of this table is automatically created for each insert statement. In this case that is not an insert statement but a find statement without reference Id. I mean it looks up in CommunicationChanelOwnerLink, if there is any row with id is blank.
public void setObject(PreparedStatement ps, int param, Object value)
{
try
{
if (value == null)
{
if (column != null && column.isDefaultable() && column.getDefaultValue() != null && !StringUtils.isWhitespace(column.getDefaultValue().toString()))
{
ps.setLong(param, Long.valueOf(column.getDefaultValue().toString().trim()).longValue());
}
else
this block code of BigIntRDBMSMapping says that, if the value is null (that is exactly in this case) then it will try to parse default value that was initialized by datanucleus before. In this case, default value = "nextvalIncodeCommunications.CommunicationChannel_id_seq::regclass". This value can not be convert to Long value.
Any idea what is exactly happen here?
Thanks.

use case: see my comment Apache Isis: Java Type mapping failed
root cause: see my comment Apache Isis: Java Type mapping failed
solution: no official solution exists. I've talked with Andy Jefferson from datanucleus team. But no useful answer. At the end I've patched the library by my self and wait for appropriate fix

Related

Caused: BUG! exception in phase 'semantic analysis' in source unit 'WorkflowScript'

I have written a method that suppose to read the key value but this gives an error while running via jenkinsfile
here's the code (ScanMethods.groovy):
package api.Scan
public static ScanPipeline(String VERACODE_API_ID, String VERACODE_API_SECRET, String failOnSeverity, String BaseFile) {
Map custom_block = [
VERACODE_API_ID: VERACODE_API_ID,
VERACODE_API_SECRET: VERACODE_API_SECRET,
failOnSeverity: failOnSeverity,
BaseFile: "results.json"
]
Scan.scanload(custom_block)
}
Jenkinsfile
pipeline {
agent any
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '5')
}
stages {
stage('Veracode Pipeline') {
agent { label "default" }
steps {
script {
ScanMethods.scan-veracode-pipeline(VERACODE_API_ID, VERACODE_API_SECRET, failOnSeverity, BaseFile)
}
}}
}
}
Error i have recieved:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/var/jenkins_home/jobs/Test_pipelines/jobs/ankur-test/jobs/pipeline-scan-cit-cdw-jenkinsfile/branches/feature-T23D-4021.247156/builds/19/libs/ASTLib/src/api/ScanMethods.groovy: 11: Apparent variable 'Scan' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'Scan' but left out brackets in a place not allowed by the grammar.
# line 11, column 5.
Scan.scanload(custom_block)
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:254)
at groovy.lang.GroovyClassLoader.recompile(GroovyClassLoader.java:761)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:718)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:787)
at java.lang.ClassLoader.loadClass(ClassLoader.java:405)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell$TimingLoader.loadClass(CpsGroovyShell.java:170)
at java.lang.ClassLoader.loadClass(ClassLoader.java:405)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:545)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:185)
Caused: BUG! exception in phase 'semantic analysis' in source unit 'WorkflowScript' The lookup for api.ScanMethods caused a failed compilaton. There should not have been any compilation from this call.
Please help in how to resolve this error in order to read the values

Unknown pdx type=4

My distributed geode system went just well before, but recently not, and I don't know whether it's relevant to the company's power-cut last night. It seems all geode data persisted before can not be deserialize back now.
here's the error information:
Caused by: java.lang.IllegalStateException: Unknown pdx type=4
at com.gemstone.gemfire.internal.InternalDataSerializer.readPdxSerializable(InternalDataSerializer.java:3162)
at com.gemstone.gemfire.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2979)
at com.gemstone.gemfire.DataSerializer.readObject(DataSerializer.java:3210)
at com.gemstone.gemfire.internal.util.BlobHelper.deserializeBlob(BlobHelper.java:101)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1554)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1546)
at com.gemstone.gemfire.internal.cache.PreferBytesCachedDeserializable.getDeserializedValue(PreferBytesCachedDeserializable.java:67)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.getOldValue(EntryEventImpl.java:723)
at com.gemstone.gemfire.internal.cache.LocalRegion.validatedDestroy(LocalRegion.java:1146)
at com.gemstone.gemfire.internal.cache.LocalRegion.destroy(LocalRegion.java:1130)
at com.gemstone.gemfire.internal.cache.AbstractRegion.destroy(AbstractRegion.java:315)
at com.gemstone.gemfire.internal.cache.LocalRegion.remove(LocalRegion.java:9372)
at com.igola.datahub.wwl.geode.WWLResultsDAO.removeByKey(WWLResultsDAO.java:276)
my project was build on play framework and my configuration of geode cache and region is like this:
cache.setIsServer(true);
diskStorage = configuration.getString("geode.storage.name");
String fileStorage = configuration.getString("geode.storage.path");
cache.createDiskStoreFactory()
.setDiskDirs(new File[]{new File(fileStorage)})
.setDiskUsageWarningPercentage(0.8f)
.setAutoCompact(true)
.create(diskStorage);
geodeCache.getCache()
.<DataKey, When2GoData>createRegionFactory(PARTITION_REDUNDANT_PERSISTENT_OVERFLOW)
.setStatisticsEnabled(true)
.setEntryIdleTimeout(new ExpirationAttributes(TIMEOUT_LONG, ExpirationAction.DESTROY))
.setDiskStoreName(geodeCache.getDiskStorage())
.setPartitionAttributes(new PartitionAttributesFactory<>()
.setRedundantCopies(REDUNDANT_COPIES)
.setPartitionResolver(new DataKey())
.create())
.create("xxx");
cache = new CacheFactory()
.set("locators", configuration.getString("geode.locator"))
.set("name", configuration.getString("geode.name")+ "-"+ uuid)
.set("mcast-port", "0")
.set("log-level", "error")
.setPdxPersistent(true)
.setPdxReadSerialized(true)
.create();
Here's the relevant code from the readPdxSerializable method:
PdxType pdxType = gfc.getPdxRegistry().getType(typeId);
if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
logger.trace(LogMarker.SERIALIZER, "readPdxSerializable pdxType={}", pdxType);
}
if (pdxType == null) {
throw new IllegalStateException("Unknown pdx type=" + typeId);
}
So it looks like you have something in your cache that you can no longer deserialize ... due (I think) the fact that the type is no longer registered in the type registry.

Force Boolean Type with jOOQ throws NPE

I'm trying to use "forced types" for BOOLEANs when generating classes for our Oracle database with jOOQ 3.7.
The table looks like this:
CREATE TABLE outable_name
(
id INTEGER NOT NULL,
-- ...
some_boolean_field INTEGER DEFAULT 0 NOT NULL
);
To generate the Java classes Gradleis used. The relevant part looks like this:
database() {
name('org.jooq.util.oracle.OracleDatabase')
inputSchema(properties.getProperty('db.user'))
includes('.*')
forcedTypes() {
forcedType() {
name('BOOLEAN')
expression('some_boolean_field')
types('.*')
}
}
}
When running the gradle-task with info-output the following error is thrown:
Error while generating table record ***.*** (obfuscated)
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.<init>(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at org.jooq.util.AbstractTypedElementDefinition.mapDefinedType(AbstractTypedElementDefinition.java:174)
at org.jooq.util.AbstractTypedElementDefinition.getType(AbstractTypedElementDefinition.java:114)
at org.jooq.util.DefaultColumnDefinition.getType(DefaultColumnDefinition.java:51)
at org.jooq.util.JavaGenerator.refRowType(JavaGenerator.java:1241)
at org.jooq.util.JavaGenerator.generateRecord(JavaGenerator.java:838)
at org.jooq.util.JavaGenerator.generateRecord(JavaGenerator.java:797)
at org.jooq.util.JavaGenerator.generateRecord(JavaGenerator.java:785)
at org.jooq.util.JavaGenerator.generateRecords(JavaGenerator.java:772)
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:327)
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:267)
at org.jooq.util.GenerationTool.run(GenerationTool.java:434)
at org.jooq.util.GenerationTool.generate(GenerationTool.java:180)
at org.jooq.util.GenerationTool$generate.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at ...
Call "name" directly with invokeMethod:
database() {
name('org.jooq.util.oracle.OracleDatabase')
inputSchema(properties.getProperty('db.user'))
includes('.*')
forcedTypes() {
forcedType() {
delegate.invokeMethod('name', [
'BOOLEAN'
]
)
expression('.*\\.is_.*|.*\\.has_.*')
types('CHAR\\(1\\)')
}
}
}
Explanation in Groovy MarkupBuilder name conflict

Envers throws RuntimeException in ValidityAuditStrategy when no audit records (table partitioning)

In envers (persistence.xml), I enabled the strategy for table partitioning, according to the development guide: http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch15.html#envers-partitioning
The class: ValidityAuditStrategy, throws RuntimeException when there is no audit record. This exception occurs when the Envers try to update an audit record with a date of final revision (revend_tstmp), but this audit record does not exist.
The database of my application receives data load from external applications and is not possible change these external applications to include their audit records.
I have no chance to handle this exception (I don't know how).
In method ValidityAuditStrategy#updateLastRevision:
if (l.size() == 1) {
//... doStuff - OK
} else {
throw new RuntimeException("Cannot find previous revision for entity " + auditedEntityName + " and id " + id);
}
In method ValidityAuditStrategy#perform:
if ( rowCount != 1 )
throw new RuntimeException("Cannot update previous revision for entity " + auditedEntityName + " and id " + id);
A similar issue occurred in this link: https://developer.jboss.org/thread/160195?tstart=0 but had no solution.
It's possible apply a workaround?
I use hibernate-envers-4.1.3-Final version.
Log:
2015-07-17 10:23:28,653 DEBUG [-] [org.hibernate.SQL] (http-/0.0.0.0:8080-5) update MY_ENTITY_AUD set ID_REV_FINAL=?, DATE_HOUR_REV_FINAL=? where ID_ENTITY=? and ID_REV <> ? and ID_REV_FINAL is null
2015-07-17 10:23:28,677 TRACE [-] [org.hibernate.type.descriptor.sql.BasicBinder] (http-/0.0.0.0:8080-5) binding parameter [1] as [INTEGER] - 422
2015-07-17 10:23:28,677 TRACE [-] [org.hibernate.type.descriptor.sql.BasicBinder] (http-/0.0.0.0:8080-5) binding parameter [2] as [TIMESTAMP] - Thu Jul 17 10:23:28 BRT 2015
2015-07-17 10:23:28,677 TRACE [-] [org.hibernate.type.descriptor.sql.BasicBinder] (http-/0.0.0.0:8080-5) binding parameter [3] as [INTEGER] - 12345
2015-07-17 10:23:28,678 TRACE [-] [org.hibernate.type.descriptor.sql.BasicBinder] (http-/0.0.0.0:8080-5) binding parameter [4] as [INTEGER] - 422
2015-07-17 10:23:28,803 ERROR [-] [org.hibernate.AssertionFailure] (http-/0.0.0.0:8080-5) HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.RuntimeException: Cannot update previous revision for entity my.package.MyEntity_AUD and id 12345
2015-07-17 10:23:28,841 WARN [-] [com.arjuna.ats.arjuna] (http-/0.0.0.0:8080-5) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac1c045d:-3a5600e4:55a7c120:131, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization#5619c5a3 >: org.hibernate.AssertionFailure: Unable to perform beforeTransactionCompletion callback
at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:754) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:338) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:490) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1189)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
...
Caused by: java.lang.RuntimeException: Cannot update previous revision for entity entity my.package.MyEntity_AUD and id 12345
at org.hibernate.envers.strategy.ValidityAuditStrategy.perform(ValidityAuditStrategy.java:210) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit.perform(AbstractAuditWorkUnit.java:76) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.envers.synchronization.AuditProcess.executeInSession(AuditProcess.java:116) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.envers.synchronization.AuditProcess.doBeforeTransactionCompletion(AuditProcess.java:155) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.envers.synchronization.AuditProcessManager$1.doBeforeTransactionCompletion(AuditProcessManager.java:62) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:748) [hibernate-core-4.1.3-Final.jar:4.1.3-Final]
... 90 more
In persistence.xml existing a property to specify a custom AuditStrategey: org.hibernate.envers.audit_strategy.
Change,
From:
<property name="org.hibernate.envers.audit_strategy" value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
To:
<property name="org.hibernate.envers.audit_strategy" value="com.app.your.pack.YourCustomValidityAuditStrategy"/>
So now you can extend ValidityAuditStrategy and override perform() to not throw a RuntimeException when there is no previous revision for the entity, like this:
public class YourCustomValidityAuditStrategy extends ValidityAuditStrategy {
private final Log logger = LogFactory.getLog(getClass());
#Override
public void perform(Session session, String entityName, AuditConfiguration auditCfg, Serializable id, Object data, Object revision) {
try {
super.perform(session, entityName, auditCfg, id, data, revision);
} catch (RuntimeException re) {
if (logger.isDebugEnabled()) {
logger.debug("IGNORE RuntimeException: Cannot update previous revision for entity.", re);
}
}
}
Overriding just the perform method and catching the RuntimeException won't help you as the code throwing the RuntimeException is enclosed in an anonymous class of type BeforeTransactionCompletionProcess and is executed later.
The ValidityAuditStrategy is not very flexible so the only solution i see is ugly but should work : you must copy the entire ValidityAuditStrategy code in a custom class and catch the RuntimeException in the BeforeTransactionCompletionProcess anonymous class. Then specify your custom class in the persistence.xml :
<property name="org.hibernate.envers.audit_strategy "value="com.app.xxx.CustomValidityAuditStrategy"/>
The perform() method should look like the following :
#Override
public void perform(
final Session session,
final String entityName,
final EnversService enversService,
final Serializable id,
final Object data,
final Object revision) {
final AuditEntitiesConfiguration audEntitiesCfg = enversService.getAuditEntitiesConfiguration();
final String auditedEntityName = audEntitiesCfg.getAuditEntityName( entityName );
final String revisionInfoEntityName = enversService.getAuditEntitiesConfiguration().getRevisionInfoEntityName();
// Save the audit data
session.save( auditedEntityName, data );
// Update the end date of the previous row.
//
// When application reuses identifiers of previously removed entities:
// The UPDATE statement will no-op if an entity with a given identifier has been
// inserted for the first time. But in case a deleted primary key value was
// reused, this guarantees correct strategy behavior: exactly one row with
// null end date exists for each identifier.
final boolean reuseEntityIdentifier = enversService.getGlobalConfiguration().isAllowIdentifierReuse();
if ( reuseEntityIdentifier || getRevisionType( enversService, data ) != RevisionType.ADD ) {
// Register transaction completion process to guarantee execution of UPDATE statement after INSERT.
( (EventSource) session ).getActionQueue().registerProcess( new BeforeTransactionCompletionProcess() {
#Override
public void doBeforeTransactionCompletion(final SessionImplementor sessionImplementor) {
final Queryable productionEntityQueryable = getQueryable( entityName, sessionImplementor );
final Queryable rootProductionEntityQueryable = getQueryable(
productionEntityQueryable.getRootEntityName(), sessionImplementor
);
final Queryable auditedEntityQueryable = getQueryable( auditedEntityName, sessionImplementor );
final Queryable rootAuditedEntityQueryable = getQueryable(
auditedEntityQueryable.getRootEntityName(), sessionImplementor
);
final String updateTableName;
/*commented code*/
...
/*comment the following piece of code*/
/*if ( rowCount != 1 && ( !reuseEntityIdentifier || ( getRevisionType( enversService, data ) != RevisionType.ADD ) ) ) {
throw new RuntimeException(
"Cannot update previous revision for entity " + auditedEntityName + " and id " + id
);
}*/
}
});
}
sessionCacheCleaner.scheduleAuditDataRemoval( session, data );
}
As i said its ugly...
Setting org.hibernate.envers.allow_identifier_reuse: true helped in my scenario.
Not exactly answers the original question, but on the outside looks the same: Cannot update previous revision for entity my.package.MyEntity_AUD and id caa4ce8e.
I am using hibernate-envers-5.4.1 and for whatever reason (probably some buggy import in the past) suddenly faced the same error.
Direct query to the database select * from myentity_aud where id='caa4ce8e' resulted in:
rev revend revtype id ...
2121736 NULL 0 caa4ce8e ...
2121737 NULL 1 caa4ce8e ...
2121738 NULL 1 caa4ce8e ...
-- as seen, revend is NULL for all records.
The issue is: envers expects only one (the latest) to be NULL, all the rest must have the "overriding" rev to be set as revend.
So, to fix this particular case, it was enough to update to:
rev revend revtype id ...
2121736 2121737 0 caa4ce8e ...
2121737 2121738 1 caa4ce8e ...
2121738 NULL 1 caa4ce8e ...
and after that everything worked like a charm.
However, if you have millions of such records, you may want to write some script which will take care of them automatically.

creating nested nodes using Groovy xml Building

I have the below xml, Updated added "symptoms"
<EBF>
<EBFINFO>
<EBFNUM>EBF262323</EBFNUM>
<RELEASEDATETIME>May 06, 2011</RELEASEDATETIME>
<SYMPTOMS>
<br> INFA252994 - 910 : While running concurrent session Workflow manager hangs and workflow monitor does not respond</br>
<br> INFA262323 - 910 : pmcmd, pmdtm and all LM clients on Windows fail to connect to IS when IPv6 is installed but all IPv6 interfaces are disabled</br>
</SYMPTOMS>
<FILES>
<FILE>
<PATH>H:\EBF262323\EBF262323_Client_Installer_win32_x86\EBFs\clients\PmClient\client\bin\ACE.dll_bak</PATH>
<CHECKSUM>303966974</CHECKSUM>
<AFFECTEDFILES>
<CHECKSUM>3461283269</CHECKSUM>
<PATH>C:\clients\PmClient\CommandLineUtilities\PC\server\bin\ACE.dll</PATH>
<PATH>C:\clients\PmClient\client\bin\ACE.dll</PATH>
</AFFECTEDFILES>
</FILE>
</FILES>
<NOTES>
</NOTES>
</EBFINFO>
</EBF>
Note: In the above xml ebf\enfinfo\files\file\affectedfiles\path and ebf\enfinfo\files\file can be one or more
which I am parsing and generating another xml out of it
def records = new XmlParser().parseText(rs)
csm.ebfHistory(){
records.EBFINFO.each{
ebfHistory_info(num:it.EBFNUM.text(),
release_date_time:it.RELEASEDATETIME.text()
){
it.FILES.FILE.each{ //says Exception in thread "main" java.lang.NullPointerException: Cannot get property 'FILES' on null object
ebfHistory_fileinfo(file_path:it.PATH.text(),
file_checksum:it.CHECKSUM.text()
){
ebfHistory_fileinfo_affectedfiles(
afile_checksum:it.CHECKSUM.text(),
afile_path:it.PATH.text()
)
}
}
}
}
}
something like below
<ebfHistory>
<ebfHistory_info num="EBF262323",release_date_time="May 06, 2011">
<ebfHistory_fileinfo file_checksum="303966974">
<ebfHistory_fileinfo_affectedfiles afile_checksum="3461283269">
<path>C:\clients\PmClient\CommandLineUtilities\PC\server\bin\ACE.dll</path>
<path>C:\clients\PmClient\client\bin\ACE.dll</path>
</ebfHistory_fileinfo_affectedfiles>
</ebfHistory_fileinfo>
</ebfHistory_info>
</ebfHistory>
but instead I get Exception in thread "main" java.lang.NullPointerException: Cannot get property 'FILES' on null object where am i going wrong? Please help somebody. Thanks
Updated code (working)
def records = new XmlParser().parseText(rs)
csm.ebfHistory(){
records.EBFINFO.each{ ebfinfo ->
ebfHistory_info(num:ebfinfo.EBFNUM.text(),
release_date_time:ebfinfo.RELEASEDATETIME.text())
{
ebfinfo.SYMPTOMS.br.each{
ebfHistory_symptom(name:it.text())
}
}
}
ebfHistory_dump(rs){
"${rs}"
}
}
The it no longer refers to each EBFINFO, because you are in another closure--the ebfHistory_info closure.
Instead, explicitly name the EBFINFO object:
records.EBFINFO.each { ebfinfo -> // <-- Give it a name
ebfHistory_info(num:it.EBFNUM.text(),
release_date_time:it.RELEASEDATETIME.text()) {
ebfinfo.FILES.FILE.each { // <-- Use the name here
Same thing in the ebfHistory_fileinfo_affectedfiles parameters.

Categories

Resources