[Hibernate-JIRA] Closed: (HHH-1208) setVersion(String) accessor breaks <version type="integer"> property access at runtime
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1208?page=c... ]
Steve Ebersole closed HHH-1208.
-------------------------------
Closing stale resolved issues
> setVersion(String) accessor breaks <version type="integer"> property access at runtime
> --------------------------------------------------------------------------------------
>
> Key: HHH-1208
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1208
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
> Windows 2000 SP4
> Reporter: Adam Shackleford
> Priority: Minor
>
> I'm doing absolutely vanilla versioning, using an int version, and setVersion(int)/getVersion():int accessors.
> *But* one of my persistent classes had a setVersion(String) accessor (a NOP) that I left in for backwards compatibility with objects stored by XMLEncoder that I import with XMLDecoder.
> Having setVersion(String) stops XMLDecoder from complaining that it can't find the method. The method itself does nothing.
> THE PROBLEM: The presence of setVersion(String) confuses Hibernate when I save the persistent object. It ignores the setVersion(int) and tries to call setVersion(String), which yields a "BasicPropertyAccessor ERROR - IllegalArgumentException".
> Here are the essentials:
> ----------------------------------------
> public abstract class Entity {
> private Long id;
> private int version;
> public Long getId() {
> return id;
> }
> public void setId(Long anId) {
> id = anId;
> }
> public int getVersion() {
> return version;
> }
> public void setVersion(int aVersion) {
> version = aVersion;
> }
> }
> public class Template extends Entity {
> public void setVersion(String aVersion) {
> // NOP
> }
> ...
> }
> <class name="Template" table="`TMPL`">
> <id name="id" column="`TMPL_ID`">
> <generator class="native"/>
> </id>
> <version name="version" column="`VER`"/>
> ...
> </class>
> BasicPropertyAccessor ERROR - IllegalArgumentException in class: mypackage.Template, setter method of property: version
> BasicPropertyAccessor ERROR - expected type: java.lang.String, actual value: java.lang.Integer
> AbstractFlushingEventListener ERROR - Could not synchronize database state with session
> org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of mypackage.Template.version
> ----------------------------------------
--
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
15 years
[Hibernate-JIRA] Closed: (HHH-872) Duplicate alias issue returned in 3.0.5, 3.0.4 and possibly others
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-872?page=co... ]
Steve Ebersole closed HHH-872.
------------------------------
Closing stale resolved issues
> Duplicate alias issue returned in 3.0.5, 3.0.4 and possibly others
> ------------------------------------------------------------------
>
> Key: HHH-872
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-872
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.0.4, 3.0.5
> Environment: Hibernate 3.0.5, Oracle 9.x
> Reporter: Eugene Shagenov
>
> This problem has been fixed in 3.0Beta4. However, it has returned in lated release versions - at least in 3.0.5 and 3.0.4. The reason I believe this is a bug and it has returned is that when I make no changes to any of my code (Java or XML), but simply change jars from 3.0.5 to 3.0-beta4 jars, the problem is resolved. To reiterate from the previous issue the problem is as follows:
> When performing more than one join in a query using Criteria class, the aliases generated for the columns may turn out to be identical. Here is a sample generated query and error following -
> select this_.ART_ID as ART1_2_, this_.CREATE_SITE_ID as CREATE2_1_2_, this_.SITE_ID as SITE3_1_2_, this_.LANGUAGE_ID as LANGUAGE4_1_2_, this_.DESCRIPTION as DESCRIPT5_1_2_, this_.PUBLISH_DATE as PUBLISH6_1_2_, this_.HEADLINE as HEADLINE1_2_, this_.EYEBROW as EYEBROW1_2_, this_.TEAMSITE_OBJECT_ID as TEAMSITE9_1_2_, this_.SUB_HEAD as SUB10_1_2_, this_.TEASER as TEASER1_2_, this_.CREATE_DATE as CREATE12_1_2_, this_.BYLINE as BYLINE1_2_, this_.EMBARGO_DATE as EMBARGO14_1_2_, this_.LAST_MODIFIED as LAST15_1_2_, this_.BROWSER_TITLE as BROWSER16_1_2_, this_.FIRSTPAGE as FIRSTPAGE1_2_, this_.CD_ARTID as CD18_1_2_, this_.CD_DOCID as CD19_1_2_, this_.TOPIC as TOPIC1_2_, this_.KEYWORDS as KEYWORDS1_2_, this_.EXTERNAL_REF as EXTERNAL22_1_2_, this_.CREATORBIO as CREATORBIO1_2_, this_.COPYRIGHTHOLDER as COPYRIG24_1_2_, this_.COPYRIGHTYEAR as COPYRIG25_1_2_, this_.ISSUE_NUMBER as ISSUE26_1_2_, this_.DATELINE_LOCATION as DATELINE27_1_2_, this_.ONLINE_RELEASE_DATE as ONLINE28_1_2_, this_.ENDNOTES as ENDNOTES1_2_, taxonomies4_.ART_ID as
> ART1_,
> taxonomy1_.TAXONOMY_ELEMENT_ID as TAXONOMY2_, taxonomy1_.TAXONOMY_ELEMENT_ID as TAXONOMY1_0_, taxonomy1_.ELEMENT_NAME as ELEMENT2_8_0_, taxonomy1_.ELEMENT_DESCRIPTION as ELEMENT3_8_0_, sitesectio6_.ART_ID as
> ART1_,
> sitesectio2_.SITE_SECTION_ID as SITE2_, sitesectio2_.SITE_SECTION_ID as SITE1_1_, sitesectio2_.SECTION_NAME as SECTION2_10_1_ from ARTICLE this_ inner join ARTICLE_TAXONOMY taxonomies4_ on this_.ART_ID=taxonomies4_.ART_ID inner join TAXONOMY_ELEMENT taxonomy1_ on taxonomies4_.TAXONOMY_ELEMENT_ID=taxonomy1_.TAXONOMY_ELEMENT_ID inner join ARTICLE_SITE_SECTION sitesectio6_ on this_.ART_ID=sitesectio6_.ART_ID inner join SITE_SECTION sitesectio2_ on sitesectio6_.SITE_SECTION_ID=sitesectio2_.SITE_SECTION_ID where taxonomy1_.TAXONOMY_ELEMENT_ID in (12966) and sitesectio2_.SITE_SECTION_ID in (19,20,21,22);
> error:
> ORA-00918: column ambiguously defined
> ********
> I place extra line breaks around the two aliases generated with identical/duplicate names.
> Please let me know of any questions or if more information is needed.
--
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
15 years
[Hibernate-JIRA] Closed: (HHH-1040) Error in Hibernate3.1: Not able to obtain connection
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1040?page=c... ]
Steve Ebersole closed HHH-1040.
-------------------------------
Closing stale resolved issues
> Error in Hibernate3.1: Not able to obtain connection
> ----------------------------------------------------
>
> Key: HHH-1040
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1040
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1 rc 1
> Environment: 3.1, postgres
> Reporter: Harsha Pherwani
>
> HI
> I am geting the following errror when executing a select hql in 3.1 version (see below). However I don't get this error when I use the 3.1beta3 version (hibernate-3.1beta3.tar.gz). The scenario is I am undating a table and then reading from the table. I have used transaction while updating the table and have committed properly. We need to use the 3.1 version because we are using the 'WITH' clause in query for left outer joins which is not supported in the versions below 3.1.
> org.hibernate.HibernateException:
> at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:117)
> at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
> at org.hibernate.loader.Loader.doQuery(Loader.java:661)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
> at org.hibernate.loader.Loader.doList(Loader.java:2147)
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
> at org.hibernate.loader.Loader.list(Loader.java:2021)
> at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1455)
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
> at org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)
> at com.icrossing.icfeedsR3.model.scheduler.SchedulerModel.getExportConnectionForClient(SchedulerModel.java:116)
> at com.icrossing.icfeedsR3.operation.ClientServicesOperation.loadClientServices(ClientServicesOperation.java:93)
> at com.icrossing.icfeedsR3.operation.ClientServicesOperation.perform(ClientServicesOperation.java:60)
> at com.icrossing.framework.web.operation.OpCodeProcessor.processOperation(Unknown Source)
> at com.icrossing.framework.web.servlet.ControllerServlet.processRequest(Unknown Source)
> at com.icrossing.framework.web.servlet.ControllerServlet.doPost(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at com.icrossing.icfeedsR3.filters.SessionFilter.doFilter(SessionFilter.java:48)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:595)
--
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
15 years
[Hibernate-JIRA] Closed: (HHH-922) subclass tag with discriminator
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-922?page=co... ]
Steve Ebersole closed HHH-922.
------------------------------
Closing stale resolved issues
> subclass tag with discriminator
> -------------------------------
>
> Key: HHH-922
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-922
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Environment: Hibernate 3,Oracle,Windows
> Reporter: Dilip Ranjith
>
> Consider the following hbm.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping
> >
> <class
> name="DCDTO"
> table="ACCDC"
> dynamic-update="true"
> >
> <id
> name="ID"
> type="java.lang.String"
> >
> <column
> name="DCINFOID"
> />
> <generator class="sequence">
> <param name="sequence">DSEQ</param>
> <!--
> To add non XDoclet generator parameters, create a file named
> hibernate-generator-params-DebtorCreditorDTO.xml
> containing the additional parameters and place it in your merge dir.
> -->
> </generator>
> </id>
> <discriminator
> column="accountType"
> not-null="true"
> type="java.lang.String"
> force="true"
> insert="true"
> />
> <property
> name="creditMax"
> type="java.lang.Double"
> update="true"
> insert="true"
> column="creditMax"
> />
> <subclass
> name="CDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="C"
> >
> </.subclass>
> <subclass
> name="DDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="D"
> >
> </.subclass>
> </class>
> </hibernate-mapping>
> DCDTO is the super class while DDTO and CDTO are its child classes
> suppose we do
> session.get(DDTO.class, ID);
> the clause " where accountType='D' " is not happening
> as a result if the ID provided is the Pkey of CDTO entry (accountType='C') it still gives the result
> But if we execute the HQL query----"from DDTO where ID=?" the where clause (" where accountType='D' " ) gets added!!!
--
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
15 years