Re: [hibernate-dev] Hbm mapping with hibernate 4
> As mentioned in the migration guide, MetadataSources (in fact all of > o.h.metamodel) is still a work in progress and not for usage... > > http://community.jboss.org/wiki/HibernateCoreMigrationGuide40 So for Hibernate 4.0 there are no changes in how xml is used/defined ? All based on the "old" DTD's and not XSD ? /max > > > On Thu 24 Nov 2011 06:55:06 AM CST, Max Rydahl Andersen wrote: >> For hibernate guys: to be clear, what Dmitry is working on is >> to test and develop support in hibernate tools / jboss tools to work with >> both Hibernate 3.x and Hibernate 4. >> >> The docs/migration guide doesn't seem to cover these differences so asked >> him to raise the question on the list. >> >> /max >> >> On Nov 24, 2011, at 24:01, Dmitry Geraskov wrote: >> >>> Hey, guys, >>> >>> I created the simplest hbm mapping and try to build session factory(full >>> project attached, Hibernate-core4.0.0.CR6): >>> >>> new MetadataSources( >>> new ServiceRegistryBuilder().configure() >>> >>> .buildServiceRegistry()).buildMetadata().buildSessionFactory(); >>> >>> >>> And I get this exception(full log attached): >>> >>> Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 26; >>> cvc-elt.1: Cannot find the declaration of element 'hibernate-configuration'. >>> at >>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) >>>... >>> >>> >>> When I build session factory using old syntax >>> >>> new Configuration().configure().buildSessionFactory(); >>> >>> it works only with DTD schema(not 100% sure I found a correct header to use >>> xsd for hibernate.cfg.xml): >>> >>> >> xmlns="http://www.hibernate.org/xsd/hibernate-configuration"; >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>> xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-configuration >>> https://raw.github.com/hibernate/hibernate-core/master/hibernate-core/src/main/resources/org/hibernate/hibernate-configuration-4.0.xsd";> >>> >>> . >>> >>> This seems like a bug, or I do something wrong? >>> >>> Dmitry Geraskov >>> >>> >>> >> >> /max >> http://about.me/maxandersen >> >> >> >> >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > > -- > st...@hibernate.org > http://hibernate.org /max http://about.me/maxandersen ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] New Search QA job
Hi Strong, I've created this new job on Jenkins: http://hudson.qa.jboss.com/hudson/job/hibernate-search-master-dbmatrix-coreSnapshot Usually we have CI testing Hibernate Search master, but it tests the latest Hibernate Core release we defined as dependency; this new job is specifically overriding the version of Hibernate Core to 4.0.0-SNAPSHOT. so it tests: - Search matrix tests extend Core's matrix test with more tests - Improvements done in Core improve the Search matrix test as well - Core changes won't break Search We can remove this later on if you think it's overkill, for now it's very useful for us to start fixing the Search matrix tests, which need the fixes from latest snapshosts of Core. Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] org.hibernate.ejb.test.lob.BlobTest fails on Derby
Debugging a BLOB issue on H2 (different issue than this) led me to try Derby, which fails even earlier. This is the same test as org.hibernate.ejb.test.lob.BlobTest, if someone could run this on Derby, you should see the exception. I've copied the test 1:1 into my environment and had the same exception. The sql.BlobTypeDescriptor.STREAM_BINDING option is used by default for an @Lob java.sql.Blob property. This option "unwraps" the value by calling java.BlobTypeDescriptor.unwrap(): return (X) new BinaryStreamImpl( DataHelper.extractBytes( value.getBinaryStream() ) ); This crashes on the call to value.getBinaryStream(): Caused by: java.sql.SQLException: You cannot invoke other java.sql.Clob/java.sql.Blob methods after calling the free() method or after the Blob/Clob's transaction has been committed or rolled back. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedBlob.checkValidity(Unknown Source) at org.apache.derby.impl.jdbc.EmbedBlob.getBinaryStream(Unknown Source) at org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:123) Bug report? ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Hbm mapping with hibernate 4
Correct. On Mon 28 Nov 2011 06:25:44 AM CST, Max Rydahl Andersen wrote: > >> As mentioned in the migration guide, MetadataSources (in fact all of >> o.h.metamodel) is still a work in progress and not for usage... >> >> http://community.jboss.org/wiki/HibernateCoreMigrationGuide40 > > So for Hibernate 4.0 there are no changes in how xml is used/defined ? > > All based on the "old" DTD's and not XSD ? > > /max > >> >> >> On Thu 24 Nov 2011 06:55:06 AM CST, Max Rydahl Andersen wrote: >>> For hibernate guys: to be clear, what Dmitry is working on is >>> to test and develop support in hibernate tools / jboss tools to work with >>> both Hibernate 3.x and Hibernate 4. >>> >>> The docs/migration guide doesn't seem to cover these differences so asked >>> him to raise the question on the list. >>> >>> /max >>> >>> On Nov 24, 2011, at 24:01, Dmitry Geraskov wrote: >>> Hey, guys, I created the simplest hbm mapping and try to build session factory(full project attached, Hibernate-core4.0.0.CR6): new MetadataSources( new ServiceRegistryBuilder().configure() .buildServiceRegistry()).buildMetadata().buildSessionFactory(); And I get this exception(full log attached): Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 26; cvc-elt.1: Cannot find the declaration of element 'hibernate-configuration'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) ... When I build session factory using old syntax new Configuration().configure().buildSessionFactory(); it works only with DTD schema(not 100% sure I found a correct header to use xsd for hibernate.cfg.xml): >>> xmlns="http://www.hibernate.org/xsd/hibernate-configuration"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-configuration https://raw.github.com/hibernate/hibernate-core/master/hibernate-core/src/main/resources/org/hibernate/hibernate-configuration-4.0.xsd";> . This seems like a bug, or I do something wrong? Dmitry Geraskov >>> >>> /max >>> http://about.me/maxandersen >>> >>> >>> >>> >>> ___ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> >> -- >> st...@hibernate.org >> http://hibernate.org > > /max > http://about.me/maxandersen > > > -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] HHH-6780 - incorrect query timeout calculation
Donnchadh, I commented on the pull request. Let me know what you think. On Thu 24 Nov 2011 08:47:43 PM CST, Donnchadh Ó Donnabháin wrote: >Hi everyone, > > While trying out 4.0.0.CR6 I've discovered that my code is affected by > https://hibernate.onjira.com/browse/HHH-6780 . > There isn't a fix version on this issue. Would it be possible to get > the fix into the next CR or or 4.0.0.Final? It does seem quite broken > at the moment. > > The javadoc for org.hibernate.Transaction says: > /** >* Set the transaction timeout for any transaction started by a > subsequent call to {@link #begin} on this instance. >* >* @param seconds The number of seconds before a timeout. >*/ > public void setTimeout(int seconds); > > but instead seconds is treated as an absolute time. > > Lukasz Antoniak has created a pull request at: > https://github.com/hibernate/hibernate-core/pull/205 > > Thanks > >Donnchadh > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] org.hibernate.ejb.test.lob.BlobTest fails on Derby
I just ran BlobTest on Derby, and it passes :) btw, i'm using the latest source from master, and default hibernate.properties in hibernate-entitymanager/src/test/resource (except the db connection info changed to derby from h2) - Best Regards, Strong Liu http://about.me/stliu/bio On Nov 28, 2011, at 11:47 PM, Christian Bauer wrote: > Debugging a BLOB issue on H2 (different issue than this) led me to try Derby, > which fails even earlier. > > This is the same test as org.hibernate.ejb.test.lob.BlobTest, if someone > could run this on Derby, you should see the exception. I've copied the test > 1:1 into my environment and had the same exception. > > The sql.BlobTypeDescriptor.STREAM_BINDING option is used by default for an > @Lob java.sql.Blob property. This option "unwraps" the value by calling > java.BlobTypeDescriptor.unwrap(): > > return (X) new BinaryStreamImpl( DataHelper.extractBytes( > value.getBinaryStream() ) ); > > This crashes on the call to value.getBinaryStream(): > > Caused by: java.sql.SQLException: You cannot invoke other > java.sql.Clob/java.sql.Blob methods after calling the free() method or after > the Blob/Clob's transaction has been committed or rolled back. > at > org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown > Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown > Source) > at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedBlob.checkValidity(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedBlob.getBinaryStream(Unknown Source) > at > org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:123) > > Bug report? > > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] New Search QA job
cool but I don't see where you change the Core version to snapshot in this job configuration….. - Best Regards, Strong Liu http://about.me/stliu/bio On Nov 28, 2011, at 10:30 PM, Sanne Grinovero wrote: > Hi Strong, > I've created this new job on Jenkins: > > > http://hudson.qa.jboss.com/hudson/job/hibernate-search-master-dbmatrix-coreSnapshot > > Usually we have CI testing Hibernate Search master, but it tests the > latest Hibernate Core release we defined as dependency; this new job > is specifically overriding the version of Hibernate Core to > 4.0.0-SNAPSHOT. > > so it tests: > - Search matrix tests extend Core's matrix test with more tests > - Improvements done in Core improve the Search matrix test as well > - Core changes won't break Search > > We can remove this later on if you think it's overkill, for now it's > very useful for us to start fixing the Search matrix tests, which need > the fixes from latest snapshosts of Core. > > Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] could someone review my two pull requests?
https://github.com/hibernate/hibernate-core/pull/229 https://github.com/hibernate/hibernate-core/pull/228 thanks - Best Regards, Strong Liu http://about.me/stliu/bio ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev