openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Noordermeer (JIRA)" <>
Subject [jira] Created: (OPENJPA-721) ClassFormatError occurs when method name is wrong
Date Thu, 11 Sep 2008 15:29:47 GMT
ClassFormatError occurs when method name is wrong

                 Key: OPENJPA-721
             Project: OpenJPA
          Issue Type: Improvement
    Affects Versions: 1.0.0
         Environment: Windows, Tomcat 5.5, Spring tomcat weaving 2.05, Oracle 10g
            Reporter: Leon Noordermeer
            Priority: Minor

A ClassFormatError occures when the case of a referenced method in an orm file is incorrect.

I imagine this error could be handled a bit more gracefull with a more informative error message.
(this one took me 6 hrs to solve). I guess it should be handled the same as when the reference
to the method can not be found.

example of foo-orm.xml:
<entity class="Foo">
        <table name="FOO" />
            <id name="FooId"> <!-- should be fooId -->
                <column name="FOO_ID" />

example of
package model;

public class Foo  {
    public Long fooId;

    public Foor() {

    public Long getFooId() {
        return fooId;

    public void setFooId(Long fooId) {
        this.fooId = fooId;

The error will look like this:
java.lang.ClassFormatError: Repetitive method name/signature in class file com/aciworldwide/tm/configmodule/model/SecretKey
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(
	at org.apache.catalina.loader.WebappClassLoader.findClass(
	at org.apache.catalina.loader.WebappClassLoader.loadClass(
	at org.apache.catalina.loader.WebappClassLoader.loadClass(
	at java.lang.ClassLoader.loadClassInternal(
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(
	at org.apache.openjpa.meta.MetaDataRepository.classForName(
	at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(
	at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(
	at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(
	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message