0 0

搭petclinic环境时候启动报错,JAVA版本问题5

2012-3-25 15:52:20 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/applicationContext-dataSource.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 resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error annotation type patterns are only supported at Java 5 compliance level or above
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:452)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error annotation type patterns are only supported at Java 5 compliance level or above
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
	at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:86)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:100)
	at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:84)
	at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:107)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:278)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:848)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:820)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:446)
	... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error annotation type patterns are only supported at Java 5 compliance level or above
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	... 42 more
Caused by: java.lang.IllegalArgumentException: error annotation type patterns are only supported at Java 5 compliance level or above
	at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:326)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:195)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:181)
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:162)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200)
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254)
	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)


可是我JDK是1.6,项目的编译环境也是5.0,仍然报版本的问题。
看字面意思应该是spring的annotation的支持问题,可是我的JDK编译版本都是5.0及以上的啊?
请问下是怎么回事?
2012年3月25日 15:57

1个答案 按时间排序 按投票排序

0 0

可能是你的spring版本的问题

2012年4月09日 17:30

相关推荐

    spring petclinic

    《Spring PetClinic:探索Spring框架的实践案例》 Spring PetClinic是Spring官方提供的一款开源示例应用,它主要用于展示Spring框架的核心特性及其在实际项目中的应用。这个项目不仅适用于初学者理解Spring的工作...

    compass PetClinic 项目源码及工程

    使用Maven进行构建和运行,可以借助IDEA或Eclipse等开发工具,配置好Spring Boot的运行环境,运行主类启动应用。同时,项目还提供了单元测试和集成测试用例,帮助开发者验证代码的正确性。 7. **学习与实践** ...

    spring-petclinic-master运行mvn install报错:Failed to execute goal io.spring.javaformat:spring-javaformat

    spring-petclinic-master运行mvn install报错:Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.19:validate (default) on project spring-petclinic: Formatting violations ...

    PetClinic:旨在由具有Java后端和HTML前端的宠物诊所使用的功能齐全的Web应用程序

    我们的问题跟踪器可在以下位置找到: : 在Eclipse / STS中使用Petclinic 先决条件 您的系统中应安装以下各项: Maven 3( ) git命令行工具( ) 带有m2e插件的Eclipse(使用Eclipse的STS( )发行版时,默认...

    Spring框架的示例项目源码 Spring Petclinic

    **Spring框架的示例项目源码 - Spring Petclinic** Spring Petclinic是Spring官方提供的一款开源示例应用,它用于展示Spring框架的各种特性及其在实际开发中的应用。该项目可以帮助开发者理解和学习Spring框架的...

    Spring + Hibernate 例子(使用petclinic, 利用ant)

    在压缩包的文件名称列表中,“petclinic”可能是项目文件夹的名字,里面会包含诸如Java源代码、配置文件(如Spring的bean配置文件和Hibernate的映射文件)、Ant的build.xml构建文件以及可能的数据库脚本等。...

    spring-petclinic-rest:Spring Petclinic示例应用程序的REST版本

    REST版本的Spring PetClinic示例应用程序(spring-framework-petclinic扩展) Spring Petclinic应用程序的此后端版本仅提供REST API。 没有UI 。 是使用REST API的Angular前端应用程序。 通过一些图表了解Spring ...

    petclinic.war

    petclinic.war ,Java Spring Demo petclinic.war ,Java Spring Demo

    spring-petclinic-angular:Spring Petclinic示例应用程序的Angular 8版本(前端)

    从后端使用REST API在启动前端应用程序之前,您需要启动后端服务器。 屏幕截图 安装 按照描述将更新到最新版本(当前为8.0.3)。 npm uninstall -g angular-cli @angular/cli npm cache clean npm install -g @...

    spring-petclinic:https://github.comspring-projectsspring-petclinic.git

    通过一些图表了解Spring Petclinic应用程序 在本地运行诊所 Petclinic是使用构建的应用程序。 您可以构建一个jar文件并从命令行运行它: git clone https://github.com/spring-projects/spring-petclinic.git cd ...

    Petclinic:PET CLINIC JAVA弹簧靴

    在默认配置下,Petclinic使用内存数据库(HSQLDB),该数据库在启动时会填充数据。 如果需要持久数据库配置,则为MySql提供类似的设置。 请注意,无论何时更改数据库类型,都需要更新data-access.properties文件,...

    spring petclinic project

    《Spring PetClinic项目详解:领略Spring框架与Java后端开发的魅力》 Spring PetClinic项目是Spring官方推出的一个小型示例应用,旨在帮助开发者更好地理解和掌握Spring框架的核心功能和特性。这个项目不仅是一个...

    spring-petclinic

    Spring的PetClinic示例应用程序 了解了一些图中的Spring的PetClinic应用 在本地运行诊所 Petclinic中是一个使用内置的应用程序 。 你可以建立一个jar文件,并在命令行中运行它: git clone ...

    petclinic

    NULL 博文链接:https://kwanchai.iteye.com/blog/707923

    jgsu-spring-petclinic:在我的Jenkins Pluralsight入门课程中使用的spring-petclinic示例的WIP更新

    通过一些图表了解Spring Petclinic应用程序 在本地运行诊所 Petclinic是使用构建的应用程序。 您可以构建一个jar文件并从命令行运行它: git clone https://github.com/spring-projects/spring-petclinic.git cd ...

    spring-petclinic:研究弹簧靴的项目

    通过一些图表了解Spring Petclinic应用程序 在本地运行诊所 Petclinic是使用构建的应用程序。 您可以构建一个jar文件并从命令行运行它: git clone https://github.com/spring-projects/spring-petclinic.git cd ...

    spring-petclinic-rest-resolved

    REST版本的Spring PetClinic示例应用程序(spring-framework-petclinic扩展) Spring Petclinic应用程序的此后端版本仅提供REST API。 没有UI 。 是Angular前端应用程序,它使用了REST API。 通过一些图表了解...

    spring-petclinic:一个基于Spring的示例应用程序

    通过一些图表了解Spring Petclinic应用程序 在本地运行诊所 Petclinic是使用构建的应用程序。 您可以构建一个jar文件并从命令行运行它: git clone https://github.com/spring-projects/spring-petclinic.git cd ...

    spring-petclinic-angularjs:Spring Petclinic示例应用程序的AngularJS 1和Spring Boot 2版本

    Spring PetClinic示例应用程序的AngularJS和Spring Boot版本 通过一些图表了解Spring Petclinic应用程序 在本地运行诊所 git clone https://github.com/spring-petclinic/spring-petclinic-angularjs.git cd spring-...

    spring-sfg-petclinic:Spring启动学习

    1. 主启动类:通常包含 `@SpringBootApplication` 注解,这是 Spring Boot 应用的入口,该注解会启动 Spring 容器并扫描组件。 2. ApplicationRunner 或 CommandLineRunner:可选接口,用于在应用启动后执行特定任务...

Global site tag (gtag.js) - Google Analytics