javaee / metro-jaxws-commons

Metro has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest
https://eclipse-ee4j.github.io/metro-wsit/
Other
10 stars 9 forks source link

Plugin does not work with JDK 8 #129

Open glassfishrobot opened 10 years ago

glassfishrobot commented 10 years ago

Version 2.3, 2.2.1 and 2.2 do not work with JDK 8.

Error Message: Exception in thread "main" java.lang.ClassCastException: java.lang.AssertionError cannot be cast to java.lang.Exception at org.jvnet.jax_ws_commons.jaxws.Invoker.main(Invoker.java:87)

The Version 2.1 is working!

Environment

Windows 7 64bit java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

Affected Versions

[2.2, 2.2.1, 2.3]

glassfishrobot commented 10 years ago

Reported by daedalus

glassfishrobot commented 10 years ago

zentrum said: let me know, if you need a small maven project, which reproduces the bug.

glassfishrobot commented 10 years ago

pe4enko said: On java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b14) Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)

the same error.

glassfishrobot commented 9 years ago

diversit said: We can across this same issue. I have already resolved it locally. The fix is fairly simple. I wanted to summit a patch for this issue, but I cannot find where and how to attach a file to this issue. Since I do not have the right to push changes, I put them in my own git repo at https://bitbucket.org/diversit/jaxws-maven-plugin. The fix is in the #129 branch.

If the source repo would have been a git repo, I would have been able to provide a pull request. Time to move to Git? Subversion is so 2000's.

glassfishrobot commented 9 years ago

mplushni said: We use this workaround to get it working:

org.jvnet.jax-ws-commons jaxws-maven-plugin 2.3 -Djavax.xml.accessExternalSchema = all
glassfishrobot commented 8 years ago

ralf_muehle said: any news?

glassfishrobot commented 8 years ago

in-fke said: diversit we might get forward faster if you'd explain the patch you made. Is this the relevant diff? https://bitbucket.org/diversit/jaxws-maven-plugin/branches/compare/JAX_WS_COMMONS-129%0Dmaster#chg-jaxws-maven-plugin/src/main/java/org/jvnet/jax_ws_commons/jaxws/AbstractJaxwsMojo.java

The ClassCastException itself seems to be fixed in 2.3.1 (beta)

2.3.0

} catch (InvocationTargetException ex) {
            throw (Exception) ex.getCause();
        }

2.3.1

} catch (InvocationTargetException ex) {
            Exception rex = new RuntimeException();
            rex.initCause(ex);
            throw ex;
        }

see http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.jax-ws-commons/jaxws-maven-plugin/2.3.1-b20150201.1248/org/jvnet/jax_ws_commons/jaxws/Invoker.java?av=f but what was the root cause?

The ClassCastException itself should be a separate issse IMHO. This only seems to be an error as the result of another error.

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS_COMMONS-129