1. 程式人生 > >javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padd

javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padd

jpa (2.1.0) +spring (3.2.7.RELEASE)+eclipseLink (2.6.3)+junit(4.12)

異常棧

2016-10-10 10:21:11  [ main:1933 ] - [ ERROR ]  Caught exception while allowing TestExecutionListener [org.springframewor[email protected]75b1571d] to prepare test instance [[email protected]28e90eef]
java.lang.IllegalStateException: Failed to
load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99) at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109
) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:307) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211
) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-7107] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.ValidationException Exception Description: Error encountered during string decryption. Internal Exception: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:248) at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:64) at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:91) ... 26 more Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-7107] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.ValidationException Exception Description: Error encountered during string decryption. Internal Exception: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:815) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:183) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:528) at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactoryImpl(PersistenceProvider.java:385) at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:313) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:290) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) ... 41 more Caused by: Exception [EclipseLink-7107] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.ValidationException Exception Description: Error encountered during string decryption. Internal Exception: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher at org.eclipse.persistence.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:894) at org.eclipse.persistence.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:114) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateLogins(EntityManagerSetupImpl.java:2404) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateSession(EntityManagerSetupImpl.java:2716) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:710) ... 50 more Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676) at com.sun.crypto.provider.DESCipher.engineDoFinal(DESCipher.java:314) at javax.crypto.Cipher.doFinal(Cipher.java:2087) at org.eclipse.persistence.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:109) ... 53 more

相關推薦

javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padd

jpa (2.1.0) +spring (3.2.7.RELEASE)+eclipseLink (2.6.3)+junit(4.12) 異常棧 2016-10-10 10:21:11 [ main:1933 ] - [ ERROR ] Caught ex

java AES 加密,報javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decryp

java 使用AES解密報這個異常,字面理解很容易,就是解密的字串的陣列必須是16的倍數javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting wi

擾人的異常2: Input length must be multiple of 8 when decrypting with padded cipher

javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipherat com.sun.crypto.provider.C

Android AES加密報錯處理:javax.crypto.IllegalBlockSizeException: error:1e00007b:Cipher functions:OPENSSL_internal:WRONG_FINAL_BLOCK_LENGTH

xxxxx 說明 openssl length 技術分享 可能 而不是 com bsp 一、問題說明 今天寫AES加/解密功能的apk,設想是四個控件(測試用的,界面醜這種東西請忽略) 一個編緝框----用於輸入要加密的字符串 一個文本框----用於輸出加密後的字符串,和加

javax crypto IllegalBlockSizeException last block incomplet

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

java.lang.IllegalArgumentException: Path length must be > 0

java.lang.IllegalArgumentException: Path length must be > 0     at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java

is not a registered tag library. Must be one of:

django自定義模板標簽,使用時報以下錯誤 TemplateSyntaxError at /my_customer_tags/ ‘admin_tags‘ is not a registered tag library. Must be one of: admin_list admin_modify admi

pytorch view(): argument 'size' (position 1) must be tuple of ints, not Tensor

 view(): argument 'size' (position 1) must be tuple of ints, not Tensor pytorch的view函式引數不能是tensor,解決方法是,把引數改為tensor.shape 或者size()  gr

8 Pros And Cons Of Artificial Intelligence You Must Be Aware Of!

There is lots of talk about the Artificial Intellenege in IT industry. Needless to say, it is going to be a big advancement in the technology field. As lik

cwRsync提示password file must be owned by root when running as root的解決方法

cwRsync提示password file must be owned by root when running as

Tensorflow報錯:ValueError: Stride must be > 0, but got 0 for '...' with input shapes: [...], [...]

完整錯誤報錯為:ValueError: Stride must be > 0, but got 0 for 'gradients/CON/de_conv8/conv2d_transpose_grad/Conv2D' (op: 'Conv2D') with input shapes: [96,1

【TensorFlow】ValueError: Shape must be rank 1 but is rank 0 for ' ’ with input shapes: [].問題

基於TensorFlow訓練mnist資料集出現如下錯誤: 檢測程式碼,發現是偏置設定格式錯誤導致。 1、錯誤程式碼:  # 定義權重和偏置 n_input = 784 n_output = 10 weights = { 'wc1': tf.Variable(

ValueError: Shape must be rank 2 but is rank 0 for 'MatMul_8' (op: 'MatMul') with input shapes: [],

這個報錯多半是因為自己在定義placeholder的時候,沒有指定shape,導致系統預設將X看做為標量,無法做出正確的匹配 X = tf.placeholder(dtype=tf.float32, shape=()  -》 X = tf.placeholder(dtype

javax.mail 報錯 501 mail from address must be same as authorization user 解決方法

從一個郵箱傳送郵件 從一個郵箱傳送郵件報錯 501 mail from address must be same as authorization user,是由於獲取Session時的賬號和Message中設定的郵箱地址setFrom不一致引起的 程式碼如

The path to the driver executable must be set by the webdriver.gecko.driver system property;

pack 如果 leg ide rec sel window win find 今天安裝了webdriver後,編寫了一個測試小程序,但運行時控制臺報了這樣的錯誤: 1 Exception in thread "main" java.lang.IllegalStat

Invalid character found in method name. HTTP method names must be tokens

error 緩沖 pan img cut ade odi port col o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header Note: furt

解決Android Studio下Element layer-list must be declared問題

post 報錯 ont ack 是個 oid 應該 track 產生 近期將一個項目從Eclipse轉到Android Studio。項目中使用了環信demo中的一些xml資源,轉換後發現color資源目錄下諸如layer-list或者shape等標簽報Elemen

Constructor call must be the first statement in a constructor

nag mic tracking student cte 共存 sys 類繼承 進行 super()和this ()不能共存。否則編譯時會報異常。 Constructorcall must be the first statement in a constructo

C#使用QQ郵箱發送,出現mail from address must be same as authorization user異常

第三方 smt log .cn user alt from 登錄密碼 mtp 1.未開啟pop3或者smtp 2.在使用第三方客戶端時,郵箱登錄密碼不是“登錄密碼”,應該是生成的授權碼。 如圖: C#使用QQ郵箱發送,出現mail from address must b

A master URL must be set in your configuration問題解決方法

2.0 erro reflect sse native span pre park ons 1 Using Spark‘s default log4j profile: org/apache/spark/log4j-defaults.properties 2 16/1