[prev in list] [next in list] [prev in thread] [next in thread] 

List:       esb-java-dev
Subject:    Re: [Dev] No such method when loading third party jar in eclipse
From:       Awanthika Senarath <awanthika () wso2 ! com>
Date:       2016-02-29 11:30:50
Message-ID: CAMSU5OePvJZjQ9+Ti+QwxCSxOXe6q2xCvvB_bAtaBJqKq+2yfw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I have added the library into the libs folder and added them to the
class-path only. Since it is in the same plugin I did not export and import
explicitly.

Regards
Awanthika

Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791



On Mon, Feb 29, 2016 at 4:13 PM, Nuwan Pallewela <nuwanp@wso2.com> wrote:

> Hi Awanthika,
> 
> Have you exported the packages you need to use?
> 
> Thanks,
> Nuwan
> 
> On Mon, Feb 29, 2016 at 3:47 PM, Awanthika Senarath <awanthika@wso2.com>
> wrote:
> 
> > The issue is,
> > 
> > We are using two jackson jars in our source namely,
> > 
> > jackson-mapper-asl-1.9.3.jar and jackson-mapper-asl-1.8.10.jar,
> > 
> > Awanthika Senarath
> > Software Engineer, WSO2 Inc.
> > Mobile: +94717681791
> > 
> > 
> > 
> > On Mon, Feb 29, 2016 at 3:41 PM, Awanthika Senarath <awanthika@wso2.com>
> > wrote:
> > 
> > > Hello All,
> > > 
> > > I have a third party dependency in my eclipse RCP plugin to the
> > > following jars,
> > > 
> > > jaxb-impl-2.2.4-1.jar,
> > > jaxb-xjc-2.2.4-1.jar,
> > > jackson-mapper-asl-1.9.3.jar,
> > > jackson-core-asl-1.9.3.jar,
> > > jackson-annotations-2.1.0.jar
> > > 
> > > I have loaded them through a lib folder, added to eclipse class-path and
> > > have the entry [1] in my META-INF file.
> > > 
> > > There are no errors shown in the project explorer or in the java editor
> > > of the classes.
> > > 
> > > During runtime all the other libs are loaded fine, the firt jar loaded
> > > is jaxb-xjc-2.2.4-1.jar,, "Driver" method. But it throws a runtime error
> > > [2] saying method not found. When I cheked the source of the jar [3] I
> > > could see that the method exists.
> > > 
> > > Appreciate any help on resolving this.
> > > 
> > > 
> > > [1]  lib/jaxb-impl-2.2.4-1.jar,
> > > lib/jaxb-xjc-2.2.4-1.jar,
> > > lib/jackson-mapper-asl-1.9.3.jar,
> > > lib/jackson-core-asl-1.9.3.jar,
> > > lib/jackson-annotations-2.1.0.jar
> > > 
> > > [2] java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin:
> > > Provider
> > > org.wso2.developerstudio.visualdatamapper.diagram.avro.generators.AvroSchemagenPlugin
> > >  could not be instantiated
> > > at java.util.ServiceLoader.fail(ServiceLoader.java:232)
> > > at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
> > > at
> > > java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
> > > at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
> > > at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
> > > at com.sun.tools.xjc.Options.findServices(Options.java:931)
> > > at com.sun.tools.xjc.Options.getAllPlugins(Options.java:367)
> > > at com.sun.tools.xjc.Options.parseArgument(Options.java:671)
> > > at com.sun.tools.xjc.Driver$OptionsEx.parseArgument(Driver.java:501)
> > > at com.sun.tools.xjc.Options.parseArguments(Options.java:781)
> > > at com.sun.tools.xjc.Driver.run(Driver.java:239)
> > > at com.sun.tools.xjc.Driver.run(Driver.java:199)
> > > at com.sun.tools.xjc.Driver._main(Driver.java:122)
> > > at com.sun.tools.xjc.Driver.access$000(Driver.java:79)
> > > at com.sun.tools.xjc.Driver$1.run(Driver.java:102)
> > > Caused by: java.lang.NoSuchMethodError:
> > > org.codehaus.jackson.map.introspect.VisibilityChecker.with(Lorg/codehaus/jackson \
> > > /annotate/JsonAutoDetect$Visibility;)Lorg/codehaus/jackson/map/introspect/VisibilityChecker;
> > >  
> > > 
> > > [3]
> > > http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.jackson/jackson-map \
> > > per-asl/1.9.2/org/codehaus/jackson/map/introspect/VisibilityChecker.java#VisibilityChecker.with%28org.codehaus.jackson.annotate.JsonAutoDetect%29
> > >  
> > > Regards
> > > 
> > > Awanthika Senarath
> > > Software Engineer, WSO2 Inc.
> > > Mobile: +94717681791
> > > 
> > > 
> > > 
> > 
> 
> 
> --
> ----------------------------------------------------------
> 
> *Nuwan Chamara Pallewela*
> 
> 
> *Software Engineer*
> 
> *WSO2, Inc. *http://wso2.com
> *lean . enterprise . middleware*
> 
> Email   *nuwanp@wso2.com <nuwanp@wso2.com>*
> Mobile  *+94719079739 <%2B94719079739>@*
> 
> 
> 


[Attachment #5 (text/html)]

<div dir="ltr">I have added the library into the libs folder and added them to the \
class-path only. Since it is in the same plugin I did not export and import \
explicitly.<div><br></div><div>Regards</div><div>Awanthika</div></div><div \
class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div \
dir="ltr">Awanthika Senarath<br>Software Engineer, WSO2 Inc.<br>

<div>Mobile: <a>+94717681791</a></div><br><br></div></div></div>
<br><div class="gmail_quote">On Mon, Feb 29, 2016 at 4:13 PM, Nuwan Pallewela <span \
dir="ltr">&lt;<a href="mailto:nuwanp@wso2.com" \
target="_blank">nuwanp@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Awanthika,<br><br></div>Have \
you exported the packages you need to use? \
<br><br></div>Thanks,<br></div>Nuwan<br></div><div class="gmail_extra"><div><div \
class="h5"><br><div class="gmail_quote">On Mon, Feb 29, 2016 at 3:47 PM, Awanthika \
Senarath <span dir="ltr">&lt;<a href="mailto:awanthika@wso2.com" \
target="_blank">awanthika@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>The issue is,</div><div><br></div>We are \
using two jackson jars in our source namely,<div><br></div><div><span \
style="font-size:12.8px">jackson-mapper-asl-1.9.3.</span><span \
style="font-size:12.8px">jar and  </span><span \
style="font-size:12.8px">jackson-mapper-asl-1.8.10.jar,  </span></div></div><div \
class="gmail_extra"><span><br clear="all"><div><div><div dir="ltr">Awanthika \
Senarath<br>Software Engineer, WSO2 Inc.<br>

<div>Mobile: <a>+94717681791</a></div><br><br></div></div></div>
<br></span><div><div><div class="gmail_quote">On Mon, Feb 29, 2016 at 3:41 PM, \
Awanthika Senarath <span dir="ltr">&lt;<a href="mailto:awanthika@wso2.com" \
target="_blank">awanthika@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hello All,<div><br></div><div>I have a third \
party dependency in my eclipse RCP plugin to the following \
jars,</div><div><br></div><div><div>jaxb-impl-2.2.4-1.jar,</div><div>jaxb-xjc-2.2.4-1. \
jar,</div><div>jackson-mapper-asl-1.9.3.jar,</div><div>jackson-core-asl-1.9.3.jar,</div><div>jackson-annotations-2.1.0.jar</div></div><div><br></div><div>I \
have loaded them through a lib folder, added to eclipse class-path and have the entry \
[1] in my META-INF file.</div><div><br></div><div>There are no errors shown in the \
project explorer or in the java editor of the \
classes.</div><div><br></div><div>During runtime all the other libs are loaded fine, \
the firt jar loaded is jaxb-xjc-2.2.4-1.jar,, &quot;Driver&quot; method. But it \
throws a runtime error [2] saying method not found. When I cheked the source of the \
jar [3] I could see that the method exists.</div><div><br></div><div>Appreciate any \
help on resolving this.</div><div><br></div><div><br></div><div>[1]   \
lib/jaxb-impl-2.2.4-1.jar,</div><div>  lib/jaxb-xjc-2.2.4-1.jar,</div><div>  \
lib/jackson-mapper-asl-1.9.3.jar,</div><div>  \
lib/jackson-core-asl-1.9.3.jar,</div><div>  \
lib/jackson-annotations-2.1.0.jar</div><div><br></div><div>[2] \
java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider \
org.wso2.developerstudio.visualdatamapper.diagram.avro.generators.AvroSchemagenPlugin \
could not be instantiated</div><div><span style="white-space:pre-wrap">	</span>at \
java.util.ServiceLoader.fail(ServiceLoader.java:232)</div><div><span \
style="white-space:pre-wrap">	</span>at \
java.util.ServiceLoader.access$100(ServiceLoader.java:185)</div><div><span \
style="white-space:pre-wrap">	</span>at \
java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)</div><div><span \
style="white-space:pre-wrap">	</span>at \
java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)</div><div><span \
style="white-space:pre-wrap">	</span>at \
java.util.ServiceLoader$1.next(ServiceLoader.java:480)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Options.findServices(Options.java:931)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Options.getAllPlugins(Options.java:367)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Options.parseArgument(Options.java:671)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver$OptionsEx.parseArgument(Driver.java:501)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Options.parseArguments(Options.java:781)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver.run(Driver.java:239)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver.run(Driver.java:199)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver._main(Driver.java:122)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver.access$000(Driver.java:79)</div><div><span \
style="white-space:pre-wrap">	</span>at \
com.sun.tools.xjc.Driver$1.run(Driver.java:102)</div><div>Caused by: \
java.lang.NoSuchMethodError: \
org.codehaus.jackson.map.introspect.VisibilityChecker.with(Lorg/codehaus/jackson/annot \
ate/JsonAutoDetect$Visibility;)Lorg/codehaus/jackson/map/introspect/VisibilityChecker;</div><div><br></div><div><br></div><div>[3] \
<a href="http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.jackson/jackson- \
mapper-asl/1.9.2/org/codehaus/jackson/map/introspect/VisibilityChecker.java#VisibilityChecker.with%28org.codehaus.jackson.annotate.JsonAutoDetect%29" \
target="_blank">http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.jackson/j \
ackson-mapper-asl/1.9.2/org/codehaus/jackson/map/introspect/VisibilityChecker.java#Vis \
ibilityChecker.with%28org.codehaus.jackson.annotate.JsonAutoDetect%29</a></div><div><br></div><div>Regards</div><span><font \
color="#888888"><div><br clear="all"><div><div><div dir="ltr">Awanthika \
Senarath<br>Software Engineer, WSO2 Inc.<br>

<div>Mobile: <a>+94717681791</a></div><br><br></div></div></div>
</div></font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font \
color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><font style="background-color:rgb(255,255,255)" \
color="#cccccc" size="2">----------------------------------------------------------</font></div><div \
dir="ltr"><div><i>Nuwan Chamara Pallewela<br></i></div><p style="margin:0px"><i><span \
style="font-size:10pt;font-family:Arial,sans-serif">Software \
Engineer<br></span></i></p><div><b><font style="background-color:rgb(255,255,255)" \
face="arial black, sans-serif"></font></b><p style="margin:0px"><b \
style="font-family:Arial,sans-serif;font-size:10pt"><i>WSO2, Inc. </i></b><span><font \
color="#888888"><font color="#888888"><a href="http://wso2.com/" \
style="color:rgb(17,85,204)" \
target="_blank">http://wso2.com</a></font></font></span></p><i><span \
style="font-size:10pt;font-family:Arial,sans-serif">lean . enterprise . \
middleware</span></i><b><font style="background-color:rgb(255,255,255)" face="arial \
black, sans-serif"><br><br></font></b><span><span \
style="background-color:rgb(255,255,255)"><font color="#cccccc">Email    <span \
style="color:rgb(0,0,255)"> <u><a href="mailto:nuwanp@wso2.com" \
target="_blank">nuwanp@wso2.com</a></u></span></font></span></span><br></div><div><span \
style="background-color:rgb(255,255,255)"><font color="#cccccc">Mobile</font>   <font \
color="#0000ff"><u><a href="tel:%2B94719079739" value="+94719079739" \
target="_blank">+94719079739</a>@</u>   <br>                 <span \
style="font-size:12.8000001907349px"><u><br></u></span></font></span><br></div></div>< \
/div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
 </font></span></div>
</blockquote></div><br></div>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic