i am facing a issue with installation of a project. I was mainly working on Windows and everything works fine here (so that the code is 100% working on my machine), recently i switched to the Macbook PRO on the new M1 Pro chip, i managed to install maven, httpd, tomcat and java with brew, and started to configure to run the project, however i get an error:
java.io.FileNotFoundExceiption: Could not open ServletContext resource [/../conf/application.properties]
I would like to point that i am using java 8. On my windows machine everything works fine, what can be the problem? I am first time using Mac OS. Thanks in advice.
Try reinstalling the library... or if not the file mentioned doesn't exist or is corrupt. now check everything(like if any data is corrupt in the library or your files and make sure it exists). If it doesn't work, try including information (like error logs and so on.)in a comment in this answer.
Related
I just started using the MacBook with the M1 chip and I just git-cloned my spring boot project through IntelliJ and I have installed the same java version and set its path and SDK. Everything is great actually and it runs but I get an error in my pom.xml file that says "Plugin 'org.apache.maven.plugins:maven-release-plugin:' not found". I have installed maven through homebrew. I have set its path and I have tried the different solutions provided online but the error stays the same. Can you helpThe result I'm getting
Can you please help me out
I was doing a servlet project in eclipse.
when i tried to run my tomcat server in eclipse like this(right click server-start)
run tomcat in eclipse
(and neither can i run my servlet app on tomcat through eclipse)
it'll show "a java exception has occured"
java exception
and in the debugging window,it look like this
console output
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Logger
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:61)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:181)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:133)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:156)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:211)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:50)
Caused by: java.lang.ClassNotFoundException: java.util.logging.Logger
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 6 more
the problem is ,the server was perfectly well in eclipse yesterday,and although i can't run tomcat in eclipse ,i can start tomcat outside eclipse.i tried a different version of tomcat,reinstall eclipse and tomcat,and searched online,but the problem was not solved
i installed jdbc for sqlserver and imported the sql-jar in one of the java project in eclipse ,and besides that,i cant think of anything that can possibly make this happen....
and before i tried to reinstall tomcat,there was another error in eclipse ,,Could not load the Tomcat server configuration at \Servers\Tomcat v8.0 Server at localhost-config
and after i reinstalled tomcat,this was gone ,but tomcat still cant run
thank you for your time..btw
the problem was solved just after i posted this question.....
i tried to use a different completely new workspace for eclipse ,and it worked..
i have no idea why...
-----update---------------------------------------------
i found where the problem is,but still dont know why.
like i said above,i was trying to install jdbc and java-sql environment,within the steps,there was one step it requires to specify the exact loction where my jre folder is,(something like that)
and i was using jdk12, which dont have a jre folder in the jdk folder,and i found a way to generate the jre folder manually,and that was what i did.and the database part worked out pretty good.
(it seems the jdbc version i used is not the best,i suppose in the correct version it doesnt require a jre folder to be specified)
anyway,after i deleted the jre folder i generated manually, i re-configured the tomcat server in eclipse,and then the server can run in eclipse
Few points you can verify
Make sure you are using Eclipse JEE version
Your tomcat and Eclipse should be using JDK 8 and above, and have the same JAVA_HOME path reference.
Also, stop all the tomcat instance, if you are running outside.
Try changing the default the tomcat ports, mainly HTTP, startup and shutdown port
I'm developing a web app.
I'm trying to make it work on my new laptop.
I'm downloading the sources with git, then creating the WAR, then copying the WAR to my webapps Tomcat8 folder running on my brand new Windows 10 laptop.
The app starts very well
Then I can click on the first button, it works very fine
Then I fill the fields and when I click on "save" it doesn't work (see red message on the top of the screenshot)
When I open dev tools, here is what it says :
Etat HTTP 404 - /DropMe2/api/profile-infotype Rapport
d''étatmessage
/DropMe2/api/profile-infodescription La
ressource demandée n''est pas disponible.Apache Tomcat/8.5.11
(sorry it's French, but it says something like "Requested resource is not available").
Which makes no sense, since on my other Windows laptop it works well and fine. I have taken the exact same sources using maven, made sure that Tomcat is restarted.
I'm having an headache on this, I have no idea where to start looking for..
Please check your configuration port for Database and Tomcat settings ( ex: mysql, usually it is configured to port 80, but it might be configured to 8080 or some different ports in the other pc )
Have you made sure you committed your latest changes to git? Perhaps your endpoint is out of date and the requested resource really isn't there. Tomcat also unpacks the WAR into a separate directory in webapps that doesn't get updated unless you delete it, regardless of if you uploaded a new WAR.
So after investigating ; i had issue with Tomcat8.5 and java..
I have java7 and java8 installed both on my machine -- yes i know.
So here is what i did :
uninstalled java 7
uninstalled java 8
uninstalled tomcat8.5
reboot
installed java 8
installed tomcat 8.0
Well, now it works ! Yipiie !
Thanks to anyone who tried to help :)
Olivier
I created a jar file from netbeans of my java application which is displaying mysql records. I am trying to run it on another computer which doesnt have netbeans but rather java SE. I fixed a major minor version issue by installing a latest java SE version. It is now running the jar file by now the next issue is it is giving me the java.lang.classnotfoundexception: con.mysql.jdbc.Driver
I tried to copy the mysql-connector-java-5.0.8-bin into second computer as well, but no luck.
Actually I need a solution where I just copy the jar file and able to run it as a server. I want to install it on multiple computers on the site, which might not allow me to install netbeans from internet.
i have a little vaadin project for a school project that originally deployed well and worked.
i am using jboss as 7.1.1, vaadin7 and jdk8. My target platform is a raspberry pi running raspbian os.
so i am using the pi4j library to access the gpio interface of the raspberry and everything worked just fine until i implemented a check for null when creating a new instance of the web page. at first the error was because somehow the "jboss/standalone/deployments/roboterarm.war/WEB-INF/..../classes" directory became empty. afterwards the error came to eclipse as i could not use the pi4j library anymore. i did not touch the libraries and i can't figure out why it suddenly stopped working. i reinstalled eclipse, jboss and redownloaded all the libraries but i still can not use anything, not even in normal java applications!
afterwards i grabbed a copy from SVN that used to work normally but no luck there either, i can not use the pi4j jar-files.
everything looks fine to me there, yet it fails to give me code completion or compilation
i also tried creating a new vaadin project and c&p'ing the source code into the new project but the jar files are not recognized there either.
What am i doing wrong? how can i fix this? thanks in advance!
Eclipse buildpath, clearly indicates that your JRE is not properly added. Add your JRE to your build path, using the option Add Library.