e-gov / dhx-adapter Goto Github PK
View Code? Open in Web Editor NEWSoftware components for DHX implementors
License: MIT License
Software components for DHX implementors
License: MIT License
Tere
Apache tomcat 9.0.40 (https://tomcat.apache.org/download-90.cgi) ja dhx adapter server 1.0.6 (mitte openjdk-11)
Saadan SOAP-iga päringu + manus otse adapteri pihta, see sendDocuments päring läheb ilusti läbi.
Seejärel iga 20s tagant toimub saatmine, arvan, et see parameeter on see, mis sellega tegeleb
Ja kui see on läbi käinud, siis tuleb selline viga:
2020-11-21 13:56:40,259 INFO e.r.d.w.s.i.DhxPackageProviderServiceImpl [pool-3-thread-1] ----- #getOutgoingPackage(/home/dhx01/tomcat/temp/dhx_379929729519489859, '1984', 'X-road member ee-test/GO
V/70000740/DHX, representee: 70001946, system:null', 'X-road member ee-test/GOV/70000740/DHX'): thrown ee.ria.dhx.exception.DhxException(DHXException code: DHX.Validation Error occurred while vali
dating capsule. tag name "DecReceiptDate" is not allowed. Possible tag names are: <DecFolder>
at [row,col {unknown-source}]: [2,3753]) out of ee.ria.dhx.ws.service.impl.DhxMarshallerServiceImpl#validate_aroundBody38[610] in 171ms
2020-11-21 13:56:40,259 ERROR e.r.d.s.s.SoapService [pool-3-thread-1] ----- Error occured while sending document! DHXException code: DHX.Validation Error occurred while validating capsule. tag nam
e "DecReceiptDate" is not allowed. Possible tag names are: <DecFolder>
at [row,col {unknown-source}]: [2,3753]
ee.ria.dhx.exception.DhxException: DHXException code: DHX.Validation Error occurred while validating capsule. tag name "DecReceiptDate" is not allowed. Possible tag names are: <DecFolder>
at [row,col {unknown-source}]: [2,3753]
at ee.ria.dhx.ws.service.impl.DhxMarshallerServiceImpl.validate_aroundBody38(DhxMarshallerServiceImpl.java:610) ~[dhx-adapter-ws-1.0.6.jar:1.0.6]
at ee.ria.dhx.ws.service.impl.DhxMarshallerServiceImpl$AjcClosure39.run(DhxMarshallerServiceImpl.java:1) ~[dhx-adapter-ws-1.0.6.jar:1.0.6]
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjrt-1.8.13.jar:?]
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) ~[jcabi-aspects-0.22.6.jar:?]
Kui vaadata nüüd selle viga saanud dokumendi kapslit, siis seal alumises osas on niimoodi:
Võrdluseks sama päring/kapsel tomcat 9.0.40 ja adapteri versioon 1.0.5 töötab. Samamoodi töötab tomcat 9.0.31 ja adapter 1.0.6
Seal jääb see kapsel niimoodi:
Paistab, et probleem on kaudselt selle tabeliga kaust, mida 1.0.6-s enam ei ole. Mingil põhjusel 9.0.40 tomcati versiooniga see „DecFolder: /“ element kaotatakse kapsist ära ja seetõttu tulebki viga, kuna järgnev element ei vasta sellele, mida oodatakse.
Error occurred while validating capsule. tag name "DecReceiptDate" is not allowed. Possible tag names are: <DecFolder>
Ma ei tea, kas see on tomcati versiooni viga või dhx-i, võks uurida.
Lisan kaasa requesti ja manuse.
DHX_tomcat_9.0.40_ja_adapter_1.0.6.zip
Raul
DHX-adapter versioon: 1.0.4
CentOS Linux release 7.6.1810 (Core)
Ilmselt on tegemist selle taustatööga:
#frequency of the address renewal. cron expression
address-renew-timeout=0 */20 * * * ?
Panin püsti mitu adapterit ja märkasin, et see viga tekib ainult GOV'ide puhul (adapteri konfis soap.member-class=GOV).
Lisaks sai tehtud veel NGO adapter(adapteri konfis soap.member-class=NGO), mis sai kopeeritud ühest GOV'i adapterist ja vajalikud parameetrid ära muudetud, seal töötab ilusti.
Baase sai mitu korda uuesti tehtud (adapter seisma, vana baas dropitud, uus baas asemel ja käivitamisel ehitas adapter struktuuri ise üles), aga endiselt sama teema.
GOV'ide puhul siis kõigil aadresside uuendamise taustatöö annab täpselt sama vea.
...
2019-05-02 08:40:52,279 INFO e.r.d.s.p.s.PersistenceService [pool-3-thread-1] ----- #getOrganisationFromInternalXroadMember('X-road member EE/GOV/75006546/DHX, representee: 75006865, system:null'): 'Organisation [organisationId=141, isActive=true, ..473..e,
ownRepresentee=null, representor=null]]' in 5,57ms
...
... (kõik kuni siiani on OK)
...
2019-05-02 08:40:52,285 INFO e.r.d.s.p.s.PersistenceService [pool-3-thread-1] ----- #getOrganisationFromInternalXroadMember('X-road member EE/GOV/75006546/DHX, representee: 75006871, system:null', false): thrown org.springframework.dao.IncorrectResultSizeDataAccessException(result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements) out of org.springframework.orm.jpa.EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible[395] in 6ms
2019-05-02 08:40:52,285 INFO e.r.d.s.p.s.PersistenceService [pool-3-thread-1] ----- #getOrganisationFromInternalXroadMember('X-road member EE/GOV/75006546/DHX, representee: 75006871, system:null'): thrown org.springframework.dao.IncorrectResultSizeDataAccessException(result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements) out of org.springframework.orm.jpa.EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible[395] in 6ms
2019-05-02 08:40:52,286 INFO e.r.d.s.p.s.PersistenceDhxSpecificService [pool-3-thread-1] ----- #saveAddresseeList('[X-road member EE/GOV/70006317/DHX.dvk, X-road me..108439..HX, representee: 10351752, system:null]'): thrown org.springframework.dao.IncorrectResultSizeDataAccessException(result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements) out of org.springframework.orm.jpa.EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible[395] in 687ms
2019-05-02 08:40:52,286 ERROR o.s.s.s.TaskUtils$LoggingErrorHandler [pool-3-thread-1] ----- Unexpected error occurred in scheduled task.
org.springframework.dao.IncorrectResultSizeDataAccessException: result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:395) ~[spring-orm-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:246) ~[spring-orm-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:525) ~[spring-orm-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:209) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133) ~[spring-data-jpa-1.11.16.RELEASE.jar:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57) ~[spring-data-commons-1.13.16.RELEASE.jar:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at com.sun.proxy.$Proxy152.findByRegistrationCodeAndSubSystem(Unknown Source) ~[?:?]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember_aroundBody16(PersistenceService.java:249) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService$AjcClosure17.run(PersistenceService.java:1) ~[classes/:?]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:66) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:72) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember_aroundBody18(PersistenceService.java:215) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService$AjcClosure19.run(PersistenceService.java:1) ~[classes/:?]
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjweaver-1.8.13.jar:1.8.13]
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) ~[jcabi-aspects-0.22.6.jar:?]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember(PersistenceService.java:215) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember_aroundBody12(PersistenceService.java:199) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService$AjcClosure13.run(PersistenceService.java:1) ~[classes/:?]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:66) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:72) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember_aroundBody14(PersistenceService.java:199) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService$AjcClosure15.run(PersistenceService.java:1) ~[classes/:?]
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjweaver-1.8.13.jar:1.8.13]
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) ~[jcabi-aspects-0.22.6.jar:?]
at ee.ria.dhx.server.persistence.service.PersistenceService.getOrganisationFromInternalXroadMember(PersistenceService.java:199) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceService$$FastClassBySpringCGLIB$$94fa6e1d.invoke(<generated>) ~[classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at ee.ria.dhx.server.persistence.service.PersistenceService$$EnhancerBySpringCGLIB$$1a8801d0.getOrganisationFromInternalXroadMember(<generated>) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService.saveAddresseeList_aroundBody20(PersistenceDhxSpecificService.java:172) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService$AjcClosure21.run(PersistenceDhxSpecificService.java:1) ~[classes/:?]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:66) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:72) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70) ~[spring-aspects-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService.saveAddresseeList_aroundBody22(PersistenceDhxSpecificService.java:160) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService$AjcClosure23.run(PersistenceDhxSpecificService.java:1) ~[classes/:?]
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjweaver-1.8.13.jar:1.8.13]
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) ~[jcabi-aspects-0.22.6.jar:?]
at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) ~[jcabi-aspects-0.22.6.jar:?]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService.saveAddresseeList(PersistenceDhxSpecificService.java:160) ~[classes/:?]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService$$FastClassBySpringCGLIB$$44377da7.invoke(<generated>) ~[classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at ee.ria.dhx.server.persistence.service.PersistenceDhxSpecificService$$EnhancerBySpringCGLIB$$c53836ae.saveAddresseeList(<generated>) ~[classes/:?]
at ee.ria.dhx.ws.service.impl.AddressServiceImpl.setAddresseeList(AddressServiceImpl.java:96) ~[dhx-adapter-ws-1.0.4.jar:?]
at ee.ria.dhx.ws.service.impl.AddressServiceImpl.renewAddressList(AddressServiceImpl.java:131) ~[dhx-adapter-ws-1.0.4.jar:?]
at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_202]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_202]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at com.sun.proxy.$Proxy158.renewAddressList(Unknown Source) ~[?:?]
at ee.ria.dhx.ws.schedule.DhxScheduler.renewAddressList(DhxScheduler.java:29) ~[dhx-adapter-ws-1.0.4.jar:?]
at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_202]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_202]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
Caused by: javax.persistence.NonUniqueResultException: result returns more than one elements
at org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:539) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
at org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getSingleResult(CriteriaQueryTypeQueryAdapter.java:54) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:210) ~[spring-data-jpa-1.11.16.RELEASE.jar:?]
at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:89) ~[spring-data-jpa-1.11.16.RELEASE.jar:?]
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:128) ~[spring-data-jpa-1.11.16.RELEASE.jar:?]
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:118) ~[spring-data-jpa-1.11.16.RELEASE.jar:?]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:494) ~[spring-data-commons-1.13.16.RELEASE.jar:?]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:477) ~[spring-data-commons-1.13.16.RELEASE.jar:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:56) ~[spring-data-commons-1.13.16.RELEASE.jar:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.20.RELEASE.jar:4.3.20.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.20.RELEASE.jar:4.3.20.RELEASE]
... 90 more
Q: Kas oleks võimalik teha nii, et DHX adapter oleks vahelüliks X-tee ja mitme DHS-i vahel?
S.t DHX adapterit kasutada mitme DHS-i dokumendivahetuse korraldamiseks üle X-tee. See võimaldaks DHS-e X-teest (ja seal toimuvatest muutustest) isoleerida.
A: Palume arendajal soovi arvesse võtta - selles ulatuses, et mitme süsteemi toe lisamine oleks võimalusel lihtne. Mitme DHS-i teenindamise teostus siiski ei mahu meie projekti skoopi. Töömahu poolest isegi ehk mahuks, kuid pelgame lisada keerukust, mida enamik kasutajaid tõenäoliselt ei vaja. Samuti on parem teha praegu kavandatu korralikult valmis ja siis - ühiselt - minna edasi.
DHX adapteri tarkvara saab olema avatud ja vaba lähtekoodiga (https://github.com/e-gov/DHX-adapter). Asutustel, kes soovivad DHX adapterit kasutada mitme infosüsteemi tarbeks, soovitame vastav lisaarendus ise tellida. Kui huvilisi oleks mitu, siis oleks mõtet arendust koos tellida. RIA saaks siin ehk abiks olla.
Adressaatide uuendamisel visatakse error. Tundub, et üks atribuut on kaduma läinud.
Kasutasin etalonrakendust.
14:40:35.400 [main] INFO ee.ria.dhx.ws.service.impl.DhxMarshallerServiceImpl - #marshallToWriter(javax.xml.bind.JAXBElement@76294cd9): '<?xml version="1.0"?>\n<ns6:service ns3:objectType..486..sion>v1</ns3:serviceVersion></ns6:service>' in 893,16Ąs 14:40:35.994 [main] EVENT ee.ria.dhx.client.service.DhxClientGateWay - Error occured while getting representation list for: X-road member ee-dev/GOV/70006317/DHX.dvk. DHXException code: WS_ERROR Error occured while getting representation list. SOAP-fault:Server .ServerProxy.ServiceFailed.InvalidXmlSOAP fault returned from web service: Missing objectType attribute 14:40:35.997 [main] INFO ee.ria.dhx.ws.service.impl.AddressServiceImpl - #getRepresentees('X-road member ee-dev/GOV/70006317/DHX.dvk'): thrown ee.ria.dhx.exception.DhxException(DHXException code: WS_ERROR Error occured while getting representation list. SOAP-f ault:Server.ServerProxy.ServiceFailed.InvalidXmlSOAP fault returned from web service: Missing objectType attribute) out of ee.ria.dhx.ws.service.impl.DhxGateway#getRepresentationList[365] in 605ms 14:40:35.998 [main] ERROR ee.ria.dhx.ws.service.impl.AddressServiceImpl - Error occured while getting representationList for: X-road member ee-dev/GOV/70006317/DHX.dvkDHXException code: WS_ERROR Error occured while getting representation list. SOAP-fault:Server .ServerProxy.ServiceFailed.InvalidXmlSOAP fault returned from web service: Missing objectType attribute ee.ria.dhx.exception.DhxException: DHXException code: WS_ERROR Error occured while getting representation list. SOAP-fault:Server.ServerProxy.ServiceFailed.InvalidXmlSOAP fault returned from web service: Missing objectType attribute at ee.ria.dhx.ws.service.impl.DhxGateway.getRepresentationList(DhxGateway.java:365) ~[dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.DhxGateway.getRepresentationList(DhxGateway.java:312) ~[dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.client.service.DhxClientGateWay.getRepresentationList(DhxClientGateWay.java:72) ~[classes/:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRepresentees_aroundBody2(AddressServiceImpl.java:236) ~[dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl$AjcClosure3.run(AddressServiceImpl.java:1) ~[dhx-adapter-ws-1.0.0.jar:?] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjrt-1.8.7.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) ~[jcabi-aspects-0.22.5.jar:?] at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) ~[jcabi-aspects-0.22.5.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) ~[jcabi-aspects-0.22.5.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRepresentees(AddressServiceImpl.java:235) ~[dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRenewedAdresseesList_aroundBody0(AddressServiceImpl.java:178) [dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl$AjcClosure1.run(AddressServiceImpl.java:1) [dhx-adapter-ws-1.0.0.jar:?] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) [aspectjrt-1.8.7.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) [jcabi-aspects-0.22.5.jar:?] at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) [jcabi-aspects-0.22.5.jar:?] at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) [jcabi-aspects-0.22.5.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRenewedAdresseesList(AddressServiceImpl.java:139) [dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.client.service.AddressClientServiceImpl.getRenewedAdresseesList(AddressClientServiceImpl.java:40) [classes/:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.renewAddressList(AddressServiceImpl.java:130) [dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getAdresseeList(AddressServiceImpl.java:89) [dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.renewAdressListAsync(AddressServiceImpl.java:117) [dhx-adapter-ws-1.0.0.jar:?] at ee.ria.dhx.ws.service.impl.AddressServiceImpl.init(AddressServiceImpl.java:107) [dhx-adapter-ws-1.0.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) [spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] at ee.ria.dhx.client.Application.main(Application.java:36) [classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121] at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:506) [spring-boot-maven-plugin-1.4.1.RELEASE.jar:1.4.1.RELEASE] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: org.springframework.ws.client.WebServiceFaultException: Missing objectType attribute at org.springframework.ws.client.core.SimpleFaultMessageResolver.resolveFault(SimpleFaultMessageResolver.java:36) ~[spring-ws-core-2.4.0.RELEASE.jar:2.4.0.RELEASE] at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:830) ~[spring-ws-core-2.4.0.RELEASE.jar:2.4.0.RELEASE] at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:624) ~[spring-ws-core-2.4.0.RELEASE.jar:2.4.0.RELEASE] at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555) ~[spring-ws-core-2.4.0.RELEASE.jar:2.4.0.RELEASE] at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390) ~[spring-ws-core-2.4.0.RELEASE.jar:2.4.0.RELEASE] at ee.ria.dhx.ws.service.impl.DhxGateway.getRepresentationList(DhxGateway.java:352) ~[dhx-adapter-ws-1.0.0.jar:?] ... 52 more
DVK spetsifikatsioon kirjeldab kõikide päringute ja vastuste puhul viiteid SOAP manustele swaRef stiilis (mitte MTOM stiilis).
DHX adapterserver v1.0.2 tagastab receiveDocuments.v4 vastuse SOAP ümbrikut sisaldavas MIME osas päise, mis ebakorrektselt viitab MTOM kasutamisele Content-Type: application/xop+xml; charset=utf-8; type="text/xml"
.
Samas, DHX adapterserver tagastab vastuse SOAP kehas korrektselt swaRef stiilis viite
<ns4:receiveDocumentsResponse xmlns:ns4="http://producers.dhl.xrd.riik.ee/producer/dhl">
<keha href="cid:045b2bed-bd39-4f5c-9b92-b50e55ee7822"/>
</ns4:receiveDocumentsResponse>
Näiteks getSendingOptions.v3 puhul DHX adapterserver tagastab SOAP ümbrikut sisaldavas MIME osas korrektse päise Content-Type: text/xml; charset=utf-8
. DHX adapterserver peaks sama tegema ka receiveDocuments.v4 vastuses.
DVK keskserver tagastab korrektsed päised:
HTTP/1.1 200 OK
Content-Type: multipart/related; type="text/xml"; start="<9A73FC9D36879D038FE4ED4599380C7E>"; boundary="----=_Part_43_1004692549.1526313601626";charset=utf-8
------=_Part_43_1004692549.1526313601626
content-type:text/xml; charset=UTF-8
Content-Id: <9A73FC9D36879D038FE4ED4599380C7E>
Content-Transfer-Encoding: binary
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
...
</soapenv:Envelope>
------=_Part_43_1004692549.1526313601626
...
------=_Part_43_1004692549.1526313601626--
DVK andmekogu nimeruum http://producers.dhl.xtee.riik.ee/producer/dhl on defineeritud/kasutusel:
DVK andmekogu nimeruum http://producers.dhl.xrd.riik.ee/producer/dhl on kasutusel:
Kust on tulnud teine nimeruum?
Kui DHX adapterserveri eesmärk on olla ühilduv olemasolevate DVK klientidega, siis see peaks toetama esimest nimeruumi.
Adapter: 1.0.5
PostgreSQL: 10
Apache Tomcat 9.0.17 (proovitud ka tol hetkel viimaste versioonidega 9.0.27, 9.0.29)
CentOS Linux release 7.7.1908 (Core)
Alates adapteri versioonist 1.0.5, hakkasid tekkima tomcati temp kaustadesse sellised failid, mille nimes on "chunked":
(tomcati teenus jookseb dhx01:nginx õigustes)
-rw-r----- 1 dhx01 nginx 3.0K Nov 25 13:20 dhx_chunked_299403031230698783.tmp
-rw-r----- 1 dhx01 nginx 3.0K Nov 25 13:20 dhx_chunked_2791346563983106528.tmp
-rw-r----- 1 dhx01 nginx 3.0K Nov 25 13:20 dhx_chunked_3652940267974454704.tmp
-rw-r----- 1 dhx01 nginx 3.0K Nov 25 13:20 dhx_chunked_6128644289013230022.tmp
-rw-r----- 1 dhx01 nginx 3.0K Nov 25 13:20 dhx_chunked_7529251084490392710.tmp
-rw-r----- 1 dhx01 nginx 3.1K Nov 25 13:20 dhx_chunked_8386565849754057387.tmp
-rw-r----- 1 dhx01 nginx 3.1K Nov 25 13:20 dhx_chunked_3971262744154768012.tmp
Iga 20 minuti tagant tekib neid sinna 7 tükki. Sisuks on xml, see paistab olevat mingi representationList.v1 teenus erinevate asutuste kohta.
Varasemalt oli mul tomcat 9.0.17 ja adapter 1.0.4.
Sinna temp kausta tekkisid failid sellisel kujul "dhx_690964183044709861" ja need failid kustutati tomcati teenuse restarti järgselt ilusti ära.
Nüüd, kui 1.0.5 versiooni järgselt hakkas tekkima faile, kus nimes on "chunked", ära ei koristata, ka mitte teenuse restarti järgselt.
Üldsegi, see ka ei ole kuskilt otsast normaalne, et tuleb hakata tomcati resama regulaarselt, et nendest temp failidest lahti saada. Kui rakendus need sinna tekitab, siis rakendus peaks need ise ka ära koristama enda järelt.
Kui truststore ja keystore on erinevate paroolidega, siis sslContext init saab vea:
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dhxGateway': Unsatisfied dependency expressed through field 'soapHttpClient'
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'soapHttpClient' defined in class path resource [ee/ria/dhx/ws/config/SoapConfig.class]: Unsatisfied dependency expressed through method 'soapHttpClient' parameter 1
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sslSocketFactory' defined in class path resource [ee/ria/dhx/ws/config/SoapConfig.class]: Unsatisfied dependency expressed through method 'sslSocketFactory' parameter 0
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sslContext' defined in class path resource [ee/ria/dhx/ws/config/SoapConfig.class]: Bean instantiation via factory method failed
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.net.ssl.SSLContext]: Factory method 'sslContext' threw exception
nested exception is java.security.UnrecoverableKeyException: Cannot recover key
SOAP spetsifikatsioon ütleb, et SOAP Fault vastus tuleks tagastada HTTP 500 olekukoodiga.
X-tee turvaserver ja DVK keskserver tagastavad SOAP Fault vastuseid HTTP 200 olekukoodiga. Näited:
HTTP/1.1 200 OK
Content-Length: 461
Content-Type: text/xml;charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>Server.ClientProxy.SslAuthenticationFailed</faultcode>
<faultstring>Security server has no valid authentication certificate</faultstring>
<faultactor></faultactor>
<detail>
<faultDetail xmlns="">6d20c8ab-be81-4e03-8500-bcb8f91e377d</faultDetail>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 200 OK
Content-Length: 584
Content-Type: text/xml;charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>Esitatud sõnumi saatjaks märgitud asutus (12345678) ei kuulu DVK-d kasutavate asutuste hulka!</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">dvk-tomcat-1a.test.kit</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
DHX adapterserver v1.0.2 tagastab SOAP Fault vastuse HTTP 500 olekukoodiga. Näide:
HTTP/1.1 500 Internal Server Error
Content-Length: 1438
Content-Type: text/xml;charset=utf-8
<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<xrd:client xmlns:id="http://x-road.eu/xsd/identifiers" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" id:objectType="SUBSYSTEM">
<id:xRoadInstance>ee-test</id:xRoadInstance>
<id:memberClass>COM</id:memberClass>
<id:memberCode>12345678</id:memberCode>
<id:subsystemCode>generic-consumer</id:subsystemCode>
</xrd:client>
<xrd:service xmlns:id="http://x-road.eu/xsd/identifiers" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" id:objectType="SERVICE">
<id:xRoadInstance>ee-test</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>dhl</id:subsystemCode>
<id:serviceCode>sendDocuments</id:serviceCode>
<id:serviceVersion>v4</id:serviceVersion>
</xrd:service>
<xrd:id xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">c3c0f965-758c-4f7d-ac1d-a6cfb35fa679</xrd:id>
<xrd:protocolVersion xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">4.0</xrd:protocolVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xml:lang="en">DHXException code: TECHNICAL_ERROR Request sender and capsule sender do not match! </faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
DVK keskserveri implementatsioon ei vasta küll SOAP spetsifikatsioonile, kuid on selline olnud väga pikka aega. Kui DHX adapterserveri eesmärk on olla ühilduv olemasolevate DVK klientidega, siis see peaks lähtuma DVK keskserveri implementatsioonist.
DVK spetsifikatsioon ja ka DVK keskserveri poolt tagastatavad X-tee v5 WSDL ja X-tee v6 WSDL ütlevad, et receiveDocuments.v4 vastuses tuleb SOAP kehas tagastada:
<dhl:receiveDocumentsResponse xmlns:dhl="http://producers.dhl.xtee.riik.ee/producer/dhl">
<keha href="cid:793340a8216da081f3d785bcc74c0f74"/>
</dhl:receiveDocumentsResponse>
DVK keskserver reaalselt tagastab vastuses:
<receiveDocumentsResponse xmlns="">
<keha xmlns="">
<dokumendid href="cid:A2794FA948C2E2318BA5F6083187424F" xmlns=""></dokumendid>
</keha>
</receiveDocumentsResponse>
DHX adapterserver v1.0.2 tagastab:
<ns4:receiveDocumentsResponse xmlns:ns4="http://producers.dhl.xrd.riik.ee/producer/dhl">
<keha href="cid:045b2bed-bd39-4f5c-9b92-b50e55ee7822"/>
</ns4:receiveDocumentsResponse>
DVK keskserveri implementatsioon ei vasta küll DVK spetsifikatsioonile, kuid on selline olnud väga pikka aega. Kui DHX adapterserveri eesmärk on olla ühilduv olemasolevate DVK klientidega, siis see peaks lähtuma DVK keskserveri implementatsioonist. Olulised on kaks erinevust:
Dokumentatsioon ütleb:
Laadida alla ja installeerida Java Development Kit (JDK) 7 või 8 või uuem.
JDK11 puhul annab veaks: package javax.xml.bind.annotation does not exist
JDK dokumentatsioon ütleb, et:
java.xml.bind (JAXB) - REMOVED
Java 8 - OK
Java 9 - DEPRECATED
Java 10 - DEPRECATED
Java 11 - REMOVED
https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html#JDK-8190378
DHX-adapter versioon: 1.0.4
CentOS Linux release 7.6.1810 (Core)
Logid roteeritakse kahtlaste kuupäevadega.
log4j2.xml konfina on kasutusel default konfi, mis tuli koos pakiga kaasa.
<RollingFile name="RollingFile" fileName="/home/dhxadapter/tomcat/logs/dhx-adapter-server.log"
filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log">
<PatternLayout>
<Pattern>%d %p %c{1.} [%t] ----- %m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="24" modulate="false"/>
<SizeBasedTriggeringPolicy size="1 MB"/>
</Policies>
</RollingFile>
Täna on 22.04.2019, masina kell on ka korrektne.
# date
Mon Apr 22 15:51:21 EEST 2019
Pilt on selline (ei oska öelda, kust tulevad 05 ja 10):
# ls -lh
total 512
drwxr-x--- 2 dhxadapter dhxadapter 0 Apr 22 15:40 2019-05
-rwxr----- 1 dhxadapter dhxadapter 382K Apr 22 15:49 dhx-adapter-server.log
# ls -lh 2019-05/
total 7.1M
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 12:00 app-05-10-2019-1.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 12:20 app-05-10-2019-2.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 13:00 app-05-10-2019-3.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 13:40 app-05-10-2019-4.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 14:20 app-05-10-2019-5.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 15:00 app-05-10-2019-6.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 15:40 app-05-10-2019-7.log
Konkreetse konfi järgi peaks logid tekkima kausta:
drwxr-x--- 2 dhxadapter dhxadapter 0 Apr 22 15:40 2019-04
Ja seal kaustas sees peaksid failid olema midagi sellist:
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 12:00 app-04-22-2019-1.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 12:20 app-04-22-2019-2.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 13:00 app-04-22-2019-3.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 13:40 app-04-22-2019-4.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 14:20 app-04-22-2019-5.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 15:00 app-04-22-2019-6.log
-rwxr----- 1 dhxadapter dhxadapter 1.1M Apr 22 15:40 app-04-22-2019-7.log
Parameetri "dhx.xsd.capsule-xsd-file21" overridemine viskab Exceptioni:
java.lang.IllegalArgumentException: No enum constant ee.ria.dhx.util.CapsuleVersionEnum.file:///c:/Dvk_kapsel_vers_2_1_eng_est-FIXED.xsd
sest CapsuleConfig.java failis väärtustatakse nii XSD asukoha kui versiooni string sama property järgi:
@Value("${dhx.xsd.capsule-xsd-file21:jar://Dvk_kapsel_vers_2_1_eng_est.xsd}")
private String capsuleXsdFile21;
@Value("${dhx.xsd.capsule-xsd-file21:V21}")
private String currentCapsuleVersionStr;
https://github.com/e-gov/DHX-adapter/releases/tag/v1.0.3b versioonis annab addressService.renewAddressList() viga
java.lang.ClassCastException: java.util.ArrayList cannot be cast to ee.ria.dhx.types.InternalXroadMember at ee.ria.dhx.ws.service.impl.AddressServiceImpl$AjcClosure3.run(AddressServiceImpl.java:1) at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) at ee.ria.dhx.ws.service.impl.AddressServiceImpl.addRenewedAdressees(AddressServiceImpl.java:154) at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRenewedAdresseesList_aroundBody0(AddressServiceImpl.java:146) at ee.ria.dhx.ws.service.impl.AddressServiceImpl$AjcClosure1.run(AddressServiceImpl.java:1) at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:213) at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1) at com.jcabi.aspects.aj.MethodLogger.wrapMethod(MethodLogger.java:169) at ee.ria.dhx.ws.service.impl.AddressServiceImpl.getRenewedAdresseesList(AddressServiceImpl.java:144) at ee.ria.dhx.ws.service.impl.AddressServiceImpl.renewAddressList(AddressServiceImpl.java:134)
/verificationconf ja /verificationconf/ee-dev/shared-params.xml töötavad ja annavad vastuse. https://github.com/e-gov/DHX-adapter/releases/tag/v1.0.3 versioonis viga ei teki.
DHX adapterserveri v1.0.2 sisemine liides ei suuda teenindada HTTP päringuid, millel on kasutusel chunked transfer encoding. Sellel juhul jääb päring õhku vastust ootama vähemalt mitmeks minutiks ja levinud tulemus on, et klient katkestab päringu timeout tingimuse täitumise tõttu.
X-tee turvaserveril / DVK keskserveril probleeme ei esine kui kliendi poolt sooritatavates päringutes on kasutusel chunked transfer encoding.
Kui DHX adapterserveri eesmärk on olla ühilduv olemasolevate DVK klientidega, siis see peaks toetama HTTP päringutes chunked transfer encoding kasutust.
DVK spetsifikatsioon ütleb, et sendDocuments.v4 vastuses tuleb SOAP kehas tagastada järgnev ning DVK keskserver seda ka reaalselt tagastab (s.t. sendDocumentsResponse elemendi nimeruum on tühi):
<sendDocumentsResponse xmlns="">
<keha href="cid:14ABD2D6837F5F3FC8C201A39BB4AA62" xmlns=""/>
</sendDocumentsResponse>
DHX adapterserver v1.0.2 tagastab sendDocumentsResponse elemendi, millel nimeruum on määratud (mis vastab DVK keskserveri poolt tagastatavale X-tee v5 WSDL-ile ja X-tee v6 WSDL-ile):
<ns4:sendDocumentsResponse xmlns:ns4="http://producers.dhl.xrd.riik.ee/producer/dhl">
<keha href="cid:fc7fe900-6d74-40f8-b38d-c6f17b2a5213"/>
</ns4:sendDocumentsResponse>
DVK keskserveri implementatsioon ei vasta küll DVK spetsifikatsioonile, kuid on selline olnud väga pikka aega. Kui DHX adapterserveri eesmärk on olla ühilduv olemasolevate DVK klientidega, siis see peaks lähtuma DVK keskserveri implementatsioonist.
DVK spetsifikatsioon ütleb, et getSendingOptions.v3 vastuses tuleb tagastada:
<keha>
<asutused>
<asutus>
<regnr>12345678</regnr>
<nimi>ASUTUS 1</nimi>
<saatmine>
<saatmisviis>dhl</saatmisviis>
</saatmine>
<ks_asutuse_regnr/>
</asutus>
...
</asutused>
</keha>
DVK keskserver tagastab korrektselt:
<keha>
<asutused>
<asutus>
<regnr>70000332</regnr>
<nimi>Statistikaamet</nimi>
<saatmine>
<saatmisviis>dhl</saatmisviis>
</saatmine>
</asutus>
...
</asutused>
</keha>
DHX adapterserver v1.0.2 tagastab ebakorrektse vastuse, kus <asutused>
element puudub:
<keha>
<asutus>
<regnr>70000332</regnr>
<nimi>Statistikaamet</nimi>
<saatmine>
<saatmisviis>dhl</saatmisviis>
</saatmine>
</asutus>
...
</keha>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.