Hi Erik, thanks for reporting these further issues
re [1], https://issues.apache.org/jira/browse/ISIS-1925 . re [2], https://issues.apache.org/jira/browse/ISIS-1927 re [3], don't quite understand why the workaround is failing for RO, but we tracked down the issue anyway and have a fix in https://issues.apache.org/jira/browse/ISIS-1902 . Thx Dan On Fri, 16 Mar 2018 at 11:33 Erik de Hair <[email protected]> wrote: > Hi Andi, Dan, > > I have another issue with Blob's on 1.16.2. If an action called using RO > interface returns a null Blob I get a NPE. I believe somebody noticed > already because when I look at [1] there has been taken care of this > condition. When the action returns a non null value I get an exception > on [2]. > > Furthermore retrieving a Blob value from an entity directly using a > query like 'tq.executeResultUnique(Blob.class, true, cand.logo)' (action > called trough RO) is not solved by copying the files you mentioned > before. In that case I get an exception: > > Creation of SQLExpression for mapping > "org.apache.isis.objectstore.jdo.datanucleus.valuetypes.IsisBlobMapping" > caused error > Unable to create SQLExpression for mapping of type > "org.apache.isis.objectstore.jdo.datanucleus.valuetypes.IsisBlobMapping" > since not supported > org.datanucleus.exceptions.NucleusException: Unable to create > SQLExpression for mapping of type > "org.apache.isis.objectstore.jdo.datanucleus.valuetypes.IsisBlobMapping" > since not supported > > Any workaround for this too? ;-) Are these known issues or do you want > me to raise an issue for these? > > Thanks, > Erik > > [1] > > https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/schema/utils/CommonDtoUtils.java#L263 > [2] > > https://github.com/apache/isis/blob/master/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/util/OidUtils.java#L51 > > > On 03/14/2018 11:05 AM, Andi Huber wrote: > > Thanks Erik! > > > > Good to know. Remember, this is just a workaround, we definitely will > try to fix this. > > > > Cheers Andi. > > > > On 2018/03/14 09:57:05, Erik de Hair <[email protected]> wrote: > >> Hi Andi, > >> > >> Thank you very much! This helped. Everything's working fine now. > >> > >> Erik > >> > >> On 03/14/2018 10:31 AM, Andi Huber wrote: > >>> Hi Erik, > >>> > >>> strangely we had the same symptoms when working on the coming 2.0.0-M1 > >>> release. We tracked it down to the fact, that Isis' datanucleus > >>> extensions don't get installed during bootstrapping. > >>> > >>> Would be interesting to see, whether our current workaround [1] (to > copy > >>> over 2 files into your domain code) solves the issue. (Please let us > know!) > >>> > >>> * /plugin.xml > >>> * /META-INF/MAINFEST.MF > >>> > >>> As of version 1.16.x these files are in the isis-core-runtime jar file > >>> of the release. > >>> > >>> Cheers Andi > >>> > >>> [1] https://issues.apache.org/jira/browse/ISIS-1902 > >>> > >>> On 2018/03/14 08:35:14, Erik de Hair <[email protected]> wrote: > >>>> Hi, > >>>> > >>>> I'm having troubles with Blob fields after upgrading to Apache Isis > >>>> 1.16.2 (not sure if this was also the case for 1.16.[0-1]). The > feature > >>>> is using existing data we had no problems with before upgrading. > >>>> > >>>> My field definition: > >>>> > >>>> @javax.jdo.annotations.Persistent(defaultFetchGroup="false", columns > = { > >>>> Â Â Â Â Â Â Â Â Â Â Â @javax.jdo.annotations.Column(name = > "file_name", > >>>> allowsNull = "false"), > >>>> Â Â Â Â Â Â Â Â Â Â Â @javax.jdo.annotations.Column(name = > "file_mimetype", > >>>> allowsNull = "false"), > >>>> Â Â Â Â Â Â Â Â Â Â Â @javax.jdo.annotations.Column(name = > "file_bytes", > >>>> jdbcType="BLOB", sqlType = "BLOB", allowsNull = "false") > >>>> Â Â Â Â Â Â Â }) > >>>> Â Â Â @Property(editing=Editing.DISABLED, > optionality=Optionality.MANDATORY) > >>>> Â Â Â @Getter @Setter > >>>> Â Â Â private Blob file; > >>>> > >>>> Caused by: javax.jdo.JDOFatalUserException: StreamCorruptedException: > >>>> object is corrupted > >>>> NestedThrowables: > >>>> java.io.StreamCorruptedException: invalid stream header: 47657370 > >>>> Â Â Â at > >>>> > >>> > org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:606) > >>>> Â Â Â at > >>>> > >>> > org.datanucleus.api.jdo.JDOAdapter.getApiExceptionForNucleusException(JDOAdapter.java:677) > >>>> Â Â Â at > >>>> > >>> > org.datanucleus.state.StateManagerImpl.isLoaded(StateManagerImpl.java:2929) > >>>> Â Â Â at nl.pocos.dom.doclib.Document.dnGetfile(Document.java) > >>>> Â Â Â at nl.pocos.dom.doclib.Document.getFile(Document.java:86) > >>>> > >>>> I've changed the sqlType to "LONGVARBINARY" but this didn't help. I > >>>> can't reproduce this issue in the quickstart app. Was there any change > >>>> in Datanucleus version? Will have another look at the change logs. > >>>> > >>>> Anyone having an idea? > >>>> > >>>> Thanks, > >>>> Erik > >>>> > >> > >
