• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • OpenSpecimen Collection Error

    Dear community,

    In the “Specimen Collection” an error occurs when allocating location (in different containers). Attached a screenshot, the error message and the log file. Any help would be greatly appreciated.

    Best,

    Lynn

    Screenshot:

    Error message:
    Hello,

    A brief description of the internal server error is given below:
    Exception ID : 1255
    Username : drehera
    File Name : SpecimenServiceImpl.java
    Method Name : collectSpecimens
    Timestamp : Jul 29, 2022 08:20
    Exception : org.hibernate.PropertyAccessException: Exception occurred inside setter of com.krishagni.catissueplus.core.common.domain.PrintRuleConfig.ruleDefJson

    • OpenSpecimen Administrator

    Log-file:
    java.lang.RuntimeException: Error loading specimen label print rules
    at com.krishagni.catissueplus.core.biospecimen.services.impl.DefaultSpecimenLabelPrinter.loadRulesFromDb(DefaultSpecimenLabelPrinter.java:308)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.DefaultSpecimenLabelPrinter.print(DefaultSpecimenLabelPrinter.java:84)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.collectSpecimens_aroundBody22(SpecimenServiceImpl.java:342)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl$AjcClosure23.run(SpecimenServiceImpl.java:1)
    at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor$1.doInTransaction(TransactionalInterceptor.java:104)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork0(TransactionalInterceptor.java:96)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork(TransactionalInterceptor.java:78)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.ajc$inlineAccessMethod$com_krishagni_catissueplus_core_common_TransactionalInterceptor$com_krishagni_catissueplus_core_common_TransactionalInterceptor$doWork(TransactionalInterceptor.java:1)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.startTransaction(TransactionalInterceptor.java:64)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.collectSpecimens(SpecimenServiceImpl.java:334)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.VisitServiceImpl.collectVisitAndSpecimens_aroundBody14(VisitServiceImpl.java:257)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.VisitServiceImpl$AjcClosure15.run(VisitServiceImpl.java:1)
    at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor$1.doInTransaction(TransactionalInterceptor.java:104)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork0(TransactionalInterceptor.java:96)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork(TransactionalInterceptor.java:78)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.ajc$inlineAccessMethod$com_krishagni_catissueplus_core_common_TransactionalInterceptor$com_krishagni_catissueplus_core_common_TransactionalInterceptor$doWork(TransactionalInterceptor.java:1)
    at com.krishagni.catissueplus.core.common.TransactionalInterceptor.startTransaction(TransactionalInterceptor.java:64)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.VisitServiceImpl.collectVisitAndSpecimens(VisitServiceImpl.java:234)
    at com.krishagni.catissueplus.rest.controller.VisitsController.collectVisitAndSpecimens(VisitsController.java:253)
    at sun.reflect.GeneratedMethodAccessor2096.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.krishagni.catissueplus.rest.filter.AuthTokenFilter.doFilter(AuthTokenFilter.java:140)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:486)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.krishagni.catissueplus.core.common.domain.PrintRuleConfig.ruleDefJson
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:88)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:710)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:379)
    at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4522)
    at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:186)
    at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:137)
    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1112)
    at org.hibernate.loader.Loader.processResultSet(Loader.java:969)
    at org.hibernate.loader.Loader.doQuery(Loader.java:917)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)
    at org.hibernate.loader.Loader.doList(Loader.java:2550)
    at org.hibernate.loader.Loader.doList(Loader.java:2536)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366)
    at org.hibernate.loader.Loader.list(Loader.java:2361)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:124)
    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1623)
    at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
    at com.krishagni.catissueplus.core.common.repository.impl.PrintRuleConfigDaoImpl.getPrintRules(PrintRuleConfigDaoImpl.java:29)
    at com.krishagni.catissueplus.core.biospecimen.services.impl.DefaultSpecimenLabelPrinter.loadRulesFromDb(DefaultSpecimenLabelPrinter.java:303)
    … 69 more
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor2046.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65)
    … 87 more
    Caused by: com.krishagni.catissueplus.core.common.errors.OpenSpecimenException: Print rule label token [specimen_label,specimen_type,specimen_type,specimen_location] does not exist .
    at com.krishagni.catissueplus.core.common.domain.factory.impl.SpecimenLabelPrintRuleFactoryImpl.createLabelPrintRule(SpecimenLabelPrintRuleFactoryImpl.java:50)
    at com.krishagni.catissueplus.core.common.domain.PrintRuleConfig.setRuleDef(PrintRuleConfig.java:114)
    at com.krishagni.catissueplus.core.common.domain.PrintRuleConfig.setRuleDefJson(PrintRuleConfig.java:104)
    … 91 more

    You defined automared Label printing in the collection protocol settings. It seems that the print Token you defined is either Not there or somehow incorrect.
    To troublshoot try disabling automated printing during collection in the CP settings.
    The see if the collection works since this should not be an Issue.
    To fix the printing: you can start a print manually from the specimem Page.
    See if you get the same Error then. If So you got the root cause. If Not… good luck.
    Refer to the print rules at the official documentation go further (make sure you read in the community edition).

    The stuff about the print problem is at the very bottom of your error report.

    Best Simon