NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
So I've continued moving my web services over from wsimport
way of building them to JWSC
and in my quest I keep hitting issues to do with JWSC
compilation. This latest problem came in the form of 'Wrong number of class files' error message. This stumbled me for a while, it was an hour before my vacation was about to start, I just wanted to throw the laptop off the balcony at this point, but I managed to find a fix for this error.
The problem as it turned out was to do with classes generated by wsimport
. My bad, I should have paid more attention. Lets see the error message first though.
This is a part of the JWSC output, but it shows the error.
Update: The original fix suggested to delete all of the package-info.java files. Instead, I started excluding them in my build system, I think this is a cleaner approach. So my jwsfileset looks like this now...
Below is the original approach I used.
So the fix is to find and delete all of the package-info.java
files in your source directory. JWSC seems to expect these, but they don't get processed somehow. No issue, there is nothing useful in these files so they are quite safe to delete.
After I deleted all of these in my project, the issue went away.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...