2017年3月4日土曜日

NoSuchMethodError: com.google.gwt.dev.resource.ResourceOracle.getResourceMap()Ljava/util/Map

現象:

NoSuchMethodError: com.google.gwt.dev.resource.ResourceOracle.getResourceMap()Ljava/util/Map

問題点:

CLASSPATH に異なるバージョンの jar を結合しています。

com/google/gwt/user/client/rpc/core/java/util/map_customfieldserializerbase.class
  C:\Users\Sola\.m2\repository\com\google\gwt\gwt-user\2.8.0\gwt-user-2.8.0.jar
  C:\Users\Sola\.m2\repository\com\google\gwt\gwt-servlet\2.3.0\gwt-servlet-2.3.0.jar

対策:

mvn gwt:compile
→ mvn org.codehaus.mojo:gwt-maven-plugin:2.3.0:compile

mvn gwt:compile は最新版(2.8.0)を取得しようとします。

バージョンを合わせましょう。バージョンが同じであれば、同じ class ファイルを含んでいたとしても、問題ないはずです。

2017年3月1日水曜日

jbpm-designer-standalone.war: WELD-001409: Ambiguous dependencies for type AuthenticationService with qualifiers @Default

現象:

自炊しました jbpm-designer-standalone.war がデプロイに失敗します。

{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jbpm-designer-standalone.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jbpm-designer-standalone.war\".WeldStartService: Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type AuthenticationService with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject org.uberfire.ext.security.server.BasicAuthSecurityFilter.authenticationService
  at org.uberfire.ext.security.server.BasicAuthSecurityFilter.authenticationService(BasicAuthSecurityFilter.java:0)
  Possible dependencies: 
  - Managed Bean [class org.uberfire.ext.security.server.ServletSecurityAuthenticationService] with qualifiers [@Any @Default],
  - Managed Bean [class org.jboss.errai.security.server.PicketLinkAuthenticationService] with qualifiers [@Any @Default]
"}}

問題点:

不明

対策:

不明

jbpm-console.war.failed: "Services that were unable to start:" => ["jboss.deployment.unit.\"jbpm-console.war\".PARSE"],

問題点:

"{\"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available.\" => {
    \"Services that were unable to start:\" => [\"jboss.deployment.unit.\\\"jbpm-console.war\\\".PARSE\"],
    \"Services that may be the cause:\" => [
        \"jboss.http-upgrade-registry.default\",
        \"jboss.remoting.remotingConnectorInfoService.http-remoting-connector\"
    ]
}}"


対策:

Apache Tomcat などで http://localhost:8080 をふさいでいないかどうか、確認しましょう。

jbpm-designer-standalone: java.io.IOException: CreateProcess error=206, ファイル名または拡張子が長すぎます。

問題点:

C:\Git\jbpm-designer\jbpm-designer-standalone>mvn -Dfull -DskipTests -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory -DforkMode=never gwt:compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jBPM Designer - Standalone 7.0.0.Beta6
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.wildfly.core:wildfly-cli:jar:2.1.0.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.wildfly.core:wildfly-embedded:jar:2.1.0.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- gwt-maven-plugin:2.8.0:compile (default-cli) @ jbpm-designer-standalone ---
[ERROR] 2 28, 2017 6:02:41 午後 java.util.prefs.WindowsPreferences <init>
[ERROR] 警告: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[INFO] Compiling module org.jbpm.designer.jBPMDesigner
...
[INFO]    Compiling 2 permutations
[INFO]       [ERROR] Unable to start external process
[INFO] java.io.IOException: Cannot run program "C:\Java8\jre\bin\java": CreateProcess error=206, ファイル名または拡張子が長すぎます。
[INFO]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
[INFO]  at com.google.gwt.dev.ExternalPermutationWorkerFactory.launchExternalWorker(ExternalPermutationWorkerFactory.java:282)
[INFO]  at com.google.gwt.dev.ExternalPermutationWorkerFactory.getWorkers(ExternalPermutationWorkerFactory.java:374)
[INFO]  at com.google.gwt.dev.PermutationWorkerFactory.createWorkers(PermutationWorkerFactory.java:351)
[INFO]  at com.google.gwt.dev.PermutationWorkerFactory.compilePermutations(PermutationWorkerFactory.java:254)
[INFO]  at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:211)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:219)
[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.io.IOException: CreateProcess error=206, ファイル名または拡張子が長すぎます。
[INFO]  at java.lang.ProcessImpl.create(Native Method)
[INFO]  at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
[INFO]  at java.lang.ProcessImpl.start(ProcessImpl.java:137)
[INFO]  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[INFO]  ... 12 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:34 min
[INFO] Finished at: 2017-02-28T18:05:22+09:00
[INFO] Final Memory: 142M/1528M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.8.0:compile (default-cli) on project jbpm-designer-standalone: Command failed with status 1 -> [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<extraJvmArgs>-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory を追加します。

          <plugin><!-- Keep in sync with soa profile -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <configuration>
              <!-- Build all GWT permutations and optimize them -->
              <module>org.jbpm.designer.jBPMDesigner</module>
              <draftCompile>false</draftCompile>
              <extraJvmArgs>-Xms1g -Xmx2g -Xss1M -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>
            </configuration>
          </plugin>