Return-Path: Delivered-To: apmail-geronimo-xbean-dev-archive@locus.apache.org Received: (qmail 22868 invoked from network); 31 Aug 2007 05:02:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Aug 2007 05:02:10 -0000 Received: (qmail 2661 invoked by uid 500); 31 Aug 2007 05:02:06 -0000 Delivered-To: apmail-geronimo-xbean-dev-archive@geronimo.apache.org Received: (qmail 2644 invoked by uid 500); 31 Aug 2007 05:02:05 -0000 Mailing-List: contact xbean-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: xbean-dev@geronimo.apache.org Delivered-To: mailing list xbean-dev@geronimo.apache.org Received: (qmail 2635 invoked by uid 99); 31 Aug 2007 05:02:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 22:02:05 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kevan.miller@gmail.com designates 66.249.82.228 as permitted sender) Received: from [66.249.82.228] (HELO wx-out-0506.google.com) (66.249.82.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 05:01:58 +0000 Received: by wx-out-0506.google.com with SMTP id i27so633556wxd for ; Thu, 30 Aug 2007 22:01:37 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=lRqW5Qh4pFGpde6yKjxm/8j8g4xp9EZoWvrxed9J0x3uk/ClNMV7OJxIkUL7ziVGgvpHbXNw2aXWGpdgoUdyVQCxZQG3zywwOEXbsQxNh81d3QxYmKvdezmHQ9j1pwC9qlJtbmv1JKYWycUkIRcyweestqTmukbc6FohSZJkL6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=p9UFbzsaJGonG9pA8aMrZ71ySOFcrZD9CHdLCOQmppnndrq+IaK4k3XZY/gIr9ge+4zYxYcDaf2Z+kkGSkdq4KJfPMo5Ue2Zymb9jnvFWiQ2u2P8iA4dPM90kuxUbw0M5JvdCNHHqsG+aqe6W+UNcTAPaG6+4N47AA+OpXsuDho= Received: by 10.90.34.3 with SMTP id h3mr1429788agh.1188536497266; Thu, 30 Aug 2007 22:01:37 -0700 (PDT) Received: from ?192.168.1.100? ( [69.134.127.1]) by mx.google.com with ESMTPS id 32sm5898947aga.2007.08.30.22.01.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Aug 2007 22:01:35 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) To: xbean-dev@geronimo.apache.org Message-Id: <47B87585-678D-45B2-8CAE-6CED0F07720E@gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-10--224116046 From: Kevan Miller Subject: AbstractConverter.setValue() Date: Fri, 31 Aug 2007 01:01:21 -0400 X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-10--224116046 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I ran into the following error on G 2.0.1 with Spring versions 2.0.5-2.0.7-SNAPSHOT. PropertyEditor.setValue() is being called with an object whose type does not match the defined type. 15:54:12,596 ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath*:beanRefContext.xml], factory key [ear.context]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ear.context' defined in URL [jar:file:/ Users/kevan/Desktop/geronimo-tomcat6-jee5-2.0.1/repository/org/spring/ example/MultipleContexts/1.0/MultipleContexts-1.0.ear/lib/ SampleJava.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ear.context' defined in URL [jar:file:/Users/ kevan/Desktop/geronimo-tomcat6-jee5-2.0.1/repository/org/spring/ example/MultipleContexts/1.0/MultipleContexts-1.0.ear/lib/ SampleJava.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String Caused by: org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String at org.apache.xbean.propertyeditor.AbstractConverter.setValue (AbstractConverter.java:67) at org.springframework.beans.TypeConverterDelegate.doConvertValue (TypeConverterDelegate.java:276) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary (TypeConverterDelegate.java:192) Spring has been updated in latest builds to ignore this problem (see http://opensource.atlassian.com/projects/spring/browse/SPR-3799). There's some question about what the proper behavior is in this case... I didn't find any spec-level guidance... http:// weblogs.java.net/blog/ljnelson/archive/2007/08/objects_and_str.html (search for 'dilemma') recommends logging the condition and ignoring the type mismatch. This pretty much exhausts my knowledge of the subject. Any thoughts on being a little less dogmatic and ignoring the type mismatch? --kevan --Apple-Mail-10--224116046--