Setting Up NetSuite IDE in Eclipse - 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.

We had this problem on machines with java installed through brew cask. I offer a poor solution, but one that worked for us:
Make sure you have JDK 1.8 installed, and find where it is installed;
Close Eclipse.
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.)
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!

Related

Error Creating a new Glassfish 4 server with Oracle Tools for Kepler

I installed Oracle Tools for Kepler with no problem. But when I want to create a new server and fill in the directory to the server (which is valid, C:/glassfish4/glassfish), nothing happens. I can only click 'back' or 'cancel'.
attached image for better understanding
Thanks in advance
http://es.tinypic.com/view.php?pic=x3tkea&s=8#.U2jz6vl5NUU
http://es.tinypic.com/view.php?pic=2n0ldtu&s=8#.U2j1_Pl5NUU
This is really a weird error/bug/whatever. I have exactly the same setup on my home workstation and it works if I choose jdk1.7.0_55 or Default JRE as JDK in the dialog. It doesn't work when I choose jre7.
You can try to select Default JRE and see if this works.
Another option is to try a clean start of Eclipse. Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as first line.
If you have downloaded a multi-language version of GlassFish 4, the problem may be related to that. You then may try it with the english only version.
If this also doesn't help you can also add the server runtime manually in the folder <WORKSPACE>\.metadata\.plugins\org.eclipse.core.runtime\.settings\ in a file named org.eclipse.wst.server.core.prefs (if it doesn't exist, create it). It should look similar to this:
eclipse.preferences.version=1
module-start-timeout=300000
runtimes=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<runtimes>\r\n <runtime id\="GlassFish 4.0" location\="C\:/glassfish4/glassfish" name\="GlassFish 4.0" runtime-type-id\="org.glassfish.jst.server.runtime.glassfish4" server_definition_id\="org.glassfish.jst.server.runtime.glassfish4" timestamp\="0" vm-install-id\="1399586723676" vm-install-type-id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n <map key\="generic_server_instance_properties" sunappserver.rootdirectory\="C\:/glassfish4/glassfish" sunappserver.runtimeName\="GlassFish 4.0"/>\r\n </runtime>\r\n</runtimes>\r\n
(The format looks a bit weird with the \r\n but this should be correct.)
You have to change the vm-install-id in this configuration, look for the ID of your JDK in the file <WORKSPACE>\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.launching.prefs. There should be an entry with your JDK. Copy the vm-install-id from this entry.
Make sure to have the right path to your GlassFish installation in that file.
After saving the file, start Eclipse and try to create a new server. The runtime should then be available when you choose GlassFish 4.0.
See also:
How to run eclipse in clean mode? and what happens if we do so?

Cannot launch multiple instances of Eclipse Juno

I have multiple Eclipse versions installed in different locations (F:/eclipse-indigo, F:/eclipse-ganymede, F:/eclipse-juno). Indigo and ganymede allow me to launch multiple instances as long as I choose a different workspace. When launching a second instance of Juno I get the error stating "Java was started but returned exit code=1".
I've search for the error but most solutions were for OP not being able to launch Juno at all.
I can launch one instance fine but the second instance doesn't even allow me to choose a different workspace.
Just the error message above.
Try in this order:
Update your Java installation to a recent version. There are bugs in older Java versions causing similar problems: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7002666
Explicitly set the -vm argument in eclipse.ini to point to the Java installation that you want to use (in case there are multiple). Your Eclipse installation currently uses whatever Java was last installed (as that one copied itself into the system32 folder, from where it is started according to the error message).
Compare the eclipse.ini of Juno and one other version. Ignore the DLL and file names, but look if you changed some of the vm options (like memory size) in your old installation. If so, copy those settings into your Juno eclipse.ini.
Have you tried to start Juno explicitly by giving the workspace as argument like in the following shortcut:
F:\eclipse-juno\eclipse\eclipse.exe -data F:\eclipse-juno\ws1
If that does work, there is something wrong (in Juno) with selecting the workspace at the beginning. I try all the time to be explicit with which workspace I want to run Eclipse by creating a batch file or shortcut command like the above.
See this answer for typical command line options.

Upgrading STS with all plugins and settings

I was always disappointed when I have to update Springsource Toolsuite (would also apply to Eclipse, but I never had so much update issues with it), because it takes a rather long amount of time and update function inside of STS doesn't work that well. For example it was not possible for me to upgrade from 2.9.1 to 2.9.2, so I was forced to a reinstallation. In this question I want to show how I do this and I am hoping to get some feedback to improve this process:
I always ensure that I have this plugin installed from the market: P2 Installation Replication. It allows me to select and dump all my plugin info into a single XML file. So I start the old version of STS and dump my plugin list to a file with date in the file name to have different versions.
Then I close STS and rename the root directory to something like "springsource_old"
I download the new version as ZIP file and extract it in a single directory.
I use Lombok, so I download it and doubleclick on the JAR to install it for the chosen STS install location. Normally Lombok finds the installation if you stick to C:\springsource\.. or similar default locations.
Next I update the STS.INI file to force STS to use a specific version of the Java SDK with the -vm flag. If you have a lot of eclipse workspaces to manage it is also helpful to have them shown in the title bar of the window. So I include -showlocation in the INI file. It doesn’t have to appear first, just before -vmargs so that it doesn’t appear to be a JVM argument.
Then I start STS, choose the first workspace and close it again. This generates some preference files. What I want to have is the list of all workspaces. STS (Eclipse) is storing the workspace information in a preferences file called "org.eclipse.ui.ide.prefs".
This file is located under "%ECLIPSE_HOME%\configuration.settings" and contains a key named "RECENT_WORKSPACES". So open the file in the backup location, copy the entries, open the new generated file, and copy the settings into it. The next time I start STS, I can choose between all previous used workspaces again.
Even when no plugin is installed, STS (Eclipse) can natively open the files with the dumped plugins from step 1 (Import - Install - Install Software Items from File). It also allows to fetch the latest version instead of the version which was saved in the XML file. So I select and fetch all my missing plugins.
What is still missing from your experience? How could I improve this process? It still takes some time.
Update
Can't be that I am the only one who has problems with updating STS. Today the update from 3.1.0 to 3.2.0 came and now my STS looks like:
So I still have the issue that after every major update STS is not working anymore.
What exactly was the problem that you had? In general, you should be able to upgrade from a point release to the next point release with no problems (eg- from 2.9.1 to 2.9.2).
There was a problem at one point, which prevented you from upgrading, but that is fixed now. See here: http://forum.springsource.org/showthread.php?126775-Cannot-update-Grails-Support-from-2-9-1-to-2-9-2&p=413794#post413794
If you are having troubles upgrading, please post to the STS forum and paste the error that p2 is giving you with your message.
Sometimes, when upgrading you can look at the error message and see what component is not being found. You may need to add a new update site or de-select an incompatible feature.

Plugins won't install on Eclipse

I am trying to install subversive and checkstyle onto Eclipse IDE for Java Developers however the following message appears:
"Cannot complete the install because one or more required items could not be found.
Software currently installed: Shared profile 1.0.0.1316138460759 (SharedProfile_epp.package.java 1.0.0.1316138460759)
Missing requirement: Shared profile 1.0.0.1316138460759 (SharedProfile_epp.package.java 1.0.0.1316138460759) requires 'org.maven.ide.eclipse [1.0.100.20110804-1717]' but it could not be found"
What does it mean? Is there another way to install them as I need both plugins for my course.
Please help and thank you :)
Try running Eclipse as administrator, I just had the same issue and this worked for me.
There's an alternative to running Eclipse as an administrator: you can manually give write permissions to your "eclipse" folder for all users (or just your current user).
This way Windows/UAC won't pop up the security question that you see when you run programs as admin.
Hi I had the same problem just yesterday.
I was uploading SDK for android and found your question in a google search.
I reverted back to an older version of eclipse. Link to older version of eclipse
This solved it for me.
Remember to delete eclips from your program files. You do this by just physically deleting the file from program files (not through uninstall). Then also make sure you delete your workbench. This is a file called workbench in your docs. Well mine was in my docs, it could be somewhere else on your system.
I am using windows 7.
Best of luck.
I had this problem, but I had to dig harder to fix it.
The source of my problem was the shortcut to launch Eclipse had this in the Target field:
"C:\Program Files\eclipse\eclipse.exe" -configuration C:\Program
Files\eclipse\configuration
The problem with this is that without double quotes around the "-configuration C:\Program Files\eclipse\configuration" section it would hit that space in 'Program Files' and use C:\Program for storing configuration some of the time. Generally, if you have C:\Program you should make sure programs didn't put random files in there by mistake.
To fix this I had to move the configuration files from C:\Program to C:\Program Files\eclipse\configuration, picking and choosing along the way. Change the Target field to:
"C:\Program Files\eclipse\eclipse.exe" "-configuration C:\Program
Files\eclipse\configuration"
and I was good to go.
I had the same problem, and I solved it by setting
"Contact all update sites during install to find required software"
to true.
(I used the Eclipse install manager, in
Eclipse IDE for Java Developers,
Version: Indigo Service Release 1
)
In my case, updating to the latest version of Eclipse (Juno) did the trick. Perhaps your add-on won't run on your version?
I think you need the maven plugin in order to install your plugin. If that's the case, you can follow this this instruction to install it.
Use eclipse update manager to install the plugins.. Then it will automatically select dependent plugins..You dont need to bother about dependent plugins in that case
All I had to do was completely open up full permissions for all users to the directory. This is dangerous if you have a multi-user system but Windows 7 seems to default to giving processes not very high permission levels; some processes (such as Eclipse Updated) don't know how to deal with this and request user permission, so they just bomb out. Easy fix: full control to all users and processes for the Eclipse Directory.

How do you install JDK?

I have eclipse and I can test run java apps but I am not sure how to compile them. I read that I should type javac -version into my cmd.exe and see if it is recognized. It is not. So I went to sun's website and downloaded/installed JDK v6. Yet it still says 'javac' is an unrecognized command. What am I doing wrong?
Thanks!
UPDATE
OK after reading some replies it seems like what I am trying to do is create a .jar file that can be ran on another computer (with the runtime). However I am having trouble figuring out how to do that. This might be because I am using Flex Builder(eclipse), but I added the ability to create java projects as well.
Thanks
UPDATE
OK I do not want to make a JAR file, I am not trying to archive it...the whole point of making a program is to send it to users so they can use the program...THAT is what I am trying to do...why is this so hard?
To setup Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from Suns site. (Make sure you download one of them that has the JDK)
2.Install JDK
Install it and it will save some files to your hard drive.
On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Okay. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.
You don't need a separate compiler, eclipse already compiles the application for you. What you probably want to do is to create an "executable" JAR file, which you can do in eclipse by selecting File->Export->Runnable JAR file.
Note, however, that the resulting JAR file is not a "real" (i.e. Windows binary) executable - it still needs a JRE installed on the target computer. There isn't really a way to create windows binaries; that's not how Java works. On the upside, it will work without recompilation on a Linux or MacOS machine (if it has a JRE installed).
javac is located in the "bin" folder of your JDK installation. In order to run it you must either use full path or add this directory to your systems search path via the Control Panel.
If you installed to c:\program files\java\jdk1.6.0 your call will have to look like this:
c:\> "c:\program files\java\jdk1.6.0\bin\javac" -version
Umm, eclipse is an IDE, it compiles things as you go. You don't need javac.
If you have Eclipse installed and you can write new java apps from within it, your compilation should work already..
Eclipse automatically builds/compiles your system when you're saving new Java files. Just try to write a new simple Hello world app, printing something to the console (just type sysout and Ctrl+Space inside Eclipse)
Eclipse automatically compiles all project in the workspace. YOu can disable this option if you like under Project->Build Automatically.
A JAR file can function as an executable, when you export your project as a JAR file in Eclipse (as Michael Borgwardt pointed out) you can specify what's the executable class, that meaning which one has the entry point [aka public static void main(String[] args)]
If the user installed the JRE he/she can double-click it and the application would be executed.
EDIT: For a detailed explanation of how this works, see the "How do I create executable Java program?"
Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from oracle site.
Download link - > https://www.oracle.com/technetwork/es/java/javasebusiness/downloads/index.html
2.Install JDK
Install it and it will save some files to your hard drive. On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Ok. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.