These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Problem receiving Mediumblob object from mySql database
PostPosted: Thu Jan 18, 2007 6:42 pm 
Newbie

Joined: Sun Jan 07, 2007 11:20 am
Posts: 4
Hi I have a problem, receiving an Mediumblob object from mySql database.

In my domain object:
@Lob
private byte[] file;

In my stacktrace when I try to load an object through my dao object:

java.lang.ExceptionInInitializerError
at se.tripled.cms.util.HibernateUtil.<clinit>(HibernateUtil.java:33)
at se.tripled.cms.data.dao.FileDao.<init>(FileDao.java:13)
at se.tripled.cms.servlet.ImageServlet.doGet(ImageServlet.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.HibernateException: Wrong column type: file, expected: blob
at org.hibernate.mapping.Table.validateColumns(Table.java:261)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1080)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
at se.tripled.cms.util.HibernateUtil.<clinit>(HibernateUtil.java:28)
... 18 more

How should I get the object?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 20, 2007 11:16 am 
Newbie

Joined: Sun Jan 07, 2007 11:20 am
Posts: 4
Isn´t there anyone who can help me with this question, it must be a common problem?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 5:50 pm 
Newbie

Joined: Sun Jan 07, 2007 11:20 am
Posts: 4
I am sorry for sending this thread back to the top, but isn´t it anyone out there that has had the same problem as me before? It sounds like it would be a quite common problem for users...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.