Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty 8.1.12 and 8.1.13 fail to start Apache Cocoon 2.1.12

On 10/7/13 17:07, Joakim Erdfelt wrote:
File a bug. https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Jetty&format=guided
Attach the war that is causing problems.
Yep, already did: https://bugs.eclipse.org/bugs/show_bug.cgi?id=418812

The directions you provided to build cocoon do not work.
Oh, that's because Cocoon uses some com.sun packages, which were removed in Java 7 release, and default build properties don't set any target.vm (which is later user as target property of javac task). So either copying build.properties to local.build.properties and setting there target.vm property with 1.6 OR using Java 6 to run ant should fix that. I somehow forgot to notice that in original message.

From a look at the source of 
org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource(ContextSourceFactory.java:119)


You'll see that it attempts obtain a URL reference by calling

CoocoonContext.getRealPath("/sitemap.xmap")

Then either load the resulting URL as a File, or then
try to obtain a URL reference by calling

CocoonContext.getResource("/sitemap.xmap")

Interestingly, this process was changed with cocoon 2.2, which now just uses the javax.servlet.ServletContext itself.

Have you tried Cocoon 2.2?
--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts
I haven't, since application I'm dealing with has a fairly old (and big) code-base, and I doubt it will be a "go-go" to update to 2.2. But I'll give it a try anyway tomorrow, and write more then.

Thanks!
Alex-





On Mon, Oct 7, 2013 at 4:19 AM, Alexei Mikhailov <alexei.mikhailov@xxxxxxxxxxxx> wrote:
Greetings,

I have a problem starting up Apache Cocoon 2.1.12 framework with Jetty 8.1.12 and 8.1.13. It starts up just fine in Jetty 8.1.11 and 9.0.6, so I assume it is something about one of the changes done to .12 and .13 that breaks the startup.
I'm trying to start it up in Ubuntu 12.04.3 with latest updates; java version doesn't seem to affect this problem, since I tried both Oracle Java 7 as well as relevant OpenJDK version (and also versions 6 for 8.1.12/13).

I posted an error stacktrace from Cocoon's startup log[1], which seems to point at Apache's Excalibur component; sadly, I have little knowledge about what it does (or Cocoon's startup process to start with).

This problem is fairly easy to reproduce:
0) Download Jetty 8.1.12 or Jetty 8.1.13
1) Download Apache Cocoon 2.1.12 (you'll need both source and deps): http://cocoon.apache.org/mirror.cgi
2) Extract downloaded archives (both contain 'cocoon-2.1.12' folder, but they don't interfere with each other in any way), go to extracted directory and build cocoon (to speed things up a bit, you can build minimal cocoon by copying blocks.properties file to local.blocks.properties, and uncommenting in that one "exclude.all.blocks=true")
3) Copy the resulting webapp folder from build/ folder to Jetty's webapps.
4) Start up Jetty, after navigate to root page of Cocoon's webapp (for instance 'localhost:8080/webapp'), observe an error message.
  * The log file will be in webapp/WEB-INF/logs/cocoon.log file, unless you changed it in logkit.xconf)
5) Try the same with Jetty 8.1.11 or Jetty 9.0.6: instead of an error message, you will see Cocoon's welcome page.

Do you think it might be a bug/misfeature in current Jetty 8.1 version? Should I file a bugreport to Eclipse? Anything else I should try?
If you think this is most likely a problem in Cocoon itself, I could also post this problem to their mailing list.

Thanks in advance,
Alex-


[1]. Stacktrace:
ERROR (2013-10-07) 13:43.45:962 [core.manager] (Unknown-URI) Unknown-Thread/ExcaliburComponentManager: Caught an exception trying to initialize the component handler.
java.net.MalformedURLException: context://sitemap.xmap could not be found. (possible context problem)
        at org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource(ContextSourceFactory.java:119)
        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.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at com.sun.proxy.$Proxy2.getSource(Unknown Source)
        at org.apache.excalibur.source.impl.AbstractSourceResolver.resolveURI(AbstractSourceResolver.java:146)
        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.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at com.sun.proxy.$Proxy9.resolveURI(Unknown Source)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.configure(TreeProcessor.java:202)
        at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)
        at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:289)
        at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
        at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)
        at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
        at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1437)
        at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:495)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:534)
        at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:346)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:786)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
        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.eclipse.jetty.start.Main.invokeMain(Main.java:473)
        at org.eclipse.jetty.start.Main.start(Main.java:615)
        at org.eclipse.jetty.start.Main.main(Main.java:96)

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top