- This topic has 4 replies, 3 voices, and was last updated 16 years, 4 months ago by wciesiel.
-
AuthorPosts
-
geodokParticipantHi,
upgrading to MyEclipse 6.5, I was looking forward being able to use the HQL editor with my spring-configured hibernate configuration using annotations. However, now I see the following error when starting the HQL Editor:
java.lang.NoClassDefFoundError: javax/annotation/PostConstruct at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.<init>(CommonAnnotationBeanPostProcessor.java:186) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:96) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:837) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:579) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366) at com.genuitec.eclipse.hibernate.tool.MEFileSystemXmlApplicationContext.<init>(MEFileSystemXmlApplicationContext.java:32) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:174) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:109) at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) !ENTRY org.hibernate.eclipse.console 1 0 2008-06-26 14:53:17.875 !MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException
Aren’t beans using JSR250-annotations supported by MyEclipse 6.5? The required jar is on the project’s class path.
Brian FernandesModeratorTimo,
A quick sanity check first, did you recreate this project in 6.5 using Hibernate 3.2 capabilities and then add Spring with annotation support enabled (or vice versa)?
Some of the JARs on the project’s classpath may not be read; to help track this down, if you remove the @PostConstruct and other JSR250 annotations (if it is possible to do that), does the editor work? If you couldcreate a new project with just a single table annotated in such a way, it would help.
Sorry for the inconvenience caused.
geodokParticipantHi Brian,
the procedure was as follows:
1. manually removed all entries for spring and hibernate in the .project (buildCommand and nature)
2. added spring nature with MyEclipse _not_ adding any MyEclipse libraries
3. added hibernate nature with MyEclipse _not_ adding any MyEclipse libraries
4. opened HQL EditorI didn’t like the first step but couldn’t find a MyEclipse-way to remove a nature. Is there one? Is it “allowed” not adding the MyEclipse library sets? I don’t need them, all jars are on the classpath.
Now, with an other project which isn’t using JSR-250 I did the same thing and got the following error when opening the HQL editor:
!ENTRY org.eclipse.core.resources 2 1 2008-06-30 09:50:16.750 !MESSAGE Skipping builder 'com.genuitec.eclipse.jsf.configValidator' for project '54GermanSiteNeu-Frontend'. Either the builder is missing from the install, or it belongs to a project nature that is missing or disabled. !ENTRY org.hibernate.eclipse.console 4 4 2008-06-30 09:50:46.875 !MESSAGE LocalSessionFactoryBean could not be created. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:C:/00timo/eclipse-workspace/54GermanSiteNeu-Backend/src/de/geodok/germansite/databaseContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem !SUBENTRY 1 org.hibernate.eclipse.console 4 150 2008-06-30 09:50:46.875 !MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: LocalSessionFactoryBean could not be created. !STACK 0 org.hibernate.console.HibernateConsoleRuntimeException: LocalSessionFactoryBean could not be created. at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:183) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:109) at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:C:/00timo/eclipse-workspace/54GermanSiteNeu-Backend/src/de/geodok/germansite/databaseContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:179) ... 5 more Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.isAspect(AbstractAspectJAdvisorFactory.java:120) at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.java:98) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.isInfrastructureClass(AbstractAutoProxyCreator.java:364) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:266) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:789) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:760) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399) ... 14 more !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2008-06-30 09:50:46.890 !MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: LocalSessionFactoryBean could not be created. !STACK 0 org.hibernate.console.HibernateConsoleRuntimeException: LocalSessionFactoryBean could not be created. at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:183) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:109) at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:C:/00timo/eclipse-workspace/54GermanSiteNeu-Backend/src/de/geodok/germansite/databaseContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:179) ... 5 more Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.isAspect(AbstractAspectJAdvisorFactory.java:120) at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.java:98) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.isInfrastructureClass(AbstractAutoProxyCreator.java:364) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:266) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:789) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:760) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399) ... 14 more !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2008-06-30 09:50:46.890 !MESSAGE org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:C:/00timo/eclipse-workspace/54GermanSiteNeu-Backend/src/de/geodok/germansite/databaseContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem !STACK 0 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:C:/00timo/eclipse-workspace/54GermanSiteNeu-Backend/src/de/geodok/germansite/databaseContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:179) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:109) at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.isAspect(AbstractAspectJAdvisorFactory.java:120) at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.java:98) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.isInfrastructureClass(AbstractAutoProxyCreator.java:364) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:266) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:789) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:760) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399) ... 14 more !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2008-06-30 09:50:46.890 !MESSAGE java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem !STACK 0 java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem at org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.isAspect(AbstractAspectJAdvisorFactory.java:120) at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.java:98) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.isInfrastructureClass(AbstractAutoProxyCreator.java:364) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:266) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:789) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:760) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration$1.execute(MEConsoleConfiguration.java:179) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildWith(MEConsoleConfiguration.java:170) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:109) at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) !ENTRY org.hibernate.eclipse.console 1 0 2008-06-30 09:50:46.890 !MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException
Again, the complained class is on the class path (aspectjrt.jar). To me it looks like MyEclipse is having problems reading the project’s jars.
Do I really have to recreate the project from scratch to work around these problems?
geodokParticipantAny progress on this issue yet?
wciesielMemberI have the same problem… Since we’ve added aspectj libs to the project HQL/Criteria editors fail with message complaining about lack of AjTypeSystem class. In the application context we have
<aop:aspectj-autoproxy />
-
AuthorPosts