2012-11-25 6 views
2

나는 그것을 해결하지 않고 오일을 보내는 문제가 있습니다 : mvn exec:java을 실행 올바르게 다음과 같은 오류를 던지고, 구성 인수를 구문 분석하는 데 실패목표 org.codehaus.mojo 간부-받는다는 - 플러그인을 실행하지 못했습니다

"Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project poll-translator: An exception occured while executing the Java class. null: InvocationTargetException: Error creating bean with name 'serviceLocator' defined in class path resource [META-INF/dsol/dsol.xml]: Cannot resolve reference to bean 'dsol-service-proxy' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dsol-service-proxy' defined in class path resource [META-INF/dsol/dsol.xml]: Instantiation of bean failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.NullPointerException-->null -> [Help 1]" 

이 는 (아파치 메이븐 3.0.4을 사용) POM 구성 사용 파일입니다

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<parent> 
    <groupId>org.dsol</groupId> 
    <artifactId>dsol-parent</artifactId> 
    <version>1-SNAPSHOT</version> 
    <relativePath>../dsol/dsol-parent/pom.xml</relativePath> 
</parent> 

<groupId>org.dsol.project</groupId> 
<artifactId>poll-translator</artifactId> 
<version>0.1-SNAPSHOT</version> 

<properties> 
    <dsol.version>0.1-SNAPSHOT</dsol.version> 
</properties> 

<repositories> 
    <repository> 
     <id>dsol.internal</id> 
     <url>http://maven.dsol-lang.net:8080/archiva/repository/internal/</url> 
    </repository> 
    <repository> 
     <id>dsol.snapshots</id> 
     <url>http://maven.dsol-lang.net:8080/archiva/repository/snapshots/</url> 
    </repository> 
</repositories> 

<dependencies> 
    <dependency> 
     <groupId>org.dsol</groupId> 
     <artifactId>dsol-interpreter</artifactId> 
     <version>${dsol.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.dsol</groupId> 
     <artifactId>dsol-default-planner-plugin-impl</artifactId> 
     <version>${dsol.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.cxf</groupId> 
     <artifactId>cxf-rt-transports-http-jetty</artifactId> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <configuration> 
       <source>1.6</source> 
       <target>1.6</target> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 
      <version>1.1</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>java</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <mainClass>org.dsol.engine.DSOLServer</mainClass> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>com.thoughtworks.paranamer</groupId> 
      <artifactId>paranamer-maven-plugin</artifactId> 
      <executions> 
       <execution> 
        <id>run</id> <!-- id is optional --> 
        <configuration> 
         <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> 
         <outputDirectory>${project.build.outputDirectory}</outputDirectory> 
        </configuration> 
        <goals> 
         <goal>generate</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
    <pluginManagement> 
     <plugins> 
      <!--This plugin's configuration is used to store Eclipse m2e settings 
       only. It has no influence on the Maven build itself. --> 
      <plugin> 
       <groupId>org.eclipse.m2e</groupId> 
       <artifactId>lifecycle-mapping</artifactId> 
       <version>1.0.0</version> 
       <configuration> 
        <lifecycleMappingMetadata> 
         <pluginExecutions> 
          <pluginExecution> 
           <pluginExecutionFilter> 
            <groupId> 
             com.thoughtworks.paranamer 
            </groupId> 
            <artifactId> 
             paranamer-maven-plugin 
            </artifactId> 
            <versionRange> 
             [2.3,) 
            </versionRange> 
            <goals> 
             <goal>generate</goal> 
            </goals> 
           </pluginExecutionFilter> 
           <action> 
            <execute /> 
           </action> 
          </pluginExecution> 
         </pluginExecutions> 
        </lifecycleMappingMetadata> 
       </configuration> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
</build> 

Idon't는 어디에 문제가 있는지 알고 어떻게 해결할 수 있습니까? 도와 줄수있으세요?

감사합니다. Sana.

+1

classpath 또는 "봄"문제와 유사합니다. Pom을 더 이상 보지 않고서는 아마 SooL입니다 –

답변

1

문제는 봄용 구성이며 구성 설정이 아닙니다. 스프링이 dsol-service-proxy 개체를 만들려고 할 때 생성자가 serviceLocator인데 int가 serviceLocator을 만들고 스프링이 serviceLocator을 생성하는 데 문제가 발생했습니다. dsol.xml을 확인하고 serviceLocator이 올바르게 구성되었는지 확인하십시오.

+0

DSOL.xml 파일을 검사했지만 serviceLocator 필드에 대한 표시기를 찾지 못했습니다! Orchestration_Interface = service.PollTranslator 클래스 = actions.PollTranslatorConcreteActions Service_Context = pollTranslator Service_Port = 8088 Classpath_Folder =/tmp를/클래스 경로 # 서비스 = 클래스 경로 : Dsol이-구성-services.xml에 # 여기 Dsol이 파일의 코드는 작업 = 클래스 경로 : ## 응용 프로그램 특정 속성 abstract_actions.xml # [METHOD_NAME] .goal = # [METHOD_NAME] .initial_state = bingAPIKey = 5AC69AFC18A833033B8F5D123BAFA0F6768FDC5A –

+0

, 당신은 "봄 구성"에 의해 무엇을 또 다른 질문을 의미합니까하세요? –

+0

아 좋아, 그게 마지막이야! 방금 파일의 클래스 경로 위치를 기본 파일로 수정했는데 모두 올바르게 진행되었습니다. 두 분 모두에게 많은 감사를드립니다. –

0

또 다른 가능한 해결책은 <argument>${env.ANDROID_HOME}/build-tools/android-4.2.2/lib/dx.jar</argument> 과 같은 것이 있으면 환경 경로 변수에 ANDROID_HOME을 추가하는 것이 좋습니다.

관련 문제