openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <>
Subject [jira] [Created] (OPENJPA-2403) Enhancer yields "does not have a public no-args constructor." exception for entity with protected qualified constructor
Date Wed, 19 Jun 2013 21:52:20 GMT
Albert Lee created OPENJPA-2403:

             Summary: Enhancer yields "does not have a public no-args constructor." exception
for entity with protected qualified constructor
                 Key: OPENJPA-2403
             Project: OpenJPA
          Issue Type: Bug
          Components: Enhance
    Affects Versions: 2.0.3, 2.1.2, 2.3.0, 2.2.3
            Reporter: Albert Lee
            Assignee: Albert Lee

Entity with protected qualified constructor:

public class Kunde {
	protected Kunde() {
		// jpa constructor

causes enhancer to fail with message like:

C:\>wsenhancer test\Kun*.class
82  ConstructorDemoWeb  INFO   [main] openjpa.Tool - Enhancer running on type "class at.arz.domain.core.Kunde".
Exception in thread "main" <openjpa-2.2.3-SNAPSHOT-r422266:1485013 fatal user error>
org.apache.openjpa.util.MetaDataException: The id class "class test.Kundennummer"
 specified by type "class test.Kunde" does not have a public no-args constructor.
        at org.apache.openjpa.meta.ClassMetaData.validateAppIdClassMethods(
        at org.apache.openjpa.meta.ClassMetaData.validateAppIdClass(
        at org.apache.openjpa.meta.ClassMetaData.validateIdentity(
        at org.apache.openjpa.meta.ClassMetaData.validateMeta(
        at org.apache.openjpa.meta.ClassMetaData.resolve(
        at org.apache.openjpa.meta.MetaDataRepository.processBuffer(
        at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(
        at org.apache.openjpa.meta.MetaDataRepository.resolve(
        at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(
        at org.apache.openjpa.meta.MetaDataRepository.getMetaData(
        at org.apache.openjpa.enhance.PCEnhancer.<init>(
        at org.apache.openjpa.enhance.PCEnhancer$
        at org.apache.openjpa.lib.conf.Configurations.launchRunnable(
        at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(
        at org.apache.openjpa.enhance.PCEnhancer.main(
Caused by: java.lang.NoSuchMethodException: test.Kundennummer.<init>()
        at java.lang.Class.throwNoSuchMethodException(
        at java.lang.Class.getConstructor(
        at org.apache.openjpa.meta.ClassMetaData.validateAppIdClassMethods(
        ... 17 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message