Hmm... just tested this with fileinstall-3.1.4 (the version I already had
around) and it works fine.
However, with fileinstall-3.2.4, I get the problem you describe:
Welcome to Apache Felix Gogo
g! lb
gogo: CommandNotFoundException: Command not found: lb <--- expected, as
we haven't installed gogo.command
# invoke BundleContext.getBundles() directly - gogo converters pretty-print
the result :-)
g! bundles
0|Active | 0|org.apache.felix.framework (4.0.3)
1|Active | 1|org.apache.felix.bundlerepository (1.6.6)
2|Active | 1|org.apache.felix.fileinstall (3.2.4)
3|Active | 1|org.apache.felix.gogo.runtime (0.10.0)
4|Active | 1|org.apache.felix.gogo.shell (0.10.0)
# copy gogo.command to fileinstall load directory
g! In main loop, we have serious trouble: java.lang.RuntimeException:
java.lang.InterruptedException
java.lang.RuntimeException: java.lang.InterruptedException
at
org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:332)
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.refresh(DirectoryWatcher.java:677)
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:494)
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at
org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:330)
... 3 more
g! lb
gogo: CommandNotFoundException: Command not found: lb
g! bundles
0|Active | 0|org.apache.felix.framework (4.0.3)
1|Active | 1|org.apache.felix.bundlerepository (1.6.6)
2|Active | 1|org.apache.felix.fileinstall (3.2.4)
3|Active | 1|org.apache.felix.gogo.runtime (0.10.0)
4|Active | 1|org.apache.felix.gogo.shell (0.10.0)
5|Resolved | 1|org.apache.felix.gogo.command (0.12.0)
# so gogo.command failed to activate
# let's try starting it directly:
g! (bundle 5) start
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (4.0.3)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix File Install (3.2.4)
3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
4|Active | 1|Apache Felix Gogo Shell (0.10.0)
5|Active | 1|Apache Felix Gogo Command (0.12.0)
g! gosh: stopping framework
--
Derek
On 15 October 2012 14:03, Per-Erik Svensson <[email protected]>wrote:
> Hi,
>
> I get the following exception when trying to start gogo-command
> automatically through fileinstall:
>
> In main loop, we have serious trouble: java.lang.RuntimeException:
> java.lang.InterruptedException
> java.lang.RuntimeException: java.lang.InterruptedException
> at
>
> org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:332)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.refresh(DirectoryWatcher.java:677)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:494)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)
> Caused by: java.lang.InterruptedException
> at java.lang.Object.wait(Native Method)
> at
>
> org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:330)
> ... 3 more
> In main loop, we have serious trouble: java.lang.RuntimeException:
> java.lang.InterruptedException
> java.lang.RuntimeException: java.lang.InterruptedException
> at
>
> org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:332)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.refresh(DirectoryWatcher.java:677)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:494)
> at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)
> Caused by: java.lang.InterruptedException
> at java.lang.Object.wait(Native Method)
> at
>
> org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:330)
> ... 3 more
>
> "What did you do to make this happen?"
>
> Originally through an embedded version of felix 4.0.2. To make sure that it
> was not my code, through dist of felix 4.0.3.
>
> All I have done is to unpack the Felix Framework Distribution, removed gogo
> commands from the bundle directory (to make it not auto-install/start from
> felix itself) and added gogo commands to a fileinstall-controlled
> directory. Of course, I put fileinstall in the bundle directory of felix
> (to make it auto-install).
>
> Note that this only happens when gogo command is installed from
> fileinstall. If felix installs and starts it from the bundle dir, it works
> like a charm. It also only happens with gogo command, other bundles can be
> installed properly through fileinstall. I'm thus not sure if this is a bug
> in fileinstall, gogo command or simply an error 40 issue (the guy sitting
> 40 cm from the screen).
>
> All versions used are the ones currently available from the felix download
> site.
>
> Felix Framework Distribution 4.0.3
> Fileinstall 3.2.4
> Gogo Command 0.12.0
>
> Other bundles installed (coming from distribution)
> Bundle Repository 1.6.6
> Gogo Runtime 0.10.0
> Gogo Shell 0.10.0
>
> Is this maybe some weird dependency thing making the framework try to
> refresh itself? If so, is it possible to resolve in any way?
>
> Best regards,
> Per-Erik Svensson
>