db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: java.lang.NoClassDefFoundError: java.math.BigDecimal
Date Tue, 26 Dec 2006 22:26:57 GMT
Jonas wrote:

>I'm trying to use Derby 10.2.2 with IBM WSDD and it does not work for me.
>I always get a 
>java.lang.NoClassDefFoundError: java.math.BigDecimal
>	at java.lang.Class.verifyImpl(Native Method)
>	at java.lang.Class.verify(Class.java:253)
>	at java.lang.Class.initialize(Class.java:315)
>	at org.apache.derby.jdbc.Driver20.newEmbedResultSet(Driver20.java:149)
>	at ....jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1197)
>	at ..jdbc.EmbedStatement.execute(EmbedStatement.java:585)
>	at ..jdbc.EmbedStatement.executeQuery(EmbedStatement.java:154)
>	at com.lf.MiniBD.main(MiniBD.java:64)
>when using a simple resultset like 
>   rs = stt.executeQuery("SELECT * FROM TEST");.
>I use EmbeddedSimpleDataSource to obtain a jdbc Connection and can create and
>insert data in a new database. However, when i use a resultset to query the
>database, i get the BigDecimal error.
>Thank you in advance.
Hi Jonas,

Is it possible to reproduce this outside of WSDD ? Which JVM are you using ?

Under a simple scenario I could not reproduce this with 10.2.2 on IBM 
142 and IBM 15 JVMs.

            EmbeddedDataSource ds = new EmbeddedDataSource();
            Connection conn=ds.getConnection();
            Statement stmt=conn.createStatement();
            ResultSet rs=stmt.executeQuery("select * from  testbigdecimal");
                System.out.println("Row "+rs.getInt(1)+" 

The table columns in 'testbigdecimal' were: (intcol integer, decimalcol 

it returned the valid rows:
Row 1 1234.5678902
Row 2 2323.8727837

Not sure what could be wrong in your scenario (JVM ?, security policy ? 
).  In any case I would suggest
if you are able to see  the issue consistently, do post the reproduction 
test case with steps to the list.


View raw message