commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "White, Joshua A (HTSC, CASD)" <Joshua.Wh...@htsco.com>
Subject RE: java.lang.StackOverflowError
Date Thu, 02 Sep 2004 16:31:19 GMT
This problem might be caused by how I have my domain model constructed.  I
have created and abstract class "Value" which all my domain classes extend
from (Entity extends Value ... etc).  Value has the following methods:

    public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.MULTI_LINE_STYLE);
    }

    public boolean equals(Object o) {
        return EqualsBuilder.reflectionEquals(this, o);
    }

    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

If I have a domain object with other domain objects as members, will this
cause the below exception?

Regards,

Joshua



 


-----Original Message-----
From: White, Joshua A (HTSC, CASD) [mailto:Joshua.White@htsco.com]
Sent: Thursday, September 02, 2004 12:14 PM
To: 'commons-user@jakarta.apache.org'
Subject: java.lang.StackOverflowError


All,
 
I am receiving a java.lang.StackOverflowError.  The stack trace is very
repetitive.  Any ideas on how I may debug this?
 
Regards,
 
Joshua
 
 
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
DEBUG - SessionImpl.finalize(3384) | running Session.finalize()
 
java.lang.StackOverflowError
 at java.lang.reflect.AccessibleObject.<init>(AccessibleObject.java:137)
 at java.lang.reflect.Field.<init>(Field.java:62)
 at java.lang.reflect.Field.copy(Field.java:83)
 at java.lang.reflect.ReflectAccess.copyField(ReflectAccess.java:92)
 at sun.reflect.ReflectionFactory.copyField(ReflectionFactory.java:277)
 at java.lang.Class.copyFields(Class.java:1962)
 at java.lang.Class.getDeclaredFields(Class.java:1090)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:345)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at java.util.AbstractSet.hashCode(AbstractSet.java:103)
 at net.sf.hibernate.collection.Set.hashCode(Set.java:384)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at
org.apache.commons.lang.builder.HashCodeBuilder.append(HashCodeBuilder.java:
392)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionAppend(HashCodeBui
lder.java:353)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:327)
 at
org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(HashCodeB
uilder.java:194)
 at employeeclub.domain.Value.hashCode(Value.java:22)
 at java.util.AbstractSet.hashCode(AbstractSet.java:103)
 at net.sf.hibernate.collection.Set.hashCode(Set.java:384)
....
Last 17 lines repeat another 20+ times...


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message