Hello, I'm using tapestry-hibernate in my project. I was recently asked to
store file uploads in the database. Sybase only offers the datatype image
and tapestry-hibernate doesn't seem to offer that as an option. 

I've tried 


    @Lob
    private byte[]fileContent;

    public byte[] getFileContent() {
        return fileContent;
    }

    public void setFileContent(byte[] fileContent) {
        this.fileContent = fileContent;
    }

which allows me to insert the byte data into the table, but gives me the
following exception when trying to retrieve it. 

ioc.Registry The method com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String)
is not supported and should not be called. ioc.Registry Operations trace:
ioc.Registry [ 1] Triggering event 'activate' on Purchase_Request
TapestryModule.RequestExceptionHandler Processing of request failed with
uncaught exception: The method
com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String) is not supported and
should not be called. org.apache.tapestry5.ioc.internal.OperationException:
The method com.sybase.jdbc3.jdbc.SybResultSet.getBlob(String) is not
supported and should not be called.

I've tried this guys solution without success
http://stackoverflow.com/questions/9049488/retrieve-image-from-blob-via-hibernate-not-jdbc

I also found this jira issue 
https://issues.jboss.org/browse/JBPAPP-2867

Laura claims the "The workaround for this issue is to create user-defined
types that map to the Sybase text and image types."


I know this isn't entirely related to Tapestry, but was hoping someone in
our community may have ran into this issue and managed to come up with a
solution. 

Thanks

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-Sybase-image-data-type-tp5639008p5639008.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to