Open ebruchez opened 7 years ago
Copying below comments from #2843 related to full portlet:
Stack trace for Node
issue with full portlet:
Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/Node
at org.orbeon.oxf.webapp.Orbeon$.initialize(Orbeon.scala:62)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
at org.orbeon.oxf.externalcontext.ParametersAndAttributes$$anon$1.getOrElseUpdate(WebAppContext.scala:96)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$class.$init$(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.ServletWebAppContext.<init>(WebAppContext.scala:125)
at org.orbeon.oxf.externalcontext.WebAppContext$.apply(WebAppContext.scala:170)
at org.orbeon.oxf.pipeline.InitUtils$.runWithServletContext(InitUtils.scala:167)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply$mcV$sp(OrbeonServletContextListener.scala:42)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply(OrbeonServletContextListener.scala:42)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply(OrbeonServletContextListener.scala:42)
at org.orbeon.oxf.webapp.ServletPortlet$.withRootException(ServletPortlet.scala:104)
at org.orbeon.oxf.webapp.OrbeonServletContextListener.contextInitialized(OrbeonServletContextListener.scala:41)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.instantiatingListener(SecurePluginContextListener.java:355)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.instantiatingListeners(SecurePluginContextListener.java:163)
... 69 more
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node cannot be found by orbeon_1.0.0
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:444)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Stack trace if I disable the listener:
java.lang.NoClassDefFoundError: org/w3c/dom/Node
at org.orbeon.oxf.webapp.Orbeon$.initialize(Orbeon.scala:62)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
at org.orbeon.oxf.externalcontext.ParametersAndAttributes$$anon$1.getOrElseUpdate(WebAppContext.scala:96)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$class.$init$(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.ServletWebAppContext.<init>(WebAppContext.scala:125)
at org.orbeon.oxf.externalcontext.WebAppContext$.apply(WebAppContext.scala:170)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$init$1.apply$mcV$sp(OrbeonServlet.scala:59)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$init$1.apply(OrbeonServlet.scala:59)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$init$1.apply(OrbeonServlet.scala:59)
at org.orbeon.oxf.webapp.ServletPortlet$.withRootException(ServletPortlet.scala:104)
at org.orbeon.oxf.servlet.OrbeonServlet.init(OrbeonServlet.scala:58)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.init(ServletExceptionAdapter.java:56)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:95)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:575)
Similar error when removing servlets:
Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/Node
at org.orbeon.oxf.webapp.Orbeon$.initialize(Orbeon.scala:62)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:120)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
at org.orbeon.oxf.externalcontext.ParametersAndAttributes$$anon$1.getOrElseUpdate(WebAppContext.scala:96)
at org.orbeon.oxf.externalcontext.OrbeonWebApp$class.$init$(WebAppContext.scala:120)
at org.orbeon.oxf.externalcontext.PortletWebAppContext.<init>(WebAppContext.scala:145)
at org.orbeon.oxf.externalcontext.WebAppContext$.apply(WebAppContext.scala:171)
at org.orbeon.oxf.portlet.OrbeonPortlet$$anonfun$init$1.apply$mcV$sp(OrbeonPortlet.scala:72)
at org.orbeon.oxf.portlet.OrbeonPortlet$$anonfun$init$1.apply(OrbeonPortlet.scala:69)
at org.orbeon.oxf.portlet.OrbeonPortlet$$anonfun$init$1.apply(OrbeonPortlet.scala:69)
at org.orbeon.oxf.webapp.ServletPortlet$.withRootException(ServletPortlet.scala:104)
at org.orbeon.oxf.portlet.OrbeonPortlet.init(OrbeonPortlet.scala:69)
at javax.portlet.GenericPortlet.init(GenericPortlet.java:136)
Adding xml-apis.jar
to WEB-INF/lib
seems to go past this error. It's unclear yet whether we can/should bundle xml-apis.jar
.
The next error is:
javax.servlet.ServletException: configuration file exist-conf.xml not found or not readable
at org.exist.http.servlets.EXistServlet.init(EXistServlet.java:109)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletExceptionAdapter.init(ServletExceptionAdapter.java:56)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:95)
Checking the logs, I see:
EXistServlet: exist.home=null
reading configuration from /Users/ebruchez/Orbeon/null/exist-conf.xml
This is computed from:
String dbHome = config.getInitParameter("basedir");
dbHome =
(dbHome == null) ?
config.getServletContext().getRealPath(".") :
config.getServletContext().getRealPath(dbHome);
So config.getServletContext().getRealPath()
always returns null
, and this explains why things break. If that is the case, with our very old version of eXist, it doesn't seem like it is possible to start the servlet without modifications. So we can simply say that the embedded eXist is not supported in the full portlet
Next error: class org.orbeon.oxf.portlet.liferay.FormRunnerAuthFilter$
is not found.
Commenting out the portlet filters takes us pass this error.
Then the landing page loads, but resources are not found. Setting this gets us past:
<property
as="xs:boolean"
name="oxf.url-rewriting.wsrp.encode-resources"
value="true"/>
Next error:
org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
|----------------------------------------------------------------------------------------------------------------------|
|Exception: java.lang.ClassCastException |
|----------------------------------------------------------------------------------------------------------------------|
|javax.xml.parsers.SAXParserFactory |newInstance | | |
|net.sf.ehcache.config.ConfigurationFactory |parseConfiguration |ConfigurationFactory.java | 155|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: net.sf.ehcache.CacheException |
|----------------------------------------------------------------------------------------------------------------------|
|net.sf.ehcache.config.ConfigurationFactory |parseConfiguration |ConfigurationFactory.java | 159|
|net.sf.ehcache.config.ConfigurationFactory |parseConfiguration |ConfigurationFactory.java | 103|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: net.sf.ehcache.CacheException |
|----------------------------------------------------------------------------------------------------------------------|
|net.sf.ehcache.config.ConfigurationFactory |parseConfiguration |ConfigurationFactory.java | 105|
|net.sf.ehcache.CacheManager |parseConfiguration |CacheManager.java | 680|
|net.sf.ehcache.CacheManager |init |CacheManager.java | 369|
|net.sf.ehcache.CacheManager |<init> |CacheManager.java | 317|
|org.orbeon.oxf.cache.Caches$Private$ |liftedTree1$1 |Caches.scala | 45|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: org.orbeon.oxf.common.OXFException |
|----------------------------------------------------------------------------------------------------------------------|
|org.orbeon.oxf.cache.Caches$Private$ |liftedTree1$1 |Caches.scala | 48|
We could possibly work around this by:
CacheManager(Configuration configuration)
constructorConfiguration
via the Ehcache BeanHandler
class
This doesn't explain why the cast fails though.
Following #2843.
Here are the current challenges for the full portlet with Liferay 7:
NoClassDefFoundError
error.ClassCastException
.2017-06-15-2843-liferay-7-experiments
local branch). We might find a Liferay or other configuration related to class loading.NoClassDefFoundError
.xml-apis.jar
inWEB-INF/lib
.xml-apis.jar
in `WEB-INF/lib if this doesn't cause other issues (servlet deployment?). We might find a Liferay or other configuration related to class loading.It will take quite a bit more work to solve these issues, and anyway we are not so keen on developing the full portlet so much at this point. The main difference is that the full portlet has simpler deployment (arguably) and supports custom XForms pages. The latter is not very useful for most customers, and if needed, we could enable this in the proxy portlet to some level. So we think that it is ok not to support the full portlet in Liferay 7 at this point, or possibly going forward.