2017-05-02 2 views
1

방금 ​​내 Vaadin 프로젝트를 7.7.6에서 8.0.5로 마이그레이션했습니다. 먼저 Vaadin8 마이그레이션 도구를 사용하려고했지만 IDE에서 너무 많은 vaadin. * imports를 사용하여 수동으로 수행했습니다. 근무 시간 외에도 (호환 패키지 가져 오기) 메이븐 빌드가 다시 작동하고 브라우저에서 웹 애플리케이션을 열고 싶지만 "위젯 세트를로드하지 못했습니다 ..."라는 오류 메시지가 나타납니다.Vaadin8 마이그레이션 후 Vaadin Widgetset 컴파일 오류

편집 2017년 5월 4일 : 나는 내가 위젯 셋하지만 만약 angel-받는다는 - 플러그인 오류가 발생 재 컴파일 할 필요가 있다고 생각 나는 QueryDSL 의존성을 제거 "querydsl-APT를"및 위젯 셋이 컴파일 ...합니까 왜 이런 일이 일어나는 지 아는 사람이 있습니까?

c:\dev\workspace_intellij\wsi>mvn vaadin:compile 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building wsi 2.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for com.querydsl:querydsl-core:jar:3.7.4 is missing, no dependency information available 
[INFO] 
[INFO] --- vaadin-maven-plugin:8.0.5:compile (default-cli) @ wsi --- 
[INFO] auto discovered modules [WsiWidgetset] 
[INFO] Using com.vaadin:vaadin-client-compiler version 8.0.5 
[INFO] Compiling module WsiWidgetset 
[INFO] [ERROR] An internal compiler exception occurred 
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3944) 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.getInternalCompilerException(GwtAstBuilder.java:4351) 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMembers(GwtAstBuilder.java:4043) 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.processImpl(GwtAstBuilder.java:3883) 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3918) 
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:129) 
[INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384) 
[INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470) 
[INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1092) 
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:325) 
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548) 
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:479) 
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:465) 
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423) 
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:222) 
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202) 
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143) 
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:204) 
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155) 
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144) 
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118) 
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55) 
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50) 
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:125) 
[INFO] Caused by: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.lookup.MethodBinding.isDefaultMethod()Z 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMethod(GwtAstBuilder.java:4138) 
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.createMembers(GwtAstBuilder.java:4033) 
[INFO] ... 21 more 
[INFO] [ERROR] at SVGPathSegLinetoVerticalAbs.java(30): public interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg 
[INFO]  org.eclipse.jdt.internal.compiler.ast.TypeDeclaration 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 13.929 s 
[INFO] Finished at: 2017-05-02T15:04:34+02:00 
[INFO] Final Memory: 35M/434M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.5:compile (default-cli) on project wsi: Command [[ 
[ERROR] C:\Program Files\Java\jdk1.8.0_102\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war c:\dev\workspace_intellij\wsi\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen c:\dev\workspace_intellij\wsi\target\.generated WsiWidgetset 
[ERROR] ]] failed with status 1 
[ERROR] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

내 pom.xml 파일은 다음과 같습니다

<?xml version="1.0" encoding="UTF-8"?> 
<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.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>1.5.2.RELEASE</version> 
     <relativePath /> 
    </parent> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <java.version>1.8</java.version> 

     <vaadin.version>8.0.5</vaadin.version> 
     <vaadin.plugin.version>8.0.5</vaadin.plugin.version> 
     <vaadin.charts.version>4.0.0</vaadin.charts.version> 
     <vaadin.spring.version>2.0.1</vaadin.spring.version> 
     <vaadin.context.menu.version>2.0.0</vaadin.context.menu.version> 
     <vaadin.fontawesome.version>1.3.4</vaadin.fontawesome.version> 
     <vaadin.componentrenderer.version>2.0.0</vaadin.componentrenderer.version> 

     [...] 

    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-jpa</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-ldap</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-security</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-spring-boot-starter</artifactId> 
      <version>${vaadin.spring.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>mysql</groupId> 
      <artifactId>mysql-connector-java</artifactId> 
      <scope>runtime</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.h2database</groupId> 
      <artifactId>h2</artifactId> 
      <scope>runtime</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-tomcat</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-test</artifactId> 
      <scope>test</scope> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-thymeleaf</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-lang3</artifactId> 
      <version>3.0</version> 
     </dependency> 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-push</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.vaadin.addons</groupId> 
      <artifactId>fontawesomelabel</artifactId> 
      <version>${vaadin.fontawesome.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.directory.server</groupId> 
      <artifactId>apacheds-server-jndi</artifactId> 
      <version>1.5.5</version> 
     </dependency> 

     <dependency> 
      <groupId>org.flywaydb</groupId> 
      <artifactId>flyway-core</artifactId> 
      <version>4.0.1</version><!--$NO-MVN-MAN-VER$--> 
     </dependency> 

     <dependency> 
      <groupId>org.imgscalr</groupId> 
      <artifactId>imgscalr-lib</artifactId> 
      <version>4.2</version> 
     </dependency> 

     <dependency> 
      <groupId>com.google.code.gson</groupId> 
      <artifactId>gson</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jms</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.activemq</groupId> 
      <artifactId>activemq-broker</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>com.querydsl</groupId> 
      <artifactId>querydsl-core</artifactId> 
      <version>4.1.4</version> 
     </dependency> 
     <dependency> 
      <groupId>com.querydsl</groupId> 
      <artifactId>querydsl-apt</artifactId> 
      <version>4.1.4</version> 
     </dependency> 
     <dependency> 
      <groupId>com.querydsl</groupId> 
      <artifactId>querydsl-jpa</artifactId> 
      <version>4.1.4</version> 
     </dependency> 

     <dependency> 
      <groupId>org.vaadin.addons</groupId> 
      <artifactId>mediaelementjs-player</artifactId> 
      <version>1.3.3</version> 
     </dependency> 
     <dependency> 
      <groupId>org.vaadin.patrik</groupId> 
      <artifactId>GridFastNavigation</artifactId> 
      <version>0.2.1</version> 
     </dependency> 

     <!-- Eigenes Kompilat, da Sourcen nicht attached waren --> 
     <dependency> 
      <groupId>org.vaadin.addons.lazyquerycontainer</groupId> 
      <artifactId>vaadin-lazyquerycontainer</artifactId> 
      <version>7.6.1.3</version> 
     </dependency> 

     <!-- WIDGETSET --> 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-charts</artifactId> 
      <version>${vaadin.charts.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-context-menu</artifactId> 
      <version>${vaadin.context.menu.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>de.datenhahn.vaadin</groupId> 
      <artifactId>componentrenderer</artifactId> 
      <version>${vaadin.componentrenderer.version}</version> 
     </dependency> 

     <!-- WIDGETSET END --> 

     [...] 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-compatibility-server</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>com.vaadin</groupId> 
      <artifactId>vaadin-compatibility-client</artifactId> 
     </dependency> 

    </dependencies> 

    <repositories> 
     <repository> 
      <id>vaadin-addons</id> 
      <url>http://maven.vaadin.com/vaadin-addons</url> 
     </repository> 
    </repositories> 

    <dependencyManagement> 
     <dependencies> 
      <dependency> 
       <groupId>com.vaadin</groupId> 
       <artifactId>vaadin-bom</artifactId> 
       <version>${vaadin.version}</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 
     </dependencies> 
    </dependencyManagement> 

    <build> 
     <plugins> 

      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-source-plugin</artifactId> 
      </plugin> 

      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-clean-plugin</artifactId> 
       <!-- Clean up also any pre-compiled themes --> 
       <configuration> 
        <filesets> 
         <fileset> 
          <directory>src/main/webapp/VAADIN/themes</directory> 
          <includes> 
           <include>**/styles.css</include> 
           <include>**/styles.scss.cache</include> 
          </includes> 
         </fileset> 
        </filesets> 
       </configuration> 
      </plugin> 

      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <configuration> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
        <!-- Exclude some unnecessary files generated by the GWT compiler. --> 
        <packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**, WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes> 
       </configuration> 
      </plugin> 

      <plugin> 
       <groupId>com.vaadin</groupId> 
       <artifactId>vaadin-maven-plugin</artifactId> 
       <version>${vaadin.plugin.version}</version> 

       <configuration> 
        <extraJvmArgs>-Xmx1G</extraJvmArgs> 
       </configuration> 

       <executions> 
        <execution> 
         <goals> 
          <goal>update-theme</goal> 
          <goal>update-widgetset</goal> 
          <goal>compile</goal> 
          <!-- Comment out compile-theme goal to use on-the-fly theme compilation --> 
          <goal>compile-theme</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 

      <plugin> 
       <groupId>com.mysema.maven</groupId> 
       <artifactId>apt-maven-plugin</artifactId> 
       <version>1.1.3</version> 
       <executions> 
        <execution> 
         <goals> 
          <goal>process</goal> 
         </goals> 
         <configuration> 
          <outputDirectory>target/generated-sources</outputDirectory> 
          <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 

     </plugins> 
    </build> 

    [...] 

</project> 

내 Widgetset.gwt.xml은 다음과 같습니다 잘못되어 가고 무슨

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" 
     "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd"> 
<module> 
    <!-- 
    Uncomment the following to compile the widgetset for one browser only. 

    Multiple browsers can be specified as a comma separated list. The supported user agents at the moment of writing were: 
    ie8,ie9,gecko1_8,safari,opera 

    The value gecko1_8 is used for Firefox and safari is used for webkit based browsers including Google Chrome. 
    --> 
    <!-- <set-property name="user.agent" value="safari"/> --> 

    <!-- 
    To enable SuperDevMode, uncomment this line. 
    See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more information and instructions. 
    --> 
    <!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> --> 

    <!--<inherits name="com.vaadin.DefaultWidgetSet"/>--> 

    <inherits name="com.vaadin.v7.Vaadin7WidgetSet" /> 

    <inherits name="com.vaadin.addon.charts.Widgetset"/> 

    <inherits name="de.datenhahn.vaadin.componentrenderer.ComponentRendererWidgetSet"/> 

    <inherits name="com.vaadin.contextmenu.WidgetSet" /> 

    <inherits name="org.vaadin.patrik.GridFastNavigation" /> 
</module> 

는 아는 사람 있나요?

안부

일반적으로 NoSuchMethodError
+0

언뜻보기에는 classpath 문제처럼 보입니다. 아마도 일부 플러그인에 의해 간접적으로 참조되는 한 라이브러리 (jdt ?!)의 여러 버전 일 것입니다. 따라서 [sscce] (http://sscce.org)가 없어도 추적 할 수 있습니다. 아마도 유용한 [link 1] (https://groups.google.com/forum/#!topic/google-web-toolkit/pU-Bop35KiE) 및 [link 2] (https://github.com/gwtproject/gwt/issues/9447) – Morfic

+0

@Morfic 방금 내 pom의 모든 종속성을 단계적으로 제거했습니다. QueryDSL 의존성을 제거한 후 "querydsl-apt"내 widgetset이 컴파일 중입니다 ...하지만 querydsl이 필요합니다. 왜 호환되지 않습니까? – shinchillahh

+1

아마도 QueryDSL은 JDT 라이브러리를 참조하지만 GWT와 다른 버전을 참조합니다. 컴파일 타임에 클래스 패스에서 잘못된 클래스가 선택되어 오류가 발생합니다. _full_pom에'mvn dependency : tree'를 실행하여 완전한 의존성 트리를보고 [명시 적으로 제외] (https : //maven.apache.org/guides/introduction/introduction-to-excludes-dependencies.html)에서 QueryDSL의 JDT 버전을 다운로드하고 위젯 세트가 컴파일되고 앱이 여전히 제대로 작동하는지 확인하십시오. 그렇지 않으면 widgetset 컴파일과 패키징/앱 실행을 모두 허용하는 해결 방법을 찾아야합니다. – Morfic

답변

2

는 의미에서, 클래스 경로에 문제가 있음을 나타냅니다 그 코드를 작성 (당신의 IDE가 오류를 확인하기 위해 인라인에게 코드를 컴파일) 할 때 당신이 당신의 CP에있는 라이브러리 maven 컴파일 타임 cp와는 다른 버전이다. 코드를 컴파일하거나 실행할 때 코드를 작성할 때 사용할 수있는 방법이 더 이상 없습니다 (late binding 참조). 특정 경우

,이 때문에 JDT 버전을 사용하는 QueryDSL 의존성에 일 가능성 간접 결과이며, 만약 angel 받는다는 다른 JDT 버전을 참조하는 GWT 플러그인을 사용하여 플러그인.

해결 방법으로 QueryDSL 버전 또는 Vaadin maven 플러그인의 explicitly exclude JDT 전이 종속성을 확인하고 해당 동작 여부를 확인할 수 있습니다.

P. 정확하게 JDT 의존성을 참조하고있는 사람을 확인하려면 mvn dependency:tree

0

That worked> Thanks a lot. 고맙습니다. 나는 추가 :

<exclusion> 
 
    <groupId>org.eclipse.jdt.core.compiler</groupId> 
 
    <artifactId>ecj</artifactId> 
 
</exclusion>

을 내 치어 의존성에.