[kepler-users] problem with the URL To Local File  actor and a symbol

Trina Myers t.myers at bigpond.net.au
Sat Jun 13 17:16:09 PDT 2009


Hi All,

I have a workflow that extracts xml files from a servlet and transforms the
data within using the XPATH actor. It has been working very well until I
have tried to import 2 elements from the site. The only difference between
the URL in question and the working URL is the use of "|" (separating
max|avg). 
If I download the xml file with both elements and use the absolute address
to the file on the local machine the workflow works fine (extracting both
the avg and max data as required), so I am sure the problem is at the URL to
local file actor.

I would appreciate any guidance
Cheers
Trina

The error message:

ptolemy.kernel.util.IllegalActionException: Cannot read file
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2'
  in .test_url.URL To Local File.fileOrURL
Because:
Problem with URI format in
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2'. and
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2' This can happen if the file name is not
absoluteand is not present relative to the directory in which the specified
model was read (which was
'file:/C:/Documents%20and%20Settings/Trina/Desktop/THESIS_wORKFLOWS/Hypothes
isTest_Reef/AIMS_REALTIME/test_url.xml')
	at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:216)
	at util.URLToLocalFile._openAndReadBytes(URLToLocalFile.java:226)
	at util.URLToLocalFile.fire(URLToLocalFile.java:166)
	at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
	at
ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.j
ava:170)
	at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
	at ptolemy.actor.Manager.iterate(Manager.java:688)
	at ptolemy.actor.Manager.execute(Manager.java:332)
	at ptolemy.actor.Manager.run(Manager.java:1071)
	at ptolemy.actor.Manager$3.run(Manager.java:1112)
Caused by: java.io.IOException: Problem with URI format in
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2'. and
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2' This can happen if the file name is not
absoluteand is not present relative to the directory in which the specified
model was read (which was
'file:/C:/Documents%20and%20Settings/Trina/Desktop/THESIS_wORKFLOWS/Hypothes
isTest_Reef/AIMS_REALTIME/test_url.xml')
	at ptolemy.util.FileUtilities.nameToURL(FileUtilities.java:356)
	at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:213)
	... 9 more
Caused by: java.lang.IllegalArgumentException
	at java.net.URI.create(Unknown Source)
	at java.net.URI.resolve(Unknown Source)
	at ptolemy.util.FileUtilities.nameToURL(FileUtilities.java:353)
	... 10 more
Caused by: java.net.URISyntaxException: Illegal character in query at index
140:
http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00&
thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4h
&dataLevel=level0&bleach=0&vers=2
	at java.net.URI$Parser.fail(Unknown Source)
	at java.net.URI$Parser.checkChars(Unknown Source)
	at java.net.URI$Parser.parseHierarchical(Unknown Source)
	at java.net.URI$Parser.parse(Unknown Source)
	at java.net.URI.<init>(Unknown Source)
	... 13 more
Caused by: java.io.IOException: Problem with URI format in
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2'. and
'http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00
&thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4
h&dataLevel=level0&bleach=0&vers=2' This can happen if the file name is not
absoluteand is not present relative to the directory in which the specified
model was read (which was
'file:/C:/Documents%20and%20Settings/Trina/Desktop/THESIS_wORKFLOWS/Hypothes
isTest_Reef/AIMS_REALTIME/test_url.xml')
	at ptolemy.util.FileUtilities.nameToURL(FileUtilities.java:356)
	at ptolemy.data.expr.FileParameter.asURL(FileParameter.java:213)
	at util.URLToLocalFile._openAndReadBytes(URLToLocalFile.java:226)
	at util.URLToLocalFile.fire(URLToLocalFile.java:166)
	at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:398)
	at
ptolemy.actor.sched.StaticSchedulingDirector.fire(StaticSchedulingDirector.j
ava:170)
	at ptolemy.actor.CompositeActor.fire(CompositeActor.java:400)
	at ptolemy.actor.Manager.iterate(Manager.java:688)
	at ptolemy.actor.Manager.execute(Manager.java:332)
	at ptolemy.actor.Manager.run(Manager.java:1071)
	at ptolemy.actor.Manager$3.run(Manager.java:1112)
Caused by: java.lang.IllegalArgumentException
	at java.net.URI.create(Unknown Source)
	at java.net.URI.resolve(Unknown Source)
	at ptolemy.util.FileUtilities.nameToURL(FileUtilities.java:353)
	... 10 more
Caused by: java.net.URISyntaxException: Illegal character in query at index
140:
http://data.aims.gov.au/awsqaqc/XmlDataServlet?fromDate=2008-02-01T00:00:00&
thruDate=2008-02-10T00:00:00&stations=4&agperiod=day&agFunct=max|avg&vars=4h
&dataLevel=level0&bleach=0&vers=2
	at java.net.URI$Parser.fail(Unknown Source)
	at java.net.URI$Parser.checkChars(Unknown Source)
	at java.net.URI$Parser.parseHierarchical(Unknown Source)
	at java.net.URI$Parser.parse(Unknown Source)
	at java.net.URI.<init>(Unknown Source)
	... 13 more




More information about the Kepler-users mailing list