I get this error when using NetBeans:
The Java DB location is not set correctly.
Can somebody help?
I came across the same error message whenever starting the GlassFish.
It was because the Java DB path had changed.
(My previous install was glassfish-3.1.1/javadb)
You can set up the correct path in the Java DB properties.
I had the same problem on my Mac, debugging an app on GlassFish 3.1 which comes standard with NetBeans 7.0.1. This link gave me the answer I needed:
http://forums.netbeans.org/ptopic21916.html
The JavaDB path, as set in a clean installation, was pointing at an older version of GlassFish. Basically a configuration management issue it seems.
By default, it takes the C: drive path while installation.
If you give your specific path(other than C: Drive), it prompts that pop up
I had a similar problem. When i right clicked to create the database the option was not enabled. I then clicked in properties and the 'Java DB installation' and 'Database location' fields were blank.
This link helped me solve the issue:
https://docs.oracle.com/cd/E19798-01/821-1770/gioew/index.html
Basically GlassFish server didn't come with the installation of NetBeans pack, that's why i had to follow the instructions in the link to install the server.
After the installation finished the 'Java DB installation' and 'Database location' fields were already filled with the correct path.
Related
I'm building a simple calculator app from a tutorial/class on Pluralsight (Java Fundamentals class), which starts with a Main.java file, and adds a class file later, MathEquation.java.
I created a Git repo to track my progress, and uploaded to Github: JavaFundamentalsClass. I used GitIgnore.IO to find a Java IntelliJ .gitignore file, and everything seemed to be working fine on the original PC I was using.
However, after switching over to a different PC, with a fresh install of IDEA, I cloned down the repo from Github, and found that the project would not build and/or run. I get this error:
"C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.191-1\bin\java.exe" -Dfile.encoding=windows-1252 -jar ""
Error: Unable to access jarfile
Process finished with exit code 1
I suspect that there is something in the .gitigore file that is keeping some of the project, dependency, or build information from being saved in the repo that keeps IDEA from having all the info it needs to build and run the Main.java correctly.
Can anyone help? You should be able to download the project from the repo linked above in it's currently broken state, including the .gitignore file.
Additional Info
I wiped my repo clean and recloned and I forgot, originally it doesn't even give me the run button (it is grayed out). I had to do a procedure with "Add Configuration" from a search I did for that to show up to get the error above.
Also, I did install java from the OpenJDK, rather than oracle. I figured with Oracle cutting off commercial development maybe start the switch now as I'm learning, but maybe that's the issue (normal Java on my other PC).
It's working, but...
First thing - Intellij needs to know where Java is. It appears that if the SDK/JDK is not installed prior to Intellij, you will need to tell it where Java is after installing. Or if you use OpenJDK instead of Oracle Java SDK. You can do that at View/Open Library Settings, under Platform Settings / SDKs (select the JDK home path).
Then, after setting up Java, I am able to get everything working in Intellij IDEA if I find the Main.java file, right-click, and choose "Run main.main()". This runs the program okay, and also creates a Main configuration in the Run/Debug configuration area, and finally the "Run" button becomes available.
So I can get it working, but if I wipe all the files and clone it fresh from the remote repo, I have to go through running the Main.java file directly again to recreate the configuration.
So, this still doesn't answer my original question. Why doesn't this configuration get saved in the repo? What file is this information saved in? Is there something in the .gitignore file that is keeping this information from being saved to the repo?
Look like you have a different java version on your second machine.
First of all, check your java version
Update the configuration of your project, right now it pointing to java 1.8
https://github.com/LightCC/JavaFundamentalsClass/blob/master/.idea/misc.xml
I think it might be because of java not installed on the other PC you were trying. If it is installed just check whether the path mentioned has java executable file.
The first part is ensuring Java is setup, and that Intellij IDEA knows where Java is, per the other answers, comments, and addendums to the question.
The second part is setting up the run/debug configuration, per the "It's working but.." section of the question. This can be created automatically by right-clicking the file that has the main class to be run (usually Main()...), and selecting the "Run Main.main()" option (replacing Main and main() with the file and function which needs to be run)
The final piece is that to get the run/debug configurations to save to the repo, you either need to:
Share the workspace.xml file (i.e. make sure this is not in the .gitignore file). However, there is a lot of user-specific stuff in that file, so it should normally be excluded from the repo.
Or, edit the configuration and checkmark the "Share" box in the upper right-hand corner (just right of the "Name" field). This will put the configuration into a separate folder inside the .idea folder, which should not be excluded from the repo by .gitignore.
I changed my default jre to jdk 1.7x in eclipse kepler. I was getting a null pointer exception when I started glassfish 4. To fix this issue, I did all the steps to change the jre/jdk of my glassfish. On the final screen, when I click finish, nothing happens. This looks like a bug in the software. Please help me to fix my problem.
Note: When I try to clean the server using my server > right click > clean, I get the same null pointer exception again.
Edit-
I tried one solution which does not help:
Apparently when Glassfish is installed it hard-codes its reference to
your JDK location, so to fix this problem I ended up having to edit a
file named asenv.bat. In short, I edited this file:
C:\glassfish\config\asenv.bat.
and I commented out the reference to JDK 6 and added a new reference
to JDK 5, like this:
REM set AS_JAVA=C:\Program Files\Java\jdk1.6.0_04\jre/..
set AS_JAVA=C:\Program Files\Java\jdk1.5.0_16
This solved the problem, and Glassfish started right up after this
change.
But my asenv.dat file contains no such path. Anyway, I added set AS_JAVA = my jdk path here and it did not help.
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin
set AS_CONFIG=..\config
set AS_INSTALL=..
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DEF_NODES_PATH=..\nodes
set AS_DERBY_INSTALL=..\..\javadb
REM I added my line here
Another solution which leaves me with the same problem:
Install latest eclipse luna with latest glassfish 4.
It is a bug - see here the comment by BalusC
The only sure way to workaround is to delete your server runtime and create it anew.
And by the way - Luna is the latest eclipse release - maybe update ?
First, delete the glassfish server in servers window in eclipse. Then, in my second screenshot, in the window below the front window, i.e where you see Invalid JRE in red, delete the glassfish server. Then, recreate a glassfish server from the servers window from scratch. Your problem will be solved. I had also reinstalled my jdk, so I am not sure if that also helps. Anyway the glassfish server is atleast running now.
Here is the Answer :
Glass-fish Requires JDK , somehow it is unable to get it.
We can solve this issue just click on the JRE preference link.
And add one more entry of JDK in that popup window.
Now you should be able to select & proceed further with the Glass-fish installation.
Save the server and try to add a new module again.
See more: https://www.eclipse.org/forums/index.php/t/1072242/
For the last couple of hours, I'm desperately trying to configure apache tomcat6 in Eclipse, and I'm having some difficulties.
I tried everything I could find online, including several posts here in Stack Overflow (most of the problems I found wasn't exactly like mine).
Initially, I followed this tutorial, and after installing tomcat6 like this:
sudo apt-get install tomcat6-common
sudo apt-get install tomcat6
and making sure that the server is running.
Next, I followed the mentioned tutorial, and everything was fine, until I got to stage 5.4 in the tutorial: "Start Server".
When I click Start, I get the following error:
As I said, I tried to look online for an answer, but nothing seems to help...
Does anyone know why am I getting this error and how can I fix this?
This might be a long-shot but do you have correct permissions for the folder where the config file is located?
try to follow the steps mentioned in below link
clipse-could-not-load-the-tomcat-server-configuration
1)Close Eclipse
2)Copy all files from TOMCAT_6_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v6.0 Server at localhost-config
3)Start Eclipse
4) Expand the Servers project, click on the Tomcat 6 project and hit F5
5) Start Tomcat from Eclipse
Try to start the server using terminal and then try in eclipse. go to /bin/ execute the command startup.sh. try this.
if you still got error. Execute this configtest.sh will provide you the proper error.
Then try set Classpath for your server. can be done using setclasspath.sh
I was able to solve it, after 3 and a half hours of trying...
Apparently, when I installed tomcat from the command line (sudo-apt-get etc) the /usr/share/tomcat6 folder (the default installation path) was missing some files, including this /conf folder, which required for Eclipse (hence the error message).
But when I removed it, and download tomcat as a tar.gz file from here, and extracted it, it somehow contains more files in it, including the /conf folder.
So then in Eclipse I created a new Server, and provided the path of the new extracted folder, instead of the previous /usr/share/tomcat.
This did the trick.
I've been up for hours now, searching online for a solution. I can happily say, this has really pissed me off.
Upon opening 'Install New Software' I get "'Contacting Software Sites' has encountered a problem.
Some sites could now be found. See the error log for more detail."
Here's the error log:
Some sites could not be found. See the error log for more detail.
Unable to read repository at
http://download.eclipse.org/webtools/repository/indigo/content.xml.
Cannot assign requested address: JVM_Bind Unable to read repository at
http://download.eclipse.org/eclipse/updates/3.7/content.xml. Cannot
assign requested address: JVM_Bind Unable to read repository at
http://download.eclipse.org/mylyn/releases/indigo/content.xml. Cannot
assign requested address: JVM_Bind Unable to read repository at
http://download.eclipse.org/releases/indigo/content.xml. Cannot assign
requested address: JVM_Bind
Any ideas?
I want to install MercurialEclipse but it cannot find the repository, same for the defaults.
I had the same problem. And found solution on russia site.
In file eclipse.ini under line -vmargs add this line:
-Djava.net.preferIPv4Stack=true
This will resolve problem.
Site with explanation
I have encountered the same problem. I have resolved disabling the site using:
Window → Preferences → Install/Update → Available software Site
Here the site that can be used have a tick (enabled). You must find the site that caused the problems and disabled them.
I hope this could be useful.
I encountered the same problem and solved it by disabling the McAffee Host Intrusion Detection program during the installation.
I noticed an additional symptom that I wasn't able to browse the Internet using the Eclipse Internal Web Browser feature using below Eclipse Menu navigational steps:
Window → Show View → Other → General → Internal Web Browser.
I have had the same problem in the past when installing new software in Eclipse.
In my case it has always been a problem with my Eclipse Proxy settings.
Eclipse > Preferences > General > Network Connections
Make sure you have your proxy settings configured correctly. If you are on a college or office network you can get the Proxy details of the administrator. In my case I had to configure the HTTP, HTTPS and the SOCKS.
The SOCKS requires that you input your username and password.
NOTE: If your network username or password changes you will have to update this.
In my case I had to change the "Active Provider" drop down from 'Direct' to 'Manual'
This solved all my problems
More info at http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-net-preferences.htm
I had the same issue, to resolve it, I preformed the following steps:
Made sure the internal browser was able to connect to the internet.
Window/preferences
install/update
available Software sites
click on each row that is checked, one at a time and at the bottom right side of the window it will tell you if the resource is available or not. If that resource is not available then uncheck it. I then added the following resource site and this was able to fix the error.
Name:Composite Marketplace Repository
Location:http://marketplace.eclipse.org/repo
HOPE THIS HELPS...
This is a shot in the dark and might not help but, have you tried the following:
Can you connect to internet at all through Eclipse?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser.
Look up any normal adress, is it working?
Can you connect to another update site? Try for example Eclipse Emma:
http://update.eclemma.org/ Do you see anything there?
What are your proxy preferences? Go to Window -> preferences ->
General: Network connections.
The active provider:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened
without the use of a proxy server. Selecting Manual causes settings
defined in Eclipse to be used. On some platforms there is also a
Native provider available, selecting this one causes settings that
were discovered in the OS to be used.
If internet is working fine outside of Eclipse, try changing to
Native. After that, try Direct.
I have encountered problems where an update site would not load, then
I had to remove it and add it again. This forces Eclipse to reread the
contents of the site even if it has a cached copy. So, if you still
get no connection to the indigo update site, but everything else is
working, try that. Go to Window -> Preferences -> Install/update:
Available Software sites. Then remove and add the indigo site. Just
remember to copy the adress so you can add it again.
This is a copy and paste from this post.
If the embedded browser works but updates will not work you might just be using a 32 bit Java on a 64 bit eclipse. Download the 32-bit version and see if that helps. Worked for me.
I also encountered the same problem and nothing here worked. What I found the problem to be was an issue with the versions of openjdk and oracle-java...as a result I installed all versions from 6-8...I'm not sure which one fixed the issue but after installing all of them the problem was resolved. Hope this helps
I was having the same problem and I checked my proxy setting for all the browsers which was installed ......... One of the browser(IE 8 for my case ) was using the proxy setting to execute the testing sites of the company ...........
I unchecked that one ......... restarted my eclipse and now its working fine ..........
My solution was:
Window → Preferences → Install/Update → Available software Site
edit the problematic sites-> remove the 's' from 'https' on the site lines!
using Luna.
this is reference of
Unable to read repository at http://download.eclipse.org/releases/indigo
Can you connect to internet at all through Eclipse?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser.
Look up any normal adress, is it working?
Can you connect to another update site? Try for example Eclipse Emma: http://update.eclemma.org/ Do you see anything there?
What are your proxy preferences? Go to Window -> preferences -> General: Network connections.
The active provider:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.
If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.
I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
As suggested in a comment below by #lostiniceland, this is a simpler way to achieve the above:
Goto Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins
My Eclipse Installation:
SuSE Linux Enterprise Server 11.
Eclipse Neon 64-bit
Oracle JDK jdk1.8.0_51 64-bit
I worked out and followed many of the suggestions in the web and nothing helped.
Except that one:
In eclipse Go to "Window -> preferences -> General: Network connections" and set the "Aktiv Source" to "Native"
Exit eclipse
In the shell prompt, type
"export http_proxy=http://proxy-rzf:8080" (your own proxy server and port)
invoke eclipse
DONE!!!
If you then go to the eclipse "Network connections" settings you will see something like the image:
I hope i could help somebody with that. It cost me a lot of hours searching and trying.
I just got the Eclipse Java EE version and tried to configure Tomcat by going to the Window-->preferences-->Server
But when I went to "runtime environment" and gave it the location of the current tomcat directory, it didn't seem to recognize it and didn't let me go to next screen.
Did I do something wrong? The problem is that there are still the red squigly lines in the import statements of servlet libraries. Is there some correct way to refresh the page so I can ensure that Eclipse indeed does not recognize those libraries still?
I have been experiencing similar problems recently, sometimes even Eclipse not listing Apache Tomcat 6.0 among available servers. The solution was go to eclipse's metadata directory:
your_workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
And delete following files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
Then restart Eclipse and try again, everything should work.
Hope this helps!
Ensure that you're pointing to the real Tomcat root directory which contains the /bin, /conf, /lib, etc folders, not to a directory which contains just apache-tomcat-7.0.11 or something.
Also pay attention to the error/warning message in top of the wizard, if any, right below the title.