Tuesday 16 September 2008

WSAS and Eclipse Integration

So, I've been playing with the WSO-WSAS server today - I don't really understand it, but whilest following the tutorial here: http://wso2.org/library/2839 to get it working I discovered the following things you need to do to make it work... for me anyway.

Firstly I needed to change the default Java Compiler Eclipse uses to 1.5...

Then I got the following error when trying to create a new project:
Runtime "WSO2 WSAS" is invalid. Missing classpath entry \serverRootDirectory\lib.

The fix meant changing the: org.wso2.wsf.ide.server.wsas-2.3.jar file so the ServerRootDirectory are correct. This needed to be hard coded into wsas.serverdef file (extract the jar, and edit the file) in the "property id=serverRootDirectory" setting. It ended up looking something like this:
<property id="serverRootDirectory"
label="Runtime Directory"
type="directory"
context="runtime"
default="D:/opt/wso2wsas-2.3" />


I now have a project that works, but that doesn't mean I like it.

5 comments:

Probability Pipeline said...

What setup did you use? i am using Eclipse 3.4.1 and getting the same problem. i've made the changes and repacked the jar into the plugins directoryfor no change

Tom Shearer said...

Hi, I didn't see this, sorry.
I was using the latest Build of Eclipse for this, which was:
3.4.0

I suspect I may have got lucky. I was hammering it for a while to make it work, and the other blogs covering this out there really helped me too.

Tom Shearer said...

oh, and one other thing, make sure you change:
default="D:/opt/wso2wsas-2.3"

To whereever you have wso2wsas installed.

Curran said...

Does anyone know if they fixed this bug for the next version? It is such a pain to have to edit a file within a jar to get the IDE to work. I really want to use WSAS IDE, but this is a deal breaker. Thanks for the tip nonetheless!

Saminda said...

Hi,

yes this is a bug in the wsas 2.3 ide tools. This issue was not apparent in eclipse Europa (which was the available version during development before eclipse Ganymede came out). Due to some coincidence the issue was ignored in Europa and the users were able to work. If you try to you eclipse Europa with the plugins provided in wsas 2.3 it should work.

Yes with the wsas 3.0 release we are providing a fixed version of this plugin with the ability to use wsas as tomcat inside eclipse.

We are extremely sorry for the discomfort you have faced due to the plugin. One other workaround to the problem with the current plugin (plugin distributed with wsas 2.3) is to map the wsas home folder to a new path name "\serverRootDirectory", but this can only be done on a linux environment.

Thank you,
Saminda