atom feed7 messages in net.sourceforge.lists.exist-openRe: [Exist-open] jetty startup error
FromSent OnAttachments
Chris TomlinsonMar 27, 2014 1:22 pm 
Adam RetterMar 27, 2014 1:31 pm 
Chris TomlinsonMar 27, 2014 1:47 pm 
Adam RetterMar 27, 2014 1:54 pm 
Chris TomlinsonMar 27, 2014 3:20 pm 
Chris TomlinsonMar 27, 2014 4:57 pm 
Chris TomlinsonMar 28, 2014 6:47 am 
Subject:Re: [Exist-open] jetty startup error
From:Chris Tomlinson (chri@gmail.com)
Date:Mar 27, 2014 4:57:00 pm
List:net.sourceforge.lists.exist-open

Here is a patch for betterform/build.xml that removes the explicit dependency on
saxonhe-9.4.0.7:

----------------------------- diff --git a/extensions/betterform/build.xml b/extensions/betterform/build.xml index ebcdcea..014c286 100644 --- a/extensions/betterform/build.xml +++ b/extensions/betterform/build.xml @@ -2,7 +2,7 @@ ~ Copyright (c) 2011. betterForm Project - http://www.betterform.de ~ Licensed under the terms of BSD License ~ Author betterFORM team ( info AT betterform.de ) - --> + -->

<project name="betterFORM extension for eXist" default="install" basedir="."> <property name="exist.rootdir" value="${basedir}/../.."/> @@ -28,10 +28,14 @@ <sequential> <echo level="info">XSLT Generating @{out}</echo> <java classname="net.sf.saxon.Transform" - classpath="${exist.rootdir}/lib/endorsed/saxonhe-9.4.0.7.jar" logError="true" output="@{out}" fork="true"> + <classpath> + <fileset dir="${exist.rootdir}/lib/endorsed"> + <include name="saxon*.jar"/> + </fileset> + </classpath> <arg value="@{in}"/> <arg value="@{style}"/> </java>

The problem is that there is a dependency in betterform/build.xml explicitly for
saxonhe-9.4.0.7.jar. If I change the build.xml to refer to saxonpe-9.4.0.9.jar
all is fine. The problem is not ant as near as I can tell. There doesn't appear
to be a wildcarding available in the build.xml such as the one used in
build/installer.xml:

<include name="saxon*.jar"/>

I don't know how one would properly fix the build.xml so that it doesn't have a
dependency on a particular saxon.

On Mar 27, 2014, at 5:56 PM, Adam Retter <ad@exist-db.org> wrote:

XSLT is used to generate the web.xml from web.xml.tmpl. I have a strange feeling that this is done from an Ant task and that Ant probably cannot work with Saxon PE. You might want to add Saxon PE into the mix after you have done the build.

On 27 March 2014 22:20, Chris Tomlinson <chri@gmail.com> wrote:

Well I've tracked down the part of the problem. I did a fresh checkout and
noticed that the eclipse build-path was looking for ant.jar rather than
ant-1.9.3.jar so after changing that I then tar'd up the entire check out and
did a clean and build and that worked as expected.

I then make various configuration changes to add in some extension jars and add
items to conf.xml.tmpl and so on for our particular use and after playing 20
questions I was able to isolate the change that led to the web.xml being created
as zero-length.

We have a license for Saxon PE to use with various XSL calls in XQuery.

When I replace saxonhe-9.4.0.7 with saxonpe-9.4.0.9 + saxon-license.lic then the
clean followed by build.sh leads to a zero-length web.xml and the startup
failure.

I don't see why this change leads to the result and I don't know how to properly
fix it.

On Mar 27, 2014, at 3:54 PM, Adam Retter <ad@exist-db.org> wrote:

That should be done by the build step...

When I do a fresh checkout, I normally run -

./build.sh clean ./build.sh

Note that clean-all can be a bit dangerous as it will delete any database that is present amongst other things.

On 27 March 2014 20:48, Chris Tomlinson <chri@gmail.com> wrote:

Indeed the web.xml is zero length. The web.xml.tmpl is present but somewhere I
suppose there's supposed to be a step of converting the web.xml.tmpl to the
working web.xml for the jetty deploy. Where is this step supposed to happen?

On Mar 27, 2014, at 3:32 PM, Adam Retter <ad@exist-db.org> wrote:

I think the file will be the web.xml file.

On 27 March 2014 20:23, Chris Tomlinson <chri@gmail.com> wrote:

Hello,

I have checked out the devlop branch from git - last update was from 24 Mar. I have done:

./build.sh clean-all ./build.sh all

and then startup.sh is failing as below - it appears that jetty is loading some xml file and getting a parse error, but I don't see what file that might be. What am I doing wrong?

Thanks, Chris

./bin/startup.sh

27 Mar 2014 14:59:42,100 [main] INFO (JettyStart.java [run]:117) - Configuring eXist from /Users/chris/eXist-2.2RC1-20140324/conf.xml 27 Mar 2014 14:59:42,100 [main] INFO (JettyStart.java [run]:119) - Running with Java 1.7.0_51 [Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM) in /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre] 27 Mar 2014 14:59:42,100 [main] INFO (JettyStart.java [run]:125) - Running as user 'chris' 27 Mar 2014 14:59:42,101 [main] INFO (JettyStart.java [run]:128) - [eXist Version : 2.1] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:130) - [eXist Build : 20140327] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:132) - [eXist Home : unknown] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:134) - [SVN Revision : ] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:137) - [Operating System : Mac OS X 10.9.2 x86_64] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:142) - [jetty.home : /Users/chris/eXist-2.2RC1-20140324/tools/jetty] 27 Mar 2014 14:59:42,102 [main] INFO (JettyStart.java [run]:144) - [log4j.configuration : file:/Users/chris/eXist-2.2RC1-20140324/log4j.xml] Mar 27, 2014 2:59:43 PM org.expath.pkg.repo.util.Logger info INFO: Create a new repository with storage: File system storage in /Users/chris/eXist-2.2RC1-20140324/webapp/WEB-INF/data/expathrepo Loading mime table from file /Users/chris/eXist-2.2RC1-20140324/mime-types.xml 27 Mar 2014 14:59:45,636 [main] INFO (JettyStart.java [lifeCycleStarting]:404) - Jetty server starting... 27 Mar 2014 14:59:45,639 [main] INFO (Server.java [doStart]:270) - jetty-8.1.9.v20130131 27 Mar 2014 14:59:45,677 [main] WARN (XmlParser.java [fatalError]:404) - FATAL@null line:-1 col:-1 : org.xml.sax.SAXParseException: Premature end of file. 27 Mar 2014 14:59:45,678 [main] WARN (WebAppContext.java [doStart]:501) - Failed startup of context eXist-db Open Source Native XML Database org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:204) at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:220) at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:65) at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:148) at org.eclipse.jetty.webapp.MetaData.setWebXml(MetaData.java:170) at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:61) at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:455) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:280) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.exist.jetty.JettyStart.run(JettyStart.java:187) at org.exist.jetty.JettyStart.main(JettyStart.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.exist.start.Main.invokeMain(Main.java:126) at org.exist.start.Main.run(Main.java:448) at org.exist.start.Main.main(Main.java:50) 27 Mar 2014 14:59:45,684 [main] INFO (NCSARequestLog.java [doStart]:649) - Opened /Users/chris/eXist-2.2RC1-20140324/tools/jetty/logs/2014_03_27.request.log 27 Mar 2014 14:59:45,687 [main] INFO (ScanningAppProvider.java [doStart]:113) - Deployment monitor /Users/chris/eXist-2.2RC1-20140324/tools/jetty/contexts at interval 10 27 Mar 2014 14:59:45,690 [main] INFO (ScanningAppProvider.java [doStart]:113) - Deployment monitor /Users/chris/eXist-2.2RC1-20140324/tools/jetty/webapps at interval 10 27 Mar 2014 14:59:45,692 [main] INFO (DeploymentManager.java [addApp]:132) - Deployable added: /Users/chris/eXist-2.2RC1-20140324/tools/jetty/webapps/homepage 27 Mar 2014 14:59:45,872 [main] INFO (DeploymentManager.java [addApp]:132) - Deployable added: /Users/chris/eXist-2.2RC1-20140324/tools/jetty/webapps/portal 27 Mar 2014 14:59:45,956 [main] INFO (AbstractConnector.java [doStart]:338) - Started SelectChannelConnector@0.0.0.0:8080 27 Mar 2014 14:59:46,079 [main] INFO (SslContextFactory.java [doStart]:300) - Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] 27 Mar 2014 14:59:46,081 [main] INFO (AbstractConnector.java [doStart]:338) - Started SslSelectChannelConnector@0.0.0.0:8443 27 Mar 2014 14:59:46,082 [main] INFO (JettyStart.java [lifeCycleStarted]:410) - Jetty server started. 27 Mar 2014 14:59:46,083 [main] INFO (JettyStart.java [run]:224) -

----------------------------------------------------- 27 Mar 2014 14:59:46,083 [main] INFO (JettyStart.java [run]:225) - Server has started on ports 8080 8443. Configured contexts: 27 Mar 2014 14:59:46,083 [main] INFO (JettyStart.java [run]:234) - '/exist' 27 Mar 2014 14:59:46,084 [main] INFO (JettyStart.java [run]:272) -