-->
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.  [ 2 posts ] 
Author Message
 Post subject: Blob Oracle10g OC4J (Oracle)
PostPosted: Tue Jun 07, 2005 5:06 am 
Newbie

Joined: Tue Jun 07, 2005 4:14 am
Posts: 3
Hibernate version: 2.1.8

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
Oracle 9i


Bonjour,

Je devellope sous JDEV 10.012
j'ai une application struts/Hibernate
J'upload un fichier que je stock en BD

Code:
org.apache.struts.upload.FormFile file = (org.apache.struts.upload.FormFile) params.get("data");

         NewsFile obj = new  NewsFile();

         obj.setData(Hibernate.createBlob(file.getFileData()));
         
         obj.setFileSize(file.getFileSize());
         obj.setName(file.getFileName(););
         obj.setStatDownload(new Integer(0));

         session.save(obj);


Rien que du classic

Je teste et ca marche

Je fait mon petit war et je le livre sous IAS

je teste et

Erreur durant la creation "net.sf.hibernate.exception.GenericJDBCException: could not insert: [bdd.util.NewsFile#23]
at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)
at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at bdd.util.dao.NewsFileDAO.add(NewsFileDAO.java:69)


Je ne comprend pas car Jdev et IAS fonctionne avec des OC4J tous les 2,
Rien ne change le hibernate cfg est identique

j'ai essaye en modifiant les params de config

<property name="dialect">net.sf.hibernate.dialect.OracleDialect>/property>
et Oracle9Dialect


<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>


si qqun a une idée ??


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 2:41 am 
Regular
Regular

Joined: Tue May 03, 2005 8:19 am
Posts: 53
Location: Paris
Que dit la JDBC exception qui remonte :
Code:
net.sf.hibernate.exception.GenericJDBCException: could not insert: [bdd.util.NewsFile#23]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.