Better late than never... I finally got around to trying this out myself, and 
what happens is that simply when you run the code in Maven, the JVM somehow is 
started with the "-ea" switch, while when running in Eclipse it is not.

I will have to open a JIRA issue for this to see if the assert is really 
correct since the code seems to be working well even when the assert gets fired.

Radu 

> -----Original Message-----
> From: Tor Arne Kvaløy [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 01, 2008 6:44 AM
> To: [email protected]
> Subject: Strange behaviour after element is set to null
> 
> 
> Hello,
> 
> I am experiencing a very strange behavior when an element is 
> set to null and then assigned an value.
> 
> invoice.setTermsOfPaymentId(null);
> invoice.setTermsOfPaymentId(BigInteger.valueOf(10));
> invoice.getTermsOfPaymentId();
> 
> What's really strange is that this works fine when i run this 
> code from within Eclipse, however when I run it with Maven it 
> fails with the following
> error:
> java.lang.AssertionError
>       at 
> org.apache.xmlbeans.impl.store.Xobj.fetch_text(Xobj.java:1794)
>       at
> org.apache.xmlbeans.impl.values.XmlObjectBase.get_wscanon_text
> (XmlObjectBase.java:1332)
>       at
> org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlO
> bjectBase.java:1269)
>       at
> org.apache.xmlbeans.impl.values.JavaIntegerHolder.bigIntegerVa
> lue(JavaIntegerHolder.java:58)
>       at
> org.apache.xmlbeans.impl.values.XmlObjectBase.getBigIntegerVal
> ue(XmlObjectBase.java:1504)
>       at
> no.avinor.pub.domain.invoice.v1.impl.InvoiceImpl.getTermsOfPay
> mentId(Unknown
> Source)
>       at
> no.avinor.invoiceservice.ws.SubmitInvoiceEndpointTest.noTermsO
> fPayment(SubmitInvoiceEndpointTest.java:367)
> 
> I have tried to figure out of there is a different jars, but 
> they look the same (the eclipse project is generated via maven).
> 
> So I am curious if anyone has any suggestions for what might be wrong?
> 
> My pom has this:
> <dependency>
>       <groupId>org.apache.xmlbeans</groupId>
>       <artifactId>xmlbeans</artifactId>
>       <version>2.4.0</version>
> </dependency>
> <dependency>
>       <groupId>xerces</groupId>
>       <artifactId>xercesImpl</artifactId>
>       <version>2.8.1</version>
> </dependency>
> <dependency>
>       <groupId>xalan</groupId>
>       <artifactId>xalan</artifactId>
>       <version>2.7.0</version>
> </dependency>
> 
> Thanks,
> Tor
> 
> --
> View this message in context: 
> http://www.nabble.com/Strange-behaviour-after-element-is-set-t
> o-null-tp19757955p19757955.html
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to