Search code examples
eclipsenetsuitesuitescriptsuitecloud

Setting Up NetSuite IDE in Eclipse


I'm trying to start using the Eclipse IDE for NetSuite SDF, but every time I try to upload or download (or do anything) a script, I'm receiving an error of "javax/xml/soap/SOAPException".

Eclipse Version: 2019-03 (4.11.0) - Eclipse IDE for JavaScript and Web Developers(I've also tried Eclipse IDE for Enterprise Java Developers with the same issue)

I've tried creating a new SuiteScript Project (type 1.0 to start with) called TestScript. I've then created a sample workflow action script.

I've tried connecting to both production and sandbox. Using the Non-2FA Developer role as suggested by SuiteAnswers (70304). I've re-installed Eclipse and the IDE framework (2019.1).

My script looks like:

function sampleFunction(){ nlapiLogExecution('DEBUG', 'Sample', 'Hello world'); }

I'd expect to load this to the file cabinet under SuiteScripts/TestScript, but I'm receiving that SOAPException error instead. I've also tried setting up a TBA authentication for the user, but I receive the same error.


Solution

  • We had this problem on machines with java installed through brew cask. I offer a poor solution, but one that worked for us:

    1. Make sure you have JDK 1.8 installed, and find where it is installed;
    2. Close Eclipse.
    3. Edit your eclipse.ini file (which we found at /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini on our macs)
      Enter the following (changed for wherever you found your jdk 1.8 installation) above the existing -vmargs line:

      -vm
      /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin/java
      

      (That's -vm on one line, the path on the next line, the existing -vmargs line below that.)

    4. Restart Eclipse & try again.

    Limitations of this solution:
    I doubt this updated version of the .ini file will survive Eclipse updates. It'd be great if there was (and there probably is) an .ini file location in the user dir that overrode this one.
    Updates to the JDK installation will require manual changes to the .ini file.

    … but, it works!