abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: NullPointerException when calling ClientResponse.getDocument()
Date Mon, 28 Apr 2008 22:13:15 GMT
It's almost certainly a classpath issue.  If you can, please provide the 
classpath list for both environments.

- James

Dan Diephouse wrote:
> Well I'll be honest, I'm stumped too. This is with 0.4.0 right? Any 
> chance you can print out the classpath?
> 
> Dan
> 
> Todd Wells wrote:
>> I¹m stumped.  I have this repeatable case where 
>> ClientResponse.getDocument()
>> results in a NullPointerException, even though a fully-formed atom 
>> document
>> was successfully retrieved.
>>
>> Here¹s the weird part ‹ and sorry there are so many caveats here ‹ 
>> this is
>> running from inside an ant task that I¹ve written.  When I run it 
>> inside of
>> the debugger or IDE (while not debugging) it works just fine.  When I 
>> run it
>> via the command line I get the NPE every time.  I¹m routing both attempts
>> through an HTTP proxy (fiddler) and I can see that the HTTP request and
>> response are the same in both cases , but in the one case Abdera 
>> throws the
>> NPE.  I¹ve been poking at this for several hours now and I¹m at my wit¹s
>> end.  Here¹s the stack trace I¹m getting.  Any idea how I could 
>> further nail
>> this down?
>>
>> Caused by: java.lang.NullPointerException
>>         at 
>> org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(Abstrac 
>>
>> tClientResponse.java:96)
>>         at 
>> org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(Abstrac 
>>
>> tClientResponse.java:74)
>>         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:585)
>>         at 
>> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>>         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
>>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
>>         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:754)
>>         at 
>> org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.jav 
>>
>> a:765)
>>         at 
>> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:75 
>>
>> 3)
>>         at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptByteco 
>>
>> deAdapter.java:167)
>>
>> My best (and somewhat feeble) guess is that there¹s something 
>> different in
>> the class paths that is causing the difference in behavior.  What that 
>> might
>> be, I have no idea.
>>
>>   
> 
> 

Mime
View raw message