Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

how to call a custom java class with Mirth 1.7?

  • Filter
  • Time
  • Show
Clear All
new posts

  • how to call a custom java class with Mirth 1.7?

    [ul]I have a simple Java class called MessageSegments with two String attributes with simple getter and setter methods for both.
    I have created multiple constructors including one that has no parameters.
    I have one package called 'test' where the single MessageSegments class is.
    I created a jar using: jar cfv newtest.jar ./test
    I placed my newtest.jar into the MIRTH_HOME/lib/custom directory and then started mirth.[/ul]

    My javascript transformer step I have tried a number of the suggestions on the forum:

    var obj = new MessageSegments();

    --and also tried---
    var obj = new Packages.test.MessageSegments();
    both approaches produce this error:
    ERROR-300: Transformer error
    ERROR MESSAGE: Error evaluating transformer
    com.webreach.mirth.server.MirthJavascriptTransform erException:
    CHANNEL: tuesday testing
    CONNECTOR: Destination 1
    DETAILS: Java constructor for "test.MessageSegments" with arguments "" not found.
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:307)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform( 8)
    at org.mule.transformers.AbstractTransformer.transfor m(
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule
    at com.webreach.mirth.server.controllers.MessageObjec tController.getMessageObjectFromEvent(MessageObjec
    at com.webreach.mirth.connectors.file.FileMessageDisp atcher.doDispatch(
    at com.webreach.mirth.connectors.file.FileMessageDisp atcher.doSend(
    at org.mule.providers.AbstractMessageDispatcher.send(
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(
    at org.mule.transaction.TransactionTemplate.execute(T
    at ute(
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab

  • #2
    Re:how to call a custom java class with Mirth 1.7?

    that sounds like it should work...i've gotten it to work in 1.7...your error is saying the Java Constructor can't be found...maybe check that you made the constructor and the class public?