- This topic has 6 replies, 3 voices, and was last updated 14 years, 5 months ago by Allan Sanderson.
-
AuthorPosts
-
Allan SandersonMemberI have a problem since updating to 8.5.
Every time I hit the Deploy/Redeploy button in my Manage Deployments window for my web app, MyEclipse also deploys a new context file into my c:\jetty\contexts\ directory
I never had this behaviour on previous versions. Is there somewhere I can stop this behaviour, or configure what is in the context file?
Thanks.
support-shaliniMemberhavoc77,
Can you give some more information?
1. Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Details?
2. What is the version of Jetty that you are using?
3. What was the earlier version of MyEclipse that you used?
Allan SandersonMemberHi
My Installation Summary is:
*** Date: Monday, 19 July 2010 10:08:16 AM EST ** System properties: OS=WindowsXP OS version=5.1.0 Java version=1.6.0_20 *** MyEclipse details: MyEclipse Enterprise Workbench Version: 8.5 Build id: 8.5-20100319 *** Eclipse details: MyEclipse Enterprise Workbench Version: 8.5 Build id: 8.5-20100319 Eclipse startup command=-os win32 -ws win32 -arch x86 -showsplash -launcher C:\Program Files\Genuitec\MyEclipse 8.5\myeclipse.exe -name Myeclipse --launcher.library C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll -startup C:\Program Files\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -exitdata d8c_40 -install C:/Program Files/Genuitec/MyEclipse 8.5 -configuration configuration -vm C:/PROGRA~1/Java/JDK16~1.0_2/bin/javaw.exe
My jetty version is jetty-6.1.24
I have been using MyEclipse for over 3 years, and I always keep it up to date – so I have used all the versions of it over that time.
Here is what happens… Say I have a project called myWebApp. I also create a context file c:\jetty\contexts\myWebApp.xml
with the following content:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="contextPath">/myWebApp</Set> <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/myWebApp</Set> <Set name="defaultsDescriptor">/jetty/etc/webdefault.xml</Set> </Configure>
Every time I hit the deploy, MyEclipse changes the contents of the file to :
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!--<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd">--> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="configurationClasses"> <Array type="java.lang.String"> <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item> <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item> <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item> <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item> <Item>org.mortbay.jetty.plus.webapp.Configuration</Item> </Array> </Set> <Set name="contextPath">/myWebApp</Set> <Set name="war">C:\jetty\webapps\myWebApp</Set> <Set name="extractWAR">true</Set> <Set name="copyWebDir">false</Set> </Configure>
After MyEclipse makes this change I get java.lang.ClassCastException errors in my console if I try to start jetty.
support-shaliniMemberhavoc77,
I could replicate this at my end and I have raised a PR with the dev team.
Thank you for bringing this up.
Brian FernandesModeratorHavoc,
This will be fixed in 8.6 due this week. The Jetty preference page will have a preference allowing you to turn the generation of the files in the context folder off, we enabled this for better user experience in most cases, but I realize that some users will configure this file themselves. Can you please tell us what class cast exceptions you see so we can make sure there are no additional bugs around this area?
Allan SandersonMemberThankyou very much for including an option to fix this issue in the next release.
In regards to what my errors were, it seems that I have since done something to my configuration that has stopped them coming up now. All that I remember is that it was a java.lang.ClassCastException (possibly related to an XML parser class?)
Allan SandersonMemberHi
My error came back, so here are the datails:
java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source) at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:324) at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:84) at com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:298) at com.champion.middleware.XMLConfig.parse(XMLConfig.java:54) at com.champion.middleware.DatabaseManager.bootstrap(DatabaseManager.java:74) at com.champion.servlet.WebAppStartupServlet.bootstrapMiddleware(WebAppStartupServlet.java:98) at com.champion.servlet.WebAppStartupServlet.init(WebAppStartupServlet.java:21) at javax.servlet.GenericServlet.init(GenericServlet.java:241) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.deployer.ContextDeployer.deploy(ContextDeployer.java:268) at org.mortbay.jetty.deployer.ContextDeployer.access$000(ContextDeployer.java:67) at org.mortbay.jetty.deployer.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:89) at org.mortbay.util.Scanner.reportAddition(Scanner.java:410) at org.mortbay.util.Scanner.reportDifferences(Scanner.java:324) at org.mortbay.util.Scanner.scan(Scanner.java:280) at org.mortbay.util.Scanner$1.run(Scanner.java:232) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)
The error goes away if I put my own context configuration back.
Thanks.
-
AuthorPosts