This Question is Possibly Answered

1 "correct" answer available (4 pts)
10 Replies Last post: Sep 3, 2009 11:13 AM by infinityiz  
Click to view simon0.0.1's profile   2 posts since
Oct 20, 2008

Apr 7, 2009 10:53 PM

Migration of VAG programs that are generated to Java for Web Services


Hi,

We are in the process of migrating from VAG (v4.5) to EGL (v7.5.1.1) and have hit a bit of a snag.

We have several programs that provide Web Service access to the database (DB2 v8 on Z/OS). These programs are generated to CICS, and then generated to Java. The Java generated code is then exported from VAG and imported to a Web Project in WebSphere (v5.1).

We have managed to migrate these programs to EGL and generate Java code from them, but the Java code generated does not appear to be compatible with WebSphere. For one it seems to be producing BeanInfo classes that VAG never did.

When I import the Java code produced by EGL into WebSphere, WebSphere does not recognise the libraries that the code is using i.e. com.ibm.javart.JavartSerializable

I do not know if the incompatibility is something that can be fixed in the Build Descriptor, or if it's simply that the WebSphere version that we are using is so out of date.

Has anyone any ideas on what we can do to fix this?

Click to view John_Crosbie's profile   5 posts since
Nov 30, 2008
2. Apr 16, 2009 9:12 AM Up Image in response to: simon0.0.1
Re: Migration of VAG programs that are generated to Java for Web Services

Simon,

it depends on which version of the Wrapper runtime you have either already deployed ( under VAG) or you plan to deploy under EGL. EGL supports wappers from VAG v4.5 thru to EGL V7.5. You need to deploy the appropriate EGL Java runtime classes from the RBD Plugins directory once you have decided which flavour you wish to deploy.

John.

Click to view markevans's profile   483 posts since
May 1, 2008
3. Apr 16, 2009 5:36 PM Up Image in response to: John_Crosbie
Re: Migration of VAG programs that are generated to Java for Web Services

Simon,

As John said, I think the problem is that you do not have EGL Java runtime included in your web project. The references in the generated Java do require this.

So, you should copy/add the fda7.jar file from EGL into the LIB directory under WebContent->WEB-INF->classes->lib or if a non-web project..to the java build path in the project properties.

Since you are generating Java wrappers (i think this is what you are really generating since you say you did these in VAGen)....I suspect the generation added this to the Java Build path of the project properties that was the target for generation. You can look there for its location.


Click to view atomgregg's profile   2 posts since
Apr 22, 2009
4. Apr 22, 2009 4:13 AM Up Image in response to: markevans
Re: Migration of VAG programs that are generated to Java for Web Services

Hi Mark and John,

I've picked up where Simon left off and have imported the fda7.jar and hpt.jar files specific to the RBD environment into the WSAD v5.1 environment which gets me to the stage where the project compiles.

The next part is a runtime error which I am stumped on...I have tried a few ways to work around this however, in the end I still get the same error which is below. The error occurs when _program() is called by the EGL generated java class files. _program() returns an instance of Program which is within cso.ibm.resources.javart (part of fda7.jar).

java.lang.NoSuchMethodError: java.lang.RuntimeException: method <init>(Ljava/lang/Throwable;)V not found
+ at com.ibm.vgj.cso.CSOServerProgram._program(CSOServerProgram.java:159)+
+ at fwar03.Fwar03.call(Fwar03.java:151)+
+ at fwar03.Fwar03.execute(Fwar03.java:179)+
+ at main.CICS_FWAR03.createVehicleList(CICS_FWAR03.java:44)+
+ at main.GetVehicleList.VehicleList(GetVehicleList.java:24)+
+ at main.Test.main(Test.java:38)+
Exception in thread "main"

To me this says the library was never meant to run in this environment, ie. it is calling a method or property which doesn't exist in this version of the runtime (in this case j2ee v1.3). I have tried changing the rt.jar file including removing it from the class path of the project but then I get errors of the nature;

The project was not built since its classpath is incomplete. Cannot find the class file for java.lang.Object. Fix the classpath then try rebuilding this project.

Thanks in advance,

Aaron.

Click to view markevans's profile   483 posts since
May 1, 2008
5. Apr 22, 2009 12:10 PM Up Image in response to: atomgregg
Re: Migration of VAG programs that are generated to Java for Web Services

Aaron,

First thing I would try is to fix the "unable to build problem".

I don't have WSAD V5.1 any longer, so not sure what I am stating below will be the same as you would see....

but in the more current releases, you can choose the web project and in the project properties...you can set the Java Build Path..

In that dialog for the Java Build Path, you should go to the libraries tab and choose the "system JRE". If you change this to use the workbench jdk......save it.. and this might kick off a successful compile. Sometimes, you need to change it back (i.e. toggle it..but save in between).

See the screenshot attached for my dialog (from RBD V7.5.1)

Attachments:
Click to view atomgregg's profile   2 posts since
Apr 22, 2009
6. Apr 22, 2009 10:17 PM Up Image in response to: markevans
Re: Migration of VAG programs that are generated to Java for Web Services

Hi Mark,

In my ealirer attempts I had added the rt.jar file from the Rational Business Developer environment to the build path as an External jar..

I tried the approach you mentioned to edit the settings of the rt.jar (JRE) in WSAD v5.1 to refer to the rt.jar taken from RBD but I still get the "unable to build problem".

I have been talking with John (referred to earlier in this thread) and we've got a few new approaches we are going to attemp which include getting the generated files building and invoking the CICS transaction gateway from the RBD IDE environment to prove that the generated files are indeed valid. Then we will attempt to alter some of the Build Options and re-try publishing to WSAD v5.1 and see how we go.

Thanks to all those that are assisting, Aaron.

Click to view John_Crosbie's profile   5 posts since
Nov 30, 2008
7. Apr 23, 2009 6:45 PM Up Image in response to: atomgregg
Re: Migration of VAG programs that are generated to Java for Web Services

Hi Mark,

The wrappers are working fine in RBD. Are you able to confirm that the 7.5.1 wrapper runtime has been built on JDK 1.4.2? I cannot find any documentation to confirm this.

Attempting to run the wrappers in WSAD 5.1 is throwing the following exceptions:

java.lang.NoClassDefFoundError: java/util/RandomAccess

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:320)

at java.net.URLClassLoader.access$400(URLClassLoader.java:93)

at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:682)

This class was not available in JRE 1.3

Thanks,

John.


Click to view markevans's profile   483 posts since
May 1, 2008
8. May 1, 2009 5:14 PM Up Image in response to: John_Crosbie
Re: Migration of VAG programs that are generated to Java for Web Services
Sorry for the delay in responding...but yes, EGL requires JRE V1.4.2 or later.
Click to view John_Crosbie's profile   5 posts since
Nov 30, 2008
9. May 4, 2009 2:43 AM Up Image in response to: markevans
Re: Migration of VAG programs that are generated to Java for Web Services

Hi Mark,

Thanks!!

John.


Click to view infinityiz's profile   2 posts since
Sep 3, 2009
10. Sep 3, 2009 11:13 AM Up Image in response to: simon0.0.1
Re: Migration of VAG programs that are generated to Java for Web Services

Simon,

I am attempting to do the same thing, generate a Vagen program to java and convert it to a web service deployed to Websphere Application Server and was running into some issues. I was wondering what tools you used and where/how you deployed your web services. I would appreciate any guidance.

Thanks very much,

Tayyaba(infinityiz@yahoo.com)

Bottom Banner