Trying to integrate Lucee into an existing java app; have error need help

Sorry for the title not being clear, :minidisc: :horse: won’t let me put in a descriptive title.

I’m trying to integrate Lucee into an existing java app, I get the following when trying to start up:

WEB CONTEXT (46f3c5aa6d21043fd3b0f358d5a9f2d8)
- config:C:\mainfolder\subfolder\out\WEB-INF\lucee
- webroot:C:\mainfolder\subfolder\out\
- hash:46f3c5aa6d21043fd3b0f358d5a9f2d8
- label:46f3c5aa6d21043fd3b0f358d5a9f2d8

2017-04-12 16:33:13.803 config file C:\mainfolder\subfolder\out\WEB-INF\lucee\lucee-web.xml.cfm was not valid and has been replaced
2017-04-12 16:33:13.805 write file:C:\mainfolder\subfolder\out\WEB-INF\lucee\lucee-web.xml.cfm
Apr 12, 2017 4:33:13 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [RESTServlet] in web application [/subfolder] threw load() exception
javax.servlet.ServletException: 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 lucee.runtime.text.xml.XMLUtil.parse(
	at lucee.runtime.config.XMLConfigFactory._loadDocument(
	at lucee.runtime.config.XMLConfigFactory.loadDocument(
	at lucee.runtime.config.XMLConfigFactory.loadDocumentsubfolderateIfFails(
	at lucee.runtime.config.XMLConfigWebFactory.newInstance(
	at lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(
	at lucee.runtime.engine.CFMLEngineImpl.addServletConfig(
	at lucee.loader.engine.CFMLEngineWrapper.addServletConfig(
	at lucee.loader.engine.CFMLEngineFactory.getInstance(
	at lucee.loader.servlet.RestServlet.init(
	at org.apache.catalina.core.StandardWrapper.initServlet(
	at org.apache.catalina.core.StandardWrapper.loadServlet(
	at org.apache.catalina.core.StandardWrapper.load(
	at org.apache.catalina.core.StandardContext.loadOnStartup(
	at org.apache.catalina.core.StandardContext.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.ContainerBase$
	at org.apache.catalina.core.ContainerBase$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

Any ideas of what could be wrong? I tried building from source, but I seem to be missing a lot of prerequisites. I will start another thread on that.

What does your lucee-web.xml.cfm look like?

I guess it’s just a standard file since it was just created. Here are the contents:

<?xml version="1.0" encoding="iso-8859-1"?>

<cfLuceeConfiguration version="2.0">

Path placeholders:
	{lucee-web}: path to the Lucee web directory typical "{web-root}/WEB-INF/lucee"
	{lucee-server}: path to the Lucee server directory typical where the Lucee.jar is located
	{lucee-config}: same as {lucee-server} in server context and same as {lucee-web} in web context}
	{temp-directory}: path to the temp directory of the current user of the system
	{home-directory}: path to the home directory of the current user of the system
	{web-root-directory}: path to the web root
	{system-directory}: path to thesystem directory
	{web-context-hash}: hash of the web context
		close-connection - 	write connection-close to response header
		suppress-whitespace	-	supress white space in response
		show-version - show lucee version uin response header
	<setting />

<!--	definition of all database used inside your application. 										-->
<!--	above you can find some definition of jdbc drivers (all this drivers are included at lucee) 	-->
<!--	for other database drivers see at: 																-->
<!--	 - 											-->
<!--	 - 																		-->
<!--	or ask your database distributor 																-->

		lock-timeout   - 	define how long a request wait for a lock
    <remote-clients directory="{lucee-web}remote-client/"/>
		deploy-directory - directory where java classes will be deployed
		custom-tag-directory - directory where the custom tags are
		tld-directory / fld-directory - directory where additional Function and Tag Library Deskriptor are.
		temp-directory - directory for temporary files (upload aso.)
	scope configuration:
		cascading (expanding of undefined scope)
			- strict (argument,variables)
			- small (argument,variables,cgi,url,form)
			- standard (argument,variables,cgi,url,form,cookie)
		cascade-to-resultset: yes|no
			when yes also allow inside "output type query" and "loop type query" call implizid call of resultset
			when yes all form and url scope are synonym for both data
		client-directory:path to directory where client scope values are stored
		client-directory-max-size: max size of the client scope directory
	define path to scedule task directory
		directory: path
	directory mapping:
		trusted: yes|no
			trusted cache -> recheck every time if there are changes in the called cfml file or not.
			virtual path of the application
			example: /somedir/
			physical path to the apllication
			example: d:/projects/app1/webroot/somedir/
			path to a archive file:
			example: d:/projects/app1/rasfiles/somedir.ras
		primary: archive|physical
			define where lucee first look for a called cfml file.
			for example when you define physical you can partiquel overwrite the archive.
		<ext-tag type="java" name="HelloWorld" class="lucee.cfx.example.HelloWorld"/>
			path to base component for every component that have no base component defined 
		data-member-default-access: remote|public|package|private
			access type of component data member (variables in this scope)
		use-shadow: if true component variable scope has a second scope, not only the this scope
	regional configuration:
		locale: default: system locale
			define the locale 
		timezone: default:maschine configuration
			the ID for a TimeZone, either an abbreviation such as "PST", 
			a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". 
		timeserver: [example:] default:local time
			dns of a ntp time server
		enable and disable debugging

Possible Layouts:
- - - - - - - - - - - - - -

 Same layout as with Lucee 1 - 4.1

a HTML table, possible arguments are 
- locationinfo (boolean): By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.
- title: The Title option takes a String value. This option sets the document title of the generated HTML document.

The output of the XMLLayout consists of a series of log4j:event elements as defined in the log4j.dtd. It does not output a complete well-formed XML file. The output is designed to be included as an external entity in a separate file to form a correct XML file.
- locationinfo (boolean): By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.
- properties: Sets whether MDC key-value pairs should be output, default false.

A flexible layout configurable with pattern string. 
- pattern: This is the string which controls formatting and consists of a mix of literal content and conversion specifiers. for more details see:

A full class path to a Layout class available in the enviroemnt with a empty constructor.
for every argument defined lucee tries to call a matching setter method

Possible Appenders:
- - - - - - - - - - - - - -

logs events to to the error or output stream
- streamtype: "output" or "error" 

Logs error to a resource (locale file, ftp, zip, ...)
- path: path to the locale file
-charset (default:resource charset): charset used to write the file
- maxfiles (default:10): maximal files created
- maxfilesize (default:1024*1024*10): the maxial size of a log file created

A full class path to a Appender class available in the enviroemnt with a empty constructor.
for every argument defined lucee tries to call a matching setter method

		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/remoteclient.log" level="info" layout="classic" name="remoteclient"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/requesttimeout.log" layout="classic" name="requesttimeout"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/mail.log" layout="classic" name="mail"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/scheduler.log" layout="classic" name="scheduler"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/trace.log" layout="classic" name="trace"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/application.log" level="info" layout="classic" name="application"/>
		<logger appender="resource" appender-arguments="path:{lucee-config}/logs/exception.log" level="info" layout="classic" name="exception"/>	

What’s interesting is there are a couple of backups there,

  • lucee-web.1.buggy
  • lucee-web.2.buggy
  • lucee-web.3.buggy

Looks like I was able to fix this by removing the xerces-impl-2.11.0.jar from my webapp.

It would be nice if the lucee jar was up on a maven repository somewhere, so that dependencies could be managed better.