Mirth is Not Picking Up Updated JAR File?

Posted by ashes999 on Stack Overflow See other posts from Stack Overflow or by ashes999
Published on 2011-01-03T18:51:58Z Indexed on 2011/01/03 18:54 UTC
Read the original article Hit count: 389

Filed under:
|
|

I have some Mirth code (javascript) that's consuming one of my Java classes (let's call it SimpleClass). It seems that Mirth is not picking up my changes to my class.

SimpleClass used to look something like this:

public class Simpleclass {
  public SimpleClass(String one) {
    // do something with one
  }
}

Now it looks like:

public class Simpleclass {
  public SimpleClass(String one, String two) {
    // store one and two
  }

  public void Execute() {
    // do something with one and two
  }
}

When I try and call SimpleClass with two strings, I get the error "Java constructor for SimpleClass with arguments string, string not found." When I try to run Execute, I get an error similar to "TypeError: method Execute not found." Perplexingly, I can still call SimpleClass("one string") to call the one-string constructor (which is now nowhere to be seen in the code).

To get my code to work, I build a JAR file using ant, and deploy it to \\lib\custom. I have tried:

  • Copying the new JAR and restarting Mirth while it's live
  • Copying the new JAR after stopping Mirth, then starting Mirth
  • Looking for other copies of my JAR or Mirth installations (there are none)
  • Unzipping and reverse-engineering the JAR (it has the two-constructor code)
  • Hashing the JAR (it matches what I'm building in ant)
  • Restarting my computer (hey, you never know)

I'm at a loss. I'm not sure why I'm not seeing the latest code. My channel has very simple Javascript:

var sp = new Packages.com.hs.channel.scarborough.ScarboroughParser("one", "two");

I know it's not a configuration error of any kind, since this used to work (and does still work, albeit with the old code -- single-parameter constructor).

© Stack Overflow or respective owner

Related posts about java

Related posts about JavaScript