# Debugging in eclipse

**URL:** <https://forum.xwiki.org/t/debugging-in-eclipse/4636>\
**Category:** Help / Discuss\
**Created:** [March 18, 2019, 8:29am UTC](https://forum.xwiki.org/t/debugging-in-eclipse/4636 "2019-03-18T08:29:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MilkaChucky](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/m/919ad9/32.png) [@MilkaChucky](https://forum.xwiki.org/u/MilkaChucky)\
**Post date:** [March 18, 2019, 8:29am UTC](https://forum.xwiki.org/t/debugging-in-eclipse/4636/1 "2019-03-18T08:29:26Z")

</div>

Hi,

I am new to the XWiki project and would like to ask for some help how I could debug the freshly pulled code. I followed the instructions on [https://dev.xwiki.org/xwiki/bin/view/Community/DebugXWikiWithEclipse/](https://dev.xwiki.org/xwiki/bin/view/Community/DebugXWikiWithEclipse/) , but at the end of the process, when I need to start the server, I get the following error:  
Starting preview server on port 8080

Modules:  
xwiki-debug-eclipse (/xwiki)

2019-03-18 08:38:17.870:INFO::main: Logging initialized @1955ms to org.eclipse.jetty.util.log.StdErrLog  
2019-03-18 08:38:18.096:INFO:oejs.Server:main: jetty-9.4.14.v20181113; built: 2018-11-14T15:35:30.162Z; git: 8c3198a72f04a52b29398242b762a4c81d8cc7d1; jvm 1.8.0\_201-b09  
2019-03-18 08:40:12.285:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /xwiki, did not find org.eclipse.jetty.jsp.JettyJspServlet  
2019-03-18 08:40:12.291:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@272ed83b java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:84)  
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:71)  
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:409)  
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1457)  
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)  
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)  
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)  
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)  
at org.eclipse.jetty.server.Server.start(Server.java:415)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)  
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)  
at org.eclipse.jetty.server.Server.doStart(Server.java:382)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)  
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)  
Caused by:  
java.lang.ClassCastException: org.eclipse.wst.server.preview.internal.WTPErrorHandler cannot be cast to org.eclipse.jetty.servlet.ErrorPageErrorHandler  
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitErrorPage(StandardDescriptorProcessor.java:1127)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:84)  
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:71)  
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:409)  
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1457)  
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)  
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)  
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)  
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)  
at org.eclipse.jetty.server.Server.start(Server.java:415)  
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)  
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)  
at org.eclipse.jetty.server.Server.doStart(Server.java:382)  
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)  
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)  
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)  
2019-03-18 08:40:12.330:INFO:oejs.AbstractConnector:main: Started ServerConnector@932bc4a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}  
2019-03-18 08:40:12.331:INFO:oejs.Server:main: Started @116485ms

What am I missing here?  
Thanks for the help in advance!

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 18, 2019, 8:37am UTC](https://forum.xwiki.org/t/debugging-in-eclipse/4636/2 "2019-03-18T08:37:17Z")

</div>

This looks like a Jetty specific error. I only tested this setup with Tomcat so not really sure what could be your issues here

Does not seems to have anything to do with XWiki at least. Maybe some incompatibility between Eclipse WTP and the version of Jetty you are trying to use.

---

<div class="post-metadata">

**Author:** ![MilkaChucky](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/m/919ad9/32.png) [@MilkaChucky](https://forum.xwiki.org/u/MilkaChucky)\
**Post date:** [March 18, 2019, 8:41am UTC](https://forum.xwiki.org/t/debugging-in-eclipse/4636/3 "2019-03-18T08:41:34Z")

</div>

I will give it a try with Tomcat and will let you know if that was the problem.  
Thanks for the quick response! 🙂

---

<div class="post-metadata">

**Author:** ![MilkaChucky](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/m/919ad9/32.png) [@MilkaChucky](https://forum.xwiki.org/u/MilkaChucky)\
**Post date:** [March 18, 2019, 10:05pm UTC](https://forum.xwiki.org/t/debugging-in-eclipse/4636/4 "2019-03-18T22:05:09Z")

</div>

Using Tomcat seems to have solved the problem. Thanks again!
