cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fahman_dude <fahman_d...@hotmail.com>
Subject Re: RESTful services without annotations
Date Sun, 21 Feb 2010 13:46:27 GMT

Hello,

I was browsing through the logs the other day and noticed this:
WARN  [main] cxf.jaxrs.utils.ResourceUtils (373)     - Problem with
processing a user model at
classpath:/org/apache/cxf/systest/jaxrs/resources/resources2.xml

First, I assumed that I wasted your time since the error is that the
resources2.xml simply cannot be found on the classpath... but unfortunatelly
it could.

So I finally downloaded cxf sources and dug down along the stack.

This is what I found inside (cxf-common-utilities-2.2.6.jar,
cxf-rt-frontend-jaxrs-2.2.6.jar):

java.lang.NullPointerException
	at java.lang.String.contains(String.java:2103)
	at
org.apache.cxf.helpers.DOMUtils.findAllElementsByTagNameNS(DOMUtils.java:603)
	at
org.apache.cxf.helpers.DOMUtils.findAllElementsByTagNameNS(DOMUtils.java:608)
	at
org.apache.cxf.helpers.DOMUtils.findAllElementsByTagNameNS(DOMUtils.java:596)
	at
org.apache.cxf.jaxrs.utils.ResourceUtils.getResourcesFromElement(ResourceUtils.java:401)
	at
org.apache.cxf.jaxrs.utils.ResourceUtils.getUserResources(ResourceUtils.java:396)
	at
org.apache.cxf.jaxrs.utils.ResourceUtils.getUserResources(ResourceUtils.java:371)
	at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setModelRefWithServiceClass(AbstractJAXRSFactoryBean.java:289)

The statement:

if (localName.equals(el.getLocalName()) &&
nameSpaceURI.contains(el.getNamespaceURI())) {

in
org.apache.cxf.helpers.DOMUtils.findAllElementsByTagNameNS(DOMUtils.java:603)
is causing this NullPointerException in the
nameSpaceURI.contains(el.getNamespaceURI()) because NamespaceURI of the el
(in my case that would be "resource" element from user model xml) is null.

I am sorry to bother you guys, but since last time I worked with DOM
directlly was like 8 years ago, am quite puzzled about this error. I
explicitelly set xlmns="http://cxf.apache.org/jaxrs" attribute of 'model'
element. Can someone point me to the reason why the namespace uri in the
parsed DOM Document instance is null?

cheers
reinis
-- 
View this message in context: http://old.nabble.com/RESTful-services-without-annotations-tp27637811p27675688.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message