Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"java.util.HashSet cannot be cast to [Ljava.lang.String;" in Eclipse #1

Closed
GoogleCodeExporter opened this issue Aug 3, 2015 · 13 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

I am not sure that it will reproduce it every time, but it seems to manifest 
when using wsdl2java without any services... at least I see the following 
warning:

... full path to src/main/resources/service.wsdl does not define any services

That is the only clue I have.

What is the expected output? What do you see instead?

I see an error marker in Eclipse telling:

java.util.HashSet cannot be cast to [Ljava.lang.String; 
(org.apache.cxf:cxf-codegen-plugin:2.6.0:wsdl2java:generate-sources:generate-sou
rces)

What version of the product are you using? On what operating system?

Indigo for JEE, 
Windows XP Professional 32-bit.
cxf 2.6.0
latest version of the cxf m2e connector

I am not able to reproduce the same error from a command line build, so I 
suspect that this is maybe an issue with the cxf connector. Also, this 
exception does not turn up in the Eclipse error log file or anywhere else, the 
error marker does not have an exception trace either, so I cannot give a trace 
for this.


Original issue reported on code.google.com by robva...@politext.info on 12 Jun 2012 at 5:19

@GoogleCodeExporter
Copy link
Author

Sorry, the Indigo version is Indigo-JEE-SR2.

Original comment by robva...@politext.info on 12 Jun 2012 at 5:20

@GoogleCodeExporter
Copy link
Author

Able to reproduce this problem running Indigo-Java-SR2 on Fedora 16.
I am trying to build the demos from Camel in Action available via
svn checkout http://camelinaction.googlecode.com/svn/trunk/ 
camelinaction-read-only 

Original comment by KHAks...@gmail.com on 20 Jun 2012 at 12:43

@GoogleCodeExporter
Copy link
Author

Running on 64-bit Fedora 16 that is.

Original comment by KHAks...@gmail.com on 20 Jun 2012 at 12:45

@GoogleCodeExporter
Copy link
Author

I experience this too.

Indigo JEE SR2 on WinXP. I have double checked my codegen plugin configuration 
and everything seems good (and works fine), except this error marker.

Original comment by legzo...@gmail.com on 26 Jun 2012 at 11:58

@GoogleCodeExporter
Copy link
Author

After debugging the plugin, I found that cxf 2.6 changed it configuration 
model, causing the type cast.

I have submitted this attach patch.

Please release a new version soon.


Original comment by sebastie...@gmail.com on 29 Jun 2012 at 5:57

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi,

Just so you know, I tried to revert my CXF version to 2.5.1 to see if the 
problem had been introduced with the new 2.6 configuration model, but I still 
have the error :

java.util.HashSet cannot be cast to [Ljava.lang.String; 
(org.apache.cxf:cxf-codegen-plugin:2.5.1:wsdl2java:generate-sources:generate-sou
rces)

Original comment by legzo...@gmail.com on 29 Jun 2012 at 10:52

@GoogleCodeExporter
Copy link
Author

Correct. This is also true for 2.5.1. 

I also confirm that the patch works for cxf 2.5.1.

This consistent with the test pom.xml file in this project that was testing 
with the cxf plugin version 2.5.0.

Original comment by sebastie...@gmail.com on 2 Jul 2012 at 5:01

@GoogleCodeExporter
Copy link
Author

Patch worked for me. Attaching ready-to-install archive in case someone needs 
it.
Since patch is not applied yet and I had to build plugin archive myself.
For some reason, it took Maven more than hour to download all deps.  Not 100% 
sure that it will suit everyone, since Maven warned about smth environment 
specifics blah-blah. By the way, I applied patch changes manually. I simply 
could not apply HG patch via Hg Workbench, I have never did it before. Total 
noob :). 
Win7 x64, Java 7u4.

Original comment by andrii.r...@gmail.com on 18 Jul 2012 at 4:48

Attachments:

@GoogleCodeExporter
Copy link
Author

I can confirm that the plugin packaged in comment 8 installs fine on
Windows xp 32
Eclipse SDK 3.7.2.M20120208-0800
m2e - Maven Integration for Eclipse 1.0.200.20111228-1245   

thanks !

Original comment by jhe...@xebia.fr on 30 Jul 2012 at 1:54

@GoogleCodeExporter
Copy link
Author

Confirming this bug exists with cxf-codegen-plugin 2.7.1
running on Juno SR2, Windows 7 Pro 64-bit.

Also confirming that the archive from Andrii works on this version/platform!
Thank you Andrii and Sebastien.

Original comment by jkter...@gmail.com on 8 Apr 2013 at 1:47

@GoogleCodeExporter
Copy link
Author

This got merged last night, after I emailed Ryan asking if he could merge it, 
yay.
https://code.google.com/a/eclipselabs.org/p/m2e-cxf-codegen-connector/source/det
ail?r=ae2d184025b731cdefd9f5c4c45b76f10543d368

Apparently updating the plugin version is tedious, so the update site hasn't 
changed yet, but a step in the right direction!

Original comment by joel.pea...@gmail.com on 3 May 2013 at 12:47

@GoogleCodeExporter
Copy link
Author

I've merged the patch and added the updated binaries to the update site.
If anyone has any issues, let me know.

Original comment by ryan.smi...@gmail.com on 17 May 2013 at 12:42

@GoogleCodeExporter
Copy link
Author

Original comment by ryan.smi...@gmail.com on 17 May 2013 at 12:43

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant