facebook

Problem with fix: Deploy WAR file to WAS 6.1

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #287803 Reply

    Joe Ammann
    Member

    Hi

    I’m using Blue Edition 6.5GA (6.5.0-Blue-GA-20080609) with WebSphere 6.1 (Build Number: b0620.14) on Linux. When I tried to deploy my first WAR file (freshly created as a WebProject in MyEclipse Blue without changes) the deployment failed.

    The error message from wsadmin was about a java regexp error.

    I found out that MyEclipse calls the wsadmin command wrongly. During deployment, it call wsadmin with the JACL script …../plugins/com.genuitec.eclipse.blue.websphere61_6.5.0.zmyeclipse650200806/installWebModule.jacl. This script gets 9 arguments. the sixth argument (webAppMapping is wrong. From MyEclipse the following string is passed:

    {{\"Test.war\" Test.war,WEB-INF/web.xml}}

    This has 2 errors. First, the escaping is wrong. The backslashes before the quotes are not needed, and those are causing the java regexp error. Second, the MapWebModToVH option of WebSphere has 3 arguments, not 2. The last one is missing, it should be the name of the WebSphere virtual host.

    I fixed the problem by adding

    set webModuleMapping [string map {"\"" "\"" "\}" " default_host\}"} $webModuleMapping]

    on line 14 of the JACL script. This replaces \” with “, and the closing } with default_host}.

    Of course, this does not really cure the problem. The JACL script works fine if invoked correctly. The problem should be fixed in the MyEclipse invocation part.

    #287840 Reply

    Riyad Kalla
    Member

    jammann,
    Great followup and I appreciate you taking the time to post it incase anyone else runs into it.

    The only issue is that we don’t actually support Blue on Linux yet, so I”m guessing you made this install yourself using the Windows install files?

    Out of curiosity is it mostly running OK?

    #287916 Reply

    Joe Ammann
    Member

    Hm. I consider your statement (“don’t actually support Blue on Linux”) VERY strange. On the page to download MyEclipse Blue your website mentions:

    “For Linux and Mac: please utilize the Pulse installer for maximum stability …”

    It is true that the release notes mention only Windows platform as being supported, but providing an installation guide for a platform on the download page is more or less like saying “Oh yeah, and by the way, we tell you how to buy and install our product, but we won’t actually support it..”.

    BTW: Of course I used the recommended way to install MyEclipse Blue via Pulse (which was working fairly straightforward) and yes, the product is running mostly ok (several such hickups as described above, but nothing really bad).

    I will contact your sales department to hear what they have to say about this.

    #287993 Reply

    Joe Ammann
    Member

    I’m starting to understand the problems with MyEclipse Blue on Linux a bit better. It seems that you guys must follow (Unix) quoting rules a bit more exactly when invoking the wsadmin.sh shell script 🙂

    Problem 1) When deploying a WAR file (doesn’t matter if standalone or in an EAR), the WAR file name in the MapWebModtoVH argument (sixth argument to the JACL script) is incorrectly quoted. It’s \”XXX.war\” instead of “XXX.war”. This probably does not do any harm on Windows.

    That one can be fixed by tweaking the installWAR and installEAR JACL scripts as described above.

    Problem 2) When deploying an EAR that does not contain any EJB JARs, wsadmin.sh is invoked with an twelveth, emtpy argument. The ‘hasEJB’ argument (eigth argument to the JACL) is correctly set to ‘none’ and the JACL script would work if it would ever be called by wsadmin. But the trailing empty argument seems to confuse the wsadmin command. To be exact: the wsadmin.sh Shell script works ok, but the com.ibm.ws.runtime.WsAdmin Java class that is invoked aborts with a syntax error message.

    I’d say this is at least halfway a bug in WebSphere, rather than MyEclipse. I got around it by hacking the wsadmin.sh Script, to not pass empty arguments to the Java class.

    Problem 3) As mentioned above, the MapWebModToVH Admin command is missing a third argument. Turns out that this can be fixed more cleanly. I added an XDoclet configuration “Standard Web for Websphere” (similar to “Standard EJB for Websphere”. In this XDoclet config, I additionally invoke the ‘webspherewebxml’ subtask of the deployment descriptor task. With this, the Websphere-specific deployment descriptors are also created. And one can set the target virtual host there.

    With this, the fix to add “default_host” in the JACL is not anymore needed.

    #288043 Reply

    Scott Anderson
    Participant

    jammann,

    First, I see why you’re really confused when we said that we don’t support Blue Edition on Linux when the download page clearly implies that we do. The truth is that we currently don’t support Blue on Linux and the download page is simply incorrect. It’s a “documentation bug”, if you will, and we appreciate you bringing it to our attention so we can get it corrected. It really is confusing. And, I apologize for the time you’ve spent running down these issues not knowing that.

    Actually, I must admit I’m pleased to hear that Blue is doing “mostly OK”, considering that we don’t test it on Linux at present. It’s not that we don’t intend on introducing Linux support, it’s simply a matter of market demand to determine when we do that. Thus far, the interest in Blue has been almost exclusively on Windows but it’s interesting to hear that you’re using it on Linux. Is that a corporate policy? Is WebSphere development being done to a large degree on Linux in your organization? The reason I ask is that the more of a market we can demonstrate for Linux support the quicker it will likely come. Can you provide any insights there?

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Problem with fix: Deploy WAR file to WAS 6.1

You must be logged in to post in the forum log in