- This topic has 11 replies, 3 voices, and was last updated 17 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
GeoffMemberGreat work on 5.5M2!!!
I am so excited to get back into MyEclipse again. I’ve been doing Java EE 5 development and have been using Netbeans for quite a few months waiting. I have looked at WTP 2.0, but after just a few minutes of working with this latest MyEclipse 5.5M2, I can already tell it is so much closer to what I was looking for.
I am using the EJB3 and JAX-WS and deploying to glassfish v1 and sjsas 9.0. I am looking forward to MyEclipse adding support for glassfish v2 and sjsas 9.1 as well!
Anyway, I’m just getting started with the MyEclipse 5.5M2 as mentioned before and can get lots of the good stuff working. However I am having a slight problem with starting sjsas 9.0 (u1p1) from inside MyEclipse.
The first thing I noticed is that when I deploy a very simple JAX-WS web service it fails with the error message:
NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
If I stop the app server and start from outside of MyEclipse and then redeploy it works fine, so its something about the launch configuration.
Then I noticed that using the default launcher it was not picking up the Hibernate libs or the postgres libs that I have added to the SUNWappserver/lib directory.
So I modified the launcher using Create Launcher and added all of the jars from the lib directory manually. I clicked apply and then close and it complained about not being saved yet, so I clicked yes. When I launch using the server window it still didn’t seem to pick up the jars, so I went back in to the configuration -> create Launch (thought it was odd that it said create Launcher since I had already created it, but since there was no edit). And the launcher didn’t have the libs there. Repeated the process to find the same results (not saved message, libs not added for the launch).
So I went to the Run dialog found the launcher and launched it that way, and the libs were found — hurray. So there seem to be some bugs with the Launch configuration, but I’m still super excited.
Okay, so back to deploying my simple Web App with my simple web service (@WebService public class SomeClass {@WebMethod getHello() {return “Hello”;}} (or something like that)… It still fails with the same error.
In doing some research on this it would appear to be a classpath problem, but since I can really see any classpath details to figure out how MyEclipse was launch sjsas 9.0 I figured I better go ahead and post and get some help working this out.
System: Fedora Core 5
Sun App Server 9.0 update 1 patch 1
Eclipse 3.2.2
MyEclipse 5.5M2Once again, I’d like to applaud your efforts and say that I’m always telling everyone what a superior product MyEclipse + Eclipse is compared to some of those more expensive products.
Looking forward to trying anything you guys would like me to try. And I will be very happy to do lots of testing and reporting back to you guys. If you want me to report these in a different way, please let me know!
Thanks again,
Geoff
GeoffMemberI’m sorry for posting on this twice already, but … I thought I had provided enough information, but here is the installation information as requested in the posting guidelines:
*** Date:
Thursday, April 19, 2007 6:20:43 PM EDT** System properties:
OS=Linux
OS version=2.6.19-1.2288.2.4.fc5
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.5.0 Milestone 2
Build id: 20070409-5.5.0-Milestone2*** Eclipse details:
Eclipse SDKVersion: 3.2.2
Build id: M20070212-1330Eclipse Platform
Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
Build id: M20070212-1330Eclipse RCP
Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
Build id: M20070212-1330Eclipse Java Development Tools
Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
Build id: M20070212-1330Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20070212-1330Eclipse Project SDK
Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
Build id: M20070212-1330Eclipse Graphical Editing Framework
Version: 3.2.2.v20070208
Build id: 20070208-1315Eclipse startup command=-os
linux
-ws
gtk
-arch
x86
-launcher
/home/gruscoe/local/eclipse-3.2.2/eclipse/eclipse
-name
Eclipse
-showsplash
600
-exitdata
b7b0016
-data
/home/gruscoe/workspace
-clean
-consolelog
-vm
/usr/bin/java
Loyal WaterMemberHi gcruscoe,
Thanks for appreciating the efforts we have put. Im happy to know you like the latest version of MyEclipse.Ok, any *extra* JARs that you need to add to your setup need to be added to the ‘Paths’ preference under the connector you would be using. This way you can avoid creating that Custom Launch Config each time.
Another thing, Glassfish 2 connector was added just yesterday and will be in the 5.5 GA release in May and we are looking at supporting JAX-WS in a future release to make your life even easier going forward
GeoffMemberThe news just gets better and better all the time!
I have added the jars and as you suggested the app server starts fine. However, I still can’t deploy the application. If I start the app server outside of the IDE everything is fine, but if I start it in side I get the annotation processing exception.
I added all of the libs from the SUNWappserver/lib directory to the Path (I tried as Prepended and Appended).
I have looked at the startup logs and they are very different. I would have expected some differences, but this was a lot of differences, enough that I gave up on the comparison.
So, I didn’t really have to do anything to make this a JAX-WS capable app, because it’s all automatic. I just added my annotations to my class in my web project. And if the app server is started outside of the ide I deploy and everything is fine. But I can’t figure out what about the connector is causing the problem. Thanks again!
BTW, I’d be happy to supply the log files for the startup inside and outside of the IDE if this would be helpful.
Thanks again,
Geoff
Riyad KallaMemberGeoff,
Is it possible that the JDK the app server is using when started externally is different than the one started from within MyEclipse… the good news is that the connector can pretty much be manipulted in any way to mirror what any startup script is doing, the bad news is that we just need to figure out what those modifications are to make it work.
GeoffMemberAt first they weren’t but after modifying them, I have them both using jdk 6 u1, and I still get the same error. I know that JAX-WS is included in the App server and in Java 6, but this hasn’t seemed to be a problem. However, when running through the IDE, it does seem as though there is a mismatch in this regard. Hope this helps!
Thanks again,
Geoff
Riyad KallaMemberGeoff,
Is there a way you could share a project with me that I could use as a small test to see this issue in action and try and fix it on my end?
GeoffMemberSure, I have two very simple projects setup for testing. I have an ear project with one war module. The war module has one class. This one class has the @WebServices and @WebMethod annotations. I have a tar.gz of the two projects. How can I get them to you.
GeoffMemberIt is only 2.5 k. I can put it on my web server or email it or whatever. I can’t find a way to attach a file here though. Am I mistaken?
Riyad KallaMemberPlease send them to support@genuitec.com ATTN Riyad, with a link to this thread for reference. Thank you.
Riyad KallaMemberThis looks to be a bug, but luckily it’s easily worked around. Just edit your connector settings and go to the Paths preferences, and append your JDK’s tools.jar file to your classpath, then restart.
For some reason it cannot find the annotation processor from the JDK when launched with one. We will look into it.
Riyad KallaMemberGeoff,
After further digging it seems with Glassfish 2 nightly builds there are server-errors occuring while trying to load this. We are still looking into this issue and contacting the GF2 team about it for assistance. -
AuthorPosts