Cannot create second projects in WSAS Eclipse WTP
Hello,
After creating a test project excatly following the info at wso2.org/project/wsas/java/2.0/docs/tools/ide.html I was able to publish, make new exposed methods, etc. As soon as I desided to implement an actual solution code I created a different project from scratch, following steps at above url, but giving project and classes more suitable names. At this point sample code used, no customizations.
On step 10, when web service deployment takes place, I get this exception:
Could not publish to the server.
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.jst.ws.internal.consumption.ui.command.StartServerCommand$1.run(StartServerCommand.java:132)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Please provide your comments.
- Login or register to post comments
- Printer friendly version
- 1466 reads











RE : Cannot create second projects in WSAS Eclipse WTP
Hi Sergh,
This seems to be a bug to me, I need to clarify this is in WSAS IDE or in Eclipse WTP. Thanks for the report. Its better if I can have the full stacktrace of this and also I will suggest you to stop the server that you have already started if and then close the other project that you have deployed and then restart the server and try your scenario.
Waiting for your reply.
Thanks
Lahiru Sandkith
Hi! Indeed, at some point
Hi!
Indeed, at some point I've noticed that among other files there were 'test' package in progress dialog. Such package existed in my first project which was done by example. Though, in current project there were no such package. So I did what you suggest. I made lots of server restarts as well. Finally I created brand new workspace, again manually created my new project, but the issue still exists.
It does actually place files to wsas repository and wsas finds them good when restarted.
In my previous message it was the complete contents of Error dialog. No errors in wsas console, same result whether wsas is running or not.
Still, at some point of my tries there was a message in wsas console window, 'database content differs, will replace' or something like that. This makes me think it is contents of wsas database, which might cause the error. I beleive, if I reinstall wsas, it might fix the error, but I'm not gonna try this right now.
Hi I have same problem with
Hi I have same problem with the following error. Everytime without fail. Tried starting WSAS from within and outside Eclipse.
Publishing failed
Could not publish to the server.
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.jst.ws.internal.consumption.ui.command.StartServerCommand$1.run(StartServerCommand.java:132)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Could not publish to the server.
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.jst.ws.internal.consumption.ui.command.StartServerCommand$1.run(StartServerCommand.java:132)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Hi, I tried to reproduce
Hi,
I tried to reproduce this issue with WTP/Winxp/WSAS2.2.1. However, I haven't still got the error you reported. You can see 3 different projects in my WTP and the associated service instances in WSAS in the attached screen shot.
This may be an intermittent issue or specific to some environment settings. Do you consistently experience this issue?
regards
Charitha
What could it be?
Hi Charitha,
I am running WinXP, Eclipse Europa, all with the latest updates and WSAS 2.2.1. I have 2 PCs (desktop and notebook) and exactly the same thing happening on both. Using jdk1.5.0_14 on one machine and jdk1.5.0_13 on the other.
Please note however, that It does actually place files to wsas repository, and are available from the WSAS console (services).
Any idea what it could be?
Regards, Lawrence.
RE : What could it be?
Hi,
Since its hard ot reproduse this for us, one thing that we miss maybe is the exact versoin of the Eclipse Plus the WTP (eclipse core version plus wtp version/ or if you use all in one bundle what is the build of it) that you use. Please send us those details to us.
Thanks
Lahiru Sandakith
I have
I have an all in one bundle, named wtp-all-in-one-sdk-R-2.0.1-20070926042742-win32 when downloaded. Since then I updated it via update service, so now eclipse is Version: 3.3.2
Build id: M20080221-1800 and WSAS plugin version 2.0. There are two JVMs installed, 1.5.0_14 and 1.6.0_04, eclipse configured to use 1.5.0_14 only.
As I said before, my previous project had package named 'test' which is missing in current one, still sometimes, when progress goes slowly due to computer load, I am able to see 'test' displayed in progress dialog. Also source code for 'test' project was deleted.
Are there any tools I can use to expolre WSAS db? Previous fact makes me think WSAS might be trying to update all registered services and for some reason, 'test' project was not correctly unregistered.
UPD: the error actually happens right after 'test' can be seen in progress dialog. This goes after current project service is deployed, so the needed service configuration is updated ok.
Eclipse / WTP version
I installed the Eclipse IDE for Java EE Developers (eclipse-jee-europa-winter-win32.zip) about 1 week ago and have taken all the updates.
Version: 3.3.2
Build id: M20080221-1800
Find attached Eclipse Configuration details (Eclipse Confuration Details.txt).
Also find attached the Eclipse error log (Eclipse Error Log.txt) for the last 3 days or so. Plenty of the following errors:
and
and
Also find attached something I found in the Eclipse Product Configuration dialog box (Help->Software updates->Manage configurations).
I noticed an error on
JST Enterprise UI v2.0.2. See attached files Eclipse Product Configuration.jpg and JST Enterprise UI.jpg. I don't know how to fix this.
Regards, Lawrence.

RE : Eclipse / WTP version
Hi Lawrence,
** The JAVA EE version of the eclipse seems unable to load the "org.wso2.wsf.ide.wtp.ext" due to some issue, maybe it needs some plugin that exist in the WTP that do not exist in the JAVA EE set of plugin cllections.
** One suggession on this is that start ecilpse from commnd line and see wether the same variable exist. I have a feeling that the shell variable did not initiate in your environment.
** I will look on to this issue and get back to you.
Thanks
Lahiru Sandakith
How to start eclipse from the command line?
Hi Lahiru,
Do we start eclipse from the command line as follows?
Should there be any command line arguments?
Lawrence.
RE : How to start eclipse from the command line?
RE : I have
Hi ,
** I have a concern that your java vm setting maybe overridden by some other version of it. Can you post me your java vm settings.
Also did you looked at the section 28 ) on the tutorial that has some information on
== If the configuration does not work out of the box for you ==
* Increase the default memory usage in eclipse.ini file. Normally Eclipse WTP comes with -Xms40m -Xms256m Normally with the servers inside WTP would require -Xms256m -Xms512m to work efficiently. * In some Linux distros the Eclipse Internal Browser will not function correctly. If that becomes an issue the users need to Enable SSL on Mozilla browser. Steps Enable SSL on mozilla export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
The open mozilla firefox and type about:config on the address bar and set the below settings
1. enable security.enable_ssl2 to true
2. enable security.enable_ssl3 to true
3. enable security.ssl3.rsa_rc4_40_md5 to true
Restart firefox and restart eclipse, the internal browser will work properly.
** Its a derby db, you can use any of the db vievers to get the db exploere that support derby. We use data studio.
Thanks
Lahiru Sandakith
Fixed
Hi Lahiru,
Thank you for following up with this. I did change my JVM settings in eclipse.ini to -Xms256m -Xms512m, but it did not make a difference.
However, today I took a couple of eclipse updates that has fixed the problem. Find the details below:
WST Server Core Patches
2.0.2.v200803130320-1-_D7w311914191948
Patch(s) for Server tools framework core.
See bug 219889 (http://bugs.eclipse.org/219889) ModulePublishInfo loadResource and saveResource are not symmetrical
JST Web Core Patches
2.2.2.v200803130320-108f7w311914182_41
The bugs and fixes are described in the following bugzilla entries:
Bug http://bugs.eclipse.org/219627 NullPointerException Could not publish to the server
Regards, Lawrence.
RE : Fixed
Hi Lawrence,
Thanks for the info and findings I will add them to the documentations
Thanks
Lahiru
Thanks
Updating eclipse eliminated the issue.