You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Created) (JIRA)" <ji...@apache.org> on 2012/02/16 07:26:59 UTC

[jira] [Created] (CAMEL-5010) Renove OSGi environment detection logging from camel-spring

Renove OSGi environment detection logging from camel-spring
-----------------------------------------------------------

                 Key: CAMEL-5010
                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
             Project: Camel
          Issue Type: Improvement
          Components: camel-spring
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
            Priority: Minor
             Fix For: 2.10.0


In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.

And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5010) Renove OSGi environment detection logging from camel-spring

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5010.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.1
    
> Renove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212447#comment-13212447 ] 

Claus Ibsen commented on CAMEL-5010:
------------------------------------

I have seen a lot of weird OSGi crapola over the times, but this one beats them all.

I have not see any other OSGi framework have to do tricks like this to just work.
And if its really needed, then code comments must be in place stating, why this weird code must be in place.

The BlueprintCamelContext does not have the need for this weird code.
                
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Hadrian Zbarcea (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-5010:
-----------------------------------

    Summary: Remove OSGi environment detection logging from camel-spring  (was: Renove OSGi environment detection logging from camel-spring)
    
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Willem Jiang (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-5010.
---------------------------------

    Resolution: Fixed

Reverted the original patch and added some comments on the code.
                
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Willem Jiang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212527#comment-13212527 ] 

Willem Jiang commented on CAMEL-5010:
-------------------------------------

The BlueprintCamelContext is only supported in OSGi platform.

With those codes, we could let the namespace handler of "http://camel.apache.org/schema/spring" detect the OSGi platform and load the OSGi CamelContextFactoryBean automatically. In this way the user's spring camel context configuration file can be loaded by Spring or Spring-DM without any change.

I just add some comments on the code.
                
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CAMEL-5010) Renove OSGi environment detection logging from camel-spring

Posted by "Raul Kripalani (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani reopened CAMEL-5010:
-----------------------------------


This fix breaks OSGi compatibility on Karaf 2.2.5 (and probably lower). Current HEAD of trunk, revision 1291263. The code deleted by this commit loaded the {{org.apache.camel.osgi.CamelContextFactoryBean}} class and then registered it. Due to a wrong import, it is now loading {{org.apache.camel.*spring*.CamelContextFactoryBean}} instead. As a result, Camel is unable to resolve components, languages, etc. from the OSGi environment.

I will attach a patch.
                
> Renove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212532#comment-13212532 ] 

Claus Ibsen commented on CAMEL-5010:
------------------------------------

Fine, the INFO logging should be removed as ppl get confused it it says "OSGi environment not detected" or whatever it does, when they simply use Camel in Tomcat.


                
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Remove OSGi environment detection logging from camel-spring

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213111#comment-13213111 ] 

Babak Vahdat commented on CAMEL-5010:
-------------------------------------

I assume because of this OSGi magic we should remove the following note included for the 2.10.0 release, right? 

{code}
Fixed issue with WARN logging running Camel as a WAR file in JBoss 7.
{code}
                
> Remove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Renove OSGi environment detection logging from camel-spring

Posted by "Willem Jiang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212287#comment-13212287 ] 

Willem Jiang commented on CAMEL-5010:
-------------------------------------

Yes, we need to revert the patch. I think we could try to loading the "org.osgi.frameworkBundleActivator" before the "org.apache.camel.osgi.Activator" which could avoid the WARNING Error.
                
> Renove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5010) Renove OSGi environment detection logging from camel-spring

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211990#comment-13211990 ] 

Raul Kripalani commented on CAMEL-5010:
---------------------------------------

Actually, it needs to be reverted entirely. 

Claus, I believe the code is not simply doing logging, it is actually overriding the CamelContextFactoryBean being used. It starts off by statically using the Spring one, and if the OSGi one is available, it switches to that one.
                
> Renove OSGi environment detection logging from camel-spring
> -----------------------------------------------------------
>
>                 Key: CAMEL-5010
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5010
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.1, 2.10.0
>
>
> In the old days when using OSGi and Camel it was sometime tricky to get the stuff working and running correctly. So we had some logic to detect if OSGi environment. We have some left over code in camel-spring that logs this. We should now remove this as it does not offer any value.
> And also causes a WARN to be logged in JBoss7 that may confuse users, when using Camel as a WAR app in JBoss.
> http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira