From: Tobias (JIRA) <no...@at...> - 2005-11-22 13:15:59
|
interfaces for Proxies are not regonized as interfaces ------------------------------------------------------ Key: HHH-1189 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 Project: Hibernate3 Type: Patch Components: core Versions: 3.1 rc3 Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 Reporter: Tobias Priority: Critical In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: if ( !proxyInterface.isInterface() ) { and should be if ( !subclassClass.isInterface() ) { So the code then would look like this: Subclass subclass = ( Subclass ) iter.next(); Class subclassProxy = subclass.getProxyInterface(); Class subclassClass = subclass.getMappedClass(); if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { if ( !subclassProxy.isInterface() ) { // HERE! throw new MappingException( "proxy must be either an interface, or the class itself: " + subclass.getEntityName() ); } proxyInterfaces.add( subclassProxy ); } After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Gavin K. (JIRA) <no...@at...> - 2005-11-22 13:20:01
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=all ] Gavin King updated HHH-1189: ---------------------------- Fix Version: 3.1 > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > Fix For: 3.1 > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Gavin K. (JIRA) <no...@at...> - 2005-11-22 13:20:01
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=all ] Gavin King reassigned HHH-1189: ------------------------------- Assign To: Steve Ebersole > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > Fix For: 3.1 > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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...> - 2005-12-03 23:01:20
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21004 ] Steve Ebersole commented on HHH-1189: ------------------------------------- do you have a test case showing what this is supposed to "fix"? > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > Fix For: 3.1 > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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...> - 2005-12-08 06:49:26
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=all ] Steve Ebersole updated HHH-1189: -------------------------------- Fix Version: (was: 3.1) still waiting on response from user (moving off 3.1) > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Tobias (JIRA) <no...@at...> - 2005-12-08 07:49:29
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21106 ] Tobias commented on HHH-1189: ----------------------------- I don't have a test case at hand that I could submit. I can't upload our project here and you don't want that either I guess ;-) Perparing a test case would take some time, perhaps in 2006? Nevertheless I tested the patch on our project and the particular Exception went away. > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Gavin K. (JIRA) <no...@at...> - 2005-12-08 07:53:27
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21107 ] Gavin King commented on HHH-1189: --------------------------------- If you can't be bothered writing a test case, we can't be bothered with your patch. It is obviously not very important, and we have many things to do. I will reject unless a test case is forthcoming. > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Luiz H. D. (JIRA) <no...@at...> - 2005-12-15 01:44:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21269 ] Luiz Henrique Decaro commented on HHH-1189: ------------------------------------------- He's right i just tried to map an entity's proxy as an interface with hibernate 3.0.5 and this error popped up. I'll try his fix and come > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Luiz H. D. (JIRA) <no...@at...> - 2005-12-15 02:20:31
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21270 ] Luiz Henrique Decaro commented on HHH-1189: ------------------------------------------- YES! I found out what is going on. By the code I MUST have an interface proxying my superclass when I want to have an interface proxying my subclass. And what if I want to have a proxy as an interface only in my subClass? LOOK: if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { --> if ( !proxyInterface.isInterface() ) { //HERE throw new MappingException( In those 3 lines what happens is this: First you ask about SUBCLASS proxy and SUBCLASS class and WHAT DOES THE CLASS PROXY (proxyInterface) has todo with it in the folowing line? It should be the folowing: if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { if ( !subClassProxy.isInterface() && !subClassProxy.isConcreteClass() ) { throw new MappingException( The TestCase you were asking for is this: public class Bug {} public class BadBug extends Bug implements Errors{} and now: Map this out Thanks in advance! > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Luiz H. D. (JIRA) <no...@at...> - 2005-12-15 02:59:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_21272 ] Luiz Henrique Decaro commented on HHH-1189: ------------------------------------------- Yep, my comment proceed! I mapped my superClass with a proxy that is an interface for that superclass and it worked nicelly. From the reference guide: <class name="CatImpl" proxy="Cat"> ...... <subclass name="DomesticCatImpl" proxy="DomesticCat"> ..... </subclass> </class> What it should do with the fix is: <class name="Cat"> ...... <subclass name="DomesticCatImpl" proxy="DomesticCat"> ..... </subclass> </class> > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Tobias (JIRA) <no...@at...> - 2006-05-16 04:23:11
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_23104 ] Tobias commented on HHH-1189: ----------------------------- Unless this is fixed in the source you need to pull the sources, apply the fix youself and compile your own hibernate version. Another option is to let the superclass use a interface as the proxy. That would be a workaround. > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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: Oleg S. K. (JIRA) <no...@at...> - 2006-05-15 19:32:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189?page=comments#action_23099 ] Oleg S. Kobyzev commented on HHH-1189: -------------------------------------- Hi , I have the same issue in version 3.1.3. Could you please provide me an information about how this isssue can be fixed or how can I get round this issue. thank you in Advance! > interfaces for Proxies are not regonized as interfaces > ------------------------------------------------------ > > Key: HHH-1189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1189 > Project: Hibernate3 > Type: Patch > Components: core > Versions: 3.1 rc3 > Environment: Discovered on Hibernate 3.0, still present in 3.1rc3 > Reporter: Tobias > Assignee: Steve Ebersole > Priority: Critical > > Original Estimate: 1 hour > Remaining: 1 hour > > In org.hibernate.tuple.PojoEntityTuplizer line 119 reads: > if ( !proxyInterface.isInterface() ) { > and should be > if ( !subclassClass.isInterface() ) { > So the code then would look like this: > Subclass subclass = ( Subclass ) iter.next(); > Class subclassProxy = subclass.getProxyInterface(); > Class subclassClass = subclass.getMappedClass(); > if ( subclassProxy!=null && !subclassClass.equals( subclassProxy ) ) { > if ( !subclassProxy.isInterface() ) { // HERE! > throw new MappingException( > "proxy must be either an interface, or the class itself: " + > subclass.getEntityName() > ); > } > proxyInterfaces.add( subclassProxy ); > } > After that change the specified interfaces for subclass proxies are regonized as such. Without this patch the superclass is checked, which may not have/be an interface as proxy class. -- 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 |