Details
Description
Just switched from 4.0.x to 4.1.RC1. The following query that worked before started printing warnings and throwing an exception:
// "bytes" byte[] bytes = SQLSelect .scalarQuery(byte[].class, "SELECT bytes FROM sometable") .selectOne(context);
o.a.c.a.t.SerializableTypeFactory: Haven't found suitable ExtendedType for class 'byte[]'. Most likely you need to define a custom ExtendedType. o.a.c.a.t.SerializableTypeFactory: SerializableType will be used for type conversion. o.a.c.l.JdbcEventLogger: *** error. java.io.StreamCorruptedException: invalid stream header: 79FC63D0 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:808) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301) at org.apache.cayenne.access.types.SerializableTypeFactory$SerializableType.toJavaObject(SerializableTypeFactory.java:106) at org.apache.cayenne.access.types.SerializableTypeFactory$SerializableType.toJavaObject(SerializableTypeFactory.java:70) at org.apache.cayenne.access.types.ExtendedTypeDecorator.materializeObject(ExtendedTypeDecorator.java:53) at org.apache.cayenne.access.jdbc.reader.ScalarRowReader.readRow(ScalarRowReader.java:50)
The cause seems to related to the incorrect class name extraction for "byte[]" class, so extended type lookup is failing.