You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by suren_1001 <su...@7strata.com> on 2009/07/21 17:07:55 UTC

No ManagedConnections available within configured blocking timeout

Hi all,

Iam using servicemix 3.3.2 . where i deployed two components
1. Camel which inturn using jms
2. ode.

my Flow sequence is jmsClient will populate message to camel and camel will
kick start the ode process, in this iam using derby embedded db. while doing
this iam getting error which i pasted in the following link

http://pastebin.com/m6d4c1b9b


with Regards

Surendar V
-- 
View this message in context: http://www.nabble.com/No-ManagedConnections-available-within-configured-blocking-timeout-tp24589535p24589535.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: [SMX4] How to configure logging ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Another thing Vincent,

It's right that BND manages the import package using dependencies 
provided. Nevertheless, in your case, you can avoid the slf4j dependency 
and define it only in the import package. Like this your project and 
build is more lighweight ;)

Regards
JB

Vincent GIRARDREYDET wrote:
> Jean-Baptiste,
> 
> Looking at the samples in the gshell, I have seen that they use the 
> slf4j interface.
> 
> I have added slf4j-api and slf4j-log4j13 as provided dependencies, and I 
> can compile, package and deploy.
> Note that I had no use to add an <Import-Package> directive, as the BND 
> tool takes care of it for me :-).
> 
> I have not understood the dull picture of logging in SMX4, but now it 
> works, and I can still use plain old log4j configuration files to 
> configure my loggin. So everythinkg seems to be fine now.
> 
> Thanks for your time. Hope that this post will help other people having 
> the same troubles ;-). Is there any way we could get this information 
> posted in the wiki ?
> 
> Jean-Baptiste Onofré a écrit :
>> Vincent,
>>
>> if you package your services as OSGi bundles, I guess that you use the 
>> Felix BND maven plugin.
>>
>> In your POM, you should have some section looking like:
>>
>> <Export-Package>my*;version=${version}</Export-Package>
>> <Import-Package>...</Import-Package>
>>
>> In your case, you have two solution:
>> - embed log4j in the bundle classpath using 
>> <Embed-Dependency>log4j;scope=runtime</Embed-Dependency>
>> - add a log4j import package but it's require that a OSGi bundle is 
>> already available into kernel/karaf.
>>
>> Could you provide your complete pom.xml, I can review it if you want.
>>
>> Regards
>> JB
>>
>> Vincent GIRARDREYDET wrote:
>>> Hi Jean-Baptiste,
>>>
>>> I deploy everything as OSGi bundles. Some services are OSGi services, 
>>> some other are NMR services.
>>> My dependencies are as generated by the spring-osgi-bundle artifact. 
>>> If you have a suggestion for a correct dependency, I would greatly 
>>> appreciate.
>>>
>>> I'm not even at the stage of configuring the import package 
>>> definition (although I guess I would import org.apache.log4j). Here I 
>>> have compilation problems.
>>> I have tried the following dependency alone:
>>>        <dependency>
>>>            <groupId>log4j</groupId>
>>>            <artifactId>log4j</artifactId>
>>>            <version>1.2.15</version>
>>>            <type>jar</type>
>>>            <scope>provided</scope>
>>>        </dependency>
>>>
>>> But then maven complains about unresolved indirect dependencies:
>>> com.sun.jmx:jmxri:jar:1.2.1:provided
>>>
>>> Help !
>>>
>>> Jean-Baptiste Onofré a écrit :
>>>> Hi Vincent,
>>>>
>>>> do you deploy your service as a OSGi service ?
>>>> If it's the case, could you provide your import package definition 
>>>> (from the POM) ?
>>>>
>>>> Anyway, in your pom, I see that the log4j dependency is scoped as 
>>>> test, is it normal ?
>>>>
>>>> Regards
>>>> JB
>>

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: [SMX4] How to configure logging ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK Vincent,

Good that work.

In fact, there is already a wiki page around this topic:
http://servicemix.apache.org/SMX4KNL/43-logging-system.html

But it deals mainly from a user point of view, not a dev one. I will 
upgrade it.

Sorry, I was thinking that you want to force the usage of log4j (and not 
through the usage of slf4j bundle).

Regards
JB

Vincent GIRARDREYDET wrote:
> Jean-Baptiste,
> 
> Looking at the samples in the gshell, I have seen that they use the 
> slf4j interface.
> 
> I have added slf4j-api and slf4j-log4j13 as provided dependencies, and I 
> can compile, package and deploy.
> Note that I had no use to add an <Import-Package> directive, as the BND 
> tool takes care of it for me :-).
> 
> I have not understood the dull picture of logging in SMX4, but now it 
> works, and I can still use plain old log4j configuration files to 
> configure my loggin. So everythinkg seems to be fine now.
> 
> Thanks for your time. Hope that this post will help other people having 
> the same troubles ;-). Is there any way we could get this information 
> posted in the wiki ?
> 
> Jean-Baptiste Onofré a écrit :
>> Vincent,
>>
>> if you package your services as OSGi bundles, I guess that you use the 
>> Felix BND maven plugin.
>>
>> In your POM, you should have some section looking like:
>>
>> <Export-Package>my*;version=${version}</Export-Package>
>> <Import-Package>...</Import-Package>
>>
>> In your case, you have two solution:
>> - embed log4j in the bundle classpath using 
>> <Embed-Dependency>log4j;scope=runtime</Embed-Dependency>
>> - add a log4j import package but it's require that a OSGi bundle is 
>> already available into kernel/karaf.
>>
>> Could you provide your complete pom.xml, I can review it if you want.
>>
>> Regards
>> JB
>>
>> Vincent GIRARDREYDET wrote:
>>> Hi Jean-Baptiste,
>>>
>>> I deploy everything as OSGi bundles. Some services are OSGi services, 
>>> some other are NMR services.
>>> My dependencies are as generated by the spring-osgi-bundle artifact. 
>>> If you have a suggestion for a correct dependency, I would greatly 
>>> appreciate.
>>>
>>> I'm not even at the stage of configuring the import package 
>>> definition (although I guess I would import org.apache.log4j). Here I 
>>> have compilation problems.
>>> I have tried the following dependency alone:
>>>        <dependency>
>>>            <groupId>log4j</groupId>
>>>            <artifactId>log4j</artifactId>
>>>            <version>1.2.15</version>
>>>            <type>jar</type>
>>>            <scope>provided</scope>
>>>        </dependency>
>>>
>>> But then maven complains about unresolved indirect dependencies:
>>> com.sun.jmx:jmxri:jar:1.2.1:provided
>>>
>>> Help !
>>>
>>> Jean-Baptiste Onofré a écrit :
>>>> Hi Vincent,
>>>>
>>>> do you deploy your service as a OSGi service ?
>>>> If it's the case, could you provide your import package definition 
>>>> (from the POM) ?
>>>>
>>>> Anyway, in your pom, I see that the log4j dependency is scoped as 
>>>> test, is it normal ?
>>>>
>>>> Regards
>>>> JB
>>

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: [SMX4] How to configure logging ?

Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Jean-Baptiste,

Looking at the samples in the gshell, I have seen that they use the 
slf4j interface.

I have added slf4j-api and slf4j-log4j13 as provided dependencies, and I 
can compile, package and deploy.
Note that I had no use to add an <Import-Package> directive, as the BND 
tool takes care of it for me :-).

I have not understood the dull picture of logging in SMX4, but now it 
works, and I can still use plain old log4j configuration files to 
configure my loggin. So everythinkg seems to be fine now.

Thanks for your time. Hope that this post will help other people having 
the same troubles ;-). Is there any way we could get this information 
posted in the wiki ?

Jean-Baptiste Onofré a écrit :
> Vincent,
>
> if you package your services as OSGi bundles, I guess that you use the 
> Felix BND maven plugin.
>
> In your POM, you should have some section looking like:
>
> <Export-Package>my*;version=${version}</Export-Package>
> <Import-Package>...</Import-Package>
>
> In your case, you have two solution:
> - embed log4j in the bundle classpath using 
> <Embed-Dependency>log4j;scope=runtime</Embed-Dependency>
> - add a log4j import package but it's require that a OSGi bundle is 
> already available into kernel/karaf.
>
> Could you provide your complete pom.xml, I can review it if you want.
>
> Regards
> JB
>
> Vincent GIRARDREYDET wrote:
>> Hi Jean-Baptiste,
>>
>> I deploy everything as OSGi bundles. Some services are OSGi services, 
>> some other are NMR services.
>> My dependencies are as generated by the spring-osgi-bundle artifact. 
>> If you have a suggestion for a correct dependency, I would greatly 
>> appreciate.
>>
>> I'm not even at the stage of configuring the import package 
>> definition (although I guess I would import org.apache.log4j). Here I 
>> have compilation problems.
>> I have tried the following dependency alone:
>>        <dependency>
>>            <groupId>log4j</groupId>
>>            <artifactId>log4j</artifactId>
>>            <version>1.2.15</version>
>>            <type>jar</type>
>>            <scope>provided</scope>
>>        </dependency>
>>
>> But then maven complains about unresolved indirect dependencies:
>> com.sun.jmx:jmxri:jar:1.2.1:provided
>>
>> Help !
>>
>> Jean-Baptiste Onofré a écrit :
>>> Hi Vincent,
>>>
>>> do you deploy your service as a OSGi service ?
>>> If it's the case, could you provide your import package definition 
>>> (from the POM) ?
>>>
>>> Anyway, in your pom, I see that the log4j dependency is scoped as 
>>> test, is it normal ?
>>>
>>> Regards
>>> JB
>

Re: [SMX4] How to configure logging ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Vincent,

if you package your services as OSGi bundles, I guess that you use the 
Felix BND maven plugin.

In your POM, you should have some section looking like:

<Export-Package>my*;version=${version}</Export-Package>
<Import-Package>...</Import-Package>

In your case, you have two solution:
- embed log4j in the bundle classpath using 
<Embed-Dependency>log4j;scope=runtime</Embed-Dependency>
- add a log4j import package but it's require that a OSGi bundle is 
already available into kernel/karaf.

Could you provide your complete pom.xml, I can review it if you want.

Regards
JB

Vincent GIRARDREYDET wrote:
> Hi Jean-Baptiste,
> 
> I deploy everything as OSGi bundles. Some services are OSGi services, 
> some other are NMR services.
> My dependencies are as generated by the spring-osgi-bundle artifact. If 
> you have a suggestion for a correct dependency, I would greatly appreciate.
> 
> I'm not even at the stage of configuring the import package definition 
> (although I guess I would import org.apache.log4j). Here I have 
> compilation problems.
> I have tried the following dependency alone:
>        <dependency>
>            <groupId>log4j</groupId>
>            <artifactId>log4j</artifactId>
>            <version>1.2.15</version>
>            <type>jar</type>
>            <scope>provided</scope>
>        </dependency>
> 
> But then maven complains about unresolved indirect dependencies:
> com.sun.jmx:jmxri:jar:1.2.1:provided
> 
> Help !
> 
> Jean-Baptiste Onofré a écrit :
>> Hi Vincent,
>>
>> do you deploy your service as a OSGi service ?
>> If it's the case, could you provide your import package definition 
>> (from the POM) ?
>>
>> Anyway, in your pom, I see that the log4j dependency is scoped as 
>> test, is it normal ?
>>
>> Regards
>> JB

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: [SMX4] How to configure logging ?

Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Hi Jean-Baptiste,

I deploy everything as OSGi bundles. Some services are OSGi services, 
some other are NMR services.
My dependencies are as generated by the spring-osgi-bundle artifact. If 
you have a suggestion for a correct dependency, I would greatly appreciate.

I'm not even at the stage of configuring the import package definition 
(although I guess I would import org.apache.log4j). Here I have 
compilation problems.
I have tried the following dependency alone:
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

But then maven complains about unresolved indirect dependencies:
com.sun.jmx:jmxri:jar:1.2.1:provided

Help !

Jean-Baptiste Onofré a écrit :
> Hi Vincent,
>
> do you deploy your service as a OSGi service ?
> If it's the case, could you provide your import package definition 
> (from the POM) ?
>
> Anyway, in your pom, I see that the log4j dependency is scoped as 
> test, is it normal ?
>
> Regards
> JB

Re: [SMX4] How to configure logging ?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Vincent,

do you deploy your service as a OSGi service ?
If it's the case, could you provide your import package definition (from 
the POM) ?

Anyway, in your pom, I see that the log4j dependency is scoped as test, 
is it normal ?

Regards
JB

Vincent GIRARDREYDET wrote:
> Hi,
> 
> I'm fighting with the configuration of logging in ServiceMix 4. From 
> what I have read, log4j is the default logging mechanism in SMX4. I have 
> used the spring-osgi-bundle artifact to create a ServiceMix4 Bundle.
> 
> I want to use the logging API, I am using log4j (Logger class). However, 
> when I compile, it seems that log4j is missing. I have tried playing 
> with teh dependencies, but if I remove the exclusions (what are they for 
> anyway ?) in com.springsource.slf4j.log4j, then the pom.xml claims it is 
> missing some indirect dependencies. So.... I'm stuck :-(
> 
> Here is my dependency configuration:
> 
>    <dependencies>
>        <dependency>
>            <groupId>org.apache.cxf</groupId>
>            <artifactId>cxf-rt-frontend-jaxws</artifactId>
>            <version>2.2.2.0-fuse</version>
>            <scope>provided</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.geronimo.specs</groupId>
>            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
>            <version>1.1.2</version>
>        </dependency>
>        <dependency>
>          <groupId>org.slf4j</groupId>
>          
> <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
>          <version>${slf4j.version}</version>
>          <scope>provided</scope>
>        </dependency>
>        <!--  --><dependency>
>          <groupId>org.slf4j</groupId>
>          <artifactId>com.springsource.slf4j.api</artifactId>
>          <version>${slf4j.version}</version>
>          <scope>provided</scope>
>        </dependency>
>        <dependency>
>          <groupId>org.slf4j</groupId>
>          <artifactId>com.springsource.slf4j.log4j</artifactId>
>          <version>${slf4j.version}</version>
>          <scope>provided</scope>
>          <exclusions>
>            <exclusion>
>                <groupId>log4j</groupId>
>                <artifactId>log4j</artifactId>
>            </exclusion>
>            <exclusion>
>                <groupId>org.apache.log4j</groupId>
>                <artifactId>com.springsource.org.apache.log4j</artifactId>
>            </exclusion>
>          </exclusions>
>        </dependency>
>        <dependency>
>            <groupId>log4j</groupId>
>            <artifactId>log4j</artifactId>
>            <version>1.2.15</version>
>            <type>jar</type>
>            <scope>test</scope>
>        </dependency>
>    </dependencies>

-- 
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

[SMX4] How to configure logging ?

Posted by Vincent GIRARDREYDET <vi...@thalesgroup.com>.
Hi,

I'm fighting with the configuration of logging in ServiceMix 4. From 
what I have read, log4j is the default logging mechanism in SMX4. I have 
used the spring-osgi-bundle artifact to create a ServiceMix4 Bundle.

I want to use the logging API, I am using log4j (Logger class). However, 
when I compile, it seems that log4j is missing. I have tried playing 
with teh dependencies, but if I remove the exclusions (what are they for 
anyway ?) in com.springsource.slf4j.log4j, then the pom.xml claims it is 
missing some indirect dependencies. So.... I'm stuck :-(

Here is my dependency configuration:

    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>2.2.2.0-fuse</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          
<artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
          <version>${slf4j.version}</version>
          <scope>provided</scope>
        </dependency>
        <!--  --><dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>com.springsource.slf4j.api</artifactId>
          <version>${slf4j.version}</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>com.springsource.slf4j.log4j</artifactId>
          <version>${slf4j.version}</version>
          <scope>provided</scope>
          <exclusions>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.log4j</groupId>
                <artifactId>com.springsource.org.apache.log4j</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
    </dependencies>