[Hibernate-JIRA] Commented: (HHH-1907) make ComponentType operate more like EntityType
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1907?page=c... ]
Steve Ebersole commented on HHH-1907:
-------------------------------------
Well the important piece of "operate more like EntityType" is specifically offloading of info to *something* maintained by the session factory. This something might either be a new ComponentPersister, or perhaps the ComponentMetamodel directly (but even if I go the ComponentPersister route, it would have a reference to the ComponentMetamodel).
So short answer is yes
> make ComponentType operate more like EntityType
> -----------------------------------------------
>
> Key: HHH-1907
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1907
> Project: Hibernate3
> Type: Improvement
> Components: core
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
>
>
> Specifically, we need to move all the code directly dealing with property-access, instantiation, etc out of here. So where do we move it? Well, EntityType for example moves this stuff off to the persisters; the type then just looks up the persister when needed. Not sure we actually need a persister per-se for handling components; perhaps just ComponentMetamodel is enough...
> Why is this important? Well the way ComponentType is currently structured leads to the need for certain configuration properties to be classloader scoped (static on Environment) instead of SessionFactory scoped. This is painful for two in particular: 1) whether to use reflection optimization and 2) bytecode provider.
> Also, this change should allow us to cleanup how property accessors are built
--
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
19 years, 5 months
[Hibernate-JIRA] Commented: (HHH-514) getDatabaseMajorVersion unsupported by some Oracle drivers
by Rene Gielen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-514?page=co... ]
Rene Gielen commented on HHH-514:
---------------------------------
I would recommend to switch to current Oracle JDBC driver instead. We had the same problem here, switching to 10.2.0.2 driver solved the problem immediately, without any configuration change requirements.
Download link: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc...
Remember that Oracle recommends you to use 10 series drivers even if you are connecting to a 8 or 9 series database server!
> getDatabaseMajorVersion unsupported by some Oracle drivers
> ----------------------------------------------------------
>
> Key: HHH-514
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-514
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.0.4
> Environment: WLS 8.1 SP2, Hibernate 3.0.4, Oracle9i Enterprise Edition Release 9.2.0.4.0, Oracle JDBC driver 9.2.0.3.0
> Reporter: Mathias Bogaert
> Priority: Critical
>
>
> Put an extra try catch around databaseMajorVersion = meta.getDatabaseMajorVersion(); in SettingsFactory (change occured in version 1.31) and handle 0 value in DialectFactory.buildDialect.
> WARN - Could not obtain connection metadata
> java.sql.SQLException: Kenmerk wordt niet ondersteund.
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)
> at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4451)
> at weblogic.jdbc.wrapper.DatabaseMetaData_oracle_jdbc_driver_OracleDatabaseMetaData.getDatabaseMajorVersion(Unknown Source
> )
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:75)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
--
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
19 years, 5 months
[Hibernate-JIRA] Commented: (HHH-1612) Serious performance lost within IdentityMap...
by Markus Heiden (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1612?page=c... ]
Markus Heiden commented on HHH-1612:
------------------------------------
The IdentityMap seems to be the problem at first, but it isn't the real problem. I replaced the entrySet() method with a simpler one which directly iterates the underlying maps entrySet to avoid the massive useless object generation of the current implementation. Sadly, it didn't fix the performance bottleneck, it decreased the needed time but saving transient instances is still far to slow.
The real problem is the iteration in StatefulPersistenceContext's methods getOwnerId and getIndexInOwner which iterate each time over all known persistent entities. This leads to an exponential increasing time by the number of currently known persistent entities. The called methods isFoundInParent and getIndexInParent didn't take long to execute but they are called so often that this accumulates to a significant time.
Just an example of the time needed by the original hibernate 3.2 implementation: I tried to save 1000 transient instances which each contained a collection with 10 transient instances which each contained a collection of 20 transient instances (~200000 transient instances total). This took over an hour!
> Serious performance lost within IdentityMap...
> ----------------------------------------------
>
> Key: HHH-1612
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1612
> Project: Hibernate3
> Type: Improvement
> Components: core
> Versions: 3.1.3
> Reporter: Peter Fassev
> Priority: Critical
> Attachments: Hibernate_3.1.3_performance.jpg
>
>
> Please look at the attached profiler snapshot.
> After I switched from 3.0.5 to 3.1.3 I have mentioned a serious performance decrease when perfecting data, especially on loading non lazy collection (for instance Arrays of String[]). A simple fetch query, which was executed in 6 seconds on hibernate 3.0.5, now it takes 40 seconds on 3.1.3 (without any changes to the application). The fetch of the whole data needs with 3.1.3 about 90 seconds, with 3.0.5 about 49, which is a serious performance lost.
> The NetBeans Profiler shows a huge increase of the self time of the IdentityMap.entrySet() method. Now it takes 22,3% of the whole start time. Together with it's calling method BatchFetchQueue.getCollectionBatch() it consumes 36 % of the start time, which explains the performance lost pretty good.
> Looking at the source code I saw that there is already a TO DO regarding the performance of the IdentityMap.entrySet(), so please fix it, if possible. I think the whole implementation of the IdentityMap should be rethinked, because currently only a dirty hack is possible. If you can't use the IdentityHashMap of 1.4 due to compatibility reasons, please take a look at the current release of apache commons-collections (3.1), where you will find an IdentityHashMap.
> With best regards
> Peter
--
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
19 years, 5 months
[Hibernate-JIRA] Commented: (HHH-1524) Error on left outer join with Oracle Dialect: ORA-00936: missing expression
by Marcelo Oliveira (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1524?page=c... ]
Marcelo Oliveira commented on HHH-1524:
---------------------------------------
It works fine. Good job!
> Error on left outer join with Oracle Dialect: ORA-00936: missing expression
> ---------------------------------------------------------------------------
>
> Key: HHH-1524
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1524
> Project: Hibernate3
> Type: Bug
> Components: query-sql
> Versions: 3.1.2
> Environment: Oracle 8.1.7, Hibernate 3.1.2
> Reporter: Marcelo Oliveira
> Priority: Critical
> Attachments: HHH-1524.patch, ORA-00936.zip
>
> Original Estimate: 1 day
> Remaining: 1 day
>
> With this HQL:
> from Company comp
> left outer join comp.employees empl
> with empl.birthday > :date
> Produce following SQL:
> select
> company0_.id as id0_0_,
> employees1_.id as id1_1_,
> company0_.companyName as companyN2_0_0_,
> employees1_.name as name1_1_,
> employees1_.birthday as birthday1_1_,
> employees1_.companyId as companyId1_1_
> from
> TB_COMPANY_TEMP company0_,
> TB_EMPLOYEE_TEMP employees1_
> where
> company0_.id=employees1_.companyId(+)
> and (employees1_.birthday(+)>(+)=?)
> When it is run, the stacktrace is:
> org.hibernate.exception.SQLGrammarException: could not execute query
> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
> at org.hibernate.loader.Loader.doList(Loader.java:2148)
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
> at org.hibernate.loader.Loader.list(Loader.java:2024)
> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1129)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
> at mytest.OuterJoinTest.main(OuterJoinTest.java:28)
> Caused by: java.sql.SQLException: ORA-00936: missing expression
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
> at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
> at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
> at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
> at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
> at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
> at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
> at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
> at org.hibernate.loader.Loader.doQuery(Loader.java:662)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
> at org.hibernate.loader.Loader.doList(Loader.java:2145)
> ... 8 more
> The correct where clause should be :
> where
> company0_.id=employees1_.companyId(+)
> and (employees1_.birthday(+)>=?)
> This error don't occur with MySQLDialect or SQLServerDialect. Probably it considers >= as two operators instead of a single operator.
--
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
19 years, 5 months