Just in terms of the issue with the spaces, Guido suggested I put quotes
around the directory. However this causes the system to go into an
endless loop!
Behaviour is as follows:
When I define felix.fileinstall.dir=watchedDir (i.e. without quotes),
and when 'watchedDir' actually resolves to E:\Documents and
Settings\some\path\watchedDir, then I get the following error when I
drop a bundle into that directory:
ERROR 20090612 10:01:28 bid#11 - Failed to install bundle:
/E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
(java.net.URISyntaxException: Illegal character in path at index 13:
/E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
java.net.URISyntaxException: Illegal character in path at index 13:
/E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
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)
at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
at
org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
r.java:686)
at
org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
r.java:587)
at
org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
tcher.java:351)
at
org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:121)
When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes
around the directory) I get the endless loop, when I start up the
container. here's a bit of the output:
ERROR 20090612 10:08:33 bid#11 - In main loop, we have serious
trouble
(java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
er.java:439)
at
org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:120)
ERROR 20090612 10:08:33 bid#11 - In main loop, we have serious
trouble
(java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
er.java:439)
at
org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:120)
(this is an endless loop of output)
If I do the same things in a directory that doesn't contain spaces i.e.
if I move the whole set up to directly under the E: directory, this
doesn't happen.
This is actually an issue since I can't guarantee that anyone else who
will checkout and use this code will not be also on Windows and in their
home directory (i.e. C:/Documents and Settings/${username}. Really it
becomes useless to me as a project solution.
Thanks,
Fiona.
Fiona Mahon wrote:
Beautiful! Works a treat now.
Thanks Filippo and Guido
Just a couple of things to watch for:
- as you said Filippo, I had to define "felix.fileinstall.dir" as the
full path from where I started Knopflerfish and not from where the
config file was located i.e.
felix.fileinstall.dir=watchedDir/watchedSubDir
- also seems to have problems with spaces in the filenames. I'm
running on windows and when the FileInstall resolves the location of
the config files as E:/Documents and Settings/<some path> it throws an
error. If I put Knopflerfish directly under E:/ all is ok! I'm not
specifying this path in any file, it is just resolved to that by the
bundle.
Thanks again,
Fiona.
Filippo Diotalevi wrote:
On Thu, Jun 11, 2009 at 9:42 AM, Guido Spadotto<[email protected]>
wrote:
Hi Filippo,
I've had a quick look at the Compendium R4, V4.1.
On Section 104.4.2 it reads:
/The value of the property may be of the following types:
type ::= simple | vector | arrays
simple ::= String | Integer | Long | Float | Double| Byte | Short |
Character | Boolean
primitive ::= long | int | short | char | byte | double | float |
boolean
arrays ::= primitive ‘[]’ | simple ‘[]’
vector ::= Vector of simple
/
So, apart from this particular case with KF-specific properties, it
might
still
be worth to be aware of 'simple' (not 'primitive') property types in
the
Configuration Dictionary.
Hi,
so I was able to reproduce easily the problem with Knopflerfish, and
submitted a patch for that at
https://issues.apache.org/jira/browse/FELIX-1216
As for the original Fiona's email, I hope the patch fixes her bug too,
since the file she was referring to (props.xargs file) is indeed a
Knopflerfish file.
--
Fiona Mahon
Pervasive Communication Services(PCS),
Applied Research
Telecommunications Software & Systems Group (TSSG),
ArcLabs Research and Innovation Building,
Waterford Institute of Technology,
Carriganore Campus, Carriganore,
Co. Waterford, Ireland
www: www.tssg.org/people/fmahon
tel: +353 (0)51 302 928
fax: +353 (0)51 341 100
e-mail: [email protected]
Skype: fiona_mahon
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]