Error Reading Credit Card Table

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Reading Credit Card Table

rohit2016
Hi,

I have upgraded of ofbiz to latest trunk 1760059.

I have data stored in the credit card table from much earlier versions of ofbiz and now I am getting the error as below:

I will really appreciate if I can get some inputs on resolving this.

Thanks,

Rohit



2016-10-10 12:40:07,611 |ajp-nio-8009-exec-10 |RequestHandler |I| Rendering View [viewprofile]. Hidden sessionId by default.
2016-10-10 12:40:07,823 |ajp-nio-8009-exec-10 |SqlJdbcUtil |E| null
org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@6a902416].
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:462) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:445) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:390) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:382) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.ofbiz.entity.util.EntityCrypto$ShiroStorageHandler.decryptValue(EntityCrypto.java:281) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityCrypto.doDecrypt(EntityCrypto.java:147) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityCrypto.decrypt(EntityCrypto.java:126) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.decryptFieldValue(GenericDelegator.java:2409) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.jdbc.SqlJdbcUtil.getValue(SqlJdbcUtil.java:587) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:530) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:492) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:80) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1439) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.getRelatedOne(GenericDelegator.java:1779) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericValue.getRelatedOne(GenericValue.java:187) [ofbiz.jar:?]
at org.apache.ofbiz.accounting.payment.PaymentWorker.getPartyPaymentMethodValueMaps(PaymentWorker.java:74) [ofbiz.jar:?]
at org.apache.ofbiz.accounting.payment.PaymentWorker$getPartyPaymentMethodValueMaps$0.call(Unknown Source) [ofbiz.jar:?]
at ViewProfile.run(ViewProfile.groovy:39) [script:?]
at org.apache.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:204) [ofbiz.jar:?]
at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:342) [ofbiz.jar:?]
at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:324) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.AbstractModelAction$Script.runAction(AbstractModelAction.java:633) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.AbstractModelAction.runSubActions(AbstractModelAction.java:142) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:273) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:136) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:1001) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:653) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) [ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:324) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.content.content.ContentUrlFilter.doFilter(ContentUrlFilter.java:99) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:338) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:873) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote-8.0.36.jar:8.0.36]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.36.jar:8.0.36]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:922) ~[sunjce_provider.jar:1.8.0_101]
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833) ~[sunjce_provider.jar:1.8.0_101]
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) ~[sunjce_provider.jar:1.8.0_101]
at javax.crypto.Cipher.doFinal(Cipher.java:2165) ~[?:1.8.0_71]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:459) ~[shiro-core-1.3.0.jar:1.3.0]
... 62 more
2016-10-10 12:40:07,824 |ajp-nio-8009-exec-10 |GenericDelegator |E| Failure in findOne operation for entity [CreditCard]: org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@5f5d2dc2].. Rolling back transaction.
org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@5f5d2dc2].
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:462) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:445) ~[shiro-core-1.3.0.jar:1.3.0]
Reply | Threaded
Open this post in threaded view
|

Re: Error Reading Credit Card Table

rohit2016
Just to add to my previous message, I get the above error when accessing data already in DB prior to updated to latest truck. Data added after truck update is not effected and works just fine.

Thanks,

Rohit
Reply | Threaded
Open this post in threaded view
|

Re: Error Reading Credit Card Table

james_sg
In reply to this post by rohit2016
Hi Rohit,

Please make sure you are subscribed to the mailing list before making a post at Nabble for OFBiz.
By doing so, your posts at Nabble for OFBiz will reach the mailing list where a reply is more likely.

See here for more info: https://ofbiz.apache.org/mailing-lists.html

Regards,
James

rohit2016 wrote
Hi,

I have upgraded of ofbiz to latest trunk 1760059.

I have data stored in the credit card table from much earlier versions of ofbiz and now I am getting the error as below:

I will really appreciate if I can get some inputs on resolving this.

Thanks,

Rohit



2016-10-10 12:40:07,611 |ajp-nio-8009-exec-10 |RequestHandler |I| Rendering View [viewprofile]. Hidden sessionId by default.
2016-10-10 12:40:07,823 |ajp-nio-8009-exec-10 |SqlJdbcUtil |E| null
org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@6a902416].
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:462) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:445) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:390) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:382) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.ofbiz.entity.util.EntityCrypto$ShiroStorageHandler.decryptValue(EntityCrypto.java:281) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityCrypto.doDecrypt(EntityCrypto.java:147) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityCrypto.decrypt(EntityCrypto.java:126) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.decryptFieldValue(GenericDelegator.java:2409) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.jdbc.SqlJdbcUtil.getValue(SqlJdbcUtil.java:587) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:530) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:492) [ofbiz.jar:?]
at org.apache.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:80) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.findOne(GenericDelegator.java:1439) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericDelegator.getRelatedOne(GenericDelegator.java:1779) [ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericValue.getRelatedOne(GenericValue.java:187) [ofbiz.jar:?]
at org.apache.ofbiz.accounting.payment.PaymentWorker.getPartyPaymentMethodValueMaps(PaymentWorker.java:74) [ofbiz.jar:?]
at org.apache.ofbiz.accounting.payment.PaymentWorker$getPartyPaymentMethodValueMaps$0.call(Unknown Source) [ofbiz.jar:?]
at ViewProfile.run(ViewProfile.groovy:39) [script:?]
at org.apache.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:204) [ofbiz.jar:?]
at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:342) [ofbiz.jar:?]
at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:324) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.AbstractModelAction$Script.runAction(AbstractModelAction.java:633) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.AbstractModelAction.runSubActions(AbstractModelAction.java:142) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:273) [ofbiz.jar:?]
at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:136) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98) [ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:1001) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:653) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) [ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:324) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.content.content.ContentUrlFilter.doFilter(ContentUrlFilter.java:99) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:338) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [tomcat-catalina-8.0.36.jar:8.0.36]
at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:873) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote-8.0.36.jar:8.0.36]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote-8.0.36.jar:8.0.36]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.36.jar:8.0.36]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:922) ~[sunjce_provider.jar:1.8.0_101]
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833) ~[sunjce_provider.jar:1.8.0_101]
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) ~[sunjce_provider.jar:1.8.0_101]
at javax.crypto.Cipher.doFinal(Cipher.java:2165) ~[?:1.8.0_71]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:459) ~[shiro-core-1.3.0.jar:1.3.0]
... 62 more
2016-10-10 12:40:07,824 |ajp-nio-8009-exec-10 |GenericDelegator |E| Failure in findOne operation for entity [CreditCard]: org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@5f5d2dc2].. Rolling back transaction.
org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@5f5d2dc2].
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:462) ~[shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:445) ~[shiro-core-1.3.0.jar:1.3.0]