[Hibernate-JIRA] Commented: (HHH-1961) Schema validation fails with floating point column in Oracle 10g
by Gerald Holl (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961?page=c... ]
Gerald Holl commented on HHH-1961:
----------------------------------
I have the same problem with MS SQL 2005 Enterprise.
> Schema validation fails with floating point column in Oracle 10g
> ----------------------------------------------------------------
>
> Key: HHH-1961
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.0.cr2
> Environment: 3.2 CR 2, Oracle 10g express edition release 2, Windows XP service pack 2, JDK 1.5.0_06
> Reporter: Daniel Dyer
>
> I have a table (created automatically by Hibernate) for mapping a double field. The table creation from Ant works fine but when starting up JBoss with the hibernate.hbm2ddl.auto property set to validate, I get the following exception:
> Caused by: org.hibernate.HibernateException: Wrong column type: percentage, expected: double precision
> at org.hibernate.mapping.Table.validateColumns(Table.java:219)
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
> ... 127 more
> Doing a "desc" on the table reveals that the column is of type FLOAT with a length of 22.
> I think this may be related to issue HHH-1566 or HHH-1008.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[Hibernate-JIRA] Created: (HHH-2527) nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
by Oukhouya Said (JIRA)
nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V
---------------------------------------------------------------------------------------------------------------
Key: HHH-2527
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2527
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.0 final
Environment: hibernate version 3 mySQL Database
Reporter: Oukhouya Said
Priority: Blocker
Hi,
I m new here and I m working on a web application using middlegen 2.2, Spring, hibernate3 and cglib. I m working on migrating this project from hibernate2 to hibernate3.
i v done all corrections and when I run my application, I have this stacktrace. Some of the users hav encountered this problem. Could someone help me please.
Thank u
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [conf/spring/dao-beans.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)Vjava.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43) at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162) at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135) at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:777) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:703) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:57) at net.stinfoservices.blob.BaseTestCase.setUp(BaseTestCase.java:39) at net.stinfoservices.blob.BaseDatabaseTestCase.setUp(BaseDatabaseTestCase.java:75) at net.stinfoservices.blob.dao.Table0DaoTestCase.setUp(Table0DaoTestCase.java:60)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[Hibernate-JIRA] Commented: (HHH-1614) parent element should accept access="field"
by Hontvári József (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1614?page=c... ]
Hontvári József commented on HHH-1614:
--------------------------------------
Now I debugged the code in 3.2.2. and also checked if trunk is the same (yes).
The parent field is hadled separately from other properties in the component.
PojoComponentTuplizer constructor calls PropertyAccessorFactory.getPropertyAccessor( null ). Note the null parameter, which should be the type of access (i.e. field; getter/setter; etc.). This method (which has a comment: "todo : this eventually needs to be removed"), considers null as if "property" were supplied and returns a BASIC_PROPERTY_ACCESSOR, which according to its document only uses getters/setters. I guess, for field access, instead of null the value "field" should be passed, so it would return a DIRECT_PROPERTY_ACCESSOR
> parent element should accept access="field"
> -------------------------------------------
>
> Key: HHH-1614
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1614
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.0.5
> Reporter: Hontvári József
> Priority: Minor
>
> Currently one cannot specify access="field" in a Hibernate mapping file in the "parent" element of components. This means that JavaBean style setters and getters must be created even if all other fields are accessed directly by Hibernate, which doesn't look nice in the source.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[Hibernate-JIRA] Commented: (HHH-1961) Schema validation fails with floating point column in Oracle 10g
by richard yang (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961?page=c... ]
richard yang commented on HHH-1961:
-----------------------------------
We really want to keep the validator on. For now we have to turn it off unless you can tell me a work around.
What confused me is that many people are using hibernate and oracle 10g. But many people do not have this problem at all and other people do. If this is a defect in the hibernate core, then everybody (using decimal/double) would hit this issue. But as I found out, many people did not have this mapping problem.
> Schema validation fails with floating point column in Oracle 10g
> ----------------------------------------------------------------
>
> Key: HHH-1961
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.0.cr2
> Environment: 3.2 CR 2, Oracle 10g express edition release 2, Windows XP service pack 2, JDK 1.5.0_06
> Reporter: Daniel Dyer
>
> I have a table (created automatically by Hibernate) for mapping a double field. The table creation from Ant works fine but when starting up JBoss with the hibernate.hbm2ddl.auto property set to validate, I get the following exception:
> Caused by: org.hibernate.HibernateException: Wrong column type: percentage, expected: double precision
> at org.hibernate.mapping.Table.validateColumns(Table.java:219)
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
> ... 127 more
> Doing a "desc" on the table reveals that the column is of type FLOAT with a length of 22.
> I think this may be related to issue HHH-1566 or HHH-1008.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[Hibernate-JIRA] Commented: (HHH-1961) Schema validation fails with floating point column in Oracle 10g
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961?page=c... ]
Max Rydahl Andersen commented on HHH-1961:
------------------------------------------
go to the user docs and see how you disable the *non-vital feature* called schema validation.
> Schema validation fails with floating point column in Oracle 10g
> ----------------------------------------------------------------
>
> Key: HHH-1961
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.0.cr2
> Environment: 3.2 CR 2, Oracle 10g express edition release 2, Windows XP service pack 2, JDK 1.5.0_06
> Reporter: Daniel Dyer
>
> I have a table (created automatically by Hibernate) for mapping a double field. The table creation from Ant works fine but when starting up JBoss with the hibernate.hbm2ddl.auto property set to validate, I get the following exception:
> Caused by: org.hibernate.HibernateException: Wrong column type: percentage, expected: double precision
> at org.hibernate.mapping.Table.validateColumns(Table.java:219)
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
> ... 127 more
> Doing a "desc" on the table reveals that the column is of type FLOAT with a length of 22.
> I think this may be related to issue HHH-1566 or HHH-1008.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[Hibernate-JIRA] Commented: (HHH-1008) SchemaValidator mapping of double to SQL-Type DECIMAL with Precision and Scale
by richard yang (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1008?page=c... ]
richard yang commented on HHH-1008:
-----------------------------------
Same problem for me. Oracle 10g, java 1.6 and jboss 4.0.3sp1, windows xp.
> SchemaValidator mapping of double to SQL-Type DECIMAL with Precision and Scale
> ------------------------------------------------------------------------------
>
> Key: HHH-1008
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1008
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 beta 2
> Environment: DB2, Win2k
> Reporter: Phritz Grau
> Priority: Minor
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> I am using the new SchemaValidator, it really is very useful. 1000x thanks.
> However we have one problem.
> Our tables contain a lot columns of SQL-Type DECIMAL with precision and scale.
> These are mapped to double or java.lang.Double and
> we specify the mapping like e.g.:
> <property
> name="doubleVal"
> type="double">
> <column name="dVal" precision="12" scale="6"/>
> </property>
> Using the SchemaValidator results in an error:
> org.hibernate.HibernateException: Wrong column type: dVal, expected: double
> at org.hibernate.mapping.Table.validateColumns(Table.java:205)
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:938)
> Since there is not appropriate java type for sql type decimal,
> it would be very nice if the above error is omittet,
> when the mapping contains the correct precision and scale
> values.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months