the problem below is fixed and the server runs now. However it keeps printing red messages but then it deletes them and runs... is that normal? Is there any need for fixing it - if so, what?
When I created a Dynamic Web Project in Eclipse and tried to run my Apache Tomcat v9.0 Server in which I made all the .sh files executable, it still gave me this error:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-Djava.endorsed.dirs=/Users/my_name/Desktop/tomcat/apache-tomcat-
9.0.10/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
In all the tutorials and forums I have looked, none of the proposed solutions have helped me. How can I fix this problem and make my server run properly?
Thanks!
What JRE are you using? The error you're getting seems to indicate that there is an incompatibility between the JRE versions. As mentioned in Tomcat's docs https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html the 'endorsed' feature is not support in Java hence it means that something keeps adding this up to your configuration.
This seems to be an issue with eclipse (or at the least the way it's setup at your system). Try having a look at this eclipse bug link as it may provide so more information about the problem you're dealing:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=507338
Related
I am relatively new to Java/Maven and am attempting to build an existing Java app downloaded from SVN on my machine. The issue is when attempting to compile/package via Maven I get the following error...
org.apache.cxf.tools.common.ToolException: java.lang.RuntimeException: Resource http://testserver:8080/imp-inbound-services-1.0/common.xsd can not be read
I have built this in both NetBeans and Eclipse using JDK 1.7 on a Windows 7 machine and get the error via both. I would assume it is an issue reaching the "testserver" but other developers within the organization have no issue. I see no differences in their configurations and mine.
Am I missing some Eclipse/Maven configuration that could be causing this? Any ideas where to look or best way to troubleshoot?
You have to ask the developers where does testserver run and what starts it. It seems like a local process, so there may be a Maven goal that starts the server.
I'm trying to get a Java web application running on my local environment. I'm using WebSphere 7.0 and MyEclipseBlue 10 using Java 6. The app builds and deploys fine, but when I start up the server I receive this error:
CWXRS0010W: Error while processing:
wsjar:file:/C:/Apps/IBM/WebSphere/AppServer/7.0/profiles/AppSrv01/installedApps/M006Node02Cell/rbb3.ear/rb31.war/WEB-INF/lib/com.ibm.ws.runtime.jar!/plugin.xml
java.lang.NullPointerException at
com.ibm.wkplc.extensionregistry.Extension.equals(Extension.java:201)...
The odd part is that I had this application running before but didn't have this issue.
Does anyone have any advice on eliminating this error? Does it even matter that it is there? I will gladly provide more information if needed!
Thanks!
You should not include WebSphere related libraries in application itself. So in your case please remove com.ibm.ws.runtime.jar from WEB-INF/lib.
Check you Maven, Eclipse, or any other build process you are doing to create EAR, and make sure that such WebSphere jars are not added to the application.
I have a problem including the jars for reading a file from hadoop. If i run the application from netbeans, it works. But if i run it from command line
it succeeds building the jar but i cannot run it and i get the following exception. When i execute the programm i put also the path of the
jars.
javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
If i add in the list of jars xercesImpl-2.9.1.jar I get the next following exception.
java.lang.NoClassDefFoundError: com/sun/security/auth/UnixPrincipal
Does anyone has a clue of how i can solve this?
This might be due to the fact that you're running the IBM JVM.
switch to the Sun JVM, which is the only one that Hadoop is rigorously tested on
OR
Go to the IBM web site and download their slightly-modified version of Hadoop that works with their JVM.
I think that the issue might be fixed with the latest hadoop revisions.
Jira issues: one and two.
See this, this and this
I'm trying to write a simple java applet program, but it seems that I'm missing the javax.servlet.* class definitions.
Using:
apple snow
eclipse Java EE ide
Do I need to add a specific JAR file to my project and if so, which one?
I have Macports installed in case something from the ports might be helpful.
This is all result of misconceptions (Applets have nothing to do with the actual problem) and ignorance about Eclipse (if offers builtin ways to seamlessly integrate and link the one and the other, the Java EE variant has already a Tomcat plugin, you just have to integrate the server and associate it with the web project).
In the future you should be more precise and detailed about the problem (and thus not telling like "...it seems that..."). Post the relevant code snippet which caused the problem. Post the actual error message (with stacktrace, if any). Post the steps to accomplish to reproduce the problem. Also see: How To Ask Questions The Smart Way.
I've answered several times before how to get started with Eclipse+Tomcat+Servlets, you may find it useful as well:
Question about installing Java EE locally?
Tomcat servlet problem - class not found
CLASSPATH, Java Buld Path (eclipse), and WEB-INF\LIB : what to use, when, and why?
Thank for all of your helpful comments.
I installed tomcat 6 and it contains the missing jar in order to compile the project.
Nice plug-in to load tomcat applications :
Sysdeo Eclipse Tomcat Launcher plugin - http://www.eclipsetotale.com/tomcatPlugin.html
Using Netbeans i was able to properly compile tomcat applications just by creating a new java web application. for now i'll stick to netbeans, it also has a nice gui for connecting to the server and seeing the installed applications and their status.
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