[Hibernate-JIRA] Commented: (HHH-1473) hbm2ddl validate seems to fail when views are involved
by Shadow X (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473?page=c... ]
Shadow X commented on HHH-1473:
-------------------------------
I believe the fix is simple, although I do not know if it will break anything else. See this page:
http://www.cs.helsinki.fi/u/vkuokkan/gradu/aeonstore/tools/hibernate.html...
I tried compiling Hibernate Core 3.2.3 with that change and it allowed validation to work.
> hbm2ddl validate seems to fail when views are involved
> ------------------------------------------------------
>
> Key: HHH-1473
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473
> Project: Hibernate3
> Issue Type: Bug
> Components: metamodel
> Affects Versions: 3.1
> Reporter: Emmanuel Bernard
> Priority: Minor
>
> http://forum.hibernate.org/viewtopic.php?t=955341&start=0&postdays=0&post...
> CategoryRanking is a view
> org.hibernate.HibernateException: Missing table: CategoryRating
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:953)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:299)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:484)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:202)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:78)
> at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:512)
> at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:253)
> at org.jboss.ejb3.Ejb3JmxDeployment.create(Ejb3JmxDeployment.java:230)
> at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
> 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:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
> at $Proxy0.create(Unknown Source)
> at org.jboss.system.ServiceController.create(ServiceController.java:341)
> at org.jboss.system.ServiceController.create(ServiceController.java:284)
> at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy10.create(Unknown Source)
> at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:208)
> 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:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy11.create(Unknown Source)
> at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
> at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy6.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
> 09:13:51,528 INFO [EJB3Deployer] Deployed: file:/C:/work/jboss-4.0.3SP1/server/default/deploy/bizmerit.ejb3
--
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
[Hibernate-JIRA] Created: (HHH-2553) New LoadContexts Implementation causing possible performance degradation
by Shawn Clowater (JIRA)
New LoadContexts Implementation causing possible performance degradation
-------------------------------------------------------------------------
Key: HHH-2553
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2553
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.3
Reporter: Shawn Clowater
Priority: Critical
Noticed that some of our unit tests began to suffer a 300% decrease in performance with the latest 3.2.3 release.
Fetches that were taking in the order of 20s were now up around a minute.
Stuck a profiler on the test run including the Hibernate classes in the profile and the CollectionLoadContext immediately filtered to the top getting tens of millions of hits in the locateLoadingCollectionEntry chain of methods. Looked at one of the offending tests and it ends up loading ~ 1000 entities and the collectionLoadContexts property of the LoadContexts class peaks at about 9500.
I'm thinking the iteration of the contents of the collectionLoadContexts collection is going to cause grief for anyone loading a substantial amount of entities at a given time. I believe the implementation before was there used to be 1 lookup of a Map key to find a collection where now you may end up with n number of key lookups where n is the number of CollectionLoadContexts that you have. (in my case 9500ish)
The specific piece of code from LoadContexts I am referring to is:
LoadingCollectionEntry locateLoadingCollectionEntry(CollectionKey key, CollectionLoadContext caller) {
if ( collectionLoadContexts == null ) {
return null;
}
if ( log.isTraceEnabled() ) {
log.trace( "attempting to locate loading collection entry [" + key + "] in any result-set context" );
}
LoadingCollectionEntry rtn = null;
Iterator itr = collectionLoadContexts.values().iterator();
while ( itr.hasNext() ) {
final CollectionLoadContext collectionLoadContext = ( CollectionLoadContext ) itr.next();
if ( collectionLoadContext == caller ) {
continue;
}
rtn = collectionLoadContext.getLocalLoadingCollectionEntry( key );
if ( rtn != null ) {
if ( log.isTraceEnabled() ) {
log.trace( "collection [" + key + "] located in load context [" + collectionLoadContext + "]" );
}
break;
}
}
return rtn;
}
I'm not quite clear as to the purpose of the underlying change but just wanted to at least let you guys know that it might cause less than optimal performance using the 3.2.2 release as a baseline.
--
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
[Hibernate-JIRA] Created: (HBX-927) Incorrect syntax on insert statement
by Robert Stone (JIRA)
Incorrect syntax on insert statement
------------------------------------
Key: HBX-927
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-927
Project: Hibernate Tools
Issue Type: Bug
Environment: Hibernate 3.1.3 Postgres 7.4.7 Tomcat 5.5.12 localhost running on Debian AMD 64
Reporter: Robert Stone
All of a sudden, any insert statement constructed by Hibernate has this "select scope_identity()" appended to it that naturally causes a SQLGrammar exception.
This occurred one day to the next. There has been NO change to the operating environment.
The box accessible by users has exactly the same environment except it is an Intel chipset and it is working as normal.
Hibernate: insert into mothers_medical_history (au_vers_numb, date_of_occurrence, icd_code, mmh_comments, record_created_by, datetime_created, mothers_id) values (?, ?, ?, ?, ?, ?, ?) select scope_identity()
Can anybody help?????
--
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
[Hibernate-JIRA] Created: (HHH-2306) put() fails on lazy one-to-many Map
by Andreas Idl (JIRA)
put() fails on lazy one-to-many Map
-----------------------------------
Key: HHH-2306
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2306
Project: Hibernate3
Type: Bug
Versions: 3.2.0.ga, 3.2.1
Environment: HIbernate 3.2.1. with Mysql 4
Reporter: Andreas Idl
Priority: Critical
Attachments: MapTest.zip
If I add n objects to a lazy-loaded one-to-many map, the first added object is not contained afterwards.
The size of the map is (n-1).
Document document = (Document) session.load(Document.class,documentId);
DocumentHistory history = new DocumentHistory();
history.setVersion(1);
history.setTitle(document.getTitle());
history.setContent(document.getContent());
history.setDocument(document);
// Put the new history into the map.
Map<Integer, DocumentHistory> histories = document.getHistories();
histories.put(history.getVersion(), history);
//not equal because histories.size() is 0
assertEquals(1, histories.size());
--
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