[ 
https://issues.apache.org/jira/browse/CAMEL-10071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341238#comment-15341238
 ] 

Daniel Pocock commented on CAMEL-10071:
---------------------------------------

As it involves logging, it impacts the way it is used in a framework.  It also 
appeared on the Service Mix mailing list, so I thought it useful to fully 
document the issue here.  Another developer is looking at it more closely as 
Jitsi also uses this JAR.

There may be a workaround involving a system property and that could be coded 
into the camel-sip component if the issue isn't resolved with an upstream 
change.



> camel-sip - hard dependency on log4j 1.2.x JAR
> ----------------------------------------------
>
>                 Key: CAMEL-10071
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10071
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sip
>    Affects Versions: 2.17.1
>         Environment: n/a
>            Reporter: Daniel Pocock
>            Priority: Minor
>
> Trying to use log4j 2.x and the log4j-1.2-api (to emulate log4j 1.2 support), 
> starting a route with camel-sip fails to initialize:
> Failed to create Producer for endpoint: Endpoint[sip://test@... 
> stackName=client]. Reason: javax.sip.PeerUnavailableException: The Peer SIP 
> Stack: gov.nist.javax.sip.SipStackImpl could not be instantiated. Ensure the 
> Path Name has been set.
> Further down the stack trace, it has:
> Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/SimpleLayout
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:190)
>       at gov.nist.javax.sip.SipStackImpl.<init>(SipStackImpl.java:666)
>       ... 65 more
> Caused by: java.lang.ClassNotFoundException: org.apache.log4j.SimpleLayout
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>       ... 68 more
> The original log4j 1.2.x JAR needs to be on the classpath to provide that 
> class.
> The problem is at SipStackImpl.java:666 which appears to be in the dependency 
> jain-sip-api-1.2.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to