Migrating from 36 to 46

Upon Migrationg a wmethods zip file created in 3.6 to a 4.6 , the below listed error appears while executing a java service

java.lang.reflect.InvocationTargetException
com.wm.data.IDataCursor:Method
first(Ljava/lang/String;)Z not found

The IData interface definition changed between 3.6 and 4.6. The IDataHashCursor methods where deprecated and added to the base IDataCursor.

The 4.6 implementation of IData that incluldes com.wm.data.IDataCursor.first(String key) exists in 4.6 and would not exist in 3.6. Code compiled with the smaller 3.6 interface could not reference that method because it wasn’t there. I don’t know why having the method added would cause a problem.

Certainly recompiling the package should resolve this problem. Maybe someone else can provide a better solution.

Hi Fred,
Thanks for your reply… Actually I got my question wrong… I was trying to migrate a zip created in 4.6 to 3.6.

Now that I tried to recompile ( ie open the java service in 3.6… and save again) I got it working. Is there any other way to recompile a java service in 3.6?

Also, when I migrate one another zip file which contains only records and record lists and schemas from 4.6 to 3.6, Iget a “unable to locate type definition” in one of the record elements. Any idea as to why this could be happening…

Moving back releases is rather problematic.

With each release new elements are added to the service definitions (kept in the node.ndf files). In most cases these are just ignored by previous releases, but you lose whatever feature that was defined with those keys (i.e. this could be enough to make your app not work).

For instance, transformers where added, which created a new Flow operation serialized into flow.xml files. Ignoring these operations on a system that doesn’t have transformers could be fatal or may appear as subtle runtime behavior changes. With that in mind make sure you do a full regression of the package once you get the gross problems solved.

You can recompile a complete package at once using the jcode utility that lives in the server/bin directory.

Note: When you do a jcode recompile, the node.ndf files for the Java services are overwritten. This could lose some customization of the signatures. See the “jcode tags” section of Developer(?) Manual.

HTH,
Fred