MatthewVita / node-hl7-complete

Node module that is bridged with the Java Hapi HL7 library.
54 stars 13 forks source link

Error: Cannot set classpath after calling any other java function. #10

Closed anatoleabe closed 4 years ago

anatoleabe commented 4 years ago

Hello, I am getting the following error when trying to run the example : ` java.classpath = java.classpath.concat(javaClassDependencies); ^

Error: Cannot set classpath after calling any other java function. at Error (native) at new NodeHL7Complete (/Users/An/Project/server/node_modules/node-hl7-complete/index.js:15:18) at Object. (/Users/Users/An/Project/server/app/routes.js:24:23) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at main (/Users/Users/An/Project/server/app.js:177:5) at /Users/Users/An/Projectserver/app.js:128:13 at /Users/Users/An/Project/server/node_modules/nconf/lib/nconf/provider.js:462:32 at /Users/Users/An/Project/server/node_modules/async/lib/async.js:52:16 at /Users/Users/An/Project/server/node_modules/async/lib/async.js:361:13 at /Users/Users/An/Project/server/node_modules/async/lib/async.js:52:16 at async.forEachOf.async.eachOf (/Users/Users/An/Project/server/node_modules/async/lib/async.js:236:30) at _asyncMap (/Users/Users/An/Project/server/node_modules/async/lib/async.js:355:9) at Object.map (/Users/Users/An/Project/server/node_modules/async/lib/async.js:337:20) at loadBatch (/Users/Users/An/Project/server/node_modules/nconf/lib/nconf/provider.js:461:11) at Provider.load (/UsersUsers/An/Project/server/node_modules/nconf/lib/nconf/provider.js:505:7) at Object. (/UsersUsers/An/Project/server/app.js:18:7) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 ` This error appends when I try to call this code:

var NodeHL7Complete = require('node-hl7-complete');
var hl7 = new NodeHL7Complete();

Please can some one may help me?

MatthewVita commented 4 years ago

Hi @anatoleabe - sorry for the delayed response.

I haven't used this repo for a year. Just did a fresh VM install of Ubuntu to test the package and it looks like there are definitely some problems now.

If you don't mind, can you let me know what versions of Java, NPM, and Node you are using?

Basically, where I'd like to start is with fixing the build status itself (have some ideas). That may be the root problem. On the previously mentioned fresh instance, using package.json to drive the package download/build ends up with errors. However cloning the repo and doing the build within the package folder works - very confusing.

If you'd like to see what I'm talking about, I have detailed 2 cases as an issue here: https://github.com/MatthewVita/node-hl7-complete/issues/12