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

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?

Related

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.
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!

NetBeans background scanning projects takes too long

NetBeans background scanning projects takes too long. Every time when I open netbeans it scanning for ages. I used NetBeans 7.2 and it works perfecly. Now I formatted pc and reinstalled windows, install the same version of NetBeans 7.2, and it works to slow.
Having the same issue with 8.0.2 when a project has JS resources I tracked it down in my case to a problem with the javascript2 editor module which has been updated over the original version shipping with netbeans 8.0.2.
I simply solved it by removing the updated module.
On Linux:
rm ~/.netbeans/8.0.2/modules/org-netbeans-modules-javascript2-editor.jar
However, after letting the netbeans updater download the module a second time, the problem didn't appear again.
In Netbeans 8.1, the location of this file is at:
ide/modules/org-netbeans-modules-javascript2-editor.jar.
I have the same problem in netbeans but i found solution by unselect
the check from auto scan background
in your netbeans IDE go to tools and then Option and select then to miscellaneous and select file tab inside miscellaneous and
you will find check as "enable of auto-scanning of the source
unselect that one and netbeans will be fast then i hope it will help you
in fasting your IDE too
After latest update of Netbean 8.0.2 I have the same problem that scaning process did not stop and go forever with CPU usage on 25%.
When I replace javascrip editor files in C:\Program Files\NetBeans 8.0.2\ide\modules on Windows 7 with old one then scaning project process start work again. You can take those file from this repo.
i'm facing the same issue, but it works fine after increase the heap size by adding -J-Xmx2048m in <NETBEANS_DIR>\etc\netbeans.conf
mine looks like this:
netbeans_default_options="-J-client -J-Xss2m -J-Xms2048m -J-Xmx2048m -J-XX:PermSize=32m ......
Try the following :
1) Go to Window-->Files. This opens the Files Tab.
2) In the Files Tab for each opened project open the nbproject folder and inside it open the project.properties file.
3) Now in this file below the property "excludes" there are file references listed for all your referred Libraries (JARs)
4) There might be some repeated file references with paths that may be old or on someone else's machine(if you are working in a group and transferred projects from someone's machine)
5) Delete those old path references.
Example -
excludes=
file.reference.xyz.jar=../not/correct/path.jar //delete this line
file.reference.xyz.jar-1=../correct/path.jar //remove -1
....
includes=**
6)Also locate the property "javac.classpath" and delete the unnecessary classpath entries corresponding to the deleted references as described above.
Example -
javac.classpath=\
${file.reference.xyz.jar}:\ //keep this line
${file.reference.xyz.jar-1}:\ //delete this line
....
javac.compilerargs=
7) So now the file reference mentioned in the file reference section and the javac.classpath property is same and points to a valid Library (JAR) address on your machine or network.
Example -
excludes=
file.reference.xyz.jar=../correct/path.jar //the correct reference & path
....
includes=**
....
javac.classpath=\
${file.reference.xyz.jar}:\ //the correct classpath entry for reference
....
javac.compilerargs=
....
The reason the above procedure worked (in my case) is because it prevents Netbeans from scanning unnecessary Library paths that may not be present on your machine/network.
On Windows 10 64bit I had the same problem with Netbeans IDE 8.1
I restarted Netbeans as administrator and the problem was solved. Then I closed Netbeans and started normally and the problem was still gone.
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 10 version 10.0 running on amd64; Cp1252; nl_NL (nb)
OS: Windows 7 x64.
The following worked for me:
I fully uninstalled Netbeans (ticked all boxes in uninstaller). For those who couldn't you'll need to go to C:\Users\%username%\AppData\Roaming\NetBeans\8.0.2 and delete a file called 'lock'. This is normally removed when the program exits but if you need to force terminate it'll remain there.
After that I uninstalled JDK and JRE then downloaded Java Platform (JDK) 8u40:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
And Netbeans 8.0.2:
https://netbeans.org/downloads/
Installed JDK (which installs JRE too), after that Netbeans. Once complete I loaded up projects where background scanning got stuck and it seems to have fixed it. Will post updates if it starts happening again.
I actually made a bug report for this issue. It was fixed and pushed to the update channels yesterday. So for anyone still having this specific bug, let Netbeans check for updates. :)
Bugfix: https://netbeans.org/bugzilla/show_bug.cgi?id=250985
On Ubuntu 18.04 / Netbeans 10.0, I had the same problem.
[FAIL] Deleted cache
[FAIL] Deleted project-specific "nbproject" dir
[FAIL] Closed the offending project (mouseover the progress bar to identify which one) --> restart NB --> create new project
[SUCCESS] Nuked the project from the F/S --> re-cloned --> restarted NB. I also renamed the directory itself, in case there was some other cache that pointed to the old dirname.
Please try NetBeans 8.0.2 from https://netbeans.org/downloads/
NetBeans 7.2 is too old and you will not get any support anymore.
I was having the same problem with Netbeans 8.1, Windows 10. It was also hanging when I tried to compile and refactor. It would sometimes say 100% done yet continue background scanning for hours. I closed the project in which this was happening, and switched to a simple project and the problem went away. So I examined my code. I had class A extending class B, then class B importing class A. When I changed this, the endless looping in Ant stopped.
Always I fix such Netbeans related problems by deleting cache directory.
Directory location can be seen on About dialog window.
For me, the path is
C:\Users\USER\AppData\Local\NetBeans\Cache\YOUR_VERSION
This problem is related to one of the project opened in your IDE. As I had been facing the same issue but, after spending two hours on that issue I finally fixed that. Close project one by one or check and close the project where background processing is taking time. After closing the project delete the .nbproject folder and re-import the same project into your IDE.
It should be called foreground scanning of projects. Closing the program and restarting solves it for me sometimes.
I had the same problem but in my case I was on Windows 10 and running NetBeans 8.1.
Before I formatted my laptop I copied and backed up C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders
Then i followed the below steps:
Install NetBeans and run it.
Closed NetBeans
Go to C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders and replace them with the backed up folders.
Run NetBeans again
I hope this solves your problem!!
In my Laravel case ,got this "forever scanning" because the project was created in another IDE. I put the old IDE related folders .idea , vendor , node_modules into myproject->Properties->Ignored folders . Relaunched NetBeans as admin. It will scan a little bit but next time wont stick on that.

JDK and Eclipse not working properly

Okay, so i wiped my PC clean today. Upon attempting to install Eclipse and the JDK i hit a snag.
I install the "ADT Bundle" from android developers.
I install the JDK to the default path
When i try to open Eclipse, it cannot find my JRE (which from what i understand comes in the JDK which i downloaded from the oracle website). I know it is properly installed because i can navigate to the install path and run java programs using the exe.
iv heard something about modifying environment variables to get it to find it but nothing has worked... i dont have a "PATH" variable listed.... i do have a "Path"... but changing either one does nothing to fix the problem... I have done this installation many times and it SHOULD be working...
any help on the subject would be greatly appreciated.
Since you wiped it clean, have you tried downloading Java Runtime Environment again (maybe you wiped it too)
The solution to this problem is such:
The "Path" enviroment variable needs to be under -user variables- NOT system variables
make a new user variable named "Path" and set the value to the absolute path of the java compiler
for me it was something like C:\Program File\Java\JDK1.7\bin
that should fix the problem of eclipse not finding the JDK/JRE...
if it complains about "JNI" then you need to make sure you are running the JDK and eclipse as the same achitechture (64bit java wont work with 32bit eclipse)
The "Path" environment variable needs to be defined or updated. If you are working in Windows 8 then you can navigate by following these steps:
Open > File Explorer
Right Click "Computer"
Select "Properties"
On the left hand side select "advanced system settings"
Under the "Advanced" tab, select "Environment Variables"
Locate the Path directory in the list under System
Edit the directory by entering a semi-colon after the last entry and then manually typing the location of your Java directory.
After the full address is entered, (Should look similar to --> C:\Program File\Java\JDK1.7\bin) click "Ok" on the screen to save your changes.
Something to keep in mind while updating your path. Make sure that you direct the path to the compatible version. If you downloaded the 64 bit eclipse, choose the 64 bit Java. If you do not remember the Eclipse version you downloaded, check your download file name against the files offered on Eclipse's website. If you follow these steps Eclipse should open up without a problem.

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.

Can't add server to a moved workspace

I have this workspace downloaded off the web and I try running it on a tomcat server from a fresh installation of Eclipse Ganymede. This particular project came with its own workspace.
When I select Tomcat v6.0 I get a message
Cannot create a server using the selected type
Older tomcat versions are available, though.
I guess I have to recreate some configuration setting. The question is which one? This seems to be some odd error as creating a new dynamic web project lets me configure tomcat for both of them
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.
I had this same problem on Ubuntu 8.10 with Ganymede and Tomcat6. This appears to be some sort of bug with Eclipse. If you try and create a server, and it barfs, you can't create another tomcat6 server. To correct this problem, do the following:
close eclipse
go to the {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings directory and remove a file called org.eclipse.wst.server.core.prefs.
start eclipse
add your tomcat6 server in the server tab
kotfu
#id thanks for the solution but something is also hidden in org.eclipse.jst.server.tomcat.core.prefs
So in order to solve the problem
close eclipse
go to {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
remove the files org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs
Tomcat 5.5
I order to be able to use the tomcat5.5 server you need to have a writeable catalina.policy file as mentioned in
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg16795.html (= add a READ and WRITE permissions to the files in directory "{$tomcat.home}/conf" (chmod -vR a+rw {$tomcat.home}/conf/*). To be more specific, on the file "catalina.policy". After that, the Tomcat server can be added in the Eclipse servers)
(dead link) http://webui.sourcelabs.com/eclipse/issues/239179
and to have the tomcat5.5 stopped before entering eclipse and started afterwards.
Tomcat 6
In order to be able to use the tomcat6 server the proper solution is to have a user instance of the tomcat6 server as described in
/usr/share/doc/tomcat6-common/RUNNING.txt.gz
RUNNING.txt (on the WEB)
My configuration is Debian/Sid, Eclipse 3.4.1. Ganymede
The error view really is key. There is a lot of detail in there -- if necessary, right-click on the entries and copy their contents into your favorite text editor. One problem that can come up, for instance, is that if you have a server configuration already in place, and one of the configuration XML files is unparseable, the server can't be added. This happened to me this evening -- my <Context> element had a linebreak in it, so it was <C(linebreak)ontext>. This prevented Eclipse from recreating the server configuration.
i finally got mine to work with the default Ubuntu 8.10 tomcat. (the debug command-line on eclipse is a wonderful thing) First i had to make a couple of symbolic links and then change the permissions to a file. (you might want to think twice about changing the permissions depending on your configuration, but if eclipse can't read the file it throws and exception and the gui won't let you continue)
sudo ln -s /etc/tomcat6 /usr/share/tomcat6/conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy /usr/share/tomcat6/conf/catalina.policy
sudo chmod a+r /usr/share/tomcat6/conf/tomcat-users.xml
Hum it can tricky. Bring the "server" view. If your project has already been deployed, remove it from the server to clean the binding between your project and the server.
Or you can right-click on your project in the project explorer and choose debug on the server. If you don't done it already, Eclipse should ask you to create a server runtime and here you can specify Tomcat 6 and specify the location of your server installation.
You can also see the "problems" view to see any problm in the project imported like the JDK etc...
Look in the error view. If you tried to set one up once and failed, Eclipse seems to try and look there again later just before allowing you to create a new one. If you've deleted the folder or its not there any more, you need to replace it so that you can proceed.
The only way I found to use the Tomcat 6 is changing the ownership of the Tomcat directory to my user. It seems that is not enough to have r/w permissions.
BTW, removing org.eclipse.wst.server.core.prefs erases you workspace configuration.
I had had same problem until I went to tomcat6 configuration directory and added ownership to my user in addition to root:
cd /usr/share/tomcat6/conf
chown root:myusername ./*
chmod 777 ./*
You can choose some better chmod for security, 777 is just a quick brutal fix.
I have Eclipse 3.5 (Galileo) + Fedora 12 + Tomcat 6 extracted from tar(which is why Eclipse could not access it). Eclipse had been complaining "Cannot create a server using the selected type".
What version of Eclipse? Europa? Ganymede?
What do you mean by workspace? An Eclipse workspace is not something you deploy, it holds your projects.
You will need to generate a WAR file (or the folder of files that would comprise the WAR file), a project would typically include an ANT or Maven build script to do this, or if the project used Eclipse's Dynamic Web Project type there might be a 'generate WAR' option somewhere. Without further details I can't help any more.
Adding a new dynamic web project to the workspace seems to 'unlock' the feature.
Changing the ownership to my user worked for me.
In my case, it was the corrupted Tomcat configuration files. Eclipse log was saying:
org.eclipse.core.runtime.CoreException:
Could not load the Tomcat server configuration at
C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.14\conf.
The configuration may be corrupt or incomplete.
Got a new Tomcat distribution, removed the old one and all good now.
Finally got this problem solved on my system.
1) got rid of the apt-gotten tomcats
2) installed a typical tomcat from bins at tomcat.apache.org
3) got rid of my openjdk
4) installed the sun jdk (apt-get)
5) removed my web projects in eclipse
6) noticed that when adding a web project you can set "Target Runtime" - I tried setting it to Tomcat 6 and it let me know there was a problem
Maybe none of the above mattered, but here's what might have mattered:
7) KICKER: Window -> Preferences -> Server - Runtime Environments. Removed any crappy runtime environments here, and added the path to my newly installed tomcat.
This Question is maybe old. But I just ran into this problem. My project was not recognized as a web project (no globe icon in Eclipse ).
Suppose you use maven plugin , it failed to convert to web project with command
mvn eclipse:eclipse -Dwtpversion=1.5
In package Explorer, right-click on the project / configure / Convert to Java Facets project/ Dynamic Web project in Eclipse
Et Voilà
Check the .project file at the root before and after the convert.
You will see new natures.
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
Instead of deleting config settings files, just go to Preferences -> Server -> Runtime Environments and remove the "forgotten" environment....
Thanks a lot this answer working for me..
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.