P
Philip Reimer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all.
I'm trying to deploy a little ejb3 example application on JBoss 4.0.4 in
combination with MySql 5.0.22. In one of the entities I have a primary
key consisting of two fields, the first one is an Integer, the second
one is an Object. I've defined a key class for this compound primary key
and when I change the type of the second primary key field to String,
everything works fine, but when I leave it as an Object the creation of
the according table fails with the error message:
"BLOB/TEXT column 'windowId' used in key specification without a key length"
I found some hints on the internet that mysql requires the user to
define some kind of length for a blob that's used as a primary key, but
I'm not sure how to specify this in my source code. Didn't find any
annotation that seemed fitting. Maybe that's not even possible because
the problem lies within the object-relational mapping functionality.
Furthermore, when using the built-in hypersonic database, the
application deploys just fine in both cases (String and Object).
So, if anyone could point me in the right direction on how to solve this...
Thanks,
Philip
PS: I, of course, tried google and the jboss forums before posting here,
but to no success. Seems as if there are not many people using blobs
with ejbs, and even less using them as primary keys. Maybe it was a bad
idea in the first place?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
iD8DBQFEpBJ/OnXHmEVwvcQRAgHtAJ92u6QpPuiJsL0Sc/8tzqfUeXuOrACgkqS7
vkkLoJX0ztsorLReUHxflAE=
=hcMR
-----END PGP SIGNATURE-----
Hash: SHA1
Hello all.
I'm trying to deploy a little ejb3 example application on JBoss 4.0.4 in
combination with MySql 5.0.22. In one of the entities I have a primary
key consisting of two fields, the first one is an Integer, the second
one is an Object. I've defined a key class for this compound primary key
and when I change the type of the second primary key field to String,
everything works fine, but when I leave it as an Object the creation of
the according table fails with the error message:
"BLOB/TEXT column 'windowId' used in key specification without a key length"
I found some hints on the internet that mysql requires the user to
define some kind of length for a blob that's used as a primary key, but
I'm not sure how to specify this in my source code. Didn't find any
annotation that seemed fitting. Maybe that's not even possible because
the problem lies within the object-relational mapping functionality.
Furthermore, when using the built-in hypersonic database, the
application deploys just fine in both cases (String and Object).
So, if anyone could point me in the right direction on how to solve this...
Thanks,
Philip
PS: I, of course, tried google and the jboss forums before posting here,
but to no success. Seems as if there are not many people using blobs
with ejbs, and even less using them as primary keys. Maybe it was a bad
idea in the first place?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
iD8DBQFEpBJ/OnXHmEVwvcQRAgHtAJ92u6QpPuiJsL0Sc/8tzqfUeXuOrACgkqS7
vkkLoJX0ztsorLReUHxflAE=
=hcMR
-----END PGP SIGNATURE-----