Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 31440 invoked from network); 23 Jul 2003 16:37:49 -0000 Received: from mail4.messagelabs.com (212.125.75.12) by daedalus.apache.org with SMTP; 23 Jul 2003 16:37:49 -0000 X-VirusChecked: Checked X-Env-Sender: chrisd@biomedcentral.com X-Msg-Ref: server-12.tower-4.messagelabs.com!1058978269!333933 X-StarScan-Version: 5.0.7; banners=.,-,- Received: (qmail 3122 invoked from network); 23 Jul 2003 16:37:49 -0000 Received: from mail.current-science-group.com (HELO severin.cursci.co.uk) (195.224.176.47) by server-12.tower-4.messagelabs.com with SMTP; 23 Jul 2003 16:37:49 -0000 Received: by severin.cursci.co.uk with Internet Mail Service (5.5.2653.19) id ; Wed, 23 Jul 2003 17:39:22 +0100 Message-ID: From: Chris Davis To: 'Jakarta Commons Users List' Subject: RE: [BeanUtils] Introspection and Enums Date: Wed, 23 Jul 2003 17:39:21 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sorry to everyone again, but does anyone know whether this is possible? Thanks, Chris Davis -----Original Message----- From: Chris Davis [mailto:chrisd@biomedcentral.com] Sent: 22 July 2003 11:16 To: 'commons-user@jakarta.apache.org' Subject: Introspection and Enums Hi, What I want to do is to populate an object which has a number of simple set methods taking String, ints etc. It also has a setStatus(JournalStatusEnum) method which takes an object of a specific class: in this case a JournalStatusEnum. The JournalStatusEnum has a private constructor and holds a singleton instance of each of the different possible status values. These instances are got using the getInstance(String) method. I'm encoding this in the source property name as "status.instance", but it is causing a problem: java.lang.IllegalArgumentException: Null property value for 'status' at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUti ls.java:864) at org.apache.commons.beanutils.PropertyUtils.isWriteable(PropertyUtils.java:12 88) at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:237) at com.biomedcentral.noddy.integration.oracledao.OracleJournalVolumesDAO.search ForJournalVolumes(OracleJournalVolumesDAO.java:330) at com.biomedcentral.noddy.integration.oracledao.OracleJournalVolumesDAO.search (OracleJournalVolumesDAO.java:135) at com.biomedcentral.noddy.datatool.test.bmc.BMCSearchJournalVolumesTest.testSe archJournalVolumesNormal(BMCSearchJournalVolumesTest.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu nner.java:392) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner. java:276) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner .java:167) I'm not actually sure whether this is possible, as I can't find details of introspection which takes this form. Any suggestions would be very useful, Thanks in advance for your help, Chris ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________