failed to run tomcat in eclipse - java

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

Related

Spring Boot exception: Could not open ServletContext resource

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.

Connect Weblogic server to Eclipse Error: "does not contain a valid WebLogic Server install or the installed version is not supported"

I'm trying to connect a weblogic server to my eclipse (photon) and I keep getting this error message:
Error
"does not contain a valid WebLogic Server install or the installed version is not supported"
I've tried installing 3 different types of eclipse (Photon, Eclipse IDE for Java Developers - 2021-09 and Eclipse IDE for Enterprise Java and Web Developers - 2021-09) but I have the same error on all of them.
I know that I have configured the weblogic server correctly because I can access it as shown:
Weblogic Server
Shouldn't it be looking for the startWebLogic file or something? Because that's where I'm pointing it at.
I have tried doing what other threads do but they don't work for me.
Basically I have 2 questions:
How do I fix this error?
What file does this pop-up is looking for?
The WebLogc Home Folder must set to point to your WebLogic installation and not to a domain folder (as you did). Locate the wlserver folder under your WebLogic installation and set it up in Eclipse.
You have to look to the "wlserver" folder, I just got it fixed, also with Oracle 12c.
The Server I linked was: C:\WL\wls12213\wlserver
And then you can continue, also the configuration guide will ask you for the domain, that you have to had already configured.
In my case: C:\WL\weblogic_server_12.2.1
I'm using Spring Tools Studio 4.6.1

Running Apache Tomcat 7 in Eclipse

I am trying to run Apache Tomcat 7 on the Eclipse. But I am facing some problems. I configured the tomcat libraries. Then I also imported the war files in the existing workspace. Then I tried running the index jsp page. But I am getting error
"Unable to load page". Cannot resolve proxy hostname. I am not sure why the tomcat is starting now.
Can someone tell me what is this error ?
To run Tomcat, you need to either add a server using Eclipse's tomcat plugin or modify the run/debug configurations to point to your application's server.xml.
The error you're getting suggests that tomcat is not running or that it's not configured properly.
What exactly are you trying to do?
if you are using windows then go to run type services.msc a window will open up from there stop the apache tomcat service and then try to run it from eclipse.
or just change the port numbers it might be used by some other application

How to create an enterprise application client with Netbeans 7.4 and JBoss 7?

I try to create an enterprise application client with JBoss by following this official tutorial (based on Glassfish):
https://netbeans.org/kb/docs/javaee/entappclient.html
but I get this error message: Error: Unable to access jarfile C:\EntAppClient\${client.jar}
As far as I know, Netbeans IDE supports JBoss 7 since its version 7.3 RC1 and I use Netbeans 7.4. This feature seemed already broken for a long time according to this thread:
http://forums.netbeans.org/topic40270.html
It is expected to work as Netbeans is intended to support other application servers. However, some Glassfish specific properties are hardcoded inside the Ant build scripts and the property client.jar is set if and only if j2ee.clientName isn't set which isn't my case (it's set to EntAppClient.jar).
When I set client.jar to ${dist.dir}/${j2ee.clientName}, I go a bit further but Netbeans doesn't find the JAR of the remote interface and the Glassfish specific agent class loader org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader.
How can I make it work? I'm going to try to fix build-impl.xml to use the correct classpath and I hope to find a smarter solution.

Hot deploy not longer working on JBoss ("Scheme change not implemented")

I've got a pretty annoying problem with my JBoss AS 4.2.3 GA.
Until recently everything was running fine, but now the hot deploy feature is now longer working. And -- as always -- I don't know what I did to cause this behaviour.
My projects are built with Maven. I've cleaned every target directory, installed the projects and then deployed them to the server. So the sources in Eclipse and the deployed projects on the server should be identical.
Inside a method I've added a simple System.out.println("test"); statement and -- BANG! -- I get the following error:
(source: imagefruity.com)
Do you know a way out of my trouble?
Ok, I did the following things now:
Uninstall all JDKs
Install only one JDK, namely JDK5 (cause that's the one we use in production)
Clean, install and deploy every project anew
And now it seems to work (I'm keeping my fingers crossed).
I've used JDK 6 Update 20 for building in Eclipse and JDK 6 Update 7 in Maven. Maybe that has caused the problem.
In my case "Hot code replace failed - Scheme change not implemented" was caused by IDE using another compiler than compiler used to build files deployed on J2EE server. You can binary compare class files in your J2EE archive with class files compiled by IDE in your workspace - they should be identical.
For details please check here.

Categories

Resources