2011-12-28 11 views
5

मुझे अपने स्प्रिंग एप्लिकेशन को संकलित करने का प्रयास करते समय कोई त्रुटि हो रही है। जब मैं संकलित करता हूं तो मुझे निम्न त्रुटि मिलती है:स्प्रिंग 3.0 त्रुटि: java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException

Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException. Please see server.log for more details. 
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210) 
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106) 
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
at org.apache.tools.ant.Task.perform(Task.java:348) 
at org.apache.tools.ant.Target.execute(Target.java:390) 
at org.apache.tools.ant.Target.performTasks(Target.java:411) 
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) 
at org.apache.tools.ant.Project.executeTarget(Project.java:1368) 
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 
at org.apache.tools.ant.Project.executeTargets(Project.java:1251) 
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) 
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) 
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153) 

प्रेषक-servlet.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:p="http://www.springframework.org/schema/p" 
    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-3.0.xsd 
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd 
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

<context:spring-configured/> 
<context:annotation-config/> 
<context:component-scan base-package="connect.controller"/> 


<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/> 

<!-- 
Most controllers will use the ControllerClassNameHandlerMapping above, but 
for the index controller we are using ParameterizableViewController, so we must 
define an explicit mapping for it. 
--> 
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> 
    <property name="mappings"> 
     <props> 
      <prop key="index.htm">indexController</prop> 
      <prop key="main.htm">mainViewController</prop> 
     </props> 
    </property> 
</bean> 

<bean id="viewResolver" 
     class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
     p:prefix="/WEB-INF/jsp/" 
     p:suffix=".jsp" /> 

<!-- 
The index controller. 
--> 
<bean name="indexController" 
     class="org.springframework.web.servlet.mvc.ParameterizableViewController" 
     p:viewName="index" /> 

किसी भी मदद की बहुत सराहना की जाएगी।

+0

आप सभी आवश्यक पुस्तकालयों की तैनाती कर रहे हैं करने के लिए जार जोड़ने है? ऐसा लगता है कि आप एक निर्भरता (या एक पारस्परिक निर्भरता) खो रहे हैं। –

+0

मुझे ऐसा लगता है। मैं netbeans का उपयोग कर रहा हूँ तो यह स्वचालित रूप से वसंत कंकाल बनाता है। –

+0

लेकिन आपने निर्भरताएं जोड़ दी हैं; जब तक आप मेवेन का उपयोग नहीं कर रहे हैं, मुझे विश्वास नहीं है कि यह स्वचालित रूप से आवश्यक पुस्तकालयों को जोड़ देगा। आप कौन से पुस्तकालय तैनात कर रहे हैं? –

उत्तर

संबंधित मुद्दे