Will be happy to contribute as I've not had to before, not sure how to start
though. Will also pick that up tomorrow.
Right now, I just had to get something actually working locally to ensure it
will work. And actually have success! Thank you for your help getting to
the bottom of these blocking niggles, hoping they can be solved for TomEE 8
M3. Happy to help with test cases and tickets as needed.
I changed findStaticContent (Line 284 onwards):
if (pathInfo.endsWith("/") || pathInfo.isEmpty()) { // root is
redirected to welcomefiles
if (pathInfo.endsWith("/")) {
pathInfo = pathInfo.substring(0, pathInfo.length() - 1);
}
for (final String n : welcomeFiles) {
final InputStream is =
request.getServletContext().getResourceAsStream(pathInfo + n);
if (is != null) {
return is;
}
}
This now returns default welcome pages for sub-paths too.
I changed CXFJAXRSFilter (Line 124):
!mapping.startsWith("*") to !mapping.equals("*")
(again this is just to get it through to test beyond these).
Everything seems to be up and running now there is just one exception
remaining (with the filters enabled again) with one webapp which is actually
an existing JAX-RS web app:
java.util.logging.ErrorManager: 5
java.lang.NullPointerException
at
java.base/java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:207)
at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555)
at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521)
at
java.logging/java.util.logging.Formatter.formatMessage(Formatter.java:118)
at org.apache.juli.OneLineFormatter.format(OneLineFormatter.java:140)
at org.apache.juli.FileHandler.publish(FileHandler.java:282)
at
org.apache.juli.AsyncFileHandler.publishInternal(AsyncFileHandler.java:146)
at
org.apache.juli.AsyncFileHandler$LogEntry.flush(AsyncFileHandler.java:185)
at
org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:161)
java.util.logging.ErrorManager: 5
java.lang.NullPointerException
at
java.base/java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:207)
at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555)
at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521)
at
java.logging/java.util.logging.Formatter.formatMessage(Formatter.java:118)
at org.apache.juli.OneLineFormatter.format(OneLineFormatter.java:140)
at
java.logging/java.util.logging.StreamHandler.publish(StreamHandler.java:199)
at
java.logging/java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:95)
at
org.apache.tomee.jul.formatter.AsyncConsoleHandler.publishInternal(AsyncConsoleHandler.java:37)
at
org.apache.juli.AsyncFileHandler$LogEntry.flush(AsyncFileHandler.java:185)
at
org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:161)
31-Jan-2019 23:26:03.075 SEVERE [main]
org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError Method
setApplication can not be accessed due to security manager restrictions
31-Jan-2019 23:26:03.100 SEVERE [main]
org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke error
invoking org.apache.tomee.webservices.TomeeJaxRsService@5db4c359
org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:225)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:641)
Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal
Server Error
at
org.apache.cxf.jaxrs.utils.SpecExceptions.toInternalServerErrorException(SpecExceptions.java:79)
at
org.apache.cxf.jaxrs.utils.ExceptionUtils.toInternalServerErrorException(ExceptionUtils.java:111)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:554)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.reportServerError(InjectionUtils.java:540)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:376)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.injectThroughMethod(InjectionUtils.java:357)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxiesAndApplication(InjectionUtils.java:1152)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.injectContextProxiesIntoProvider(ProviderFactory.java:655)
at
org.apache.cxf.jaxrs.provider.ServerProviderFactory.injectContextProxiesIntoProvider(ServerProviderFactory.java:310)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.injectContextProxies(ProviderFactory.java:644)
at
org.apache.cxf.jaxrs.provider.ServerProviderFactory.setProviders(ServerProviderFactory.java:275)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.setUserProviders(ProviderFactory.java:789)
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:332)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setupFactory(JAXRSServerFactoryBean.java:243)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:182)
But I will look into this one tomorrow.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html