Reputation: 73
We are migrating from JDK 1.6 to 1.7 and we are using spring 2.5.1 version. When starting the application i am getting the below error.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tivoliTransferManager' defined in ServletContext resource [/WEB-INF/classes/spring-managers.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/spring.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/spring.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/spring.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut addSingleUserToGroupPointCut at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:379) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
Do we need to migrate the spring version as well ?
Also please find the content of spring.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<import resource="spring-managers.xml" />
<import resource="spring-elementpermissions.xml" />
<import resource="spring-scheduling.xml" />
<context:annotation-config />
Upvotes: 1
Views: 2469
Reputation: 1135
The error
Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut addSingleUserToGroupPointCut at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run
looks problem with the jar aspectjweaver.jar
.
Please check jar file and configure the compatible aspectjweaver.jar version
Upvotes: 1
Reputation: 4112
Spring 2.5 is not compatible with JDK 1.7 at least explicitly.It was originally built and tested on JDK 1.6 However i would think it should work with JDK 1.7 1.7 barring any big JDK breakages though. Besides the error does not seem like a JDK version related issue at all.
I would recommend upgrading Spring to a later release because there has been a lot of improvements and new features introduced in later versions.
Upvotes: 3