jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Vaynberg" <ivaynb...@apache.org>
Subject Possible to silence namespace checking in HTMLTextExtractor?
Date Tue, 22 Apr 2008 05:44:35 GMT
hi,

i am storing html fragments in nt:file nodes that end with .html
extension. these fragments contain some custom tags ( eg <brix:tile
id="foo"/> ) that are replaced later during output. apparently
HTMLTextExtractor sets up a parser with namespace checking so i am
constantly seeing a warning in my logs, and even if i disable the
warning via log config i still see this in my stderr: ERROR:
'Namespace for prefix 'BRIX' has not been declared.'. it is rather
annoying.

is there any way to disable the check? stacktrace at the bottom...

thanks,
-igor

2008-04-21 22:37:57,953 [tid:main] [rid:    ] [uid:   1] WARN
o.a.j.extractor.HTMLTextExtractor - Failed to extract HTML text
content
javax.xml.transform.TransformerException: java.lang.RuntimeException:
Namespace for prefix 'BRIX' has not been declared.
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:717)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
	at org.apache.jackrabbit.extractor.HTMLTextExtractor.extractText(HTMLTextExtractor.java:68)
	at org.apache.jackrabbit.extractor.CompositeTextExtractor.extractText(CompositeTextExtractor.java:90)
	at org.apache.jackrabbit.core.query.lucene.JackrabbitTextExtractor.extractText(JackrabbitTextExtractor.java:195)
	at org.apache.jackrabbit.core.query.lucene.NodeIndexer.addBinaryValue(NodeIndexer.java:393)
	at org.apache.jackrabbit.core.query.lucene.NodeIndexer.addValue(NodeIndexer.java:282)
	at org.apache.jackrabbit.core.query.lucene.NodeIndexer.createDoc(NodeIndexer.java:221)
	at org.apache.jackrabbit.core.query.lucene.SearchIndex.createDocument(SearchIndex.java:861)
	at org.apache.jackrabbit.core.query.lucene.SearchIndex$2.next(SearchIndex.java:512)
	at org.apache.jackrabbit.core.query.lucene.MultiIndex.update(MultiIndex.java:420)
	at org.apache.jackrabbit.core.query.lucene.SearchIndex.updateNodes(SearchIndex.java:496)
	at org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:495)
	at org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:231)
	at org.apache.jackrabbit.core.observation.ObservationDispatcher.dispatchEvents(ObservationDispatcher.java:201)
	at org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:425)
	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:737)
	at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:873)
	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
	at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
	at org.apache.jackrabbit.core.BatchedItemOperations.update(BatchedItemOperations.java:183)
	at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy(WorkspaceImpl.java:397)
	at org.apache.jackrabbit.core.WorkspaceImpl.clone283(WorkspaceImpl.java:1045)
	at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java:469)
	at brix.jcr.api.wrapper.WorkspaceWrapper$1.execute(WorkspaceWrapper.java:54)
	at brix.jcr.api.wrapper.AbstractWrapper.executeCallback(AbstractWrapper.java:74)
	at brix.jcr.api.wrapper.WorkspaceWrapper.clone(WorkspaceWrapper.java:50)
	at brix.Brix.cloneWorkspace(Brix.java:121)
	at brix.Brix.clone(Brix.java:101)
	at biggie.webapp.TestDataLoader.bootstrapCms(TestDataLoader.java:1289)
	at biggie.webapp.TestDataLoader.onApplicationEvent(TestDataLoader.java:280)
	at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
	at org.mortbay.jetty.Server.doStart(Server.java:222)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
	at biggie.webapp.StartBiggie.main(StartBiggie.java:100)
	at biggie.webapp.StartBiggieFresh.main(StartBiggieFresh.java:33)
Caused by: java.lang.RuntimeException: Namespace for prefix 'BRIX' has
not been declared.
	at com.sun.org.apache.xml.internal.serializer.SerializerBase.getNamespaceURI(SerializerBase.java:895)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:197)
	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:243)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249)
	at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:361)
	at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015)
	at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888)
	at org.cyberneko.html.HTMLTagBalancer.emptyElement(HTMLTagBalancer.java:655)
	at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2340)
	at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1820)
	at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789)
	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478)
	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:637)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
	... 51 common frames omitted

Mime
View raw message