Re: Cruisecontrol-user Digest, Vol 61, Issue 17
Dan Rollo <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Wild guess: Could it be due to the locale, and some effect it has on date parsing? What is your default locale? I've never seen that error occur, but then I build the CCDist stuff from subversion (I've never built it from the source distro). I doubt it matters, but maybe you could try building CCDist from a subversion checkout? Dan > Date: Wed, 25 May 2011 15:07:24 +0000 > From: B?ns?ghi, Csaba<[email protected]> > Subject: [Cruisecontrol-user] Distributed build fails with > "Unparseable date" error > To:"[email protected]" > <[email protected]> > Message-ID: > <01B151420A3A1843BFBC5AE63BC004A1288D6F3D@CCEXCHMBX-1.central.cranfield.ac.uk> > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I recently installed CC 2.8.4 (source version on a Vista SP2 machine, Ant version 1.8.2). Tested it with a simple project, everything worked fine. Then I tried to build the same project using the distributed contrib, running both the lookup server and one agent on the same machine. Everything seems to go fine until the agent starts the build, at which point it fails with a bunch of errors like this: > > [java] java.text.ParseException: Unparseable date: "May 24 2011 1502" > [java] at java.text.DateFormat.parse(DateFormat.java:337) > [java] at net.sourceforge.cruisecontrol.distributed.core.CCDistVersion.getVersionBuildDate(CCDistVersion.java:66) > [java] at net.sourceforge.cruisecontrol.distributed.BuildAgentServiceImpl.asString(BuildAgentServiceImpl.java:990) > [java] at net.sourceforge.cruisecontrol.distributed.BuildAgentUI.doUpdateAgentInfoUI(BuildAgentUI.java:191) > [java] at net.sourceforge.cruisecontrol.distributed.BuildAgentUI.access$500(BuildAgentUI.java:38) > [java] at net.sourceforge.cruisecontrol.distributed.BuildAgentUI$6.run(BuildAgentUI.java:182) > > I opened up CCDistVersion.java and scrolled to line 66: > > /** The date format in the properties file, should match the ant format used for ${TODAY} ${TSTAMP} */ > private static final DateFormat DF_ANT_TODAY_TSTAMP = new SimpleDateFormat("MMMM d yyyy hhmm"); > private static Date buildDate; > public static Date getVersionBuildDate() { > if (buildDate == null) { > try { > buildDate = DF_ANT_TODAY_TSTAMP.parse(PROPS_CCDIST_BUILD_VERSION.getProperty("ccdist.version.date")); //<-- line 66 > } catch (ParseException e) { > LOG.error("Error parsing build date: " > + PROPS_CCDIST_BUILD_VERSION.getProperty("ccdist.version.date"), e); > } > } > return buildDate; > } > > > Shouldn't the string "May 24 2011 1502" match the format "MMMM d yyyy hhmm"? What's going on here? Note that I'm using SVN for source control, which - as far as I can see - has no options to specify the date format in config.xml. > > Any help would be appreciated > Csaba > ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1