• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Error while handling transactions in Spring

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the exception as shown below while trying to handle transaction handling. I have kept the following jars in the EAR

1) aspectjrt.jar
2) aspectjweaver.jar
3) cglib-2.1.jar

I am getting the exception as shown below while trying to handle transaction handling. I have kept the following jars in the EAR

1) aspectjrt.jar
2) aspectjweaver.jar
3) cglib-2.1.jar

Following is my application-context.xml
<bean id="testBean" class="com.marsh.dRoy.PricingRequest" scope="prototype">
</bean>
<tx:advice id="savePRAdvice" transaction-manager="transactionManager">

<tx:attributes>
<tx:method name="savePricingRequest" propagation="REQUIRED" rollback-for="com.marsh.global.framework.exception.MarshException" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="createPR" expression="execution(* com.marsh.dRoy.PricingRequest.*(..))"/>
<aop:advisor advice-ref="savePRAdvice" pointcut-ref="createPR"/>
</aop:config>

I am getting the following exception when I try to start my application

[12/29/09 4:44:57:967 EST] 00000017 WebApp SRVE0180I: [NPTWeb] [/NPTWeb] [Servlet.LOG]: Initializing Spring root WebApplicationContext
[12/29/09 4:44:59:171 EST] 00000017 WebApp Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/npt-application-context.xml]; nested exception is java.lang.NoClassDefFoundError: org.aspectj.weaver.BCException
[12/29/09 4:44:59:155 EST] 00000017 SystemErr org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/application-context.xml]; nested exception is java.lang.NoClassDefFoundError: org.aspectj.weaver.BCException
Caused by: java.lang.NoClassDefFoundError: org.aspectj.weaver.BCException
at java.lang.Class.verifyImpl(Native Method)
at java.lang.Class.verify(Class.java:253)
at java.lang.Class.initialize(Class.java:315)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:116)
at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(ConfigBeanDefinitionParser.java:206)
at org.springframework.aop.config.ConfigBeanDefinitionParser.createPointcutDefinition(ConfigBeanDefinitionParser.java:519)
at org.springframework.aop.config.ConfigBeanDefinitionParser.parsePointcut(ConfigBeanDefinitionParser.java:456)
at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:140)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1355)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:371)
at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114)
at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127)
at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:1678)
at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

[12/29/09 4:44:59:155 EST] 00000017 SystemErr Caused by: java.lang.NoClassDefFoundError: org.aspectj.weaver.BCException
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at java.lang.Class.verifyImpl(Native Method)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at java.lang.Class.verify(Class.java:253)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at java.lang.Class.initialize(Class.java:315)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at java.lang.Class.forNameImpl(Native Method)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at java.lang.Class.forName(Class.java:116)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(ConfigBeanDefinitionParser.java:206)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.aop.config.ConfigBeanDefinitionParser.createPointcutDefinition(ConfigBeanDefinitionParser.java:519)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.aop.config.ConfigBeanDefinitionParser.parsePointcut(ConfigBeanDefinitionParser.java:456)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:140)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1355)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:371)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:1678)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
[12/29/09 4:44:59:171 EST] 00000017 SystemErr
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)



 
Ranch Hand
Posts: 85
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
include aspectjtools.jar in the classpath
 
reply
    Bookmark Topic Watch Topic
  • New Topic