Spring load-time-weaver在websphere应用服务器8.0中不起作用

时间:2014-04-05 15:37:29

标签: spring aspectj websphere-8

05-Apr-2014 14:26:51 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5da05da: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,messageSource,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,sessionFactory,hibernateTemplate,transactionManager,dataSource,creditApplicationDAO,applicationDataDAO,questionsFromCriteriaDAO,criteriaService,creditService,creditApplicationService,esService,externalService,castService,criteriaObectFactory,criteriaUIElement,decisionEngineStatus,systemResponseTime,capeSequenceGenerator,xmlMerger,dataBizValidation,errorMessageXmlCreator,loadTimeWeaver,org.springframework.context.config.internalBeanConfigurerAspect,com.hrg.capeengine.helper.MyTest#0]; root of factory hierarchy
05-Apr-2014 14:26:51 org.springframework.orm.hibernate3.AbstractSessionFactoryBean destroy
INFO: Closing Hibernate SessionFactory
05-Apr-2014 14:26:51 org.hibernate.impl.SessionFactoryImpl close
INFO: closing
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWeaver]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Could not initialize WebSphere LoadTimeWeaver because WebSphere 7 API classes are not available
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    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.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
    at com.hrg.capeengine.test.AutowireTest.main(AutowireTest.java:12)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWeaver]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Could not initialize WebSphere LoadTimeWeaver because WebSphere 7 API classes are not available
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
    ... 13 more
Caused by: java.lang.IllegalStateException: Could not initialize WebSphere LoadTimeWeaver because WebSphere 7 API classes are not available
    at org.springframework.instrument.classloading.websphere.WebSphereClassLoaderAdapter.<init>(WebSphereClassLoaderAdapter.java:63)
    at org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWeaver.<init>(WebSphereLoadTimeWeaver.java:54)
    at org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWeaver.<init>(WebSphereLoadTimeWeaver.java:43)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
    ... 15 more
Caused by: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.<init>(com.ibm.ws.classloader.CompoundClassLoader)
    at java.lang.Class.throwNoSuchMethodException(Class.java:286)
    at java.lang.Class.getDeclaredConstructor(Class.java:451)
    at org.springframework.instrument.classloading.websphere.WebSphereClassLoaderAdapter.<init>(WebSphereClassLoaderAdapter.java:54)
    ... 22 more

**

  • 上下文文件

**

         

1 个答案:

答案 0 :(得分:0)

可以使用不同的配置文件设置Websphere,并且在每个配置文件中都可以使用不同的库和API。

在这种情况下,似乎Websphere 8设置了一个配置文件,其中无法进行加载时间编织工作所需的API。看看这个类似的issue(对于不同版本的WAS来说)。

相关问题