Creating JAR file based on other AppPlatform POJOs

Greetings!

I’m currently trying to create a JAR file based on POJOs which have been generated by the IS Service Wizard. For example, I want to create a Logging tool that has several types of loggers (Log4J, JournalLogger, etc…) and I wanted to make its methods generic and shareable between my other projects. To do that, I simply create an AppPlatform service for each Logger and then I would create an extra AppPlatform to connect them all together (almost seen as a Factory design pattern).

By the end, everything compiles properly and without any error. Afterwards, I simply export it as a JAR file: picture in the attachments.

However, when I try to call it in another AppPlatform and run it, I get the following exception:

“Could not run ‘TestingJAR’
java.lang.reflect.InvocationTargetException: com/softwareag/applatform/pls/is/services/ServiceWrapperFactory”

How could we try to fix this? Is there a workaround to try to make use of my project idea?

Thanks,
Rui Gomes
2020-03-05 08_59_06-Workspace10_03 - f1bpmsd4_5555@GF_NPI_Morning_GF_NPI_Morning.services_SendLotTra.png

Here’s more information:

We have also deployed the JAR file in the Integration Server under the directory: “/3rd_party/softwareag/sit-dd/wM/IntegrationServer/lib/jars/custom” and restarted the server, without any success.

It would be great to have any other ideas to try to fix the problem. I think it might be related the connection between the JAR file and the other integrated AppPlatforms:

explanationJAR.png

Hi Rui,

can you provide your wM version please?

The path you mentioned will only work up to wM 9.5.
Beginning with wM 9.6 the jar file should placed under IntegrationServer/instances/default/lib/jars/custom.
Or you can place the jar file directly in the package under code/jars. When referring to this jar from another package you should declare a dependency between the two packages to make them loading in the correct oder and in the same class loader instance.

Regards,
Holger

Hi Holger,

Thank you for your input.

Our wm version is the 10.3.
We did what you asked but we keep having the same error message.

However, we have managed to call the JAR content through another AppPlatform but, when using a conventional Java service, we get the following exception still:

Could not run ‘TestingJAR’
java.lang.reflect.InvocationTargetException: com/softwareag/applatform/pls/is/services/ServiceWrapperFactory

Hi Rui,

looks like a class loading issue in the app platform itself.

Are there any Fixes applied to your environment?

Might be worth opening an incident with Software AG to get this sorted out.

Regards,
Holger