on 02-12-2016 7:22 AM
Hi all,
I have created a Java Mapping where I am consuming a webservice where I have generated out of the WSDL a Java proxy:
I know, there is also another API for the valuemapping, but this is only working if you already are knowing the keys, not to give me all maintained keys.
When I am testing the Javamapping in NWDS, it is working as it supposed to be without any problems:
But when I am putting the JAR to ESR while testing it in the test tool, it fails in the codeline highlighted with the red star above with the exception
java.lang.ExceptionInInitializerError
I have temporairly removed the classes for the JAVA proxy that has lead into "Class not found" exception, so technically it can reach the classes. When I am catching the exception ExceptionInInitializerError there is absolutely nothing that can be retrieved by method getCause().
I have also checked that all libraries used for the compilation are downloaded directly from the PI Server to avoid a version miss-match. The compiler settings are to use Java 5 and I am on a 7.11 PI system.
Regards
Helmut
You cannot call a web service directly from Java mapping. You need to use lookup service from Java Mapping API for this purpose. As Java Mapping is running inside an EJB, you are restricted in access to other resources. It might be interesting if it would be possible to call the Java Proxy EJBs directly without web service. I have never tried.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Helmut,
First you need to catch the exact error message of the exception being thrown.
can you please try this code
try{
all lines of program code;
}
catch(Exception e)
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
e.printStackTrace(ps);
ps.close();
StringBuffer errorString=new StringBuffer("Cause: "+baos.toString());
getTrace().addInfo(errorString.toString());
throw new StreamTransformationException(errorString.toString());
}
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.