Hi Birgit,
thanks for reporting this issue.

Yes, you are right that in ISIS-714 changes were made here.  Previously we
were (wrongly) storing Blobs as a serialized Java object.  As of 1.5 I used
the IsisBlobMapping to explicitly map the three fields of an Isis blob (or
clob), specifically its name, attachment and the byte[] array itself.

Clearly the mapping in the quickstart app isn't quite generic enough for
this to work on all databases.

I'm hoping the fix will be a slightly adjusted JDO mappings for different
databases.

Let me look into it and get back to you.

Thanks again

Dan





On 16 June 2014 16:35, <[email protected]> wrote:

> Hi,
>
> I tried to use isis 1.5. instead of 1.4 in our app and ran into some
> exceptions because of blobs (we use postgresql 9). Then I tried it with a
> fresh ToDoApp and the same thing happened. I removed the comments from the
> lines for PostgreSQL Server in persistor.properties, commented out the
> lines for HSQLDB and created an empty db named isis. Running the
> ToDoApp-PROTOTYPE-with-fixtures.launch first logs two warnings:
>
> [Schema main WARN ]  Attempt to find JDBC driver 'typeInfo' for
> jdbc-type=BLOB but sql-type=BLOB is not found. Using default sql-type for
> this jdbc-type.
> [Schema main WARN ]  Attempt to find JDBC driver 'typeInfo' for
> jdbc-type=CLOB but sql-type=CLOB is not found. Using default sql-type for
> this jdbc-type
>
> and then the exception
>
> [FixturesInstallerDelegate main ERROR]  installing fixture
> fixture.todo.scenarios.RecreateToDoItemsForSven failed; aborting
> javax.jdo.JDODataStoreException: Insert of object
> "dom.todo.ToDoItem@367a1d62" using statement "INSERT INTO "ToDoItem"
> ("ownedBy","notes","cost","complete","subcategory","description","doc_name","doc_mimetype","doc_chars","category","attachment_name","attachment_mimetype","attachment_bytes","dueBy","version")
> VALUES
> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" failed : FEHLER: Spalte
> »attachment_bytes« hat Typ bytea, aber der Ausdruck hat Typ oid
>   Hinweis: Sie müssen den Ausdruck umschreiben oder eine Typumwandlung
> vornehmen.
>   Position: 263
>         at
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:732)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
>         at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
> .......
> Caused by: org.postgresql.util.PSQLException: FEHLER: Spalte
> »attachment_bytes« hat Typ bytea, aber der Ausdruck hat Typ oid
>   Hinweis: Sie müssen den Ausdruck umschreiben oder eine Typumwandlung
> vornehmen.
>   Position: 263
>         at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
> .....
>
> The error message translates to
> "ERROR: Column "attachment_bytes" is of type bytea but expression is of
> type oid.
>
> I read something about a fixed blob/clob mapping (ISIS-714) on the blog.
> Is this exception a datanucleus issue?
> Right now I have no idea how to fix this other than using isis 1.4.
>
> Cheers,
> Birgit
>
>

Reply via email to