adding spring file to idea (13) tomcat 6 or 7 - java

I have a working project in eclipse which i like to also run in idea ( my preferred IDE environment ). i am using tomcat 6 and it seem for some reason that i cannot get the spring file to be loaded. including *.xml file etc, they are all OK on eclipse but dont work on Idea.
i saw this post Trying to deploy tomcat server through Intellij IDEA and getting a weird missing server.xml error
but switching to tomcat 7 didn't helped me.

Related

failed to run tomcat in eclipse

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

Why is my TomCat8 server giving me "404 Ressource not available" on one laptop but it works on my other laptop?

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

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

Selecting Apache Tomcat Server Causes Java EE Dropdown Menu Failure, NetBeans 7.4

So here's where I'm at:
I've installed the Apache Tomcat Server successfully.
I've configured the JAVA_HOME path successfully, and created a /common/lib directory (as opposed to plain /lib) to get around an issue with NetBeans recognising recent versions of Tomcat.
If I select GlassFish 4.0 as my server, instead of Tomcat, everything's fine -- but I don't want GlassFish 4.0 as my server, as I'm working through a book on Java WebApps and don't want to run into intractable problems further down the line.
When I select Tomcat as my server, I run into the problem that the dropdown menu to select my "Java EE Version" decides it doesn't want to give me any options at all.
Has anyone experienced this problem before, or can anyone offer a rough guess as to what my problem might be?
Thanks in advance!
EDIT: Update - it's not a problem with the JDK classpath of Tomcat. Tomcat works fine on the .jsp files it came bundled with.
I had the similar problem with Tomcat 8. But after downloading Tomcat 7.0.47 I can now choose from Java EE 5 and 6. Hope that helps.

Use wildfly (Jboss 8) with Intellij Idea

I just needed to upgrade my Jboss Server to 8 (http://www.wildfly.org/) and I'd like to know if there is any way to use it like Jboss6-7 in Intellij ?
When i try to add a Jboss server I get the message : "The selected directory is not a valid
Jboss home" (I select the folder up to all subfolders, like I do for any other jboss server).
The server configuration seems to be the same as Jboss 7 (folders, files)
ANSWER : Works nicely with Intellij Idea 132.425 (Cardea) preview
This is fixed in recently released WildFly 8 Beta1
get it at http://www.wildfly.org/download/
For now we have workaround in WildFly to make Idea believe it is still "jboss as"

Categories

Resources