You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Sahoo (JIRA)" <ji...@apache.org> on 2009/07/20 08:27:14 UTC

[jira] Created: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Updating fileinstall bundle in watched directory causes IllegalsStateException
------------------------------------------------------------------------------

                 Key: FELIX-1386
                 URL: https://issues.apache.org/jira/browse/FELIX-1386
             Project: Felix
          Issue Type: Bug
          Components: File Install
    Affects Versions: fileinstall-1.2.0
         Environment: generic
            Reporter: Sahoo
             Fix For: fileinstall-1.4.0


In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:

Jul 20, 2009 11:52:04 AM  
SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
Jul 20, 2009 11:52:20 AM  
SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
Jul 20, 2009 11:52:20 AM  
SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
Jul 20, 2009 11:52:20 AM  
SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
Jul 20, 2009 11:52:20 AM  
SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
Jul 20, 2009 11:52:20 AM  
SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
Jul 20, 2009 11:52:20 AM  
SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
Jul 20, 2009 11:52:04 AM  


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743162#action_12743162 ] 

Filippo Diotalevi commented on FELIX-1386:
------------------------------------------

Just wanted to give you an update (and maybe have some suggestions)

It turned out it is not trivial to fix this issue. As Richard commented, after a bundle updates itself, it's almost impossible to do anything else. Pretty much every call tho the BundleContext will raise an IllegalStateException. Even trying to get the Bundle state (I was hoping to be able to see it STOPPING) will raise the exception.

What it means is that it is very easy to fix the particular issue (avoid retrieving the log service after the update), but after that, there are a lot of other operations that FileInstall tries to do (install other bundles, refreshPackages just to name the first two).

At this point I think the simplest solution is to raise a specific exception after FileInstall updates itself, to be sure we are blocking the flow. We can then catch the exception, and terminate the FI gracefully. Not really a nice solution, but it wouldn't involve a massive refactory.

Thoughts?

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765990#action_12765990 ] 

Guillaume Nodet edited comment on FELIX-1386 at 10/15/09 4:36 AM:
------------------------------------------------------------------

URL: http://svn.apache.org/viewvc?rev=825454&view=rev
Log:
FELIX-1756: allow fileinstall to override (i.e. update) bundles that have not been deployed by fileinstall initially
Also fixes FELIX-1386: updating fileinstall bundle in watched directory causes IllegalStateException

Modified:
   felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
   felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Util.java


Fileinstall can now update itself without any problems.

      was (Author: gnt):
    Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	karaf/assembly/src/main/filtered-resources/etc/config.properties
	M	karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
Committed r825451

  
> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-2.0.2
>
>         Attachments: FELIX-1386.txt
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated FELIX-1386:
-----------------------------------

    Fix Version/s:     (was: fileinstall-2.0.0)
                   fileinstall-2.0.1

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-2.0.1
>
>         Attachments: FELIX-1386.txt
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742322#action_12742322 ] 

Filippo Diotalevi commented on FELIX-1386:
------------------------------------------

Actually your exception rang a bell; I remember having seeing it a while ago in this situation
1) the fileinstall bundle was in the watched folder
2) the fileinstall bundle had a future system date (it was built in a machine with wrong system date)

Having a look again into the code, I find now the situation quite clear. 

What happens is simply that FileInstall bundle decides to update itself (because the file found in the watched directory is apparently new). Nothing wrong in that.

The update works correctly, but just after the update you have a call to the logger (DirectoryWatcher#791). In turn, it calls
context.getServiceReference(LogService.class.getName());  //DirectoryWatcher#449
In the particular moment when this call happen, the bundle is not yet ready to work (IllegalStateException: Invalid BundleContext). I remember finding a similar problem, in the Web Console, in FELIX-1003.

I don't know if that's the problem you are experiencing, but your stacktrace confirm it's really the log() operation
SEVERE: at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449) 
SEVERE: at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416) 
SEVERE: at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133) 

Possible workarounds:
- delete the log statement at DirectoryWatcher#791
- Thread.sleep(something) before logging!

wdyt?




> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by Filippo Diotalevi <fi...@gmail.com>.
On Wed, Aug 12, 2009 at 2:52 PM, Sahoo<Sa...@sun.com> wrote:
> Filippo,
>
> For some reason, I am not able to connect to JIRA, so I am sending this
> email. To reproduce the issue, please do the following:
> instead of updating from the shell, touch
> /opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar
> which will cause fileinstall to update itself and you shall see the
> exception.

Yes, I guess we came to the same conclusion (thanks also to Richard
clarification), and your use case is similar to the one I tried.
If FileInstall updates itself, it cannot immediately after try to
retrieve and use the log service.

I can try to add a fix checking if FileInstall is updating itself, and
avoiding the subsequent log call in that case.

-- 
Filippo Diotalevi

Re: [jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by Sahoo <Sa...@Sun.COM>.
Filippo,

For some reason, I am not able to connect to JIRA, so I am sending this 
email. To reproduce the issue, please do the following:
instead of updating from the shell, touch 
/opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar 
which will cause fileinstall to update itself and you shall see the 
exception.

Thanks,
Sahoo

Filippo Diotalevi (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742302#action_12742302 ] 
>
> Filippo Diotalevi commented on FELIX-1386:
> ------------------------------------------
>
> Sahoo, I still cannot reproduce.
>
> Here are my experiments:
>
> ---------------use hierarchical uri------------
>
> felix.auto.start.1= \
>  file:bundle/org.apache.felix.shell-1.2.0.jar \
>  file:bundle/org.apache.felix.shell.tui-1.2.0.jar \
>  file:///opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar
>
> $ java -jar bin/felix.jar 
>
> Welcome to Felix.
> =================
>
> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> -> DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
> {felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
>
> ... no exceptions.....
>
> ---------------after that I update it from the shell------------
>
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (1.8.0)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
> [   3] [Active     ] [    1] Apache Felix File Install (1.3.0.SNAPSHOT)
> -> update 3
> DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
> -> {felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
>
> -> update 3 file:///opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar
> DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
> {felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
>
>
>
>
>
>
>
>   
>> Updating fileinstall bundle in watched directory causes IllegalsStateException
>> ------------------------------------------------------------------------------
>>
>>                 Key: FELIX-1386
>>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>>             Project: Felix
>>          Issue Type: Bug
>>          Components: File Install
>>    Affects Versions: fileinstall-1.2.0
>>         Environment: generic
>>            Reporter: Sahoo
>>            Assignee: Filippo Diotalevi
>>             Fix For: fileinstall-1.4.0
>>
>>
>> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
>> Jul 20, 2009 11:52:04 AM  
>> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
>> Jul 20, 2009 11:52:20 AM  
>> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
>> Jul 20, 2009 11:52:04 AM  
>>     
>
>   

[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742302#action_12742302 ] 

Filippo Diotalevi commented on FELIX-1386:
------------------------------------------

Sahoo, I still cannot reproduce.

Here are my experiments:

---------------use hierarchical uri------------

felix.auto.start.1= \
 file:bundle/org.apache.felix.shell-1.2.0.jar \
 file:bundle/org.apache.felix.shell.tui-1.2.0.jar \
 file:///opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar

$ java -jar bin/felix.jar 

Welcome to Felix.
=================

DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
-> DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
{felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}

... no exceptions.....

---------------after that I update it from the shell------------

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix File Install (1.3.0.SNAPSHOT)
-> update 3
DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
-> {felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}

-> update 3 file:///opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar
DEBUG: WIRE: 3.0 -> org.osgi.util.tracker -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.packageadmin -> 0
{felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}







> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733680#action_12733680 ] 

Sahoo commented on FELIX-1386:
------------------------------

My setup is slightly different, but you can try either of the following two things to see the reported issue:
1. update fileinstall by using Felix shell.
2.  use a hierarchical URI (something like file:/tmp/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar) in the autostart property.

Let me know if this does not help.

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filippo Diotalevi reassigned FELIX-1386:
----------------------------------------

    Assignee: Filippo Diotalevi

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742402#action_12742402 ] 

Richard S. Hall commented on FELIX-1386:
----------------------------------------

If I am understanding, when you update yourself, then you cannot use services at all after that. You pretty much have to stop doing anything afterward, since update will stop your bundle, which invalidates its bundle context. Check out:

http://www.osgi.org/blog/2007/07/best-practice-with-depressed-bundles.html

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733670#action_12733670 ] 

Filippo Diotalevi commented on FELIX-1386:
------------------------------------------

What's your setup exactly?

Mine:
felix.auto.start.1= \
 file:bundle/org.apache.felix.shell-1.2.0.jar \
 file:bundle/org.apache.felix.shell.tui-1.2.0.jar \
 file:load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar \

and fileinstall watches the ./load folder

When I start, I see the exception:
{felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT
	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1000)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:719)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:625)
	at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:381)
	at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)
Failed to install bundle: /opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.2.0.jar: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT

I see the same exception when I try to update the same bundle.

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733670#action_12733670 ] 

Filippo Diotalevi edited comment on FELIX-1386 at 7/21/09 8:51 AM:
-------------------------------------------------------------------

What's your setup exactly?

Mine:
felix.auto.start.1= \
 file:bundle/org.apache.felix.shell-1.2.0.jar \
 file:bundle/org.apache.felix.shell.tui-1.2.0.jar \
 file:load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar \

and fileinstall watches the ./load folder

When I start, I see the exception:
{felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT
	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1000)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:719)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:625)
	at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:381)
	at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)
Failed to install bundle: /opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT

I see the same exception when I try to update the same bundle.

      was (Author: fdiotalevi):
    What's your setup exactly?

Mine:
felix.auto.start.1= \
 file:bundle/org.apache.felix.shell-1.2.0.jar \
 file:bundle/org.apache.felix.shell.tui-1.2.0.jar \
 file:load/org.apache.felix.fileinstall-1.3.0-SNAPSHOT.jar \

and fileinstall watches the ./load folder

When I start, I see the exception:
{felix.fileinstall.poll (ms) = 2000, felix.fileinstall.dir = /opt/myprojects/felix-1.8.0/./load, felix.fileinstall.debug = -1, felix.fileinstall.bundles.new.start = true}
org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT
	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1000)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:719)
	at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatcher.java:625)
	at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:381)
	at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)
Failed to install bundle: /opt/myprojects/felix-1.8.0/load/org.apache.felix.fileinstall-1.2.0.jar: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.felix.fileinstall:1.3.0.SNAPSHOT

I see the same exception when I try to update the same bundle.
  
> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-1386.
------------------------------------

    Resolution: Fixed

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	karaf/assembly/src/main/filtered-resources/etc/config.properties
	M	karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
Committed r825451


> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-2.0.2
>
>         Attachments: FELIX-1386.txt
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743234#action_12743234 ] 

Sahoo commented on FELIX-1386:
------------------------------

I have not looked at the patch yet. I just think a better approach would be for fileinstall not to update itself. 

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>         Attachments: FELIX-1386.txt
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1386) Updating fileinstall bundle in watched directory causes IllegalsStateException

Posted by "Filippo Diotalevi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filippo Diotalevi updated FELIX-1386:
-------------------------------------

    Attachment: FELIX-1386.txt

Attached a patch trying to address the issue with the "AutoUpdateException" approach.

Can you please review it?

> Updating fileinstall bundle in watched directory causes IllegalsStateException
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-1386
>                 URL: https://issues.apache.org/jira/browse/FELIX-1386
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-1.2.0
>         Environment: generic
>            Reporter: Sahoo
>            Assignee: Filippo Diotalevi
>             Fix For: fileinstall-1.4.0
>
>         Attachments: FELIX-1386.txt
>
>
> In my environment, fileinstall is installed via autostart properties, but it is located in a directory watched by fileinstall. When I updated fileinstall bundle, I get the following exception:
> Jul 20, 2009 11:52:04 AM  
> SEVERE: Exception in thread "{felix.fileinstall.poll=5000, felix.fileinstall.bundles.new.start=false, felix.fileinstall.dir=/space/ss141213/WS/gf/v3.trunk.new/publish/glassfishv3/glassfish/modules/, felix.fileinstall.debug=1}" 
> Jul 20, 2009 11:52:20 AM  
> SEVERE: java.lang.IllegalStateException: Invalid BundleContext.
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:393)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:257)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.getLogService(DirectoryWatcher.java:449)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.log(DirectoryWatcher.java:416)
> Jul 20, 2009 11:52:20 AM  
> SEVERE:         at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:133)
> Jul 20, 2009 11:52:04 AM  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.