You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Genandiy D. (JIRA) <no...@at...> - 2006-07-06 12:46:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-700?page=all ] Genandiy Donchyts updated HBX-700: ---------------------------------- Attachment: hbm2java.cfg.xml > Custom type mapping is not possible when reverse-engineering Oracle TIMESTAMP(3) types > -------------------------------------------------------------------------------------- > > Key: HBX-700 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-700 > Project: Hibernate Tools > Type: Bug > Components: reverse-engineer > Environment: 3.2 svn, Oracle 10g, Oracle JDBC Driver version - "10.2.0.1.0" > Reporter: Genandiy Donchyts > Attachments: Test.hbm.xml, hbm2java.cfg.xml, schema.sql > > Original Estimate: 1 hour > Remaining: 1 hour > > When reverse-engineering Oracle database containint column with TIMESTAMP(3) type it is not recognized as a TIMESTAMP and "serializable" type is used instead of timestamp. This happens because of the bug in Oracle JDBC driver since it returns OTHER (1111) instead of TIMESTAMP(93). > When type-mapping is provided in the form: > <type-mapping> > <sql-type jdbc-type="TIMESTAMP(3)" hibernate-type="timestamp" /> > </type-mapping> > ... it is not used because hibernate can't find TIMESTAMP(3) JDBC data type. > JDBCReader.java, processBasicColumns(Table table, ProgressListener progress): > ... > //TODO: column.setSqlType(sqlTypeName); //this does not work 'cos the precision/scale/length are not retured in TYPE_NAME > //column.setSqlType(sqlTypeName); > ... > it would be nice to have this sqlTypeName set to Column and used during comparison with <type-mapping>, then mapping from "TIMESTAMP(3)" to "timestamp" would work. Currently only 1111 ("OTHER") is passed to Column and as result column does not know anything about "TIMESTAMP(3)" > ----- > To reproduce an issue try to create simple Oracle database with one table: > create table test(id TIMESTAMP(3)); > and run reverse-engineering task over it. > ------ > HACK: custom handling of TIMESTAMP(*) types: > Modify JDBCReader.java: > private void processBasicColumns(Table table, ProgressListener progress) { // get the columns > ... > String sqlTypeName = (String) columnRs.get("TYPE_NAME"); > String columnName = (String) columnRs.get("COLUMN_NAME"); > // HACK: custom handling of TIMESTAMP(*) > if(sqlTypeName.startsWith("TIMESTAMP")) { > sqlType = java.sql.Types.TIMESTAMP; > } > ... > See also forum post: http://forum.hibernate.org/viewtopic.php?t=961625&start=0&postdays=0&postorder=asc&highlight= -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Genandiy D. (JIRA) <no...@at...> - 2006-07-06 12:46:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-700?page=all ] Genandiy Donchyts updated HBX-700: ---------------------------------- Attachment: schema.sql > Custom type mapping is not possible when reverse-engineering Oracle TIMESTAMP(3) types > -------------------------------------------------------------------------------------- > > Key: HBX-700 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-700 > Project: Hibernate Tools > Type: Bug > Components: reverse-engineer > Environment: 3.2 svn, Oracle 10g, Oracle JDBC Driver version - "10.2.0.1.0" > Reporter: Genandiy Donchyts > Attachments: Test.hbm.xml, hbm2java.cfg.xml, schema.sql > > Original Estimate: 1 hour > Remaining: 1 hour > > When reverse-engineering Oracle database containint column with TIMESTAMP(3) type it is not recognized as a TIMESTAMP and "serializable" type is used instead of timestamp. This happens because of the bug in Oracle JDBC driver since it returns OTHER (1111) instead of TIMESTAMP(93). > When type-mapping is provided in the form: > <type-mapping> > <sql-type jdbc-type="TIMESTAMP(3)" hibernate-type="timestamp" /> > </type-mapping> > ... it is not used because hibernate can't find TIMESTAMP(3) JDBC data type. > JDBCReader.java, processBasicColumns(Table table, ProgressListener progress): > ... > //TODO: column.setSqlType(sqlTypeName); //this does not work 'cos the precision/scale/length are not retured in TYPE_NAME > //column.setSqlType(sqlTypeName); > ... > it would be nice to have this sqlTypeName set to Column and used during comparison with <type-mapping>, then mapping from "TIMESTAMP(3)" to "timestamp" would work. Currently only 1111 ("OTHER") is passed to Column and as result column does not know anything about "TIMESTAMP(3)" > ----- > To reproduce an issue try to create simple Oracle database with one table: > create table test(id TIMESTAMP(3)); > and run reverse-engineering task over it. > ------ > HACK: custom handling of TIMESTAMP(*) types: > Modify JDBCReader.java: > private void processBasicColumns(Table table, ProgressListener progress) { // get the columns > ... > String sqlTypeName = (String) columnRs.get("TYPE_NAME"); > String columnName = (String) columnRs.get("COLUMN_NAME"); > // HACK: custom handling of TIMESTAMP(*) > if(sqlTypeName.startsWith("TIMESTAMP")) { > sqlType = java.sql.Types.TIMESTAMP; > } > ... > See also forum post: http://forum.hibernate.org/viewtopic.php?t=961625&start=0&postdays=0&postorder=asc&highlight= -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Genandiy D. (JIRA) <no...@at...> - 2006-07-06 12:29:57
|
Custom type mapping is not possible when reverse-engineering Oracle TIMESTAMP(3) types -------------------------------------------------------------------------------------- Key: HBX-700 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-700 Project: Hibernate Tools Type: Bug Components: reverse-engineer Environment: 3.2 svn, Oracle 10g, Oracle JDBC Driver version - "10.2.0.1.0" Reporter: Genandiy Donchyts When reverse-engineering Oracle database containint column with TIMESTAMP(3) type it is not recognized as a TIMESTAMP and "serializable" type is used instead of timestamp. This happens because of the bug in Oracle JDBC driver since it returns OTHER (1111) instead of TIMESTAMP(93). When type-mapping is provided in the form: <type-mapping> <sql-type jdbc-type="TIMESTAMP(3)" hibernate-type="timestamp" /> </type-mapping> ... it is not used because hibernate can't find TIMESTAMP(3) JDBC data type. JDBCReader.java, processBasicColumns(Table table, ProgressListener progress): ... //TODO: column.setSqlType(sqlTypeName); //this does not work 'cos the precision/scale/length are not retured in TYPE_NAME //column.setSqlType(sqlTypeName); ... it would be nice to have this sqlTypeName set to Column and used during comparison with <type-mapping>, then mapping from "TIMESTAMP(3)" to "timestamp" would work. Currently only 1111 ("OTHER") is passed to Column and as result column does not know anything about "TIMESTAMP(3)" ----- To reproduce an issue try to create simple Oracle database with one table: create table test(id TIMESTAMP(3)); and run reverse-engineering task over it. ------ HACK: custom handling of TIMESTAMP(*) types: Modify JDBCReader.java: private void processBasicColumns(Table table, ProgressListener progress) { // get the columns ... String sqlTypeName = (String) columnRs.get("TYPE_NAME"); String columnName = (String) columnRs.get("COLUMN_NAME"); // HACK: custom handling of TIMESTAMP(*) if(sqlTypeName.startsWith("TIMESTAMP")) { sqlType = java.sql.Types.TIMESTAMP; } ... See also forum post: http://forum.hibernate.org/viewtopic.php?t=961625&start=0&postdays=0&postorder=asc&highlight= -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-06 12:23:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083?page=all ] Steve Ebersole updated HHH-1083: -------------------------------- Fix Version: (was: 3.2.0.cr3) > Customization of CREATE TABLE with storage clause etc. > ------------------------------------------------------ > > Key: HHH-1083 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083 > Project: Hibernate3 > Type: New Feature > Reporter: Christian Bauer > Assignee: Steve Ebersole > Priority: Minor > > > Currently Hibernate features a hotfix for the MySQLInnoDBDialect: > public String getTableTypeString() { > return " type=InnoDB"; > } > However, this is not the only appendix that is useful for CREATE TABLE. We should do several things: > - allow appendix for CREATE INDEX, for example, to define the tablespace > - pass in additional arguments to getTableTypeString(), such as tableName, schemaName, catalogName - for example, to allow custom Dialects to return different tablespaces for particular tables > - probably rename the getTableTypeString() method to getTableAppendixString() and getIndexAppendixString() -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-06 12:23:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1871?page=all ] Steve Ebersole resolved HHH-1871: --------------------------------- Resolution: Fixed > query type autodiscovery assume wrong column when mixing entities and scalars > ----------------------------------------------------------------------------- > > Key: HHH-1871 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1871 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr2 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Blocker > Fix For: 3.2.0.cr3 > > > See org.hibernate.test.sql.GeneralTest.testMixAndMatchEntityScalar() -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-06 12:22:02
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1871?page=all ] Steve Ebersole updated HHH-1871: -------------------------------- Fix Version: 3.2.0.cr3 Assign To: Steve Ebersole > query type autodiscovery assume wrong column when mixing entities and scalars > ----------------------------------------------------------------------------- > > Key: HHH-1871 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1871 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr2 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Blocker > Fix For: 3.2.0.cr3 > > > See org.hibernate.test.sql.GeneralTest.testMixAndMatchEntityScalar() -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Andrew (JIRA) <no...@at...> - 2006-07-06 12:02:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-842?page=comments#action_23548 ] Andrew commented on HHH-842: ---------------------------- Sorry. There is no bag now with ORDER BY. There is that exception only when I use SELECT count(*) ... and ORDER BY expression together. And this is trouble of MS SQL, because ORACLE executed this query correctly > Projection with fetch="join" and order-by="" in mappings causes failure > ----------------------------------------------------------------------- > > Key: HHH-842 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-842 > Project: Hibernate3 > Type: Bug > Components: metamodel, core > Versions: 3.0.5 > Environment: MS SQL 2000 SP3, Hibernate 3.0.5 > Reporter: Vasyl Zhabko > Attachments: src.zip > > > If you have in your mappings set fetch="join" and order-by="" for child collection like in this mapping: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > > <hibernate-mapping package="test.model"> > <class name="Cat" table="CAT"> > <id name="catId" column="CAT_ID" type="java.lang.Integer"> > <generator class="native"/> > </id> > > <property name="name" column="NAME" type="java.lang.String" /> > <property name="color" column="COLOR" type="java.lang.String" /> > <property name="gender" column="GENDER" type="java.lang.String" /> > > <set > name="kittens" fetch="join" > cascade="all-delete-orphan" inverse="true" > order-by="name" > > <key column="MOTHER_ID"/> > <one-to-many class="Cat"/> > </set> > > </class> > > </hibernate-mapping> > adding Projection to criteria will have in a result incorrect query generated and execution will fail, like that: > Hibernate: select count(*) as y0_ from CAT this_ left outer join CAT kittens2_ on this_.CAT_ID=kittens2_.MOTHER_ID where this_.COLOR=? order by kittens2_.name > 14:12:45,163 ERROR JDBCExceptionReporter:72 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. > org.hibernate.exception.GenericJDBCException: could not execute query > at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82) > at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) > at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) > at org.hibernate.loader.Loader.doList(Loader.java:1596) > at org.hibernate.loader.Loader.list(Loader.java:1577) > at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300) > at test.test.Test.test(Test.java:62) > at test.test.Test.main(Test.java:79) > Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. > at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) > at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) > at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source) > at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source) > at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source) > at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120) > at org.hibernate.loader.Loader.getResultSet(Loader.java:1272) > at org.hibernate.loader.Loader.doQuery(Loader.java:391) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) > at org.hibernate.loader.Loader.doList(Loader.java:1593) > ... 6 more > Source code for criteria is: > List results = session.createCriteria(Cat.class) > .setProjection( Projections.rowCount() ) > .add( Restrictions.eq("color", "BLACK") ) > .list(); > If you remove fetch="join" everything works just fine. Even if you will use subcriteria with child attributes. Changes in any other attributes have no effect. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Andrew (JIRA) <no...@at...> - 2006-07-06 11:26:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-842?page=comments#action_23547 ] Andrew commented on HHH-842: ---------------------------- The same bag is now in Hibernate 3.2 RC2 [ SQL = "FROM mam.Project p LEFT OUTER JOIN p.processor AS processor LEFT OUTER JOIN p.finisher AS finisher LEFT OUTER JOIN p.closer AS closer WHERE p.performer.ident = :currentPerson ORDER BY closer.name ASC" ] 15:17:18,828 WARN [JDBCExceptionReporter] SQL Error: 8126, SQLState: HY000 15:17:18,828 ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'person3_.N AME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY cla use. 15:17:18,828 WARN [JDBCExceptionReporter] SQL Error: 16945, SQLState: HY000 ... > Projection with fetch="join" and order-by="" in mappings causes failure > ----------------------------------------------------------------------- > > Key: HHH-842 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-842 > Project: Hibernate3 > Type: Bug > Components: metamodel, core > Versions: 3.0.5 > Environment: MS SQL 2000 SP3, Hibernate 3.0.5 > Reporter: Vasyl Zhabko > Attachments: src.zip > > > If you have in your mappings set fetch="join" and order-by="" for child collection like in this mapping: > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > > <hibernate-mapping package="test.model"> > <class name="Cat" table="CAT"> > <id name="catId" column="CAT_ID" type="java.lang.Integer"> > <generator class="native"/> > </id> > > <property name="name" column="NAME" type="java.lang.String" /> > <property name="color" column="COLOR" type="java.lang.String" /> > <property name="gender" column="GENDER" type="java.lang.String" /> > > <set > name="kittens" fetch="join" > cascade="all-delete-orphan" inverse="true" > order-by="name" > > <key column="MOTHER_ID"/> > <one-to-many class="Cat"/> > </set> > > </class> > > </hibernate-mapping> > adding Projection to criteria will have in a result incorrect query generated and execution will fail, like that: > Hibernate: select count(*) as y0_ from CAT this_ left outer join CAT kittens2_ on this_.CAT_ID=kittens2_.MOTHER_ID where this_.COLOR=? order by kittens2_.name > 14:12:45,163 ERROR JDBCExceptionReporter:72 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. > org.hibernate.exception.GenericJDBCException: could not execute query > at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82) > at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) > at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) > at org.hibernate.loader.Loader.doList(Loader.java:1596) > at org.hibernate.loader.Loader.list(Loader.java:1577) > at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322) > at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300) > at test.test.Test.test(Test.java:62) > at test.test.Test.main(Test.java:79) > Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. > at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) > at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source) > at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) > at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source) > at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source) > at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source) > at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source) > at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120) > at org.hibernate.loader.Loader.getResultSet(Loader.java:1272) > at org.hibernate.loader.Loader.doQuery(Loader.java:391) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) > at org.hibernate.loader.Loader.doList(Loader.java:1593) > ... 6 more > Source code for criteria is: > List results = session.createCriteria(Cat.class) > .setProjection( Projections.rowCount() ) > .add( Restrictions.eq("color", "BLACK") ) > .list(); > If you remove fetch="join" everything works just fine. Even if you will use subcriteria with child attributes. Changes in any other attributes have no effect. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 11:13:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-699?page=comments#action_23546 ] Max Rydahl Andersen commented on HBX-699: ----------------------------------------- are you sure you are using the hibernate that is bundled with the tools ? I had to change the queryparametertype handling in the core, so either use the bundled hibernate (to be safe) or use a build from Hibernate 3.2.x to make this work. > Incorrect code generation for query-param elements > -------------------------------------------------- > > Key: HBX-699 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-699 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: Hibernate 3/MySql 5.X > Reporter: Jak Mang > > > Query params in xml mapping files generate incorrect code for integers and possibly other scalers. In the case below, > I have tried "int", "integer", "Integer" and "java.lang.Integer" and "Ljava.lang.Integer;" for the type of parameter "region". > <query name="com.tgcusa.idmgr.ProgramId.findProgramId"> > <query-param name="region" type="integer"/> > <query-param name="epgser" type="string"/> > <query-param name="epgepi" type="string"/> > <![CDATA[ > select pid.tgcsh, pid.tgcser, pid.tgcepi from com.tgcusa.idmgr.ProgramId > as pid where pid.region == :region and pid.epgser == :epgser and > pid.epgepi = :epgepi > ]]> > </query> > The code generator always produces: > public List findTgcSerForEpgSer(int region, java.lang.String tepgser) > { > Query query = > sessionFactory.getCurrentSession().getNamedQuery("com.tgcusa.idmgr.ProgramId.findTgcSerForEpgSer"); > query.setParameter("region", region); > query.setParameter("tepgser", tepgser); > return query.list(); > } > Which has the compilation error: > [javac] Found 2 semantic errors compiling "/sandbox/mainline/srcroot/sw/tgcs > vc/lib/java/src/com/tgcusa/idmgr/ProgramIdHome.java": > [javac] 171. query.setParameter("region", region); > [javac] ^----------------------------------^ > [javac] *** Semantic Error: No applicable overload for a method with signatu > re "setParameter(java.lang.String, int)" was found in type "org.hibernate.Query" > . Perhaps you wanted the overloaded version "org.hibernate.Query setParameter(ja > va.lang.String $1, java.lang.Object $2) throws org.hibernate.HibernateException; > " instead? > It seems that: > 1) There is ambiguity about the type "integer". I have seen it generate java.lang.Integer in other code. > 2) for "int", a query.setParameter should support int. > 3) for an Integer object, the setParameter call is ok, but the the method parameter shoud be Integer not int. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 11:09:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-698?page=comments#action_23545 ] Max Rydahl Andersen commented on HBX-698: ----------------------------------------- This is only in the case of executing a query, correct ? We can move that into a background job, but you should (hopefully) be able to set some setting on your jdbc driver for it not to behave that badly in case of "no answer" > HBX/Eclipse hang if database doesn't exist. > ------------------------------------------- > > Key: HBX-698 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-698 > Project: Hibernate Tools > Type: Improvement > Components: consoleconfiguration > Versions: 3.2beta6 > Environment: Hibernate 3.1.3, Eclipse 3.2 Callisto, Derby 10.1.2.1 (Eclipse feature) > Reporter: Brice Laurencin > > > If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. > The Eclipse log gives a > !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 > !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata > !STACK 0 > org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. > at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) > at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) > at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) > at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) > at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) > at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) > at java.sql.DriverManager.getConnection(Unknown Source) > at java.sql.DriverManager.getConnection(Unknown Source) > at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) > at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) > at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) > at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) > at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) > at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) > at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) > at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) > at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) > at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 10:13:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-677?page=all ] Max Rydahl Andersen updated HBX-677: ------------------------------------ Fix Version: 3.2LATER (was: 3.2beta6) > Expose Hibernate WTP Facet > -------------------------- > > Key: HBX-677 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-677 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Reporter: Max Rydahl Andersen > Fix For: 3.2LATER > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 10:13:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-672?page=all ] Max Rydahl Andersen updated HBX-672: ------------------------------------ Fix Version: 3.2LATER (was: 3.2beta6) > hbm.xml HQL validation > ---------------------- > > Key: HBX-672 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-672 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Reporter: Max Rydahl Andersen > Fix For: 3.2LATER > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 10:13:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-673?page=all ] Max Rydahl Andersen updated HBX-673: ------------------------------------ Fix Version: 3.2LATER (was: 3.2beta6) > Java code HQL inline validation > ------------------------------- > > Key: HBX-673 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-673 > Project: Hibernate Tools > Type: New Feature > Reporter: Max Rydahl Andersen > Fix For: 3.2LATER > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 10:13:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-678?page=all ] Max Rydahl Andersen updated HBX-678: ------------------------------------ Fix Version: 3.2LATER (was: 3.2beta6) > Eclipse 3.2 Common Navigator known configurations > ------------------------------------------------- > > Key: HBX-678 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-678 > Project: Hibernate Tools > Type: New Feature > Reporter: Max Rydahl Andersen > Fix For: 3.2LATER > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-06 10:13:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-676?page=all ] Max Rydahl Andersen updated HBX-676: ------------------------------------ Fix Version: 3.2LATER (was: 3.2beta6) > Use HQL Lexer in color coding > ----------------------------- > > Key: HBX-676 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-676 > Project: Hibernate Tools > Type: Improvement > Components: eclipse > Reporter: Max Rydahl Andersen > Fix For: 3.2LATER > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Brice L. (JIRA) <no...@at...> - 2006-07-06 09:54:59
|
HBX/Eclipse hang if database doesn't exist. ------------------------------------------- Key: HBX-698 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-698 Project: Hibernate Tools Type: Improvement Components: consoleconfiguration Versions: 3.2beta6 Environment: Hibernate 3.1.3, Eclipse 3.2 Callisto, Derby 10.1.2.1 (Eclipse feature) Reporter: Brice Laurencin If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. The Eclipse log gives a !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata !STACK 0 org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-05 21:05:00
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=comments#action_23544 ] Max Rydahl Andersen commented on HBX-697: ----------------------------------------- sure, i would just like to have a relevant test to verify the fix. > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-05 20:07:00
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=comments#action_23543 ] Jacob L E Blain Christen commented on HBX-697: ---------------------------------------------- oh its the 5th not the 6th! > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-05 20:04:56
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=comments#action_23542 ] Jacob L E Blain Christen commented on HBX-697: ---------------------------------------------- so, looking at the source from CVS, today 2006/07/06, it looks like HibernatePropertySourceProvider#getPropertySource() needs to check for null being passed in in its if-else block of code. i can't test this theory right now but i will do so when i get home in a few hours. > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-05 19:59:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=comments#action_23541 ] Max Rydahl Andersen commented on HBX-697: ----------------------------------------- if you could give me a (simple) mapping and (raw) dataset that gives the error then it would help. thanks. > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-05 18:23:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1789?p= age=3Dall ] =20 Steve Ebersole resolved HHH-1789: --------------------------------- Resolution: Fixed > improve efficiency of collection initialization from L2 cache hits > ------------------------------------------------------------------ > > Key: HHH-1789 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1789 > Project: Hibernate3 > Type: Improvement > Components: core > Environment: hibernate 3, db n/a > Reporter: Aapo Kyr=C3=B6l=C3=A4 > Assignee: Steve Ebersole > Fix For: 3.2.0.cr3 > > > We have an entity which has a <map>-type of collection attached to it, th= at uses <many-to-many> mapping. The map has cache setting of <cache usage= =3D"nonstrict-read-write"/>=20 > The problem is that the map is often quite large, 500-1000 elements in it= . But when Hibernate3 instantiates it from cache (PersistentMap.initializeF= romCache()), it will create a HashMap with default parameters and then .put= () each item from the serialized cache data to the map.=20 > HashMap default size is 16 and it resizes it to double always when it has= 75%*capacity elements in it. So, initializing a HashMap with 1000 entries = will cause 7 resizes (which are expensive): 16->32->64->128->256->512->1024= ->2048. This consumes a lot of memory and cpu because HashMap.resize() is a= costly operation.=20 > It would be better for Hibernate to initialize the map with loadfactor 1.= 0 and size of the cached serialized data array / 2 + some extra.=20 --=20 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= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-05 18:10:04
|
NPE when attempting to view entity with null valued, joined properties ---------------------------------------------------------------------- Key: HBX-697 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 Project: Hibernate Tools Type: Bug Components: eclipse Versions: 3.2beta6 Environment: eclipse.buildId=M20060629-1905 java.version=1.5.0_07 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86_64 Reporter: Jacob L E Blain Christen Priority: Minor I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: <join optional="true" table="item_instruments"> <key column="item" unique="true" /> <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> </join> <join optional="true" table="item_stackables"> <key column="item" unique="true"/> <property name="stackSize" column="stacksize" type="java.lang.Short" /> </join> If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): java.lang.NullPointerException at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jak M. (JIRA) <no...@at...> - 2006-07-05 18:10:04
|
Incorrect code generation for query-param elements -------------------------------------------------- Key: HHH-1882 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1882 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.3 Environment: Hibernate 3/MySql 5.X Reporter: Jak Mang Query params in xml mapping files generate incorrect code for integers and possibly other scalers. In the case below, I have tried "int", "integer", "Integer" and "java.lang.Integer" and "Ljava.lang.Integer;" for the type of parameter "region". <query name="com.tgcusa.idmgr.ProgramId.findProgramId"> <query-param name="region" type="integer"/> <query-param name="epgser" type="string"/> <query-param name="epgepi" type="string"/> <![CDATA[ select pid.tgcsh, pid.tgcser, pid.tgcepi from com.tgcusa.idmgr.ProgramId as pid where pid.region == :region and pid.epgser == :epgser and pid.epgepi = :epgepi ]]> </query> The code generator always produces: public List findTgcSerForEpgSer(int region, java.lang.String tepgser) { Query query = sessionFactory.getCurrentSession().getNamedQuery("com.tgcusa.idmgr.ProgramId.findTgcSerForEpgSer"); query.setParameter("region", region); query.setParameter("tepgser", tepgser); return query.list(); } Which has the compilation error: [javac] Found 2 semantic errors compiling "/sandbox/mainline/srcroot/sw/tgcs vc/lib/java/src/com/tgcusa/idmgr/ProgramIdHome.java": [javac] 171. query.setParameter("region", region); [javac] ^----------------------------------^ [javac] *** Semantic Error: No applicable overload for a method with signatu re "setParameter(java.lang.String, int)" was found in type "org.hibernate.Query" . Perhaps you wanted the overloaded version "org.hibernate.Query setParameter(ja va.lang.String $1, java.lang.Object $2) throws org.hibernate.HibernateException; " instead? It seems that: 1) There is ambiguity about the type "integer". I have seen it generate java.lang.Integer in other code. 2) for "int", a query.setParameter should support int. 3) for an Integer object, the setParameter call is ok, but the the method parameter shoud be Integer not int. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jacob L E B. C. (JIRA) <no...@at...> - 2006-07-05 18:10:03
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-697?page=comments#action_23540 ] Jacob L E Blain Christen commented on HBX-697: ---------------------------------------------- forgot to note, but i believe it to be irrelevant, that i was also getting this one my 32bit windows box as well > NPE when attempting to view entity with null valued, joined properties > ---------------------------------------------------------------------- > > Key: HBX-697 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-697 > Project: Hibernate Tools > Type: Bug > Components: eclipse > Versions: 3.2beta6 > Environment: eclipse.buildId=M20060629-1905 > java.version=1.5.0_07 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US > Command-line arguments: -os linux -ws gtk -arch x86_64 > Reporter: Jacob L E Blain Christen > Priority: Minor > > > I am getting a null pointer exception when attempting to view an entity in the properties view (e.g. clicking on a "Hibernate Query Result" after running some HQL through the console). This isn't a super major bug but it is annoying because I was using hibernate console to get quick feedback on tweaks I make to my mappings while developing and lost a few hours on the assumption that the error was just HB Tools's way of telling me they were bad =( > This is happening on an object that has some joins to aggregate some optional data. A snippet of the mapping: > <join optional="true" table="item_instruments"> > <key column="item" unique="true" /> > <many-to-one name="instrumentInfo" column="item" unique="true" insert="false" update="false" /> > </join> > <join optional="true" table="item_stackables"> > <key column="item" unique="true"/> > <property name="stackSize" column="stacksize" type="java.lang.Short" /> > </join> > If any of the properties on the mapped object defined with joins are null, the following NPE occurs and the properties window does nothing (silently ignoring the problem): > java.lang.NullPointerException > at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.hasMetaData(HibernatePropertySourceProvider.java:47) > at org.hibernate.eclipse.console.views.properties.HibernatePropertySourceProvider.getPropertySource(HibernatePropertySourceProvider.java:36) > at org.eclipse.ui.views.properties.PropertySheetEntry.getPropertySource(PropertySheetEntry.java:470) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:759) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:622) > at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575) > at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767) > at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943) > at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473) > at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:218) > at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) > at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62) > at org.hibernate.eclipse.console.views.QueryPageTabView.fireSelectionChangedEvent(QueryPageTabView.java:151) > at org.hibernate.eclipse.console.views.QueryPageViewer.tableDoubleClicked(QueryPageViewer.java:212) > at org.hibernate.eclipse.console.views.QueryPageViewer.access$0(QueryPageViewer.java:207) > at org.hibernate.eclipse.console.views.QueryPageViewer$3.selectionChanged(QueryPageViewer.java:201) > at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:843) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) > at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) > at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976) > at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1128) > at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1154) > at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:213) > at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:207) > at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:374) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) > at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) > 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.eclipse.core.launcher.Main.invokeFramework(Main.java:336) > at org.eclipse.core.launcher.Main.basicRun(Main.java:280) > at org.eclipse.core.launcher.Main.run(Main.java:977) > at org.eclipse.core.launcher.Main.main(Main.java:952) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-05 15:48:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-387?page=comments#action_23539 ] Emmanuel Bernard commented on ANN-387: -------------------------------------- @Inherited is not the right way to do it. But yes we need to support inheritance. We're thinking a lot on this lucene integration ATM to make something better. > lucene integration does not support Inheritance > ----------------------------------------------- > > Key: ANN-387 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-387 > Project: Hibernate Annotations > Type: Improvement > Components: lucene > Environment: all > Reporter: masrawi > > > the annotations of lucene does not support inherited classes, the annotaions should have @Inherited in order to be seen from the child class, otherwise we will have to override methods like getId and the such in order to get it to work -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |