Topic
3 replies Latest Post - ‏2013-12-11T16:44:06Z by markevans
mohaIBMDK
mohaIBMDK
18 Posts
ACCEPTED ANSWER

Pinned topic How to deploy EGL generated java wrappers in WAS v8.5.5 Liberty ?

‏2013-12-08T23:06:24Z |

I'm have been using EGL generated java wrappers in WAS 7, and it worked fine. Now I want to move WAS v.8.5.5 Liberty Profile.

The wrappers connects to a CICS back-end as defined in my JavaWrapperLinkage.properties and csouidpwd.properties using the cso interface.

I have used the Web Deployment Descriptor "Extensions" tab to define:

-  "additionalClassPath" and  "extendedDocumentRoot" in the ibm-web-ext.xmi file like this:

<?xml version="1.0" encoding="UTF-8"?>
<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:webappext="webappext.xmi" xmi:id="WebAppExtension_1181548765431" reloadInterval="3" reloadingEnabled="true" additionalClassPath="/etc/myproperties" fileServingEnabled="true" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="true">
  <webApp href="WEB-INF/web.xml#WebApp_ID"/>
  <fileServingAttributes xmi:id="FileServingAttribute_1327591325485" name="extendedDocumentRoot" value="/myfiles"/>
</webappext:WebAppExtension>

In the /etc/myproperties folder i keep the  properties files mentioned above.

Now I want to do the same thing in my integrated Test environment - Was v8.5.5 Liberty Profile, and I can't make it work. I have added an ear file project with the web application war file.

When I try to invoke a wrapper - I get this error in the log:

[err] egl.core.InvocationException: EGL0085E The JavaWrapperLinkage linkage properties file cannot be opened.
EGL0001I The error occurred in FMWF999Wrapper.

So my question is:

- will the definitions in the ibm-web-ext.xmi be used in WAS LP ? Or do I need to do some additional definitions in the server.xml file ?

I'm using RBD is v.9.

TIA

Morten Hansen, IBM Denmark

 

Updated on 2013-12-08T23:13:03Z at 2013-12-08T23:13:03Z by mohaIBMDK
  • markevans
    markevans
    2725 Posts
    ACCEPTED ANSWER

    Re: How to deploy EGL generated java wrappers in WAS v8.5.5 Liberty ?

    ‏2013-12-09T13:02:22Z  in response to mohaIBMDK

    Morten,

    This is more of a WAS Liberty question that a specific EGL question, so I did a quick search with Google and found a couple of things:

    Here is an APAR to WAS 8.5 that seems to match up to your symptoms:

    http://www-01.ibm.com/support/docview.wss?uid=swg1PM69730

    There was also some doc on the usage of the "getRealPath" which could be used to obtain the path for the properties file name:

    Web applications
    The Liberty profile server does not automatically expand web archive (WAR) files
    that are deployed to the server. The Java EE specification states that the
    getRealPath() method returns a null value if the content is being made available
    from a WAR file.
    If your application relies on a result being returned by getRealPath(), you must
    deploy the application as an expanded web application, not as a WAR file. For
    example, you can manually extract the WAR file and copy the expanded
    application to the dropins directory.

     

    If neither of the above provides a solution a couple of thoughts:

    a.) If you have not already, you might want to post something on a WAS or WAS Liberty forum.

    b.) As you probably already know and as I remember it, the properties files are searched for on the CLASSPATH.   So, you could just allow them to be placed in the root folder of the generated Java files (wrappers) and deploy them as part of the WAR with no special entries.   Just a thought if it works for you.

    • mohaIBMDK
      mohaIBMDK
      18 Posts
      ACCEPTED ANSWER

      Re: How to deploy EGL generated java wrappers in WAS v8.5.5 Liberty ?

      ‏2013-12-11T06:22:12Z  in response to markevans

      Hi Mark

      thanks alot for the answer. I followed your link - and from that further down the WAS Liberty Profile lane :-) And I managed to find a solution.

      As you write the *.properties must be present somewhere in the CLASSPATH to let the cso interface find it.

      I added this to make it work:

      in the WAS LP server.xml file my ear application is now described like this:

          <enterpriseApplication id="myweb9EAR" location="myweb9EAR.ear"
              name="myweb9EAR">
              <classloader>
                  <commonLibrary>
                      <folder dir="C:\etc\myproperties"></folder>
                  </commonLibrary>
              </classloader>
          </enterpriseApplication>

      This setup will add the c:\etc\myproperties folder to the classpath - for the ear application only, and that's exactly what I want. My java wrappers are now up-and-running again.
      Problem solved :-)

      btw: it's a great pleasure to use RBD 9 with WAS LP. It works very smooth - both RBD itself and also in connection with WAS LP.

      Thanks alot.

      Morten Hansen, IBM Denmark

      • markevans
        markevans
        2725 Posts
        ACCEPTED ANSWER

        Re: How to deploy EGL generated java wrappers in WAS v8.5.5 Liberty ?

        ‏2013-12-11T16:44:06Z  in response to mohaIBMDK

        Morten,

        Glad it is working now.  And thanks for sharing the solution as well as the feedback on RBD and the usage of the WAS LP.