From dev-return-21020-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Oct 3 21:18:08 2012 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 968A7DA09 for ; Wed, 3 Oct 2012 21:18:08 +0000 (UTC) Received: (qmail 38098 invoked by uid 500); 3 Oct 2012 21:18:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 38059 invoked by uid 500); 3 Oct 2012 21:18:08 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 38046 invoked by uid 99); 3 Oct 2012 21:18:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 21:18:07 +0000 Date: Thu, 4 Oct 2012 08:18:07 +1100 (NCT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: <1356222011.161430.1349299087989.JavaMail.jiratomcat@arcas> In-Reply-To: <1346302747.159209.1349275928813.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (OPENJPA-2272) Unable to instantiate proxy for type "java.util.EnumMap" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468841#comment-13468841 ] Rick Curtis commented on OPENJPA-2272: -------------------------------------- I hate to break it to you, but it looks like this problem was pointed out a number of years ago[1]. > This means the EnumMap collection is not usable ? Yes, I would say that is the case... It sounds like adding support for EnumMap is possible, but not probable. Thanks, Rick [1] http://markmail.org/thread/43fvfqdpcpqke6xb > Unable to instantiate proxy for type "java.util.EnumMap" > -------------------------------------------------------- > > Key: OPENJPA-2272 > URL: https://issues.apache.org/jira/browse/OPENJPA-2272 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.2.0 > Reporter: Guillaume Chauvet > > Dear OpenJPA team, > I have defined a EnumMap collection field like this : > @OneToMany(cascade = CascadeType.ALL, mappedBy = "settings") > @MapKeyColumn(name = "ENUMKEY") > @MapKeyEnumerated > private Map ponderations = new EnumMap(FilterType.class); > Generated tables are okay but when I launch my unit test I obtain this message : > org.apache.openjpa.persistence.RollbackException: Unable to instantiate proxy for type "java.util.EnumMap". Make sure the class has a default constructor. > I understand OpenJPA needs collections with default constructor, but EnumMap needs the enum type as parameter. This means the EnumMap collection is not usable ? -- 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: http://www.atlassian.com/software/jira