I have a Tomcat application which, the first time I start Tomcat after starting Eclipse, I get an odd NoClassDefFoundError. If I then stop and restart Tomcat through Eclipse, it works fine. I have single, double, and triple checked the classpath and everything seems fine. Anyone ever seen anything like this before?
relevant versions:
Tomcat 5.5.17
eclipse 3.3 europa
tomcat plug-in for eclipse by sysdeo:
com.sysdeo.eclipse.tomcat_3.2.1
I notice that this is a pretty old version of Tomcat, that might be contributing to the problem. You could try the following
Start Eclipse.
Clean your webapp project (build if automatic build is off)
Start the Tomcat server.
That's the only thing I can think of. Other than that I would recommend getting the latest 5.5 version of tomcat (I think it is 5.5.25)
I had problems like these as well, I think I solved it by linking in a whole folder of classes, a different folder though, there were copies of the libraries in a few places, and the Tomcat server needs the libraries from it's runtime imported into the project.
I've found the tomcat plugin to be generally buggy, and have stopped using it.
In my consulting job, I worked with a team that had all manner of stability issues with their application in development. Removing the tomcat plugin, and just having them start/stop tomcat from the command-line fixed all of the issues.
What is the class that is missing?
Have you trying starting and stopping tomcat with wtp instead of sysdeo?
Nope, never saw it. It is very unlikely that the class is present and that it is a classloader problem.
What is the class that is missing. It is probably that it is occasionally going through some error condition
e.g. trying to open a port that is already open
and the error is causing it to try and load this specific class
Related
I am trying to do parallel deployment in Tomcat to get Zero downtime.
I have read all documentation and what I understand that is almost default option just I need correct version name.
I have in webapps folder app##001.war its running ok. I upload second version to webapps folder app##002.war second version deploy's ok, but my app version in browser do not change.
If I restart Tomcat I get new version of app, but how to get new version without restarting Tomcat. Maybe I'am missing something?
I think maybe parallel deployment is what you need.
It's been supported since Tomcat 7
https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Parallel_deployment
I just updated to MyEclipse 2016, and I am having some issues getting my code to debug.
I wrote some changes in a java file and am trying to debug them on my websphere application server, but I noticed the debugger wasn't following the code at all. After a little investigation it turns out that I'm on V5 of the code, but the debugger is running V4 of the code.
I've tried going into the menu at
Run -> Debug Configurations... -> (Select My Server) -> Source
and changing the sources listed in here to just the workspace projects, but the debugger still goes through the old version of the code.
I'm at a loss and don't know what to do to get the debugger to pick up the right code. Does anybody have any suggestions I could try to get my debugger to pick up the new version of my code?
Edit: Forgot to include, Project --> Build Automatically is checked in the menus, and I have tried manually cleaning this a few times myself as well.
From your last comment, this means that the V4 code is actually executing on the server. The debugger is not executing anything; it is the server that is executing the code. So you have the wrong version deployed, somehow. Try a clean on the server, to remove any deployments and then re-deploy your project.
Given what everybody had said I checked into the deployment to the server. Looks like I had a WAR deployed to my server, when there is actually an EAR I can deploy to the server which includes the WAR I had deployed. Apparently doing just the WAR broke things, but deploying the EAR seemed to fix it all. Thank you all for the input though, definitely helped me get to the root of the issue!
I'm currently working on a GWT project in my company. Although DevMode works perfectly fine in eclipse, I still want to use Intellij Ultimate Edition for development.
But after all setups were done (Facet, Run/Debug configuration) I'm getting this weird processing window saying "Deleting Obsolete Files..." when I run the program and after that all my pre-deployed resource files in the war directory were gone (recursively...).
BTW, I use a script to deploy all my stuff. And the only argument I set for DevMode is:
-war /absolute/path/before/war/folder/war
Does anyone know the reason why Intellij is deleting my files?
After sending a request to Intellij support team, they gave me the following answer:
Adding the following two lines to the IDEA_HOME/bin/idea.properties file:
idea.gwt.clear.unit.cache.before.run=false
idea.gwt.clean.files.created.by.dev.mode=false
Which makes sense, because the only thing I need is to prevent Intellij from deleting my local cached files. Problem solved.
I switched to IntelliJ from Eclipse and never had a problem with GWT debugging in IntelliJ. It is most likely deployment-related.
First, I use Tomcat on the client side just like I'd use it in production. No built-in Jetty. Specify -noserver in Dev Mode Parameters. And make sure to start you server (in Debug mode since you are likely to debug it as well).
Other than that you may be doing custom build/deployment which is causing it. I do everything by the book. IntelliJ is Maven-centric, so it needs to be a textbook Web App module. Unlike Eclipse you don't need to specify where you war directory is. It is "webapp" per Maven convention. I suggest recreating the module from scratch.
I'm trying to learn Tomcat but the problem for me is the that the Tomcat server has to be restarted each time I make changes to the code.
Is there any way to make Tomcat pick up changes to the code without having to restart the server?
Maybe an IDE (Like Eclipse or NetBeans) can be somehow used to develop for Tomcat and test all the changes right there in the IDE?
Well if your putting your latest compiled files(classes/resources) under WEB-INF/Classes or lib folder you dont have to restart the server. You can can configure IDE's like Eclipse to configure this way where they can put latest compiled files under right target folder. Rcent Eclipse version comes up plugin where you can configure it to use existing tomcat server. You can also explore Mongrel Plugin which also serves the same purpose .
Please have a look at "DCEVM". It's a Java runtime environment alternative that works just like a normal JRE but is able to reload class changes in almost all situations. Very cool, and it's free.
http://dcevm.github.io/
Installation is very straightforward, see explanation on the site.
I have just downloaded NetBeans 7.3 for JavaEE and installed it with Tomcat 7.0.41 Everything went fine and I can run NetBeans, start and stop Tomcat from within the IDE and add and remove servers at will.
However when I try and create a Java web Application project my server list is empty.
The message I get at the bottom of the wizard for creating projects is "No servers are registered in the IDE. To register a server, click the "Add..." button.
I have Googled and got nothing and looked at the NetBeans docs and got nothing, help me
I am running Netbeans 7.3, Java 1.7, Tomcat 7.0.41 and Windows xp-3.
This Problem is solved by just Restarted Netbeans Software
Thanks to all
I know the original problem was solved, but I had a very similar issue, and in my case simply restarting Netbeans did not help, so I wanted to help anyone with my issue. It sounds stupid, but I wanted to warn people that they need to be sure to download the right tomcat zip file.
Tomcat lists several zip files on their server, and I should have been using the Windows-64 zip file. Instead, I downloaded the first file, which just said "zip". I am not sure what configuration this was. It ran in windows 7, but created the same sort of mysterious pattern in Netbeans. In the Services tab, I could clearly see Apache Tomcat listed under Servers. If I started the service it worked fine. However, when I right clicked on my project and attempted to resolve missing server problem, it would not list tomcat in the list. The list is filtered to only show servers that are valid with the version of Java EE 6 or whatever you are using. In my case, apparently the original tomcat I downloaded was not valid.
You have to register the server inside Netbeans.
Simply a matter of going to the servers tab under tools & adding a new server & browsing to the installation location.
Follow the tutorial on the link below here (start at the time I have set):
Tutorial
Try this remove all server from the IDE and then double click the netbeans exe go to customize select the the tomcat server alone and then install
sample
Go to Tools -> Plugin -> Update Plugin.Worked for me, give it a try.