Bonita 6.3.3 - Java Connector failure... Messages.getString
Hi there,
Bonita Studio 6.3.3, Java 1.7.0.67, Windows 8.1
I've created a Java connector with no inputs and only outputs. the purpose is to pull data from a parameters file and return to the process.
When return values are hard coded the connector works but when I use Source->Externalize Strings (to create a messages.properties file) and then I execute I get an error
org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
According to Oracle this exception says:
*Signals that an unexpected exception has occurred in a static initializer. An ExceptionInInitializerError is thrown to indicate that an exception occurred during evaluation of a static initializer or the initializer for a static variable. *
I've had a look and I see the messages.java has static initializers, as this code is generated by Bonita how do we fix it?
Thanks and best regards Seán
Comments
I haven't even got as far as a BAR, this is just within Studio.
There is no further stack trace, the simple way to test it is
Open Studio, create a new connector definition (use defaults) no ins or outs. Create a new connector implementation (use defaults) in the Java TODO section
add code
String s1 = "Test";
Do Source->Externalize Strings,
Eclipse will do its stuff...create a messages.properties file, the class and java code
Save the code then Test the connector using Development->Test Connector
This is where you will find the failure.
Ok, I understood the issue. The message.properties is not embedded in the jar connector that we are generating. We never thought about this use case. Please open a feature request.
Thanks for the report.