cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: input module stopped working
Date Mon, 19 May 2003 13:11:22 GMT

On Monday, May 19, 2003, at 01:23 AM, Jeff Turner wrote:

> Jeremy Quinn wrote:
> ...
>> I still get an error (but the samples still work), but this time it  
>> is  an NPF:
>> java.lang.NullPointerException
>>     at   
>> org.apache.cocoon.components.modules.input.XMLFileModule.getContextObj 
>> ec t(XMLFileModule.java:284)
>
> Bleh. Hopefully fixed now.

I did a new update, a clean build etc. but am still getting the same  
error.

This was working as of 2003-05-02.

I am including:
	stacktrace
	snippets from core.log (initialisation and usage)
	the input module definition


Here is part of the stack trace from the browser:

java.lang.NullPointerException
	at  
org.apache.cocoon.components.modules.input.XMLFileModule.getContextObjec 
t(XMLFileModule.java:299)
	at  
org.apache.cocoon.components.modules.input.AbstractJXPathModule.getAttri 
buteValues(AbstractJXPathModule.java:272)
	at  
org.apache.cocoon.components.modules.input.AbstractMetaModule.get(Abstra 
ctMetaModule.java:388)
	at  
org.apache.cocoon.components.modules.input.AbstractMetaModule.getValues( 
AbstractMetaModule.java:312)
	at  
org.apache.cocoon.components.modules.input.SimpleMappingMetaModule.getAt 
tributeValues(SimpleMappingMetaModule.java:266)
	at  
org.apache.cocoon.components.modules.input.AbstractMetaModule.get(Abstra 
ctMetaModule.java:388)
	at  
org.apache.cocoon.components.modules.input.AbstractMetaModule.getValues( 
AbstractMetaModule.java:298)
	at  
org.apache.cocoon.components.modules.input.ChainMetaModule.getAttributeV 
alues(ChainMetaModule.java:209)
	at  
org.apache.cocoon.components.modules.input.ChainMetaModule.getAttribute( 
ChainMetaModule.java:300)
	at  
org.apache.cocoon.components.treeprocessor.variables.PreparedVariableRes 
olver.resolve(PreparedVariableResolver.java:296)


Here is part of my core.log where the input module chain is initialised:

DEBUG   (2003-05-19) 13:46.27:317   [core.manager] (Unknown-URI)  
Unknown-thread/DefaultComponentFactory: ComponentFactory creating new  
instance of org.apache.cocoon.components.modules.input.XMLFileModule.
DEBUG   (2003-05-19) 13:46.27:318   [core.manager] (Unknown-URI)  
Unknown-thread/DefaultComponentFactory: logger attribute is  
core.modules.xml
DEBUG   (2003-05-19) 13:46.27:319   [core.manager] (Unknown-URI)  
Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized  
for: org.apache.cocoon.components.modules.input.XMLFileModule
DEBUG   (2003-05-19) 13:46.27:320   [core.manager] (Unknown-URI)  
Unknown-thread/ExcaliburComponentSelector: Adding  
org.apache.cocoon.components.modules.input.XMLFileModule for hint  
[iniva-conf]
DEBUG   (2003-05-19) 13:46.27:321   [core.manager] (Unknown-URI)  
Unknown-thread/DefaultComponentFactory: ComponentFactory creating new  
instance of org.apache.cocoon.components.modules.input.ChainMetaModule.
DEBUG   (2003-05-19) 13:46.27:321   [core.manager] (Unknown-URI)  
Unknown-thread/DefaultComponentFactory: logger attribute is  
core.modules.input
DEBUG   (2003-05-19) 13:46.27:322   [core.manager] (Unknown-URI)  
Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized  
for: org.apache.cocoon.components.modules.input.ChainMetaModule
DEBUG   (2003-05-19) 13:46.27:323   [core.manager] (Unknown-URI)  
Unknown-thread/ExcaliburComponentSelector: Adding  
org.apache.cocoon.components.modules.input.ChainMetaModule for hint  
[iniva]


and this is where it is used for the first time:

DEBUG   (2003-05-19) 13:46.56:984   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/AbstractMetaModule: MetaModule  
performing op GET_VALUES on statically assigned module 'request-param',  
using config null
DEBUG   (2003-05-19) 13:46.56:987   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/AbstractMetaModule: using request-param  
as  
org.apache.cocoon.components.modules.input.RequestParameterModule@3f870b 
  for 1 (content) and  
org.apache.avalon.framework.configuration.DefaultConfiguration@bb19ab  
gives null
DEBUG   (2003-05-19) 13:46.56:988   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/ChainMetaModule: read from  
request-param attribute content as null
DEBUG   (2003-05-19) 13:46.56:989   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/AbstractMetaModule: MetaModule  
performing op GET_VALUES on statically assigned module 'simplemap',  
using config null
DEBUG   (2003-05-19) 13:46.56:990   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/SimpleMappingMetaModule: mapping  
['content'] to ['/vars/content']
DEBUG   (2003-05-19) 13:46.56:991   [core.modules.input]  
(/cocoon/iniva/index) Thread-14/AbstractMetaModule: MetaModule  
performing op GET_VALUES on dynamically created module 'iniva-conf',  
using config  
org.apache.avalon.framework.configuration.DefaultConfiguration@92635f
WARN    (2003-05-19) 13:46.56:993   [core.modules.xml]  
(/cocoon/iniva/index) Thread-14/XMLFileModule: Error: missing 'file'  
child element at jndi:/localhost/cocoon/WEB-INF/cocoon.xconf:218:39
DEBUG   (2003-05-19) 13:46.57:013   [core.manager]  
(/cocoon/iniva/index) Thread-14/ExcaliburComponentManager: Could not  
find component for role:  
org.apache.cocoon.components.notification.NotifyingBuilder


and here is the input module definition from cocoon.xconf:

<component-instance  
class="org.apache.cocoon.components.modules.input.XMLFileModule"  
logger="core.modules.xml" name="iniva-conf">
   <file src="cocoon://iniva/xconf"/>
</component-instance>
<component-instance  
class="org.apache.cocoon.components.modules.input.ChainMetaModule"  
logger="core.modules.input" name="iniva">
   <input-module name="request-param"/>
   <input-module name="simplemap">
     <prefix>/vars/</prefix>
     <input-module name="iniva-conf"/> <!-- this is where the error  
points to -->
   </input-module>
</component-instance>


Has something changed in the way we are supposed to set up custom input  
modules?

I am using a pre-declared 'simplemap' module, should I declare my own  
for this purpose?

Thanks for any help

regards Jeremy



Mime
View raw message