Filippo Diotalevi wrote:
1) configuration files must have the ".cfg" extension, so
org.apache.felix.fileinstall-subWatchedDir1.cfg
for instance

2) relative URLs are relative to the folder where the JVM started, so
if you write
felix.fileinstall.dir=./subWatchedDir1
it won't watch a  subdirectory of 'mainwatchedDir


(I've commented out all other settings in those files for the minute)

When I start the Felix File Install bundle in the container I get the
following error:
Error while updating org.apache.felix.fileinstall.0
(java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String

That's strange... is the stacktrace giving any more detail?
Hi Filippo,
I managed to reproduce this same issue in Knopflerfish (hope you don't mind! ;) ).

I don't know if I got it right, but I think that the "dynamic.service.bundleLocation"
property key has an associated Object that's actually a Boolean
(sorry, I wasn't able to find the static final String variable name).

This will raise the ClassCastException in the following code of FileInstall.java
(first argument of the Util.substVars method invocation).

private void performSubstitution( Dictionary properties )
   {
       for (Enumeration e = properties.keys(); e.hasMoreElements(); )
       {
           String name = (String) e.nextElement();
properties.put(name, Util.substVars(( String ) properties.get(name), name, null, properties));
       }
   }

This is the stacktrace:
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at org.apache.felix.fileinstall.FileInstall.performSubstitution(FileInstall.java:129) at org.apache.felix.fileinstall.FileInstall.updated(FileInstall.java:117)
   at org.knopflerfish.bundle.cm.Update.update(Update.java:96)
   at org.knopflerfish.bundle.cm.Update.doUpdate(Update.java:74)
   at org.knopflerfish.bundle.cm.UpdateQueue.run(UpdateQueue.java:93)
   at java.lang.Thread.run(Unknown Source)

Maybe using
properties.get(name).toString()
in place of
( String ) properties.get(name)
might work.

Are all the properties in a ConfigurationDictionary supposed to map
to String objects?

Thanks
--
Logo
Guido Spadotto
Soluta.net, Italy
http://www.soluta.net




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to