Scenario:
MySQL driver 3.0.8
Hibernate 2.0.3
Code:
Code:
Configuration cfg = new Configuration();
cfg.addClass(Simple.class);
PersistentClass pc = cfg.getClassMapping(Simple.class); //this row throws exception
Exception:
Code:
java.lang.StackOverflowError
at java.lang.Object.toString(Object.java:203)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:361)
at org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java:337)
at org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java:322)
at org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java:224)
at org.apache.commons.lang.builder.ToStringBuilder.append(ToStringBuilder.java:326)
at org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java:292)
at org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java:231)
at net.sf.hibernate.util.Stringable.toString(Stringable.java:7)
at java.lang.String.valueOf(String.java:2177)
at java.util.AbstractCollection.toString(AbstractCollection.java:451)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:361)
at org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java:348)
at org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java:245)
at org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java:224)
.
.
.
at org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java:322)
at org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java:224)
at org.apache.commons.lang.builder.ToStringBuilder.append(ToStringBuilder.java:326)
at org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java:292)
at org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java:231)
at net.sf.hibernate.util.Stringable.toString(Stringable.java:7)
at java.lang.String.valueOf(String.java:2177)
at java.lang.StringBuffer.append(StringBuffer.java:361)
at org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java:337)
at org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java:322)
It bug in Hibernate 2.0.3 or I use some wrong libraries ?
[/code]