Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 44510 invoked from network); 6 Jul 2008 10:03:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jul 2008 10:03:05 -0000 Received: (qmail 60745 invoked by uid 500); 6 Jul 2008 10:03:05 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 60725 invoked by uid 500); 6 Jul 2008 10:03:05 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 60714 invoked by uid 99); 6 Jul 2008 10:03:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jul 2008 03:03:05 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eljotpl@gmail.com designates 66.249.90.183 as permitted sender) Received: from [66.249.90.183] (HELO ik-out-1112.google.com) (66.249.90.183) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jul 2008 10:02:13 +0000 Received: by ik-out-1112.google.com with SMTP id c30so910678ika.3 for ; Sun, 06 Jul 2008 03:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=k59E2lraltgCzrFov8UKzklQ7Pb1m4u3iU5SoGl2XaE=; b=ZuDse/H9kz8kVqsuuH5HlJqk9z+jS0oE0rkQkORg9agPIchRALC9jsyNjDaSRfmorf UmY6+P4vFuQQSJo+EJrzPpvtAnrITf4vNJ3Cwt1J158S8WFHxb0YhKHZ7R9iaOZxQNJB Pe+sHlcUtlDCKuqzbSaNQ5aFaOKxh5hOBj37g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=D/8k5/xOkJJ52x3FhNpC+t5FL2lUeOYICvUstb5bBejqWO7SOIKVaZto/tf2unTFOw H6J/h9TpVw6v+BGelT2aXK+AOlcLeHnNVMGSGCWdcDkzAR3evH7VmneeRe0z6gwJArp6 ET+kkIuFfM0hEz0Vg76yt53zb/DLBRAKCdnQI= Received: by 10.210.18.18 with SMTP id 18mr1983739ebr.95.1215338553494; Sun, 06 Jul 2008 03:02:33 -0700 (PDT) Received: by 10.210.13.15 with HTTP; Sun, 6 Jul 2008 03:02:33 -0700 (PDT) Message-ID: <1b5bfeb50807060302p30d6b89dn371ffec734587a8a@mail.gmail.com> Date: Sun, 6 Jul 2008 12:02:33 +0200 From: "Jacek Laskowski" Reply-To: jacek@laskowski.net.pl Sender: eljotpl@gmail.com To: user@geronimo.apache.org Subject: Re: error writing tuple to database "the owning entity is not mapped" geronimo 2.1.1 In-Reply-To: <338462320807060234v4a8f539bm6eac61dd38392054@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <18290344.post@talk.nabble.com> <1b5bfeb50807051348j5533674dqf88ef6d8868a5caf@mail.gmail.com> <338462320807060234v4a8f539bm6eac61dd38392054@mail.gmail.com> X-Google-Sender-Auth: cf09c6e14a372bfd X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Jul 6, 2008 at 11:34 AM, Mario Kofler wrote: > Hi Mario, Let's make it simpler by removing some unneeded, defaulted configuration values in your sample. > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" > version="1.0"> > Hint: you may remove transaction-type as it's JTA in managed environment like Geronimo. > videothek > org.apache.openjpa.persistence.PersistenceProviderImpl Provider defaults to openjpa in Geronimo. You may remove it. > vt.bean.entity.Person > vt.bean.entity.Actor > vt.bean.entity.Director > vt.bean.entity.Movie > vt.bean.entity.Dvd Not needed in managed environment like Geronimo. It makes things run faster - no need to look for annotated classes, but am not sure if we don't do this even though the class elements are specified. Also, you showed Person entity class, but what about the rest? Either remove them and let's play with a single entity only and add more later or show all of them as I think the issue might be in the others. > > > > > > jdbc/postgres > jdbc/postgres I think *data-source should be before properties element. Geronimo should really be more strict. > @Entity > @Table(name="person") > @Inheritance(strategy=InheritanceType.JOINED) > @DiscriminatorColumn(name="role", discriminatorType=DiscriminatorType.STRING) discriminatorType is defaulted to STRING. > @DiscriminatorValue("P") > public class Person implements java.io.Serializable > { > private int id; > private String name; > private Calendar birthdate; > private String origin; > > @Id > @GeneratedValue > public int getId() > { > return id; > } > > public void setId(int id) > { > this.id = id; > } > > public String getName() > { > return name; > } > > public void setName(String name) > { > this.name = name; > } > > @Temporal(TemporalType.DATE) > public Calendar getBirthdate() > { > return birthdate; > } I think that's the issue - @Temporal. According to the spec - JSR 220: Enterprise JavaBeansTM,Version 3.0 Java Persistence API - page 234: public enum TemporalType { DATE, // java.sql.Date TIME, // java.sql.Time TIMESTAMP // java.sql.Timestamp } so Calendar seems to not be accepted for @Temporal annotation. Change the return type of the getter. I think the Person entity is not mapped correctly and when you run your sample you are off the error messages which tell you the Person entity could not be mapped. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl