You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
(157) |
Mar
(111) |
Apr
(61) |
May
(68) |
Jun
(45) |
Jul
(101) |
Aug
(132) |
Sep
(148) |
Oct
(227) |
Nov
(141) |
Dec
(285) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(518) |
Feb
(462) |
Mar
(390) |
Apr
(488) |
May
(321) |
Jun
(336) |
Jul
(268) |
Aug
(374) |
Sep
(211) |
Oct
(246) |
Nov
(239) |
Dec
(173) |
2004 |
Jan
(110) |
Feb
(131) |
Mar
(85) |
Apr
(120) |
May
(82) |
Jun
(101) |
Jul
(54) |
Aug
(65) |
Sep
(94) |
Oct
(51) |
Nov
(56) |
Dec
(168) |
2005 |
Jan
(146) |
Feb
(98) |
Mar
(75) |
Apr
(118) |
May
(85) |
Jun
(75) |
Jul
(44) |
Aug
(94) |
Sep
(70) |
Oct
(84) |
Nov
(115) |
Dec
(52) |
2006 |
Jan
(113) |
Feb
(83) |
Mar
(217) |
Apr
(158) |
May
(219) |
Jun
(218) |
Jul
(189) |
Aug
(39) |
Sep
(3) |
Oct
(7) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
(8) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(7) |
Dec
|
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christian B. <chr...@bl...> - 2002-12-19 09:03:18
|
On 19 Dec (00:57), Mark Woon wrote: > >How do you 'setparent/setchild on both ends'? Is guidance on this in > >some documentation that I missed? > > Check out http://www.xylax.net/hibernate/. Tom has pulled together some > pretty useful examples and they also have notes on bi-directional > associations. It is also an item in the FAQ. -- Christian Bauer tu...@in... |
From: Mark W. <mor...@SM...> - 2002-12-19 08:57:19
|
Jim Downing wrote: >Sorry for taking a tangent here but after spending a day trying to >figure out what SessionImpl was doing and to work out why my >bi-directional associations didn't work I conceded defeat and moved to >a unidirectional model. > >How do you 'setparent/setchild on both ends'? Is guidance on this in >some documentation that I missed? > > Check out http://www.xylax.net/hibernate/. Tom has pulled together some pretty useful examples and they also have notes on bi-directional associations. -Mark |
From: Jim D. <jim...@po...> - 2002-12-19 08:12:37
|
Sorry for taking a tangent here but after spending a day trying to figure out what SessionImpl was doing and to work out why my bi-directional associations didn't work I conceded defeat and moved to a unidirectional model. How do you 'setparent/setchild on both ends'? Is guidance on this in some documentation that I missed? Thanks, jim jim...@po... On Wed, Dec 18, 2002 at 02:45:46PM +0100, Christian Bauer wrote: > On 18 Dec (20:49), Gavin King wrote: > Using a Hibernate Session is straightforward if you don't use toplevel > collections, the only thing to keep in mind is handling bidirectional > associations with setparent/setchild on both ends. |
From: Gavin K. <Gav...@ex...> - 2002-12-18 22:44:25
|
Woops, no, I didn't realise this.... (recent functionality, btw)=20 would you submit a bug report and / or patch please. TIA. > -----Original Message----- > From: Ugo Cei [mailto:u....@cb...]=20 > Sent: Thursday, 19 December 2002 2:41 AM > To: hib...@li... > Subject: [Hibernate] Missing semicolons in generated schema file >=20 >=20 > Hope this is not a FAQ. I looked around but couldn't find=20 > anything about=20 > it, so here I go. >=20 > I'm using Hibernate 1.2 and I'm trying to generate a DDL schema for=20 > Oracle from my classes. I'm using the following command-line=20 > arguments: >=20 > -Dhibernate.dialect=3Dcirrus.hibernate.sql.OracleDialect --text=20 > --output=3Dhib-Oracle.sql --quiet --format --delimiter=3D';' >=20 > What happens is that the generated script has the necessary=20 > semicolons=20 > at the end of "create" statements, but they are completely=20 > missing from=20 > the end of "drop" statements. >=20 > Is this a known bug? >=20 > Thanks in Advance, >=20 > Ugo >=20 > --=20 > Ugo Cei - http://www.beblogging.com/blog/ >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility=20 > Learn to use your power at OSDN's High Performance Computing=20 > Channel http://hpc.devchannel.org/=20 > _______________________________________________ > hibernate-devel mailing list hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel >=20 ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: <phr...@im...> - 2002-12-18 18:24:08
|
hi, it seems to be some sort of class-loading issue - the PrimaryKey class that the generator returns, and the one that the bean uses seems to have been loaded by a different classloader, so even though they are the same class, they are not compatible. have someone encountered the same issue? is there a way i can make hibernate use the same classloader? best regards, viktor On Tue, 17 Dec 2002 09:24:23 +1100, "Gavin King" <Gav...@ex...> said: > Why don't you try stepping through code. Put a break point in > > AbstractEntityPersister.setIdentifier() > > and see exactly what class of object is passed in. (This should > definately all work as advertised.) > > > > > > > cirrus.hibernate.PropertyAccessException: IllegalArgumentException > > > occurred while calling setter of test.hibernate.Foo.pk at > > > cirrus.hibernate.helpers.ReflectHelper.set(ReflectHelper.java:190) > > > at > > > > > cirrus.hibernate.persister.AbstractEntityPersister.setIdentifier(Abstr > > > actEntityPersister.java:281) > > > at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:528) > > > at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:483) > > > at > > cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:919) > > > at > > > > > test.hibernate.ejb.HibTestSessionBean.saveFoo(HibTestSessionBe > > an.java:53) > > > > -- phr...@im... -- http://fastmail.fm - Consolidate POP email and Hotmail in one place |
From: Ugo C. <u....@cb...> - 2002-12-18 15:40:30
|
Hope this is not a FAQ. I looked around but couldn't find anything about it, so here I go. I'm using Hibernate 1.2 and I'm trying to generate a DDL schema for Oracle from my classes. I'm using the following command-line arguments: -Dhibernate.dialect=cirrus.hibernate.sql.OracleDialect --text --output=hib-Oracle.sql --quiet --format --delimiter=';' What happens is that the generated script has the necessary semicolons at the end of "create" statements, but they are completely missing from the end of "drop" statements. Is this a known bug? Thanks in Advance, Ugo -- Ugo Cei - http://www.beblogging.com/blog/ |
From: Christian B. <chr...@bl...> - 2002-12-18 13:46:53
|
On 18 Dec (20:49), Gavin King wrote: > So: Do people USE this feature?? Have people really actually found uses > for this stuff, or is it actually just making Hibernate harder to > understand > for the first time? Even if it has been useful, is perhaps *still* > undesirable, > because of concerns about data integrity? Perhaps we simply shouldn't > be encouraging this kind of relational model..... I tried once to use toplevel collections, because I had a "collection of collections" and the collection could be referenced by two different classes. The mapping wasn't hard to understand, but the restrictions on the load/delete/update killed them for me. Using a Hibernate Session is straightforward if you don't use toplevel collections, the only thing to keep in mind is handling bidirectional associations with setparent/setchild on both ends. Toplevel collections add a lot more overhead to this handling routines, which is what kept me from using it. As soon as I realized that, I stopped even thinking about using a toplevel collection and change my models accordingly. I bet a lot of people are doing the same, the benefits of toplevel collections would be nice, but dealing with them is not. My point is: For every aspect thats on your "plus" side for toplevel collections, find a different way of implementing it without a toplevel collection, then compare the effort for both methods and decide wether this justifies an additional idiom (tl collections) in Hibernate or not. Data Integrity: I'm not a DB newbie, so I noticed the missing foreign key on first sight. But this is just the implementation of toplevel collections, which could be changed if the idiom itself is worth it. -- Christian Bauer tu...@in... |
From: Konstantin P. <kpr...@ya...> - 2002-12-18 10:47:55
|
Hi all, Documentation about "many to one" relation is a bit confusing. Suppose I have relation between customer & address: there is collection of addresses ( and I did not mastered yet to map it via xdoclet :) ), primaryAddress & billingAddress ( one of the defined adresses ) - so basically I have relation one-to-many for customer->address, but one-to-[one or zero] on primary & billing addresses. But I have to use @hibernate.one-to-many tag ( or one-to -many mapping element ) Isn't it a bit confusing? Or is there better way to do this? regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Laurent F. <lfl...@co...> - 2002-12-18 10:42:44
|
I have 2 classes : the first contains one Object of second class. When I generate the mapping xml with MapGenerator, MapGenerator creates the mapping in which the first class contains an element <component> on the second. but, I would like MapGenerator generates an element <many-to-one> instead of <component>. How I can make it? thanks Laurent |
From: Gavin K. <Gav...@ex...> - 2002-12-18 09:50:00
|
I'm (again) considering deprecating toplevel collections and subcollections=20 in Hibernate 2.0. I was never completely happy with this feature after I implemented it, but it had taken so much effort to get it to work that I left it in. The case against toplevel collections is: * the relational model is broken - there is no foreign key constraint from=20 collection element row to the owning row * subcollections complicate code in SessionImpl _significantly_ The case for keeping them is: * they let you persist a Java "collection of collections" * they let you have a single table / collection mapping that can be used by=20 different owning classes * instances of a toplevel collection can be passed between different owners=20 (even between owners of a different class, potentially) without needing to=20 remove and recreate the collection rows * they currently work and I havn't needed to touch the complicated code for=20 a long time now So: Do people USE this feature?? Have people really actually found uses=20 for this stuff, or is it actually just making Hibernate harder to understand=20 for the first time? Even if it has been useful, is perhaps *still* undesirable,=20 because of concerns about data integrity? Perhaps we simply shouldn't=20 be encouraging this kind of relational model..... I need advice on this. Gavin ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: Thomas Q. <tq...@ya...> - 2002-12-18 05:46:47
|
Done. Gavin King wrote: > Yes, please do that. I can't always integrate patches > right away..... -- thomas quas | "The truth indeed has never been preached by the Buddha, tq...@ya... | seeing that one has to realize it within oneself." | -- Lamkara Sutra -- |
From: Gavin K. <Gav...@ex...> - 2002-12-17 23:52:12
|
Yes, please do that. I can't always integrate patches right away..... > -----Original Message----- > From: Konstantin Priblouda [mailto:kpr...@ya...]=20 > Sent: Wednesday, 18 December 2002 5:29 AM > To: Thomas Quas > Cc: hibernate-devel > Subject: Re: [Hibernate] SchemaExport Tool & Mappings in Jar >=20 >=20 >=20 > --- Thomas Quas <tq...@ya...> wrote: > >=20 > > Hi, > >=20 > > does anybody care to apply the attached patch to > > cirrus.hibernate.tools.SchemaExport? I extended the > > code to accept a JAR=20 > > file containing the mappings. >=20 > I think that best solution would be toopen enhancement > report in SF and upload your patch there... > Or it will be lost in list... >=20 > regards, >=20 > =3D=3D=3D=3D=3D > Konstantin Priblouda ( ko5tik ) Freelance Software developer > < http://www.pribluda.de > < play java games ->=20 http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility=20 Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: Konstantin P. <kpr...@ya...> - 2002-12-17 18:29:12
|
--- Thomas Quas <tq...@ya...> wrote: > > Hi, > > does anybody care to apply the attached patch to > cirrus.hibernate.tools.SchemaExport? I extended the > code to accept a JAR > file containing the mappings. I think that best solution would be toopen enhancement report in SF and upload your patch there... Or it will be lost in list... regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Thomas Q. <tq...@ya...> - 2002-12-17 18:19:35
|
Hi, does anybody care to apply the attached patch to cirrus.hibernate.tools.SchemaExport? I extended the code to accept a JAR file containing the mappings. Thanks, tom -- thomas quas | "The truth indeed has never been preached by the Buddha, tq...@ya... | seeing that one has to realize it within oneself." | -- Lamkara Sutra -- |
From: Konstantin P. <kpr...@ya...> - 2002-12-17 16:54:04
|
Hi all, I'm continuing on development of xdoclet/jboss/hibernate example. However, current xtags.xml for hibernate module is incomplete and I need some feedback from you. Collection issues: 1. one-to-many / many-to-many - are they possible only for List/Map/Set or other collection typed fields? (IMHO, only for collection types) - "class" parameter must be mandatory. XDoclet has no way to resolve it. ... more to follow ... regards, __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Konstantin P. <kpr...@ya...> - 2002-12-17 14:20:21
|
--- Matt Raible <ma...@ra...> wrote: > I'm using the following ant task to accomplish this: thanks. ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Matt R. <ma...@ra...> - 2002-12-17 14:09:56
|
I'm using the following ant task to accomplish this: <fileset id="hibernate.mapping.files" dir="${build.dir}/ejb/gen"> <include name="**/*.hbm.xml" /> </fileset> <!-- =================================================================== --> <!-- The "initdb" target generates the database schema and creates --> <!-- tables based on the mapping files --> <!-- =================================================================== --> <target name="initdb" depends="clean,package-ejb" description="creates database tables"> <pathconvert refid="hibernate.mapping.files" property="hibernate.mappings" pathsep=" "/> <java classname="cirrus.hibernate.tools.SchemaExport" fork="true"> <arg line="${hibernate.mappings}"/> <jvmarg value="-Dhibernate.dialect=${hibernate.dialect}"/> <jvmarg value="-Dhibernate.connection.driver_class=${hibernate.connection.driver _class}"/> <jvmarg value="-Dhibernate.connection.url=${hibernate.connection.url}"/> <jvmarg value="-Dhibernate.connection.username=${hibernate.connection.username}" /> <jvmarg value="-Dhibernate.connection.password=${hibernate.connection.password}" /> <classpath refid="xdoclet.classpath" /> <classpath refid="hibernate.classpath" /> </java> </target> HTH, Matt > -----Original Message----- > From: hib...@li... > [mailto:hib...@li...] On > Behalf Of Konstantin Priblouda > Sent: Tuesday, December 17, 2002 6:49 AM > To: hibernate-devel > Subject: [Hibernate] ant subtask for schema generation? > > > Hi all, > current toolset is not very convenient. > Only .bat scripts, and they require > customisations to be usable. > > what about ant task to generate DB schema? > Is there already one? > > regards, > > ===== > Konstantin Priblouda ( ko5tik ) Freelance Software developer > < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Christian B. <chr...@bl...> - 2002-12-17 14:07:02
|
On 17 Dec (05:49), Konstantin Priblouda wrote: > current toolset is not very convenient. > Only .bat scripts, and they require > customisations to be usable. > > what about ant task to generate DB schema? > Is there already one? There is. Read the FAQ. -- Christian Bauer tu...@in... |
From: Konstantin P. <kpr...@ya...> - 2002-12-17 13:49:03
|
Hi all, current toolset is not very convenient. Only .bat scripts, and they require customisations to be usable. what about ant task to generate DB schema? Is there already one? regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Gavin K. <Gav...@ex...> - 2002-12-16 22:32:31
|
You havn't really given enough info here (the problem certainly does *not* occur with "any settings in hibernate.properties"), but I will assume that you are using a Datasource (since otherwise Hibernate would set autocommit to false by itself). So the trick is to set up your JBoss datasource to return connections with autocommit false. This is certainly doable since most people have no=20 problems using Hibernate with JBoss, but I'm not sure of the details since I'm a WebSphere user myself. =20 These kind of questions should really be directed to the user forum, where there will be other JBoss users who can assist you. =20 Gavin -----Original Message----- From: vy...@qu... [mailto:vy...@qu...]=20 Sent: Monday, 16 December 2002 9:30 PM To: hib...@li... Subject: [Hibernate] Postgres/JBoss/Hibernate problem =09 =09 =20 I am using JBoss 3.2.0-beta-2, Postgres 7.2 and JDK 1.3.1 as=20 well as hibernate 1.2.=20 I am having difficulty committing any changes that I make because I get=20 error message saying: "java.sql.SQLException: You cannot commit with autocommit set!"=20 =09 bit of code:=20 =09 [java]=20 Context ctx =3D new InitialContext();=20 SessionFactory sessions =3D (SessionFactory)ctx.lookup("java:/HibernateFactory");=20 Session sess =3D sessions.openSession();=20 =09 Vertex v =3D new Vertex();=20 v.setName( "SomeName" );=20 sess.save(v);=20 =09 sess.close();=20 [/java]=20 =09 This problem occurs with any settings in hibernate.properties=20 =09 What needs for correct work without exeption.=20 =09 Regards, AAP =20 ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: Gavin K. <Gav...@ex...> - 2002-12-16 22:24:35
|
Why don't you try stepping through code. Put a break point in=20 AbstractEntityPersister.setIdentifier() and see exactly what class of object is passed in. (This should definately all work as advertised.) > -----Original Message----- > From: phr...@im... [mailto:phr...@im...]=20 > Sent: Tuesday, 17 December 2002 7:14 AM > To: hib...@li... > Subject: RE: [Hibernate] custom identifier class >=20 >=20 > hi, >=20 > excuse my arrogance for re-posting this, but i haven't found=20 > a solution for the problem described below: >=20 > On Tue, 10 Dec 2002 12:34:56 -0500, phr...@im... said: > > hi, > >=20 > > On Tue, 10 Dec 2002 10:34:30 +1100, "Gavin King"=20 > > <Gav...@ex...> > > said: > > > Oh, so it isn't actually a composite key. I didn't understand=20 > > > properly then. Well, using a UserType is exactly the=20 > right approach.=20 > > > You would also need to implement IdentifierGenerator to generate=20 > > > instances of PrimaryKey (your implementation could just wrap up a=20 > > > built-in key generation strategy). This should work out=20 > perfectly -=20 > > > if you have any more problems let me know. > > >=20 > > > The mapping would be: > > >=20 > > > <id name=3D"key" type=3D"my.pkg.PrimaryKeyType"> > > > <generator class=3D"my.pkg.PrimaryKeyGenerator"/> > > > </id> > >=20 > > i created my own PK generator, but i'm still getting the same=20 > > exception i had before: > >=20 > > cirrus.hibernate.PropertyAccessException: IllegalArgumentException=20 > > occurred while calling setter of test.hibernate.Foo.pk at=20 > > cirrus.hibernate.helpers.ReflectHelper.set(ReflectHelper.java:190) > > at > >=20 > cirrus.hibernate.persister.AbstractEntityPersister.setIdentifier(Abstr > > actEntityPersister.java:281) > > at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:528) > > at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:483) > > at=20 > cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:919) > > at > >=20 > test.hibernate.ejb.HibTestSessionBean.saveFoo(HibTestSessionBe > an.java:53) > >=20 > > from Foo.hbm.xml: > >=20 > > <id type=3D"test.hibernate.MyPrimaryKeyType" name=3D"pk" column=3D"id"= > > length=3D"16" unsaved-value=3D"null"> > > <generator class=3D"test.hibernate.MySequencePKGenerator"> > > <param>MY_SEQ</param> > > </generator> > > </id> > >=20 > > Foo.java has: > >=20 > > public PrimaryKey getPk() > > public void setPk(PrimaryKey pk) > > (i tried adding setPk(Long), setPk(String), setPK(long) -=20 > that didnt > > chg the exception at all) > >=20 > >=20 > > My pk generator extends SequenceGenerator, and overrides=20 > one method as > > follows: > >=20 > > public Serializable generate(SessionImplementor session,=20 > Object obj) > > throws SQLException, HibernateException { > > return new PrimaryKey(=20 > String.valueOf(super.generate(session, obj)) ); > > } > >=20 > >=20 > > the implementation of my UserType is as follows: > >=20 > > private static final int[] TYPES =3D { Types.VARCHAR }; > >=20 > > public int[] sqlTypes() { > > return TYPES;=20 > > } > >=20 > > public Class returnedClass() { > > return PrimaryKey.class; > > } > >=20 > > public boolean equals(Object x, Object y) { > > if (x=3D=3Dy) return true; > > if (x=3D=3Dnull || y=3D=3Dnull) return false; > > return x.equals(y); > > } > >=20 > > public Object nullSafeGet(ResultSet rs, String[] names,=20 > Object owner) > > throws HibernateException, SQLException { > > String id =3D (String) Hibernate.STRING.nullSafeGet(rs, names[0]); > > return id=3D=3Dnull ? null : new PrimaryKey(id); > > } > >=20 > > public void nullSafeSet(PreparedStatement st, Object=20 > value, int index) > > throws HibernateException, SQLException { > > String id =3D (value=3D=3Dnull) ? null : ((PrimaryKey)value).getId(); > > Hibernate.STRING.nullSafeSet(st, id, index); > > } > >=20 > > public Object deepCopy(Object o) { > > if (o=3D=3Dnull) return null; > > return new PrimaryKey( (PrimaryKey)o ); > > } > >=20 > > public boolean isMutable() { > > return false; > > } > >=20 > >=20 > > any help would be appreciated :) > >=20 > > viktor > > -- > > =20 > > phr...@im... > >=20 > > -- > > http://fastmail.fm - Does exactly what it says on the tin > --=20 > =20 > phr...@im... >=20 > --=20 > http://fastmail.fm - Does exactly what it says on the tin >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility=20 > Learn to use your power at OSDN's High Performance Computing=20 > Channel http://hpc.devchannel.org/=20 > _______________________________________________ > hibernate-devel mailing list hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel >=20 ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: <phr...@im...> - 2002-12-16 20:14:05
|
hi, excuse my arrogance for re-posting this, but i haven't found a solution for the problem described below: On Tue, 10 Dec 2002 12:34:56 -0500, phr...@im... said: > hi, > > On Tue, 10 Dec 2002 10:34:30 +1100, "Gavin King" <Gav...@ex...> > said: > > Oh, so it isn't actually a composite key. I didn't understand > > properly then. Well, using a UserType is exactly the right > > approach. You would also need to implement IdentifierGenerator > > to generate instances of PrimaryKey (your implementation could > > just wrap up a built-in key generation strategy). This should > > work out perfectly - if you have any more problems let me know. > > > > The mapping would be: > > > > <id name="key" type="my.pkg.PrimaryKeyType"> > > <generator class="my.pkg.PrimaryKeyGenerator"/> > > </id> > > i created my own PK generator, but i'm still getting the same exception i > had before: > > cirrus.hibernate.PropertyAccessException: IllegalArgumentException > occurred while calling setter of test.hibernate.Foo.pk > at cirrus.hibernate.helpers.ReflectHelper.set(ReflectHelper.java:190) > at > cirrus.hibernate.persister.AbstractEntityPersister.setIdentifier(AbstractEntityPersister.java:281) > at cirrus.hibernate.impl.SessionImpl.doSave(SessionImpl.java:528) > at cirrus.hibernate.impl.SessionImpl.save(SessionImpl.java:483) > at cirrus.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:919) > at > test.hibernate.ejb.HibTestSessionBean.saveFoo(HibTestSessionBean.java:53) > > from Foo.hbm.xml: > > <id type="test.hibernate.MyPrimaryKeyType" name="pk" column="id" > length="16" unsaved-value="null"> > <generator class="test.hibernate.MySequencePKGenerator"> > <param>MY_SEQ</param> > </generator> > </id> > > Foo.java has: > > public PrimaryKey getPk() > public void setPk(PrimaryKey pk) > (i tried adding setPk(Long), setPk(String), setPK(long) - that didnt > chg the exception at all) > > > My pk generator extends SequenceGenerator, and overrides one method as > follows: > > public Serializable generate(SessionImplementor session, Object obj) > throws SQLException, HibernateException { > return new PrimaryKey( String.valueOf(super.generate(session, obj)) ); > } > > > the implementation of my UserType is as follows: > > private static final int[] TYPES = { Types.VARCHAR }; > > public int[] sqlTypes() { > return TYPES; > } > > public Class returnedClass() { > return PrimaryKey.class; > } > > public boolean equals(Object x, Object y) { > if (x==y) return true; > if (x==null || y==null) return false; > return x.equals(y); > } > > public Object nullSafeGet(ResultSet rs, String[] names, Object owner) > throws HibernateException, SQLException { > String id = (String) Hibernate.STRING.nullSafeGet(rs, names[0]); > return id==null ? null : new PrimaryKey(id); > } > > public void nullSafeSet(PreparedStatement st, Object value, int index) > throws HibernateException, SQLException { > String id = (value==null) ? null : ((PrimaryKey)value).getId(); > Hibernate.STRING.nullSafeSet(st, id, index); > } > > public Object deepCopy(Object o) { > if (o==null) return null; > return new PrimaryKey( (PrimaryKey)o ); > } > > public boolean isMutable() { > return false; > } > > > any help would be appreciated :) > > viktor > -- > > phr...@im... > > -- > http://fastmail.fm - Does exactly what it says on the tin -- phr...@im... -- http://fastmail.fm - Does exactly what it says on the tin |
From: Pietro P. <de...@op...> - 2002-12-16 13:30:05
|
hi, I see that part of the previous post was cut, so I repost the last part (if I should post differently, maybe directly to Gavin let me know) : 13:17:18,667 DEBUG JDBCExceptionReporter:33 - SQL Exception com.inzoom.adojni.ComException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented in Microsoft OLE DB Provider for ODBC Drivers code=3105 Type=1 at com.inzoom.ado.Command.jniExecute(Native Method) at com.inzoom.ado.Command.execute(Command.java:39) at com.inzoom.ado.Command.executeUpdate(Command.java:51) at com.inzoom.ado.Command.executeUpdate(Command.java:42) at com.inzoom.jdbcado.PreparedStatement.executeUpdate(PreparedStatement.java:81) at cirrus.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:20) at cirrus.hibernate.persister.EntityPersister.insert(EntityPersister.java:478) at cirrus.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at cirrus.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:1674) at cirrus.hibernate.impl.SessionImpl.execute(SessionImpl.java:1654) at cirrus.hibernate.impl.SessionImpl.flush(SessionImpl.java:1599) at cirrus.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:51) at cirrus.hibernate.test.FooBarTest.testAssociationId(FooBarTest.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.swingui.TestRunner$16.run(TestRunner.java:623) 13:17:18,677 WARN JDBCExceptionReporter:35 - SQL Error: 3105, SQLState: 13:17:18,677 ERROR JDBCExceptionReporter:42 - [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented 13:17:18,687 DEBUG SessionImpl:366 - transaction completion 13:17:18,998 DEBUG SessionImpl:2428 - Running Session.finalize() 13:17:19,008 DEBUG SessionImpl:366 - transaction completion 13:17:19,008 WARN SessionImpl:2438 - Unclosed connection suggestions to me, one of the many, will be welcome. You may be wondering why I am bothering on Access: well, no one will use for production, but on development on windows it's better then mysql as it raises exceptions on referential integrity violations (so you get no surprises in going in production, say on oracle), and also for the windows interface. regards |
From: Pietro P. <de...@op...> - 2002-12-16 12:31:41
|
hi, this is a revised version of the dialect: public class MSAccessDialect extends Dialect { public MSAccessDialect() { super(); register( Types.BIT, "BIT" ); register( Types.BIGINT, "INTEGER" ); register( Types.SMALLINT, "SMALLINT" ); register( Types.TINYINT, "BYTE" ); register( Types.INTEGER, "INTEGER" ); register( Types.CHAR, "VARCHAR(1)" ); register( Types.VARCHAR, "VARCHAR($l)" ); register( Types.FLOAT, "DOUBLE" ); register( Types.DOUBLE, "DOUBLE" ); register( Types.DATE, "DATETIME" ); register( Types.TIME, "DATETIME" ); register( Types.TIMESTAMP, "DATETIME" ); register( Types.VARBINARY, "VARBINARY($l)" ); register( Types.NUMERIC, "NUMERIC" ); getDefaultProperties().setProperty(Environment.OUTER_JOIN, "false"); getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH); } with access in defining the columns we should be careful on field names, like in this case changing string and single as shown makes the schema generation work: <class name="cirrus.hibernate.test.Several"> <composite-id> <key-property name="id" length="32"/> <key-property name="stringX" length="32"/> </composite-id> <many-to-one name="singleX"> <column name="single_id" length="32"/> <column name="single_string" length="32"/> </many-to-one> </class> actually generating schema for all tests still gives a few errors, but I believe all due to such field names problems. So now concentrating on cirrus.hibernate.test.FooBarTest schema generation: I had to change: <property name="yesno" column="yesno_"/> it didn't take a column named "yesno" for to me misterious reasons. Then schema is generated fine. Tests run: 59, Failures: 0, Errors: 48 The first error is in TestAssociationId; so I limited the test to the following code: public void testAssociationId() throws Exception { Session s = sessions.openSession(); Transaction t = s.beginTransaction(); Bar bar = new Bar(); String id = (String) s.save(bar); MoreStuff more = new MoreStuff(); more.setName("More Stuff"); more.setIntId(12); more.setStringId("id"); Stuff stuf = new Stuff(); stuf.setMoreStuff(more); more.setStuffs( new ArrayList() ); more.getStuffs().add(stuf); stuf.setFoo(bar); stuf.setId(1234); stuf.setProperty( TimeZone.getDefault() ); s.save(more); t.commit(); s.close(); } which generates: 13:17:15,603 DEBUG DriverManagerConnectionProvider:97 - returning connection to pool 13:17:15,673 DEBUG SessionFactoryImpl:113 - Instantiating session factory 13:17:15,673 INFO Dialect:37 - Using dialect: cirrus.hibernate.sql.MSAccessDialect 13:17:15,683 INFO DriverManagerConnectionProvider:36 - Hibernate connection pool size: 2 13:17:15,683 INFO DriverManagerConnectionProvider:65 - Using driver: com.inzoom.jdbcado.Driver at URL: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=XXXXXX;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb 13:17:15,683 INFO DriverManagerConnectionProvider:66 - Connection properties: {user=admin, password=} 13:17:15,693 INFO PreparedStatementCache:49 - prepared statement cache size: 100 13:17:15,693 INFO SessionFactoryImpl:144 - Use outer join fetching: false 13:17:15,703 DEBUG DriverManagerConnectionProvider:78 - Opening new JDBC connection 13:17:15,733 DEBUG DriverManagerConnectionProvider:89 - Created connection to: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=XXXXXX;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb, Isolation Level: 2 13:17:15,753 DEBUG DriverManagerConnectionProvider:97 - returning connection to pool 13:17:15,763 INFO SessionFactoryImpl:167 - Use scrollable result sets: true 13:17:16,004 INFO DriverManagerConnectionProvider:120 - Cleaning up dereferenced connection pool: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=XXXXXX;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb 13:17:18,017 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory 13:17:18,037 DEBUG SessionFactoryObjectFactory:76 - registered: 40288086f22746bc00f22746d0c10000 (unnamed) 13:17:18,037 INFO SessionFactoryObjectFactory:82 - no JDNI name configured 13:17:18,037 INFO SessionFactoryImpl:261 - Query language substitutions: {no='N', true=1, yes='Y', false=0} 13:17:18,037 INFO SessionFactoryImpl:264 - Query language imports: cirrus.hibernate.test 13:17:18,047 DEBUG SessionFactoryImpl:276 - Instantiated session factory 13:17:18,287 DEBUG SessionImpl:332 - opened session 13:17:18,287 DEBUG JDBCTransaction:34 - begin 13:17:18,297 DEBUG DriverManagerConnectionProvider:73 - Using cached JDBC connection 13:17:18,297 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Bar#40288086:f22746bc:00f2:2746d1d9:0001] 13:17:18,307 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Bar 13:17:18,307 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,317 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Fee#f22746d1ed0000] 13:17:18,317 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,317 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,327 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,327 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,327 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,327 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Glarch#40288086f22746bc00f22746d1f70002] 13:17:18,327 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,327 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,327 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,337 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,337 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,347 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Fee#f22746d20b0001] 13:17:18,347 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,347 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,347 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,347 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,347 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Bar 13:17:18,397 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Bar 13:17:18,407 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Bar 13:17:18,407 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.MoreStuff#cirrus.hibernate.test.MoreStuff@d1b] 13:17:18,407 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,407 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,417 DEBUG SessionImpl:2002 - Wrapped collection in role: MoreStuff/stuffs 13:17:18,417 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,417 DEBUG Cascades:225 - cascading to collection: MoreStuff/stuffs 13:17:18,427 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,427 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Stuff#cirrus.hibernate.test.Stuff@4d2] 13:17:18,427 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,427 DEBUG JDBCTransaction:48 - commit 13:17:18,427 DEBUG SessionImpl:1605 - flushing session 13:17:18,437 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Bar 13:17:18,437 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,447 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,447 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,447 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Bar 13:17:18,447 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,447 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Glarch 13:17:18,457 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,457 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,457 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.Fee 13:17:18,457 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.Fee 13:17:18,457 DEBUG Cascades:250 - processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,457 DEBUG Cascades:225 - cascading to collection: MoreStuff/stuffs 13:17:18,457 DEBUG Cascades:71 - cacading to saveOrUpdate() 13:17:18,457 DEBUG Cascades:257 - done processing cascades for: cirrus.hibernate.test.MoreStuff 13:17:18,467 DEBUG SessionImpl:1682 - Flushing entities and processing referenced collections 13:17:18,467 DEBUG SessionImpl:2036 - Collection found: [MoreStuff/stuffs#cirrus.hibernate.test.MoreStuff@d1b], was: [<unreferenced>] 13:17:18,477 DEBUG DriverManagerConnectionProvider:78 - Opening new JDBC connection 13:17:18,557 DEBUG DriverManagerConnectionProvider:89 - Created connection to: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=XXXXXX;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb, Isolation Level: 2 13:17:18,607 DEBUG DriverManagerConnectionProvider:97 - returning connection to pool 13:17:18,607 DEBUG HiLoGenerator:148 - New hi value: 0 13:17:18,607 DEBUG CollectionPersister:493 - Generated new collection ID 0 for role /foo_bytes 13:17:18,607 DEBUG SessionImpl:2036 - Collection found: [/foo_bytes#0], was: [<unreferenced>] 13:17:18,607 DEBUG SessionImpl:2036 - Collection found: [Foo/FooComponent/FooComponent/ImportantDates#40288086:f22746bc:00f2:2746d1d9:0001], was: [<unreferenced>] 13:17:18,627 DEBUG SessionImpl:2036 - Collection found: [Foo/FooComponent/importantDates#40288086:f22746bc:00f2:2746d1d9:0001], was: [<unreferenced>] 13:17:18,627 DEBUG SessionImpl:1874 - Processing unreferenced collections 13:17:18,627 DEBUG SessionImpl:1898 - Scheduling collection removes/(re)creates/updates 13:17:18,627 DEBUG SessionImpl:1617 - Flushed: 6 insertions, 0 updates, 0 deletions to 6 objects 13:17:18,637 DEBUG SessionImpl:1622 - Flushed: 4 (re)creations, 0 updates, 0 removals to 4 collections 13:17:18,637 DEBUG SessionImpl:1652 - Executing 13:17:18,637 DEBUG EntityPersister:464 - Inserting entity: cirrus.hibernate.test.Fee#f22746d1ed0000 13:17:18,637 DEBUG BatcherImpl:109 - 1 open PreparedStatements 13:17:18,637 DEBUG SessionFactoryImpl:469 - prepared statement get: insert into Fee ( fi, fee, anotherFee, qux, name, null_prop, id_ ) values ( ?, ?, ?, ?, ?, ?, ? ) 13:17:18,647 DEBUG PreparedStatementCache:67 - Preparing statement: insert into Fee ( fi, fee, anotherFee, qux, name, null_prop, id_ ) values ( ?, ?, ?, ?, ?, ?, ? ) 13:17:18,647 DEBUG EntityPersister:390 - Dehydrating entity: cirrus.hibernate.test.Fee#f22746d1ed0000 13:17:18,667 DEBUG JDBCExceptionReporter:33 - SQL Exception com.inzoom.adojni.ComException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented in Microsoft OLE DB Provider for ODBC Drivers code=3105 Type=1 at com.inzoom.ado.Command.jniExecute(Native Method) at com.inzoom.ado.Command.execute(Command.java:39) at com.inzoom.ado.Command.executeUpdate(Command.java:51) at com.inzoom.ado.Command.executeUpdate(Command.java:42) at com.inzoom.jdbcado.PreparedStatement.executeUpdate(PreparedStatement.java:81) at cirrus.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:20) at cirrus.hibernate.persister.EntityPersister.insert(EntityPersister.java:478) at cirrus.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at cirrus.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:1674) at cirrus.hibernate.impl.SessionImpl.execute(SessionImpl.java:1654) at cirrus.hibernate.impl.SessionImpl.flush(SessionImpl.java:1599) at cirrus.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:51) at cirrus.hibernate.test.FooBarTest.testAssociationId(FooBarTest.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.swingui.TestRunner$16.run(TestRunner.java:623) 13:17:18,677 WARN JDBCExceptionReporter:35 - SQL Error: 3105, SQLState: 13:17:18,677 ERROR JDBCExceptionReporter:42 - [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented 13:17:18,687 DEBUG SessionImpl:366 - transaction completion 13:17:18,998 DEBUG SessionImpl:2428 - Running Session.finalize() 13:17:19,008 DEBUG SessionImpl:366 - transaction completion 13:17:19,008 WARN SessionImpl:2438 - Unclosed connection suggestions to me, one of the many, will be welcome. You may be wondering why I am bothering on Access: well, no one will use for production, but on development on windows it's better then mysql as it raises exceptions on referential integrity violations (so you get no surprises in going in production, say on oracle), and also for the windows interface. regards |
From: <vy...@qu...> - 2002-12-16 10:20:11
|
I am using JBoss 3.2.0-beta-2, Postgres 7.2 and JDK 1.3.1 as=20 well as hibernate 1.2.=20 I am having difficulty committing any changes that I make because I get=20 error message saying: "java.sql.SQLException: You cannot commit with = autocommit set!"=20 bit of code:=20 [java]=20 Context ctx =3D new InitialContext();=20 SessionFactory sessions =3D = (SessionFactory)ctx.lookup("java:/HibernateFactory");=20 Session sess =3D sessions.openSession();=20 Vertex v =3D new Vertex();=20 v.setName( "SomeName" );=20 sess.save(v);=20 sess.close();=20 [/java]=20 This problem occurs with any settings in hibernate.properties=20 What needs for correct work without exeption.=20 Regards, AAP |