Hi all !
I'm very new to spring and eclipse, and I'm currently working on a codeEnhancement project.
It's my second day to post on this Forum(the only one forum i ever entered), and I think i'm already falling in love with this place!
I'm currently trying to decrypt a password from a decrypt file and use the password to connect to oracle database.
However, I've encourntered a number of errors with this
the first Error is when i set my proxy in eclipse, The error log pops out and states that:
Keybinding conflicts occurred.They may interfere with normail accelerator operation
org.eclipse.core.runtime.AssertionFailedException:assertion failed:
Unhandled event loop exception
Any help will be much appreciated
When i run my codes, it hits the following error:
Exception in
thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PoolingDao' defined in class path resource [jobmgmt_beans.xml]: Invocation of init method failed; nested exception is javax.crypto.BadPaddingException: Given final block not properly padded
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at net.CodeEnhancement.JobMgmt.main(JobMgmt.java:118)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at net.CodeEnhancement.Scrambler.unscramble(Scrambler.java:76)
at net.CodeEnhancement.JdbcDao.decrypt(JdbcDao.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 12 more
I've read some about BadPaddingException and there are people suggeting to store the encrypted variable in byte[].
I've tried it inside my DAO, but it still hits the same error during runtime.
Below is my JdbcDao.java:
and my jobmgmt_beans.xml which has the bean id= PoolingDao:
Any help will be much appreciated