[Hibernate-JIRA] Created: (HHH-2216) ClassCastException in SecondLevelCacheStatistics for cached Query
by Matt McGill (JIRA)
ClassCastException in SecondLevelCacheStatistics for cached Query
-----------------------------------------------------------------
Key: HHH-2216
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2216
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Environment: Hibernate 3.0.5
Reporter: Matt McGill
The following code in SecondLevelCacheStatistics.java produces a CCE when a Query has been cached, because of cast to CacheKey:
public Map getEntries() {
Map map = new HashMap();
Iterator iter = cache.toMap().entrySet().iterator();
while ( iter.hasNext() ) {
Map.Entry me = (Map.Entry) iter.next();
map.put( ( (CacheKey) me.getKey() ).getKey(), me.getValue() );
}
return map;
}
To reproduce, turn on query caching and execute cachable query:
session.createQuery("from Foo")
.setCacheable(true)
.setCacheRegion("fooQuery")
.list()
Then get entities in second level cache for the query region via statistics API:
sessionFactory
.getStatistics()
.getSecondLevelCacheStatistics("fooQuery")
.getEntities()
Relevent portion of example stack trace:
java.lang.ClassCastException: org.hibernate.cache.QueryKey
at org.hibernate.stat.SecondLevelCacheStatistics.getEntries(SecondLevelCacheStatistics.java:50)
at edu.taylor.domain.person.CachingPersonDirectory.logSecondLevelCacheContents(CachingPersonDirectory.java:22)
at edu.taylor.domain.person.CachingPersonDirectory.getPersonWithBannerId(CachingPersonDirectory.java:30)
Not sure whether 'major' is the right priority here. It's 'major' in the sense that it's a big hairy runtime crash, but it's not all /that/ important to me to log the contents of the 2nd level cache. Not hard to fix, in any event.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Commented: (HHH-1629) SchemaUpdate/validator doesn't listen to quoting
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629?page=c... ]
Max Rydahl Andersen commented on HHH-1629:
------------------------------------------
yes, verified. Either i can't read and understand javadocs or MySQL drivers are lying ;)
DataBaseMetaData.storesMixedCaseQuotedIdentifiers()
DataBaseMetaData.storesUpperCaseQuotedIdentifiers()
DataBaseMetaData.storesLowerCaseQuotedIdentifiers()
all returns true with MySQL and that can't be right - only one should return true.
I'll let MixedCaseQuotedIdentifiers be the one we ask first which should work if other db's at least tell the truth.
> SchemaUpdate/validator doesn't listen to quoting
> ------------------------------------------------
>
> Key: HHH-1629
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.2
> Environment: Hibernate 3.1.2
> Postgres 8.0.4
> Linux
> Reporter: Nicklas Nordborg
> Priority: Trivial
> Fix For: 3.2.1
> Attachments: AffyFeatureData.hbm.xml, patch-HHH-1629.txt
>
>
> The SchemaUpdate only generates SQL with CREATE TABLE statements and can't update existing tables.
> With debugging turned on the SchemaUpdate reports:
> 11:25:22,599 INFO SchemaUpdate:114 - Running hbm2ddl schema update
> 11:25:22,599 INFO SchemaUpdate:126 - fetching database metadata
> .11:25:22,771 INFO SchemaUpdate:142 - updating schema
> 11:25:22,803 INFO DatabaseMetadata:91 - table not found: AffyFeatures
> 11:25:22,830 INFO DatabaseMetadata:91 - table not found: AnnotationSets
> 11:25:22,855 INFO DatabaseMetadata:91 - table not found: AnnotationTypeItems
> .... and so on for another 100+ tables
> All tables except two exists in the database. The two new tables are created successfully by SchemaUpdate.
> I attach one of my mapping files (generated by XDoclet).
> I had a quick look at the SchemaUpdate code (which calls DatabaseMetadata) and I think the problem is that it converts the table names to upper or lower case, even though I have quoted them in the mapping files. If the DatabaseMetadata.getTableMetadata could take a Table object as a parameter instead of the name, schema and catalog, it could check the Table.isQuoted() method before converting any names to upper or lower case. It seems like this method is only used by the Configuration class so it shouldn't be too hard to fix.
> I could do the fix myself, but I will only be able to validate it against Postgres and MySQL using quoted table names. So, others would probably have to validate it agains other databases and using unquoted table names.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Created: (HHH-2213) INFINITE loop with HQL Query using select new SomeClass(queryclass)
by andrew (JIRA)
INFINITE loop with HQL Query using select new SomeClass(queryclass)
-------------------------------------------------------------------
Key: HHH-2213
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2213
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.0.cr3
Environment: Win XP, Hibernate version 3.2 cr4, August 24, 2006 Jboss jboss-4.0.4.GA, Oracle 10G
Reporter: andrew
Priority: Critical
Attachments: AdMgmtInfo.java, AdMgmtVw.java, IAdMgmtVw.java
Hi,
Run into an infinite loop problem when using HQL "select new" Query best if I report this in code: (also attaching relevant java classes,
file being described is: AdMgmtInfo.java)
I have following HQL query string:
String queryString = "select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw"
upon executing
Query query = entityManager.createQuery(queryString);
List<IAdMgmtInfo> adMgmtInfoList = (List<IAdMgmtInfo>) query.getResultList();
Hibernate goes into INFINITE loop creating follwoing repeating output (jboss log)
2006-11-05 19:08:26,316 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw
2006-11-05 19:08:26,347 DEBUG [org.hibernate.hql.ast.AST] --- HQL AST ---
\-[QUERY] 'query'
\-[SELECT_FROM] 'SELECT_FROM'
+-[FROM] 'from'
| \-[RANGE] 'RANGE'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[IDENT] 'com'
| | | | | \-[IDENT] 'unicast'
| | | | \-[IDENT] 'campaign'
| | | \-[IDENT] 'impl'
| | \-[IDENT] 'AdMgmtVw'
| \-[ALIAS] 'admgmtvw'
\-[SELECT] 'select'
\-[CONSTRUCTOR] '('
+-[DOT] '.'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[IDENT] 'com'
| | | | \-[IDENT] 'unicast'
| | | \-[IDENT] 'campaign'
| | \-[IDENT] 'impl'
| \-[IDENT] 'AdMgmtInfo'
\-[IDENT] 'admgmtvw'
2006-11-05 19:08:26,347 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,488 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2006-11-05 19:08:26,550 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} : com.unicast.campaign.impl.AdMgmtVw (admgmtvw) -> admgmtvw0_
2006-11-05 19:08:26,566 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved : admgmtvw -> admgmtvw0_.AD_ID
2006-11-05 19:08:26,581 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2006-11-05 19:08:26,581 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() : ( SELECT ( {select clause} ( ( ( . ( . ( . ( . com unicast ) campaign ) impl ) AdMgmtInfo ) admgmtvw0_.AD_ID ) ) ( FromClause{level=1} FUSE_RP.AD_MGMT_VW admgmtvw0_ ) )
2006-11-05 19:08:26,597 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [FUSE_RP.AD_MGMT_VW admgmtvw0_]
2006-11-05 19:08:26,597 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2006-11-05 19:08:26,613 DEBUG [org.hibernate.hql.ast.AST] --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (FUSE_RP.AD_MGMT_VW)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'
| \-[CONSTRUCTOR] ConstructorNode: '('
| +-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign.impl.AdMgmtInfo,no from element}
| | +-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign.impl,no from element}
| | | +-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign,no from element}
| | | | +-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast,no from element}
| | | | | +-[IDENT] IdentNode: 'com' {originalText=com}
| | | | | \-[IDENT] IdentNode: 'unicast' {originalText=unicast}
| | | | \-[IDENT] IdentNode: 'campaign' {originalText=campaign}
| | | \-[IDENT] IdentNode: 'impl' {originalText=impl}
| | \-[IDENT] IdentNode: 'AdMgmtInfo' {originalText=AdMgmtInfo}
| \-[ALIAS_REF] IdentNode: 'admgmtvw0_.AD_ID as col_0_0_' {alias=admgmtvw, className=com.unicast.campaign.impl.AdMgmtVw, tableAlias=admgmtvw0_}
\-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[admgmtvw], fromElementByTableAlias=[admgmtvw0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
\-[FROM_FRAGMENT] FromElement: 'FUSE_RP.AD_MGMT_VW admgmtvw0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=admgmtvw,role=null,tableName=FUSE_RP.AD_MGMT_VW,tableAlias=admgmtvw0_,origin=null,colums={,className=com.unicast.campaign.impl.AdMgmtVw}}
2006-11-05 19:08:26,613 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,691 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-11-05 19:08:26,691 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-11-05 19:08:26,738 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:26,738 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:27,003 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-11-05 19:08:27,003 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,081 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,081 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,081 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,081 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,222 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,222 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,284 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,284 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,316 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,316 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,331 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,331 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,472 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,472 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,503 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,503 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,534 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,534 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,534 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,534 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,675 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,675 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,706 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,706 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,738 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,738 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,738 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,738 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,738 DEBUG [org.hibernate.loader.Loader] result row:
---------------------------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Commented: (HHH-1629) SchemaUpdate/validator doesn't listen to quoting
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629?page=c... ]
Max Rydahl Andersen commented on HHH-1629:
------------------------------------------
Could you report that IllegalArgumentException as a seperate bug with a *testcase* and do make sure you don't by accident have another hibernate3.jar layong around ?
i'll try and see what mysql problems there is (most likely their driver is lying...have seen that too many times)
> SchemaUpdate/validator doesn't listen to quoting
> ------------------------------------------------
>
> Key: HHH-1629
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.2
> Environment: Hibernate 3.1.2
> Postgres 8.0.4
> Linux
> Reporter: Nicklas Nordborg
> Priority: Trivial
> Fix For: 3.2.1
> Attachments: AffyFeatureData.hbm.xml, patch-HHH-1629.txt
>
>
> The SchemaUpdate only generates SQL with CREATE TABLE statements and can't update existing tables.
> With debugging turned on the SchemaUpdate reports:
> 11:25:22,599 INFO SchemaUpdate:114 - Running hbm2ddl schema update
> 11:25:22,599 INFO SchemaUpdate:126 - fetching database metadata
> .11:25:22,771 INFO SchemaUpdate:142 - updating schema
> 11:25:22,803 INFO DatabaseMetadata:91 - table not found: AffyFeatures
> 11:25:22,830 INFO DatabaseMetadata:91 - table not found: AnnotationSets
> 11:25:22,855 INFO DatabaseMetadata:91 - table not found: AnnotationTypeItems
> .... and so on for another 100+ tables
> All tables except two exists in the database. The two new tables are created successfully by SchemaUpdate.
> I attach one of my mapping files (generated by XDoclet).
> I had a quick look at the SchemaUpdate code (which calls DatabaseMetadata) and I think the problem is that it converts the table names to upper or lower case, even though I have quoted them in the mapping files. If the DatabaseMetadata.getTableMetadata could take a Table object as a parameter instead of the name, schema and catalog, it could check the Table.isQuoted() method before converting any names to upper or lower case. It seems like this method is only used by the Configuration class so it shouldn't be too hard to fix.
> I could do the fix myself, but I will only be able to validate it against Postgres and MySQL using quoted table names. So, others would probably have to validate it agains other databases and using unquoted table names.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Commented: (HHH-1629) SchemaUpdate/validator doesn't listen to quoting
by Nicklas Nordborg (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629?page=c... ]
Nicklas Nordborg commented on HHH-1629:
---------------------------------------
It now works with Postgres but it is broken with MySQL instead. The debug output is more or less the same as before:
09:02:58,220 INFO DatabaseMetadata:95 - table not found: AnnotationSets
.....and so on for all other tables.
09:02:58,506 DEBUG SchemaUpdate:149 - create table `AnnotationSets` (`id` integer not null auto_increment, `version` integer not null, `item_type` integer not null, primary key (`id`)) type=InnoDB
09:02:58,513 ERROR SchemaUpdate:155 - Unsuccessful: create table `AnnotationSets` (`id` integer not null auto_increment, `version` integer not null, `item_type` integer not null, primary key (`id`)) type=InnoDB
I also had another problem. At first I got the following stacktrace when starting up and creating a Session:
java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at org.hibernate.jdbc.BorrowedConnectionProxy.generateProxy(BorrowedConnectionProxy.java:56)
at org.hibernate.jdbc.ConnectionManager.borrowConnection(ConnectionManager.java:163)
at org.hibernate.jdbc.JDBCContext.borrowConnection(JDBCContext.java:111)
at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:359)
at net.sf.basedb.core.HibernateUtil.newSession(HibernateUtil.java:790)
at net.sf.basedb.core.HibernateUtil.isEmptyDatabase(HibernateUtil.java:469)
at net.sf.basedb.core.HibernateUtil.createStaticTables(HibernateUtil.java:433)
at net.sf.basedb.core.Install.createTables(Install.java:127)
at net.sf.basedb.install.InitDB.main(InitDB.java:64)
I had to remove ConnectionWrapper.class from the PROXY_INTERFACES array in org.hibernate.jdbc.BorrowedConnectionProxy class. Line 790 in my HibernateUtil class contains a call to Session.connection().
> SchemaUpdate/validator doesn't listen to quoting
> ------------------------------------------------
>
> Key: HHH-1629
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1629
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.2
> Environment: Hibernate 3.1.2
> Postgres 8.0.4
> Linux
> Reporter: Nicklas Nordborg
> Priority: Trivial
> Fix For: 3.2.1
> Attachments: AffyFeatureData.hbm.xml, patch-HHH-1629.txt
>
>
> The SchemaUpdate only generates SQL with CREATE TABLE statements and can't update existing tables.
> With debugging turned on the SchemaUpdate reports:
> 11:25:22,599 INFO SchemaUpdate:114 - Running hbm2ddl schema update
> 11:25:22,599 INFO SchemaUpdate:126 - fetching database metadata
> .11:25:22,771 INFO SchemaUpdate:142 - updating schema
> 11:25:22,803 INFO DatabaseMetadata:91 - table not found: AffyFeatures
> 11:25:22,830 INFO DatabaseMetadata:91 - table not found: AnnotationSets
> 11:25:22,855 INFO DatabaseMetadata:91 - table not found: AnnotationTypeItems
> .... and so on for another 100+ tables
> All tables except two exists in the database. The two new tables are created successfully by SchemaUpdate.
> I attach one of my mapping files (generated by XDoclet).
> I had a quick look at the SchemaUpdate code (which calls DatabaseMetadata) and I think the problem is that it converts the table names to upper or lower case, even though I have quoted them in the mapping files. If the DatabaseMetadata.getTableMetadata could take a Table object as a parameter instead of the name, schema and catalog, it could check the Table.isQuoted() method before converting any names to upper or lower case. It seems like this method is only used by the Configuration class so it shouldn't be too hard to fix.
> I could do the fix myself, but I will only be able to validate it against Postgres and MySQL using quoted table names. So, others would probably have to validate it agains other databases and using unquoted table names.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Created: (HHH-2212) getter (for many-to-one) did not work with an interface as return values
by Manfred Quasten (JIRA)
getter (for many-to-one) did not work with an interface as return values
-------------------------------------------------------------------------
Key: HHH-2212
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2212
Project: Hibernate3
Type: Improvement
Environment: java 5.0, eclipse jboss ide, oracle 9i on xp , classes12.jar jdbc diver
Reporter: Manfred Quasten
Attachments: Configuration.jdo.xml, Document.java, DocumentConfiguration.java
the getter Method for a many-to-one Method can not have an Interface as returntype :
( ConfigurationImpl implements the interface DocumentConfiguration )
The first opportunity works, the second one not :
...
public ConfigurationImpl getConfiguration() {
return (ConfigurationImpl) configuration;
}
...
public DocumentConfiguration getConfiguration() {
return configuration;
}
This is bad, because it is not possible to work against an interface and to change the implementation (testmocks etc ) (using dependency injection for example)
I think the real returned type should be taken for the mapping not the signature of the method. If the signature of the method is an interface that it implemented by the returned class it should work too .
The error message for the second case :
Exception in thread "main" org.hibernate.MappingException: An association from the table xDocument refers to an unmapped class: de.mq.fourier.server.document.DocumentConfiguration
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1134)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1052)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.<init>(ConfigurationHibernateDAO.java:18)
at de.mq.fourier.server.document.dao.ConfigurationHibernateDAO.main(ConfigurationHibernateDAO.java:73)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
17 years, 7 months
[Hibernate-JIRA] Updated: (HHH-1524) Error on left outer join with Oracle Dialect: ORA-00936: missing expression
by Milosz Tylenda (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1524?page=all ]
Milosz Tylenda updated HHH-1524:
--------------------------------
Attachment: HHH-1524.patch
The patch corrects the issue. It also handles other operators like 'like' and 'between' and is aware of quoted strings in SQL. A test case for the changed functionality is also included.
> 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
17 years, 7 months