web stats
Mirth Connect 3.0 Beta 1 Released! - Page 3 - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #21  
Old 01-03-2013, 08:06 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default Javascript Error

Here's the error Nick:

ERROR-414: JavaScript Connector error
ERROR MESSAGE: Error evaluating JavaScript Writer
com.mirth.connect.server.MirthJavascriptTransforme rException:
CHANNEL: Radiology Printing Channel
CONNECTOR: FTP PDF to printer
SCRIPT SOURCE: JavaScript Writer
SOURCE CODE:
83: }
84: }
85:
86: if ( connected ) {
87:
88: ftpConn.writeFile(ftpfile, ftppath, ftpappendfile, ftpByteArray);
89: returnBoolean = true;
90: ftpConn.destroy();
91: } else {
92: logger.error("Unable to connect to ftp server: " + ftpserver
LINE NUMBER: 88
DETAILS: Can't find method com.mirth.connect.connectors.file.filesystems.FtpC onnection.writeFile(org.mozilla.javascript.ConsStr ing,string,boolean,[B).
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:164)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:107)
at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)


Simon
Reply With Quote
  #22  
Old 01-03-2013, 08:27 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Ah I see, yep, that's because the fourth argument has now been changed to an InputStream rather than a byte array. If you already have a byte array ready, you should be able to just wrap it in a ByteArrayInputStream.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #23  
Old 01-03-2013, 09:30 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

I see, like this?

Code:
ftpConn.writeFile(ftpfile, ftppath, ftpappendfile, java.io.ByteArrayInputStream(ftpByteArray) ) ;
Great! - It all works again now.

Actually a lot of the code I have in the javascript here will be redundant in version 3 now that you have queuing on all the connectors. I am sure I can achieve what I currently have with the javascript just as well with the standard File Writer connector.
Reply With Quote
  #24  
Old 01-03-2013, 09:43 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by seaston View Post
I see, like this?

Code:
ftpConn.writeFile(ftpfile, ftppath, ftpappendfile, java.io.ByteArrayInputStream(ftpByteArray) ) ;
Great! - It all works again now.

Actually a lot of the code I have in the javascript here will be redundant in version 3 now that you have queuing on all the connectors. I am sure I can achieve what I currently have with the javascript just as well with the standard File Writer connector.
Yep, that's the idea! Thanks for bringing that to our attention though; let us know if you find any other discrepancies. Cheers!
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.

Last edited by narupley; 01-04-2013 at 07:18 AM.
Reply With Quote
  #25  
Old 01-04-2013, 06:56 AM
MofSmith MofSmith is offline
Mirth Newb
 
Join Date: Oct 2012
Posts: 10
MofSmith is on a distinguished road
Default

That worked! Thanks!
Reply With Quote
  #26  
Old 01-04-2013, 08:43 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by maltmann View Post
I downloaded the 3.0 beta tar.gz to a Linux box.
It unpacks with a base folder of 'Mirth Connect'
When I try to run mcserver I get the following error, which suggests that the space in the base folder name is not being correctly escaped.

Exception in thread "main" java.lang.NoClassDefFoundError: Connect/mcserver
Caused by: java.lang.ClassNotFoundException: Connect.mcserver
at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
Could not find the main class: Connect/mcserver. Program will exit.
Hmm, I'm not able to reproduce that. What JRE are you using, what command are you issuing to start the server, and from what directory?
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #27  
Old 01-07-2013, 11:51 AM
maltmann maltmann is offline
Mirth Newb
 
Join Date: Apr 2012
Posts: 6
maltmann is on a distinguished road
Default

Here are the commands. As you can see I am using JRE 1.6.0_22

Code:
$ cd Mirth\ Connect/
$ ls
appdata     conf        extensions  logs         mcmanager           mcservice            mirth-cli-launcher.jar  mirth-manager.jar  temp
client-lib  custom-lib  lib         manager-lib  mcserver            mcservice.vmoptions  mirthdb                 mirth-server.jar   webapps
cli-lib     docs        licenses    mccommand    mcserver.vmoptions  mirth-cli.jar        mirth-launcher.jar      public_html
$ ./mcserver
Exception in thread "main" java.lang.NoClassDefFoundError: Connect/mcserver
Caused by: java.lang.ClassNotFoundException: Connect.mcserver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Connect/mcserver.  Program will exit.
$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
__________________
Michael Altmann
Roseville, MN
Mckesson Corp
Reply With Quote
  #28  
Old 01-25-2013, 07:00 PM
jab jab is offline
Mirth Newb
 
Join Date: Apr 2012
Posts: 12
jab is on a distinguished road
Default

Installed on Linux and running good.

Can I use my commercial extensions (user support, ssl, etc) from 2.2 in this release?
Reply With Quote
  #29  
Old 01-28-2013, 06:58 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Quote:
Originally Posted by jab View Post
Installed on Linux and running good.

Can I use my commercial extensions (user support, ssl, etc) from 2.2 in this release?
Glad to hear it's working for you! It works fine for me too on Linux; unfortunately I haven't been able to reproduce what maltmann is seeing.

To answer your question, none of the 2.x released plugins will be compatible with the 3.0 beta release. However, we will be updating the plugins for the 3.0 Appliance and GA releases, so when they come out you will still be able to use User Roles, SSL Manager, Channel History, etc.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #30  
Old 01-29-2013, 09:43 AM
jab jab is offline
Mirth Newb
 
Join Date: Apr 2012
Posts: 12
jab is on a distinguished road
Default

I used RHEL 6 x64 if that helps.

Maybe running a

$ rpm -q -a | grep -i java

and dumping the output will help determine the cause of maltmann's issue.

(This is assuming you are working on an rpm based Linux)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation