I am learning Java rest webservices using Jersey Framework.  Created one sample project in eclipse but not able to deploy it in tomcat. Below libraries added in eclipse project. Can anyone please help me out here  cglib-2.2.jar hk2-api-2.3.0-b06.jar hk2-locator-2.1.63.jar hk2-utils-2.5.0-b04.jar javassist.jar javax-inject.jar javax.annotation-api-1.2.jar javax.ws.rs-api-2.0.jar javax.ws.rs.jar jersey-bean-validation-2.17.jar jersey-client.jar jersey-common.jar jersey-container-servlet-core.jar jersey-container-servlet.jar jersey-guava-2.7.jar jersey-media-jaxb.jar jersey-server.jar validation-api-1.0.0.GA.jar  Getting below error while running project in Apache server inside eclipse.         SEVERE: StandardWrapper.Throwable     java.lang.NoSuchMethodError: org.glassfish.hk2.utilities.AbstractActiveDescriptor.&lt;init&gt;(Ljava/util/Set;Ljava/lang/Class;Ljava/lang/String;L     java/util/Set;Lorg/glassfish/hk2/api/DescriptorType;Lorg/glassfish/hk2/api/DescriptorVisibility;ILjava/lang/Boolean;Ljava/lang/String;Ljava/     util/Map;)V         at org.jvnet.hk2.internal.ConstantActiveDescriptor.&lt;init&gt;(ConstantActiveDescriptor.java:113)         at org.jvnet.hk2.internal.Utilities.getLocatorDescriptor(Utilities.java:951)         at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.initialize(ServiceLocatorGeneratorImpl.java:71)         at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.create(ServiceLocatorGeneratorImpl.java:96)         at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(ServiceLocatorFactoryImpl.java:270)         at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLocatorFactoryImpl.java:230)         at org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:138)         at org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:123)         at org.glassfish.jersey.server.ApplicationHandler.&lt;init&gt;(ApplicationHandler.java:330)         at org.glassfish.jersey.servlet.WebComponent.&lt;init&gt;(WebComponent.java:392)         at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)         at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)         at javax.servlet.GenericServlet.init(GenericServlet.java:158)         at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5253)         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5543)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)         at java.util.concurrent.FutureTask.run(Unknown Source)         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)         at java.lang.Thread.run(Unknown Source) enter code here
I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?
How can I get a copy of a Canadian visa refusal letter? In expressions such as "ham 'n eggs", the conjunction 'n appears to replace and, yet there is only one apostrophe to indicate the missing a and none for the missing d (i.e., no "ham 'n' eggs").    Is there a punctuation rule that governs this or is it just an idiosyncratic case? Proof of a formula involving Euler's totient function: $\varphi (mn) = \varphi (m) \varphi (n) \cdot \frac{d}{\varphi (d)}$ Convergence in probability implies convergence on a subsequence almost surely.  But this means we fix a subsequence, such that $X_{n_k}$ converges for almost every $\omega$, right? The subsequence we pick does not depend on the $\omega$ right? I am a new user, who has just been told to run / execute a command. The answer has some text with a grey background like this text here or  sometimes this text here.   However, I don't know what "run" or "command" means in relation to Ubuntu.  How do I do this?    This is intended for use as a Q&amp;A you can link to when you tell someone to run a command. I've used Ubuntu before, but I'm still very new. I just installed 16.10 on a new computer yesterday, and the Wi-Fi has been considerably slower than my Windows laptop. I put the computer together mainly to play Dota 2, and I experience decent ping but constant 5%-10% packet loss while playing. Occasionally, after the computer has been left on for a while, the Wi-Fi connection will drop completely- I can still see networks in the drop down menu, including my home network, but my computer will not reconnect without a reboot. I've looked all over for a solution, but my inexperience has prevented me from getting anything to work. My Wi-Fi card is a Ralink RT2561/RT61, here's some info  The output of sudo lshw -C network   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   Here is the output of sudo iwconfig:   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   I'm at a loss, I'm very bad at this. If any additional info is needed I can provide it Converting WKT to SHP? In the , the icon color for the various sites seems* incorrect: Whenever I select a main site, the icon is greyed out, and when ever I select the corresponding meta site, the icon is colored. My initial instinct was to think that the colors of the main/meta sites following the &quot;Switch sites:&quot; prompt should be switched. (Actually, it seems like it's just a UI thing. See the edit below.)  *Edit: Actually, the colors are technically not incorrect, since (as Jeremy Banks has pointed out) the icon shows &quot;the other&quot; site of the main/meta pair, and clicking on it is for switching to the respective other site. See the comment thread for some UI improvement ideas. Data Recovery - How to Restore Deleted / Formatted Files on HD Micro SD Card Background:    I put in a friend's SD Card to format it because it was having problems. Then I put mine back in and I think my phone formatted my SD Card. I had a ton of pictures on there that are now gone! I put the card into the computer and there's only 2mb of cache files on there and none of the original directories.   I already tried the following freeware recovery applications:         Neither of them were able to retrieve any files. Undelete took 1minute to scan for files and came up with 0 files.  Recuva took 10 minutes for their "deep scan" which doesn't seem thorough enough at all for this 8GB SD Card. I need something that's a lot more heavy duty.  I don't mind paying for an application to get the data back if necessary...   Questions:     Which application can I use to recover my deleted picture files from my 8GB HD Micro SD Card?   Why did Anroid format my SD card?   How can I tell if it's a phone problem, data problem, or SD Card problem? Find roots of $3^x+x^3=17$ Find $x$ in the following equation: $$3^x+x^3=17$$ Every time I open a folder from the desktop, a prompt is shown that the said folder is opened. How do I stop that? align xticks in PGFPlots The text xticks are not placed on the same line, rather the same height counting from the highest letter (zero is much higher than high and low).    How can you fix this?  MWE:  \documentclass[class=scrartcl,14pt]{standalone} \usepackage{fontspec} \usepackage{luatex85} \usepackage{unicode-math} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} \usepackage{calc} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture} \begin{groupplot}[group style={group size=1 by 1, horizontal sep=2cm, xlabels at=edge bottom }, %~ yticklabel style={/pgf/number format/fixed}, %~ xticklabel style={/pgf/number format/fixed}, scaled y ticks = false, scaled x ticks = false, xtick pos=left, ytick pos=left, %xlabel=time (week) ] \nextgroupplot[xmin=0.5,xmax=3.5,xtick={1,2,3},ymin=2.43,ymax=3.05,xticklabels={zero, low , high}, xlabel={label}]  \end{groupplot}  \end{tikzpicture}  \end{document} Vec2 a, b; // some random vector Vec2 cross = a.Cross(b); RelativeDirection(a,b,cross); // return true if the direction of                               // rotating a to b is counter-clockwise   How do I implement the function RelativeDirection()?  I got some suedo code from the textbook:  if a.Cross(b) &gt; 0 then ... else ...   but the cross product is a vector right? how do you compare it with an integer? How to log source file name and line number in Python Is it possible for a system to have negative potential energy? Does there exist a matrix $\mathbf{A}\in\mathbb{R}^{3\times3}$ such that $\mathbf{A}^{2}=-\mathbf{I}$? Is it possible for a matrix $\mathbf{A}\in\mathbb{R}^{3\times3}$,  $$\mathbf{A}^2=-\mathbf{I}$$  I know that It is possible for $2\times2$ matrix, but is it possible for $3\times3$ matrix ? Why $\sqrt{-1 \cdot {-1}} \neq \sqrt{-1}^2$? I would like to achieve this effect using my Nikon P510:      Are there any suggestions or tips that would help me do that? Can't use enter key shortcut on Google search results anymore Up until last week, Google used to place a blue arrow on the first search result. Using the arrow keys, one could select different results. Finally, pressing enter would enter into the selected result. For the past few days, these keyboard shortcuts are no longer there. How do I re-enable them? I search on Google every 10 minutes and can't afford to waste 2 seconds each time pointing my mouse at the desired link. How do I get console output in C++ with a Windows program?