cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Alford <dalf...@appraisalforum.com>
Subject Re: java.lang.IllegalArgumentException: The prefix 'xml' is reserved
Date Wed, 18 Feb 2004 15:01:19 GMT
Doh @ me.

I found an older castor jar lurking in my jre/lib/ext directory. I 
removed it and solved the problem.

Dan

Dan Alford wrote:

> Hi,
>   I am trying to upgrade from cocoon 2.0.x to 2.1.4.I am building  
> cocoon 2.1.4 on windows 2000 with jdk 1.4.2_02.
>
> I can successfully build, but when I try to deploy to tomcat I get the 
> following error on startup. I have tried this with tomcat 4.1.29 and 
> Tomcat 5.0.9.
>
> HSQLDB server 1.7.1 is running
> Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
> Wed Feb 18 08:44:11 CST 2004 Listening for connections ...
> java.lang.IllegalArgumentException: The prefix 'xml' is reserved (XML 
> 1.0 Specif
> ication) and cannot be declared.
>        at 
> org.exolab.castor.xml.Namespaces.addNamespace(Namespaces.java:130)
>        at 
> org.exolab.castor.xml.UnmarshalHandler.startPrefixMapping(UnmarshalHa
> ndler.java:1953)
>        at 
> org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unk
> nown Source)
>        at 
> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
> ce)
>        at 
> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Sourc
> e)
>        at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> t(Unknown Source)
>        at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
> ootElementHook(Unknown Source)
>        at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(Unknown Source)
>        at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
> known Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
> Source)
>        at 
> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:583)
>        at 
> org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:51
> 5)
>        at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:441)
>        at 
> org.apache.cocoon.portal.pluto.om.PortletDefinitionRegistryImpl.initi
> alize(PortletDefinitionRegistryImpl.java:165)
>        at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
> nerUtil.java:282)
>        at 
> org.apache.cocoon.portal.pluto.PortletContainerEnvironmentImpl.init(P
> ortletContainerEnvironmentImpl.java:137)
>        at 
> org.apache.cocoon.portal.pluto.PortletContainerEnvironmentImpl.initia
> lize(PortletContainerEnvironmentImpl.java:116)
>        at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
> nerUtil.java:282)
>        at 
> org.apache.cocoon.portal.impl.PortletPortalManager.initContainer(Port
> letPortalManager.java:206)
>        at 
> org.apache.cocoon.portal.impl.PortletPortalManager.initialize(Portlet
> PortalManager.java:173)
>        at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
> nerUtil.java:282)
>        at 
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInst
> ance(DefaultComponentFactory.java:313)
>        at 
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.init
> ialize(ThreadSafeComponentHandler.java:143)
>        at 
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.initi
> alize(ExcaliburComponentManager.java:558)
>        at 
> org.apache.cocoon.components.CocoonComponentManager.initialize(Cocoon
> ComponentManager.java:547)
>        at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
> nerUtil.java:282)
>        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:340)
>        at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(Contai
> nerUtil.java:282)
>        at 
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.ja
> va:1371)
>        at 
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:514)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1044)
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88
> 7)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3787)
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 075)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:868)
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:85
> 2)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:614)
>
>        at 
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
> loyer.java:319)
>        at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:835)
>        at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
> ava:729)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:479
> )
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :399)
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:166)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1135)
>
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:792)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1127)
>
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:502
> )
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:5
> 19)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:231
> 1)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:324)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)
>
> Looking at the cocoon logs I find the following in the error log:
> ERROR   (2004-02-18) 08:44.12:406   [core.manager] (Unknown-URI) 
> Unknown-thread/ExcaliburComponentManager: Caught an exception trying 
> to initialize the component handler.
> java.lang.IllegalArgumentException: The prefix 'xml' is reserved (XML 
> 1.0 Specification) and cannot be declared.
>    at org.exolab.castor.xml.Namespaces.addNamespace(Namespaces.java:130)
>    at 
> org.exolab.castor.xml.UnmarshalHandler.startPrefixMapping(UnmarshalHandler.java:1953)

>
>    at 
> org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unknown 
> Source)
>    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
> Source)
>    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown 
> Source)
>    at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown 
> Source)
>    at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown

> Source)
>    at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

> Source)
>    at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>    at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:583)
>    at 
> org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:515)
>    at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:441)
>    at 
> org.apache.cocoon.components.persistence.CastorSourceConverter.initialize(CastorSourceConverter.java:172)

>
>    at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)

>
>    at 
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:313)

>
>    at 
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)

>
>    at 
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:558)

>
>    at 
> org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)

>
>    at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)

>
>    at org.apache.cocoon.Cocoon.initialize(Cocoon.java:340)
>    at 
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)

>
>    at 
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1371) 
>
>    at 
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:514)
>    at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) 
>
>    at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
>    at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3787) 
>
>    at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4075)
>    at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:868) 
>
>    at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:852)
>    at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:614)
>    at 
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:319)

>
>    at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:835)
>    at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:729) 
>
>    at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:479)
>    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
>    at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:399) 
>
>    at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)

>
>    at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1135)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:792)
>    at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1127)
>    at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:502)
>    at 
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
>    at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2311)
>    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>    at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>
>    at java.lang.reflect.Method.invoke(Method.java:324)
>    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)
>
>
> I found some references on google about the castor problem but I have 
> been unable to resolve it. Here is what I have tried ( and has failed).
>
> 1) Set the org.exolab.castor.parser.namespaces=true
> 2) used the latest castor version (0.9.5.2)
> 3) removes castor jar from the optional jar files and modified 
> jars.xml ( the code built ok).
> 4) Placed the xerces and XML api jars from cocoon in the tomcat 
> emdorsed directory ( xercesImpl-2.6.1.jar,xalan-2.5.2.jar and 
> xml-apis.jar).
>
> Im guessing one of the blocks or libs has some embedded castor files 
> but I am unable to find any reference.
>
> Any hints/solutions?
>
>
> Regards,
> Dan Alford
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>

-- 
Dan Alford
Java Developer
Appraisal Forum
6800 Poplar Avenue, Ste. 121
Memphis, TN 38138
866-367-8611 Ext.290
Direct 901-759-2475
dalford@appraisalforum.com
www.appraisalforum.com
 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message