[
https://issues.apache.org/jira/browse/TILES-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908309#action_12908309
]
Antonio Petrelli commented on TILES-515:
----------------------------------------
I followed your instructions and installed the second package, but I have now a
strange exception (see below).
However if I launch:
inspect package capability org.apache.felix.framework
I see:
<snip>
org.xml.sax; version=0.0.0.1_006_JavaSE imported by:
org.ops4j.pax.web.pax-web-jsp [9]
org.ops4j.pax.web.pax-web-jetty-bundle [8]
org.ops4j.pax.web.pax-web-extender-war [7]
org.apache.tiles.core [16]
org.apache.commons.digester [20]
</snip>
So, in fact, I cannot test the bug you reported yet.
Do you know what can I do? I googled but found nothing.
-----------------
The stack trace of the exception
3362 [Thread-1] ERROR
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC - Registration
exception. Skipping.
java.lang.NoClassDefFoundError: org/xml/sax/SAXException
at
org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsReader(BasicTilesContainerFactory.java:333)
at
org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:297)
at
org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:242)
at
org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:104)
at
org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:124)
at
org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:70)
at
org.apache.tiles.web.startup.AbstractTilesListener.contextInitialized(AbstractTilesListener.java:62)
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$1.call(HttpServiceContext.java:163)
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$1.call(HttpServiceContext.java:159)
at
org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.addEventListener(HttpServiceContext.java:156)
at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addEventListener(JettyServerImpl.java:242)
at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addEventListener(ServerControllerImpl.java:258)
at
org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addEventListener(ServerControllerImpl.java:119)
at
org.ops4j.pax.web.service.internal.HttpServiceStarted.registerEventListener(HttpServiceStarted.java:339)
at
org.ops4j.pax.web.service.internal.HttpServiceProxy.registerEventListener(HttpServiceProxy.java:131)
at
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:264)
at
org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:513)
at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)
at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)
at
org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)
at
org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(ReplaceableService.java:114)
at
org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(ReplaceableService.java:28)
at
org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.serviceAdded(ReplaceableService.java:183)
at
org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingService(ServiceCollection.java:181)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)
at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3726)
at org.apache.felix.framework.Felix.access$000(Felix.java:80)
at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
at
org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
at org.apache.felix.framework.Felix.registerService(Felix.java:2847)
at
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
at
org.ops4j.pax.web.service.internal.Activator.createHttpServiceFactory(Activator.java:98)
at
org.ops4j.pax.web.service.internal.Activator.access$200(Activator.java:47)
at org.ops4j.pax.web.service.internal.Activator$1.run(Activator.java:76)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.ClassNotFoundException: org.xml.sax.SAXException
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 42 more
> ResolvingLocaleUrlDefinitionDAO doesn't handle loading from war properly
> ------------------------------------------------------------------------
>
> Key: TILES-515
> URL: https://issues.apache.org/jira/browse/TILES-515
> Project: Tiles
> Issue Type: Bug
> Affects Versions: 2.2.2
> Reporter: Bryan Keller
> Assignee: Antonio Petrelli
> Attachments: tilestest.zip, tilestest2.zip
>
>
> The BaseLocaleUrlDefinitionDAO does not handle loading view definitions
> directly from a war bundle properly. In the loadDefinitionsFromURL() call, it
> catches a FileNotFoundException if a definition is not found, logs a debug
> message and continues. This is the proper way to handle situations where a
> view definition has not been defined for a particular locale. However, when
> loading from a resource URL (e.g. "classpath:/..." or "bundle:/"), if the
> view definition is not found, a "FileNotFoundException is not thrown, rather
> an IOException is. A plain IOException is not consumed, but rather thrown,
> and prevents Tiles from initializing.
> The code is in BaseLocaleUrlDefinitionDAO, line 277. The IOException handling
> should check if it is a resource not found error and ignore the exception if
> so.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.