java.lang.NullPointerException

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.NullPointerException

Vandermi Silva
Hello, I am using XStream to store data in an XML file and when I check the code with the Java Pathfinder I get the following error"java.lang.NullPointerException Calling 'trim () Lja ...". The error occurs whenever an instance of XStream is called.
To make sure that the error was not in my implementation, I tested with the example tutorials available on the website of XStream.
Is this a bug?

Java Pathfinder (JPF) is a system to verify executable Java bytecode programs. JPF was developed at the NASA Ames Research Centerand open sourced in 2005. The core of JPF is a Java Virtual Machine that is also implemented in Java. JPF executes normal Java bytecode programs and can store, match and restore program states. Its primary application has been Model checking of concurrent programs, to find defects such as data races and deadlocks (Wikipedia)

--
Regards.


Vandermi Silva
Groups
http://www.ufam-automation.net/
Mobile: 559281252248 TIM
Mobile: 559292547005 VIVO
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NullPointerException

Jörg Schaible-3
Hi,

Vandermi Silva wrote:

> Hello, I am using XStream to store data in an XML file and when I
> check the code
> with the Java Pathfinder I get the following error"
> java.lang.NullPointerException Calling 'trim () Lja ...". The error occurs
> whenever an instance of XStream is called.
> To make sure that the error was not in my implementation, I tested with
> the example tutorials available on the website of XStream.
> Is this a bug?
>
> *Java Pathfinder* (JPF) is a system to verify executable
> Java<http://en.wikipedia.org/wiki/Java_(software_platform)>
>  bytecode <http://en.wikipedia.org/wiki/Java_bytecode> programs. JPF was
> developed at the NASA <http://en.wikipedia.org/wiki/NASA> Ames Research
> Center <http://en.wikipedia.org/wiki/Ames_Research_Center>and open sourced
> in 2005. The core of JPF is a Java Virtual
> Machine<http://en.wikipedia.org/wiki/Java_Virtual_Machine> that
> is also implemented in
> Java<http://en.wikipedia.org/wiki/Java_(software_platform)>.
> JPF executes normal Java
> bytecode<http://en.wikipedia.org/wiki/Java_bytecode> programs
> and can store, match and restore program states. Its primary application
> has been Model checking <http://en.wikipedia.org/wiki/Model_checking>
> of concurrent
> programs <http://en.wikipedia.org/wiki/Concurrent_computing>, to find
> defects such as data races <http://en.wikipedia.org/wiki/Race_condition>
>  and deadlocks <http://en.wikipedia.org/wiki/Deadlock> (Wikipedia)

Still, I have no idea, what Pathfinder does with XStream. If it simply makes
arbitrary calls with random arguments in parallel on XStream, then it *will*
definitely fail. Only the marshalling code is reentrynt, but not the
configuration part (see FAQ). Also the error message above does not help at
all without a stack trace. Nevertheless, if you feed XStream's methods with
null, I am quite sure you will get NPEs. Shit it => shit out ;-)

- Jörg




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NullPointerException

Faisal anwer
In reply to this post by Vandermi Silva
Vandermi Silva <vandermisilva@...> writes:

>
>
> Hello, I am using XStream to store data in an XML file and when
I check the code with the Java Pathfinder I get the
following error"java.lang.NullPointerException Calling 'trim
() Lja ...". The error occurs whenever an instance of XStream is
called.To make sure that the error was not in my implementation, I
tested with the example tutorials available on the website of XStream.
> Is this a bug?
>
>
> Java Pathfinder (JPF) is a system to verify
executable Java bytecode programs. JPF was developed at the NASA Ames
Research Centerand open sourced in 2005. The core of JPF is a Java Virtual
Machine that is also implemented in Java. JPF executes normal Java
bytecode programs and can store, match and restore program states. Its
primary application has been Model checking of concurrent programs, to find
defects such as data races and deadlocks (Wikipedia)
> -- Regards.Vandermi SilvaGroupshttp://www.ufam-automation.net/Mobile:
559281252248 TIMMobile: 559292547005 VIVO
>

Hi Vandermi,
I am also getting the same error given as below

gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty
java.lang.NullPointerException: Calling 'trim()Ljava/lang/String;' on null
object
        at
sun.misc.FloatingDecimal.readJavaFormatString(sun/misc/FloatingDecimal.java:
5)
        at java.lang.Float.parseFloat(java/lang/Float.java:1)
        at
com.thoughtworks.xstream.core.JVM.getMajorJavaVersion(com/thoughtworks/xstre
am/core/JVM.java:94)
        at com.thoughtworks.xstream.core.JVM.<clinit>
(com/thoughtworks/xstream/core/JVM.java:47)
        at com.thoughtworks.xstream.XStream.<init>
(com/thoughtworks/xstream/XStream.java:313)
        at com.thoughtworks.xstream.XStream.<init>
(com/thoughtworks/xstream/XStream.java:381)
        at com.thoughtworks.xstream.XStream.<init>
(com/thoughtworks/xstream/XStream.java:336)
        at
package2.AspectClass.ajc$before$package2_AspectClass$1$60326017(package2/Asp
ectClass.aj:17)
        at package2.AvlTree.main(package2/AvlTree.java:297)


have you resolved this issue.
Thanks
Faisal Anwer




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NullPointerException

Jörg Schaible-3
Hi,

which version of XStream you are using?

Regards,
Jörg

Faisal Anwer wrote:

> Vandermi Silva <vandermisilva@...> writes:
>
>>
>>
>> Hello, I am using XStream to store data in an XML file and when
> I check the code with the Java Pathfinder I get the
> following error"java.lang.NullPointerException Calling 'trim
> () Lja ...". The error occurs whenever an instance of XStream is
> called.To make sure that the error was not in my implementation, I
> tested with the example tutorials available on the website of XStream.
>> Is this a bug?
>>
>>
>> Java Pathfinder (JPF) is a system to verify
> executable Java bytecode programs. JPF was developed at the NASA Ames
> Research Centerand open sourced in 2005. The core of JPF is a Java Virtual
> Machine that is also implemented in Java. JPF executes normal Java
> bytecode programs and can store, match and restore program states. Its
> primary application has been Model checking of concurrent programs, to
> find defects such as data races and deadlocks (Wikipedia)
>> -- Regards.Vandermi SilvaGroupshttp://www.ufam-automation.net/Mobile:
> 559281252248 TIMMobile: 559292547005 VIVO
>>
>
> Hi Vandermi,
> I am also getting the same error given as below
>
> gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty
> java.lang.NullPointerException: Calling 'trim()Ljava/lang/String;' on null
> object
> at
>
sun.misc.FloatingDecimal.readJavaFormatString(sun/misc/FloatingDecimal.java:
> 5)
> at java.lang.Float.parseFloat(java/lang/Float.java:1)
> at
>
com.thoughtworks.xstream.core.JVM.getMajorJavaVersion(com/thoughtworks/xstre

> am/core/JVM.java:94)
> at com.thoughtworks.xstream.core.JVM.<clinit>
> (com/thoughtworks/xstream/core/JVM.java:47)
> at com.thoughtworks.xstream.XStream.<init>
> (com/thoughtworks/xstream/XStream.java:313)
> at com.thoughtworks.xstream.XStream.<init>
> (com/thoughtworks/xstream/XStream.java:381)
> at com.thoughtworks.xstream.XStream.<init>
> (com/thoughtworks/xstream/XStream.java:336)
> at
>
package2.AspectClass.ajc$before$package2_AspectClass$1$60326017(package2/Asp

> ectClass.aj:17)
> at package2.AvlTree.main(package2/AvlTree.java:297)
>
>
> have you resolved this issue.
> Thanks
> Faisal Anwer
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NullPointerException

Faisal anwer
This post has NOT been accepted by the mailing list yet.
Hi,
I am using XStream 1.4.4

Thanks.