Menu
  • HOME
  • TAGS

How does Eclipse know if a Tomcat server is running?

Tag: eclipse,tomcat,tomcat7,eclipse-wtp

I've run into an odd situation with Eclipse Luna on Centos. I have configured a Tomcat 7.0 server, using project metadata for the configuration file. (actually TomEE, but I don't think that should matter). When I start the server from within Eclipse, I can see in the console window that it starts up, and I can confirm that the server is running, by interacting with it, but the legend displayed in the Servers window never changes from "Starting....." to "Started", and Eclipse times out the start operation with, "The server failed to start within ... seconds."

How, normally, does Eclipse determine whether or not a server that it owns has started successfully? And what might be going on here?

[edited to add:] The same problem occurs with TomEE 1.7.1 and a recent TomEE 1.7.2-SNAPSHOT, and the Eclipse version is: Eclipse Java EE IDE for Web Developers.

Version: Luna Service Release 1a (4.4.1) Build id: 20150109-0600

Best How To :

My issue was that my server was configured not to listen on any http ports, only on https ports. The eclipse plugin wants to find an http port on which it can ping the server to see if it's running. If there is no http port configured, the plugin silently fails. This is probably a bug and I will report it... rather than silently failing, the plugin should complain about the lack of an http port.

More specifically, looking at the Eclipse plugin code at https://github.com/eclipse/webtools.servertools/blob/master/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java around line 540 (look for the comment "//ping server for startup") I see that the plugin is looking for an http port on which it can ping the server to see if it is live.

No hello World output for Neo4j

java,eclipse,neo4j

That example creates and then deletes the data so that is one reason why your graph is empty. Another observation is your DB_PATH. If you've set DB_PATH='data/graph.db', then that path is relative to your project path. If your code is located in /projects/example then this embedded database should be created...

Java: unhandled exception

java,eclipse,exception,exception-handling,try-catch

The issue is caused by the lambda function. The interface of the function that forEach requires doesn't declare any kind of checked exceptions: take a look at java.util.function.Consumer. That's the place where the first issue occurs, the second one is simply a result of the first one. Either you should...

exec-maven-plugin error, even on working example

java,eclipse,maven

The error log which you posted says the following: java.lang.ClassNotFoundException com.jadex.qna.QNAProject.App So it clear what the root source of the error is. You are trying to execute the main() method of a class whose class file Maven cannot find. As this SO article discusses, you can try explicitly compiling first,...

Eclipse CDT shows … not resolved errors for ARM neon intrinsics, but produces the binary

c++,eclipse,arm,neon

Change: #include "arm_neon.h" to: #include <arm_neon.h> Watch out for this in future - often <> and "" are interchangeable, but in some cases it can make an important difference. Always use <> for system headers and "" for user headers....

Open a properties file from a class in a Dynamic Web Project

java,eclipse,jsp,properties-file

You can put this propertie file within your java package for example com/test and use following: getClass().getResourceAsStream( "com/test/myfile.propertie"); Hope it helps....

Compilation Error on maven

java,eclipse,maven,maven-plugin

Check with that below dependency is it present or not ?? <dependency> <groupId>javax.ws.rs</groupId> <artifactId>javax.ws.rs-api</artifactId> <version>2.0-m01</version> </dependency> ...

Match a pattern preceded by a specific pattern without using a lookbehind

regex,eclipse,lookahead

A work-around for the lack of variable-length lookbehind is available in situations when your strings have a relatively small fixed upper limit on their length. For example, if you know that strings are at most 100 characters long, you could use {0,100} in place of * or {1,100} in place...

one eclipse install not displaying utf8

java,eclipse,svn,utf-8

Workspace-wide encoding is configured here (Windows -> Preferences -> General -> Workspace): If it is not working as expected, the project probably overrides the settings (Right click on project -> Properties -> Resources): ...

Why does Eclipse reference a 1.4 JRE?

java,eclipse

As @Marvin mentioned in the comments above, Eclipse Juno is not compatible with JDK 1.8. It might be a bug that Eclipse interprets JDK 1.8 as 1.4, but I suspect you can work around it by either removing the 1.8 from your list of installed JREs or updating to a...

apply formatter only on edited code - eclipse [duplicate]

java,eclipse,save,formatter

Yes, under preferences: Java -> Editor -> Save Actions "Perform the selected actions on save" -> "Format source code" -> Change from "Format all lines" to "Format edited lines"...

Java eclipse I want to open the form like tab [on hold]

java,eclipse

You want to make your program look like that? With tabs? If that's the case, use a tabbed pane. link: https://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html...

Tomcat support for HTTP/2.0?

tomcat,https,tomcat7,tomcat8,http2

I'm the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2. Tomcat's Mark Thomas has outlined support for HTTP/2 for Tomcat 9. Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN support in the JDK (which also...

CAS Redirect Loop

java,tomcat,single-sign-on,cas

It was nothing to do with my configuration. I watched several videos and understood that my configuration do not have any problems. The problem is with the 4.0.0 release. I do not know if any one else faced the same problem. My Solution: I took latest source (4.0.2) and built...

Can I install 2 or more Android SDK when using Eclipse

java,android,eclipse,sdk,versions

There shouldn't be any problem if you use the latest SDK version ; actually, this is recommended. However, make sure to set the correct "Target SDK", i.e. the highest android version you have successfully tested your app with, and the "Minimum Required SDK" as well....

Eclipse Layout: static instead of relative values?

android,eclipse,layout

<LinearLayout android:orientation=horizontal android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:orientation=horizontal android:layout_width="0" android:weight="50" android:layout_height="match_parent"> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="75dp" android:gravity="center" android:text="Button" /> </LinearLayout> <LinearLayout android:orientation=horizontal android:layout_width="0"...

how to manage multiple war application in tomcat server?

java,maven,tomcat,servlets

Use same tomcat server, but copy and rename your web application to something different. For eg, original application name app, copy and rename as following. webapp -> app1 app2 app3 Running tomcat server per each war application need to maintain many server. This is a bad idea....

guidance needed on using apache commons math

java,eclipse,apache

It may be so simple that you haven't imported the DescriptiveStatistics class. Put this in the top of your file: import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; ...

JSF facets not available in Eclipse

java,eclipse,jsf,facets

That can happen if you started with plain "Eclipse IDE for Java Developers" instead of with "Eclipse IDE for Java EE Developers" and then manually added some plugins on it. Throw away your current Eclipse install and restart clean with "Eclipse IDE for Java EE Developers".

IntelliJ - use imported modules as dependencies like maven projects in Eclipse

eclipse,scala,maven,intellij-idea,sbt

It should work out of box for dependencies, which are imported to the project as modules, no additional settings needed. At least for Java. Just do not run a Maven goal, that would use dependencies from the repository. ...

Placing secure data in Java web application

java,security,tomcat

Using a servlet does not make anything secure by itself. You dont need a Java tool to connect, you can even use Telnet, any scripting language or create your own socket. Just use a download servlet from somewhere and at least Basic authentication ("information hiding" is no security aspect ;)....

Spring Roo Shell in Eclipse: Could not create sts.roo.ui.rooShellView

eclipse,spring-roo,spring-tool-suite

As you can see here, current version of Spring IDE Roo Support plugin has no support to load Spring Roo version higher than 1.2.1. This is already fixed in new plugin version that will be released with STS 3.7.0 which is scheduled for end of June/early July. Until that, you...

Importing Spring MVC Project Manually to Eclipse

java,eclipse,spring,spring-mvc

you will extract zip file and go to inside folder in templete.zip is import succesully into eclipse IDE.i have tested.

Disable Wrapping Cursor in Eclipse

eclipse,vim,vi

In Vim, the behavior of the arrows when the cursor is at the BOL/EOL is governed by the 'whichwrap' option which — judging by the manual — is not supported by viPlugin. What you want would be achievable with custom mappings and a bit of vimscript logic in Vim itself...

How to find references to a class that's referenced indirectly via exported jar in Eclipse?

java,eclipse

For a plug-in project, all of its dependencies have to be from other plug-ins and declared using its MANIFEST.MF file. Being packaged in a .jar has nothing to do with it. At runtime, the stated dependencies are wired by Equinox. At development time, PDE uses your MANIFEST.MF to set up...

Disable direct access to application via Tomcat

apache,tomcat

You could consider using the proxy_ajp instead of proxy_http. But you can also use the RemoteAddrValve to define restrictions based on IP address: <Engine name="Catalina" defaultHost="localhost"> ... ... ... <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.0\.0\.1"/> ... </Engine> ...

How to shutdown a Tomcat's instance that wont shutdown? [duplicate]

java,tomcat,netbeans,tomee

The problem is the same as Mugi4ok. So it is a possible duplicate. The full answer was found here...

Eclipse not compiling because of ClassNotFoundException

java,eclipse,amazon-web-services,compilation,aspectj

It seems that your Eclipse doesn't found the library of aspectj. Try to download it again from: https://eclipse.org/aspectj/downloads.php By your stack trace I suppose that the version of aspectj that it is looking for it's the 1.6 so I suppose that you have to search the package in which puts...

Tomcat servlet the requested resource is unavailable

java,tomcat,servlets

Your web.xml file needs to be inside the WEB-INF folder instead of next to it. If it's not in the right location, Tomcat won't parse it and your URL patterns will not be correctly configured. If you're using the Servlet 3.0 (or higher) API, you could also configure your servlet...

Mysterious claim of a missing { in eclipse

java,eclipse

In Java, you cannot write executable statements directly in class.So this is syntactically wrong: for(int i=0; i<10; i++) { this.colorList[i] = this.allColors[this.r.nextInt(this.allColors.length)]; } Executable statements can only be in methods/constructors/code blocks...

Eclipse CDT - No Console Output on OSX

c++,eclipse,osx,terminal,64bit

Are you using the right compiler? If you are compiling with Cross GCC it might not run on a 64bit OS X device. Try using MacOS GCC for compiling if so.

How to use a local tomcat version with maven

java,maven,tomcat

I found a solution here: https://tomcat.apache.org/maven-plugin-trunk/executable-war-jar.html Ex you set the serverXml to point to your local tomcat installation. <project> ... <packaging>war or pom</packaging> ... <build> ... <plugins> ... <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> <executions> <execution> <id>tomcat-run</id> <goals>...

Tomcat v7.0 Server at localhost failed to start (Only with specific WebApp)

java,tomcat,tomcat7

Hello You should check your web.xml file because you have 2 servlets DOMServlet and edu.unsw.comp9321.DOMServlet refering to the same url-pattern, if you are not mapping the servlets in the web.xml check in your code the classes anotated with @WebServlet. other important point is that maybe you have a deployed another...

Tomcat 7 PermGen Space or Failed to Create JVM

java,eclipse,tomcat,tomcat7,permgen

Problem solved : Downloaded a new Tomcat (7.0.62) : https://tomcat.apache.org/download-70.cgi Added Arguments at the launch of my Tomcat : -Xms256m -Xmx512m -XX:MaxPermSize=128m ...

Not Able to consume external RestFul web service from Client in Eclipse or from restclient-ui

java,eclipse,web-services,restful-url,rest-client

Try setting your company's proxy using: System.getProperties().put("https.proxyHost", "proxyHost"); System.getProperties().put("https.proxyPort", "proxyPort"); Similarly for http....

How to change Eclipse IDE GUI icons?

eclipse,user-interface,icons

Most of the icons seem to be stored under \eclipse\configuration\org.eclipse.osgi\bundles\684\1.cp\icons AND in other folders of \eclipse\configuration\org.eclipse.osgi\bundles. I don't know if the license of Eclipse allows you to change that just check that out, and if you can, you can either change/create them yourself or you can search for icon packs...

Unfortunately, (My app) has stopped. Eclipse Android [duplicate]

java,android,eclipse,adt

In your MainActivity.java at line no 34 you are trying to initialize some widget that is not present in your xml layout which you have set it in your setContentView(R.layout.... That;s why you are geting nullpointerexception. EDIT: change your setContentView(R.layout.activity_main) to setContentView(R.layout.fragment_main)...

How to force team members to comment using eclipse plugin or something else

eclipse,jenkins,eclipse-plugin,coding-style,build-automation

You can run static code checks and their corresponding eclipse plug-ins to enforce comments being made in code. For e.g. in CheckStyle javadoc can be enforced http://checkstyle.sourceforge.net/config_javadoc.html Also checkstyle can be easily integrated with Jenkins. You can also use eclipse java compiler settings for javadoc check. Go to preferences->java->compiler->javadoc to...

Meaning of connectionTimeout in tomcat

java,eclipse,tomcat

Taken from here: https://tomcat.apache.org/tomcat-7.0-doc/config/http.html connectionTimeout The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. Use a value of -1 to indicate no (i.e. infinite) timeout. The default value is 60000 (i.e. 60 seconds) but note that the standard server.xml...

Remote debugging tomcat with OpenShift

eclipse,tomcat,openshift,remote-debugging

You should read through the Developer Portal's pages on Port Forwarding (https://developers.openshift.com/en/managing-port-forwarding.html) to make sure that you are using it correctly. You will want to connect to your local loopback address: 127.0.0.1 along with the correct forwarded port once you have run the port-forwarding command.

How to save a json file locally with dojo toolkit

javascript,android,json,eclipse,dojo

Why use dojo? You can use javascript and HTML5

html form action not working when using eclipse

java,eclipse,jsp,servlets

Try to delete the comment // @WebServlet("/hello"), and put @WebServlet("/hello"). Stop the server, refresh and if its necessary clean it. And re - launch again. And take a look if the web.xml the welcome file list is correctly, because is the file which launch always.

Trying to setup tomcat to use servlets

java,tomcat,servlets,invokerequired

I've just take a quick look up to the book and on page 407, there are the lines that you have to decomment or/else if not exist, add. From the book; <!-- <servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.apache.catalina.servlets.InvokerServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> --> Anything located in between the "<!--"...

What are my next steps on finding the cause of this exception?

java,android,eclipse,debugging

I step through the code as the application is running on the Android device but the exception occurs in code that is not part of the application As you've done, step through your application code line by line in a debugger, until you get to the last line which...

Scala running issue on eclipse

eclipse,scala

to run as scala application, you need to create Scala App and not class In eclipse, package explorer select project/src/package right click new>scala app inform Name e.g. Test and click "finish" select Test.scala right click "run as Scala Application" see results in console window....

Modify ivy classpath entry

java,eclipse,eclipse-plugin,ivy,ivyde

With the project, you can get all the class path entries. I went through and excludes the ivy entries. Then I re-added them with the correct class path and property files. Now, the paths do not include ${ivyproject_loc} and ${project_loc}. Here is the code: protected void changeIvyClasspath(IProject project, IProgressMonitor monitor)...

Close module in android studio

android,eclipse,android-studio

There is no notion of opening and closing a module in Android Studio. There should be no need to do it. You seem to be treating an Android Studio project as being the equivalent of an Eclipse workspace, and IMHO that is not a valid comparison....

Showing previous searches in PyCharm

eclipse,full-text-search,pycharm

When View tool window is active (View -> Tool Windows -> Find (Alt+3)) there's Recent find usages (Ctrl+E) option in the context menu. It seems Pycharm does not remember excluded results, though.