IOException

11 views
Skip to first unread message

Solido

unread,
Sep 1, 2010, 12:36:15 PM9/1/10
to hawtdb
Here's a little exception i cannot figure what's going on,
Is this a serialization problem ? the message is not that much
expressive.
Thank, you for any help :)

Caused by: java.io.IOException:
com.xxxxxx.backoffice.data.FxRatesSerie
at org.fusesource.hawtbuf.codec.ObjectCodec.decode(ObjectCodec.java:
52)
at org.fusesource.hawtdb.internal.index.BTreeNode.read(BTreeNode.java:
207)
at org.fusesource.hawtdb.internal.index.BTreeNode
$DataPagedAccessor.decode(BTreeNode.java:228)
at org.fusesource.hawtdb.internal.index.BTreeNode
$DataPagedAccessor.decode(BTreeNode.java:214)
at
org.fusesource.hawtdb.api.AbstractStreamPagedAccessor.load(AbstractStreamPagedAccessor.java:
64)
... 55 more

package com.xxxxxxx.backoffice.data;

import java.io.Serializable;
import java.util.List;


public class FxRatesSerie implements Serializable{

private static final long serialVersionUID = -8569118842488103664L;

private final List<FxRate> rates;

public FxRatesSerie(List<FxRate> rates) {
super();
this.rates = rates;
}

...

public class FxRate implements Serializable {

private static final long serialVersionUID = -3432603608763434258L;

private BigDecimal value;
private Currency currency;

...


public class Currency implements Serializable {

private static final long serialVersionUID = 8661134249845313548L;

private String name;
private String code;

...

Solido

unread,
Sep 1, 2010, 1:07:59 PM9/1/10
to hawtdb
The program is working great when launched from a main method
but when converted in a spring application, i've found that the
IOException
is a classNotFoundException.

Looks like Hawtdb use it's own classloader and the class that's is
found
by the controller is not found by HawtDb which is called from the same
controller.

List<FxRate> rs = ratesDB.load(new Date());

Solido

unread,
Sep 1, 2010, 1:19:55 PM9/1/10
to hawtdb
The problem seems to came from the injection mode of spring,
if i use the new operator it's ok else it does not found dependency
on the class.

Any ideas ?

On 1 sep, 18:36, Solido <felker.rob...@gmail.com> wrote:

Hiram Chirino

unread,
Sep 1, 2010, 2:27:31 PM9/1/10
to haw...@googlegroups.com
This is what's encoding/decoding your objects:

http://github.com/chirino/hawtbuf/blob/master/hawtbuf/src/main/java/org/fusesource/hawtbuf/codec/ObjectCodec.java

It's really simple java object serialization logic. Perhaps you
should find out from the spring folks how it can better integrate /w
spring created objects.

--
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/

Reply all
Reply to author
Forward
0 new messages