Hi Devs,

Just wanted to follow up on this issue.   We've confirmed that removing 
apache-stratos-cartridge-agent-4.0.0/lib/slf4j-1.5.10.wso2v1.jar fixed this 
issue.  We're trying to see where this dependency is configured.   I found the 
references to slf4j in [1], [2], and [3] in our code base.   I assume [1] and 
[2] are auto-generated during maven build.

Any idea which config file controls contents of [1] and [2]?

I also see that Stratos CLI code uses slf4j version 1.7.6 while cloud 
controller, load balancer and the rest uses version 1.6.4.   Should we try to 
ensure all Stratos components references the same version of sl4j?  If so, how?


1/- 
products/stratos/modules/p2-profile-gen/target/wso2carbon-core-4.2.0/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
slf4j,1.5.10.wso2v1,../plugins/slf4j_1.5.10.wso2v1.jar,4,true

2/- 
components/org.apache.stratos.cartridge.agent/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
  - slf4j.wso2 (http://wso2.org) slf4j.wso2:slf4j:bundle:1.5.10.wso2v1

3/- components/org.apache.stratos.cartridge.agent/pom.xml
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>

Thanks,
-Jeffrey

From: "Martin Eppel (meppel)" <mep...@cisco.com<mailto:mep...@cisco.com>>
Reply-To: "dev@stratos.apache.org<mailto:dev@stratos.apache.org>" 
<dev@stratos.apache.org<mailto:dev@stratos.apache.org>>
Date: Sunday, July 13, 2014 12:03 PM
To: "dev@stratos.apache.org<mailto:dev@stratos.apache.org>" 
<dev@stratos.apache.org<mailto:dev@stratos.apache.org>>
Cc: 
"d...@stratos.incubator.apache.org<mailto:d...@stratos.incubator.apache.org>" 
<d...@stratos.incubator.apache.org<mailto:d...@stratos.incubator.apache.org>>
Subject: RE: cartridge agent startup error (4.0.0 based source, local build)

We merged our local changes which (were working and based on rc4), with 4.0.0 
and now we are seeing this issue. Did we change library versions (used by 
cartridge agent) between rc4 and 4.0.0 ? Which pom files define all the 
cartridge agent dependencies ?

Thanks

Martin

From: isu...@wso2.com<mailto:isu...@wso2.com> [mailto:isu...@wso2.com] On 
Behalf Of Isuru Haththotuwa
Sent: Sunday, July 13, 2014 7:21 AM
To: dev
Cc: d...@stratos.incubator.apache.org<mailto:d...@stratos.incubator.apache.org>
Subject: Re: cartridge agent startup error (4.0.0 based source, local build)

Hi Martin,
I have not seen this, but a Google search tells me what you thought is correct. 
There are different versions of API and Integration libraries. Do you have any 
local changes? If so, please check in those classes if there are any imports 
related to a different version of SL4J.

On Sun, Jul 13, 2014 at 3:46 PM, Martin Eppel (meppel) 
<mep...@cisco.com<mailto:mep...@cisco.com>> wrote:
We are getting an error when the cartridge agent is starting, looks like the 
(local) build it is pulling 2 different versions of SLF4J (see exception below) 
when the cartridge zip file is generated which causes an incompatibility, has 
anyone else seen this ?

Any idea what's causing it and how to resolve it ?

Thanks

Martin


log4j:WARN Please initialize the log4j system properly.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/opt/apache-stratos-cartridge-agent-4.0.0/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/opt/apache-stratos-cartridge-agent-4.0.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
log4j:WARN Please initialize the log4j system properly.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/opt/apache-stratos-cartridge-agent-4.0.0/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/opt/apache-stratos-cartridge-agent-4.0.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
"/var/log/apache-stratos/cartridge-agent.log" 48L, 5449C                        
               1,1           Top
        at 
org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:310)
        at 
org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:96)
        at 
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:200)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "Thread-3" java.lang.NoSuchMethodError: 
org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
        at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:246)
        at 
org.apache.activemq.thread.TaskRunnerFactory.init(TaskRunnerFactory.java:91)
        at 
org.apache.activemq.thread.TaskRunnerFactory.execute(TaskRunnerFactory.java:149)
        at 
org.apache.activemq.thread.TaskRunnerFactory.execute(TaskRunnerFactory.java:145)
        at 
org.apache.activemq.transport.tcp.TcpTransport.doStop(TcpTransport.java:538)
        at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:71)
        at 
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:582)
        at 
org.apache.activemq.transport.AbstractInactivityMonitor.stop(AbstractInactivityMonitor.java:145)
        at 
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
        at 
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
        at 
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
        at 
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
        at 
org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
        at 
org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
        at 
org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:725)
        at 
org.apache.stratos.messaging.broker.connect.TopicConnector.close(TopicConnector.java:86)
        at 
org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:157)
        at java.lang.Thread.run(Thread.java:745)

--
Thanks and Regards,

Isuru H.
+94 716 358 048



Reply via email to