[EJB 3.0] - Problem with @Lob annotation and MySql
by tcomtcom
Hi,
I want to persit a photo of a person in my database. In order to do that, I'am using the code below:
| @Entity
| @Table(name="PERSONNE")
| @Inheritance(strategy=InheritanceType.JOINED)
| public class Personne implements Serializable{
|
| private ImageIcon photo;
| ...
|
| @Lob
| @Basic(fetch=FetchType.LAZY,optional=true)
| @Column(name="PHOTO")
| public ImageIcon getPhoto() {return photo;}
| public void setPhoto(ImageIcon photo) {this.photo = photo;}
| ...
| }
|
When I persist the entity, it's Ok but when I'am trying to extract it form the DB I got an EOFException.
@Lob make the attibute photo mapped as a blob but Blob type in MySQL seems to not support more than 64kB of data. In most of case my photos have a bigger size than 64KB and they are simply truncated.
To resolve the problem, I changed the type directly in the DB into LongBlob and now it is working fine.
So, my question is : Is there a way to have my attribute directly mapped as a LongBlob?
Thanks in advance
System informations:
jboss 4.0.4.GA
EJB RC8
MySQL 4.1.9 and connector 3.1.14
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987905#3987905
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987905
19Â years, 5Â months
[Installation, Configuration & Deployment] - JBossAS 4.0.5-GA dependency libraries version info release n
by c.vidal
Hi guys,
could you please point me to a place where I could find a listing of all JBoss 4.0.5-GA dependencies and especially their versions ?
More generally, this information would be very helpfull for all JBoss releases. For most jars, neither the filename nor the MANIFEST indicates version info. Most jars have no version info in the filename. I know this is avoided on purpose which is fine with me but the problem is that for most jars even their MANIFEST version headers are forged.
Sometimes, it is the right original version with an additionnal JBoss information:
Manifest-Version: 1.0
| Specification-Title: Commons Logging
| Created-By: 1.4.2_09-b05 (Sun Microsystems Inc.)
| Ant-Version: Apache Ant 1.6.5
| Implementation-Title: JBoss commons logging patch
| Specification-Vendor: Apache Software Foundation
| Specification-Version: 1.0
| Implementation-Vendor-Id: http://www.jboss.org/
| Implementation-Version: 1.0.5.GA-jboss
| Implementation-Vendor: JBoss Inc.
| Implementation-URL: http://www.jboss.org/
|
| Name: org.apache.commons.logging
| Specification-Version: 1.0
| Specification-Vendor: Apache Software Foundation
| Implementation-Version: 1.0.5.GA-jboss
| Implementation-Vendor: JBoss Inc.
This is fine with me because you can guess the original version of the dependency, here it seems to be commons-logging-1.0.5, but most of the time, the version header is equal to the version of the JBoss release which leaves me in the dark:
Manifest-Version: 1.0
| Specification-Title: JBoss
| JarJarStringTransformer: com.tonicsystems.jarjar.GeneratedStringTransf
| ormer
| Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.)
| Ant-Version: Apache Ant 1.6.2
| Implementation-Title: JBoss [Zion]
| Specification-Vendor: JBoss (http://www.jboss.org/)
| Specification-Version: 4.0.5.GA
| Implementation-Vendor-Id: http://www.jboss.org/
| Implementation-Version: 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610
| 162339)
| Implementation-Vendor: JBoss Inc.
| Implementation-URL: http://www.jboss.org/
The previous MANIFEST was extracted from 4.0.5.GA/server/ejb3/lib/cglib.jar, this is absolutely not clear in the MANIFEST.
Thanx for your time,
Regards,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987900#3987900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987900
19Â years, 5Â months