I started a few months ago to maintain an old Spring project using the Jetty Maven plugin. I'm currently trying to port it to Java 11 but Jetty won't start the server and (silently) fails with MultiException[java.lang.NoClassDefFoundError: org/eclipse/jetty/util/FutureCallback, java.lang.NoClassDefFoundError: org/eclipse/jetty/util/LazyList].
This seems to be an old bug of the Jetty Maven plugin that I can reproduce on various 9.x versions.
It seems fixed in versions 10 and 11 and I would gladly use these versions but both are still in alpha, configuration has radically changed and documentation is not published yet.
maven.compiler.source and maven.compiler.target are both set to 11 in POM and nothing changes if I put dependencies providing org.eclipse.jetty.util.FutureCallback and org.eclipse.jetty.util.LazyList in the POM.
[WARNING] FAILED ServletHandler#4ba402b5{FAILED}: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/LazyList
java.lang.NoClassDefFoundError: org/eclipse/jetty/util/LazyList
at org.eclipse.jetty.servlet.ServletHandler.doStop (ServletHandler.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop (AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop (ContainerLifeCycle.java:180)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop (ContainerLifeCycle.java:201)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop (AbstractHandler.java:108)
at org.eclipse.jetty.security.SecurityHandler.doStop (SecurityHandler.java:437)
at org.eclipse.jetty.security.ConstraintSecurityHandler.doStop (ConstraintSecurityHandler.java:425)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop (AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop (ContainerLifeCycle.java:180)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop (ContainerLifeCycle.java:201)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop (AbstractHandler.java:108)
at org.eclipse.jetty.server.session.SessionHandler.doStop (SessionHandler.java:519)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop (AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop (ContainerLifeCycle.java:180)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop (ContainerLifeCycle.java:201)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop (AbstractHandler.java:108)
at org.eclipse.jetty.server.handler.ContextHandler.stopContext (ContextHandler.java:1061)
at org.eclipse.jetty.servlet.ServletContextHandler.stopContext (ServletContextHandler.java:375)
at org.eclipse.jetty.webapp.WebAppContext.stopWebapp (WebAppContext.java:1462)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.stopWebapp (JettyWebAppContext.java:342)
at org.eclipse.jetty.webapp.WebAppContext.stopContext (WebAppContext.java:1428)
at org.eclipse.jetty.server.handler.ContextHandler.doStop (ContextHandler.java:1115)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop (ServletContextHandler.java:286)
at org.eclipse.jetty.webapp.WebAppContext.doStop (WebAppContext.java:547)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStop (JettyWebAppContext.java:433)
This is a interesting side-effect of interaction between maven and jetty.
What happens is that on jetty stop/shutdown the maven process yanks the classloader out from underneath the jetty threads leaving random errors in its wake, some even being unable to find classes that they need to perform a clean shutdown.
See https://github.com/eclipse/jetty.project/issues/4410
There is no workaround or fix for this that either Jetty or Maven has found.
If you find a solution please comment on the above issue (or file a new issue), and we'll document it.
We are running apache-karaf-4.2.0 on an internal network that is not connected to the internet. We are trying to get an HTTP server running within Karaf and we decided to use org.apache.felix.http.bundle-3.0.0.jar since it contains everything we need in one jar (as opposed to bringing back everything listed in the http feature within Karaf).
Here are my steps to reproduce the issue:
Download a copy of apache-karaf-4.2.0.tar.gz and untar it
Download a copy of org.apache.felix.http.bundle-3.0.0.jar
cd into apache-karaf-4.2.0
mkdir -p system/org/apache/felix/org.apache.felix.http.bundle/3.0.0/
Copy org.apache.felix.http.bundle-3.0.0.jar into the directory you just
created
Open
system/org/apache/karaf/features/standard/4.2.0/standard-4.2.0-features.xml
At the bottom, before <feature name="standard"...> add the following
lines (see below since I cannot embed it into this list):
Open etc/custom.properties
Add the following line to the bottom: org.apache.felix.jettyEnabled =
true
Execute ./bin/karaf
At the karaf prompt type: feature:install felix-http
And here's what the XML should look like in the standard-4.2.0-features.xml file:
<feature name="felix-http" description="Apache Felix HTTP Bundle" version="4.2.0">
<bundle>mvn:org.apache.felix/org.apache.felix.http.bundle/3.0.0</bundle>
<config name="org.apache.felix.http">
org.osgi.service.http.port=8888
</config>
</feature>
If I understand the IncompatibleClassChangeError it means something was compiled with an older version of something else. I'm assuming that something else is jetty but nothing else is providing it. So I'm very confused.
If anyone has any thoughts on how to continue to debug and/or fix this I would greatly appreciate it.
I installed Weblogic 12.1.3 and have had nothing but problems.
I didn't upgrade an existing domain. I created a new one and tried deploying the application to it. It immediately started bombing out on JSP compilation.
Compilation of JSP File '/WEB-INF/pages/common/layout/MainLayout.jsp' failed:
MainLayout.jsp:112:41: This attribute is not recognized.
<custom:UserMessage type="INFO" message="${TopInfoMsg}" messageContainerId="TopInfoContainDiv" messageDivId="TopInfoMsgDiv" hide="${empty TopInfoMsg}" />
I've tried the following to troubleshoot:
Java 7 and Java 8 (problem occurs in both versions)
Tried the JSP Backwards Compatibility setting in the WLS console
Disabled JRebel
Tried eliminating "xerces hell" as a problem by adding xml-apis to the <prefer-application-packages> in weblogic.xml (also eliminated the tertiary dependency on that package in my Maven POM file).
Put the #page tag with pageEnconding="UTF-8" as the first line of the MainLayout.jsp file.
What I occasionally see is weblogic emptying the contents of the .tag files, but not always.
Any help or troubleshooting ideas would be appreciated.
You should write the content of MainLayout.jsp:112:41 with lines 111 and 113, with its we can try to help you.
Hello i would like ask how it is possible configure jboss server for something like live, hot deploment:
every time when i change some code of my jsp,html,js or css file i always need to clean and build project than deploy project to jboss and again, agian and again. That cost alot of my time. I waste time for that. It will be easy when i could work on files which already use a started jboss (deployed). But this files is in WAR file "project.war" and throught my IDE (Netbeans) i cant edit this files (jsp,css,html or js). Netbeans made this file uneditable.
I Would glad for solution step by step how it is possible to avoid this boring process.
Edit Standalone.xml,change development to "true"
<configuration>
<jsp-configuration development="true"/>
</configuration>
Start JBoss.
Go to ServerLocation-> standalone\tmp\vfs
Sort by "Date Modified" descending
Open the first folder(something like deployment*******)
There will be your complete exploded war.
Go to the jsps,js,css location,edit & save the changes.
changes will be displayed live.
Follow this procedure to enable hot deployment enable in JBOSS
It will work on JBoos AS 7.0.1 and should work on other versions with slight changes
Go to JBoss administrative panel (by default localhost:9990)
Now in profile settings open Core - Deployment Scanners
Turn on Autodeploy-Exploded (set to true)
You can set scanner time (by default 5000 ms) to appropriate as
according to you your (I prefer to set 2000, for more fast incremental
publishing when I make changes in projects)
That it.
Now JBoss make HOT deploy for almost all kind of files
I think that you're looking for something like JRebel. For those who haven't had the chance to hear about it, it's a magic tool made to get rid of such annoying redeploys after every modification made in your source files.
As you're using Netbeans IDE, this a dedicated tuto explaining how to set up JRebel.
I have the same problem. My solution is to run the program on debug mode without editing config file. Once you are done, you can see the result without restarting.
If you are running JBoss EAP 7.x, add the following to your standalone XML:
<subsystem xmlns="urn:jboss:domain:undertow:7.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
...
<servlet-container name="default">
<jsp-config development="true" />
<websockets />
</servlet-container>
...
</subsystem>
Deploy the app as exploded (project.war folder), add in your web.xml:
<web-app>
<context-param>
<param-name>org.jboss.weld.development</param-name>
<param-value>true</param-value>
</context-param>
Copy class/jsp/etc,
update the web.xml time stamp every-time you deploy(append blank line):
set PRJ_HOME=C:\Temp2\MyProject\src\main\webapp
set PRJ_CLSS_HOME=%PRJ_HOME%\WEB-INF\classes\com\myProject
set JBOSS_HOME= C:\Java\jboss-4.2.3.GA-jdk6\server\default\deploy\MyProject.war
set JBOSS_CLSS_HOME= %JBOSS_HOME%\WEB-INF\classes\com\myProject
copy %PRJ_CLSS_HOME%\frontend\actions\profile\ProfileAction.class %JBOSS_CLSS_HOME%\frontend\actions\profile\ProfileAction.class
copy %PRJ_CLSS_HOME%\frontend\actions\profile\AjaxAction.class %JBOSS_CLSS_HOME%\frontend\actions\profile\AjaxAction.class
ECHO.>>%JBOSS_HOME%\WEB-INF\web.xml
I am using JBOSS AS 7.2
in http://127.0.0.1:9990/console/index.html#deployment-scanner
Configuration
⇒
Subsystems⇒
Subsystem
⇒
Deployment Scanners
Click on Edit, turn "Auto Deploy Exploded" to true.
You can change to JBoss see the deployments folder each ten seconds
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir"
scan-interval="10000"/>
</subsystem>
I am new to spring development so i am stuck here. Is there any configuration while switching spring + maven project from linux to windows. I am running on tomcat server 7. The project is initially developed in linux. I have moved all the file from linux to wondows. While running on server, i get error The requested resource (/myproject/login/) is not available. Do i need to make any changes or add add in configuation.
Thanks in advance.
I think you have missed something.
Try this.but i'am not sure this is working or not.
Tomcat, by default invoker servlet disabled (commented out in the web.xml file). You have to create a 'servlet' and a 'servlet-mapping' entry in your web.xml.
Once you do, you can get rid of the "servlet/" part of your url.
Check out the following URL for more information regarding the invoker servlet:
http://faq.javaranch.com/view?InvokerServlet