uribuilder的java依赖性

blpfk2vs  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(360)

我正在尝试使用maven执行uribuilder,但出现以下错误:
严重:路径为[]的上下文中servlet[jersey rest service]的servlet.service()引发了根本原因为java.lang.abstractmethoderror的异常[servlet execution引发了异常]:receiver类com.sun.jersey.api.uri.uribuilderimpl未定义或继承已解析方法“AbstractJavax.ws.rs.core.uribuilder”的实现抽象类javax.ws.rs.core.uribuilder的uri(java.lang.string)。
位于javax.ws.rs.core.uribuilder.fromuri(uribuilder.java:96)
我尝试了不同的依赖项,但每次都会发生此错误。我在网络上查看了这个错误,但是,没有一个解决方案对我有效。我不知道该怎么办。
my pom.xml:

  1. <sourceDirectory>src</sourceDirectory>
  2. <resources>
  3. <resource>
  4. <directory>src</directory>
  5. <excludes>
  6. <exclude>**/*.java</exclude>
  7. </excludes>
  8. </resource>
  9. </resources>
  10. <plugins>
  11. <plugin>
  12. <artifactId>maven-compiler-plugin</artifactId>
  13. <version>3.8.1</version>
  14. <configuration>
  15. <source>1.7</source>
  16. <target>1.7</target>
  17. </configuration>
  18. </plugin>
  19. <plugin>
  20. <artifactId>maven-war-plugin</artifactId>
  21. <version>3.2.3</version>
  22. <configuration>
  23. <warSourceDirectory>WebContent</warSourceDirectory>
  24. </configuration>
  25. </plugin>
  26. </plugins>
  27. </build>
  28. <dependencies>
  29. <dependency>
  30. <groupId>org.hibernate</groupId>
  31. <artifactId>hibernate-entitymanager</artifactId>
  32. <version>4.3.6.Final</version>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.hibernate</groupId>
  36. <artifactId>hibernate-core</artifactId>
  37. <version>5.2.6.Final</version>
  38. </dependency>
  39. <dependency>
  40. <groupId>mysql</groupId>
  41. <artifactId>mysql-connector-java</artifactId>
  42. <version>5.1.40</version>
  43. </dependency>
  44. <!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat -->
  45. <dependency>
  46. <groupId>org.apache.tomcat</groupId>
  47. <artifactId>tomcat</artifactId>
  48. <version>8.5.5</version>
  49. <type>pom</type>
  50. </dependency>
  51. <dependency>
  52. <groupId>javax.xml.soap</groupId>
  53. <artifactId>javax.xml.soap-api</artifactId>
  54. <version>1.4.0</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>log4j</groupId>
  58. <artifactId>log4j</artifactId>
  59. <version>1.2.17</version>
  60. </dependency>
  61. <dependency>
  62. <groupId>com.itextpdf</groupId>
  63. <artifactId>itextpdf</artifactId>
  64. <version>5.5.2</version>
  65. </dependency>
  66. <!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz -->
  67. <dependency>
  68. <groupId>org.quartz-scheduler</groupId>
  69. <artifactId>quartz</artifactId>
  70. <version>2.2.3</version>
  71. </dependency>
  72. <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
  73. <!-- https://mvnrepository.com/artifact/org.quartz-scheduler/quartz-jobs -->
  74. <dependency>
  75. <groupId>org.quartz-scheduler</groupId>
  76. <artifactId>quartz-jobs</artifactId>
  77. <version>2.2.3</version>
  78. </dependency>
  79. <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-bundle -->
  80. <dependency>
  81. <groupId>com.sun.jersey</groupId>
  82. <artifactId>jersey-bundle</artifactId>
  83. <version>1.19.4</version>
  84. </dependency>
  85. <dependency>
  86. <groupId>com.sun.jersey</groupId>
  87. <artifactId>jersey-server</artifactId>
  88. <version>1.17.1</version>
  89. </dependency>
  90. <dependency>
  91. <groupId>com.sun.jersey</groupId>
  92. <artifactId>jersey-core</artifactId>
  93. <version>1.17.1</version>
  94. </dependency>
  95. <dependency>
  96. <groupId>com.sun.jersey</groupId>
  97. <artifactId>jersey-servlet</artifactId>
  98. <version>1.17.1</version>
  99. </dependency>
  100. <dependency>
  101. <groupId>com.sun.jersey</groupId>
  102. <artifactId>jersey-json</artifactId>
  103. <version>1.8</version>
  104. </dependency>
  105. <dependency>
  106. <groupId>de.is2.java.api</groupId>
  107. <artifactId>insign-java-api</artifactId>
  108. <version>1.0</version>
  109. <scope>system</scope>
  110. <systemPath>${basedir}/WebContent/WEB-INF/lib/insign-java-api-3.9.29.jar</systemPath>
  111. </dependency>
  112. <dependency>
  113. <groupId>de.is2.rest.api.nodep</groupId>
  114. <artifactId>insign-rest-api-nodep</artifactId>
  115. <version>1.0</version>
  116. <scope>system</scope>
  117. <systemPath>${basedir}/WebContent/WEB-INF/lib/insign-rest-api-nodep-3.9.29.jar</systemPath>
  118. </dependency>
  119. </dependencies>

我在eclipse中使用Tomcat8.5,一个重要的补充说明是,我必须使用jersey 1.x,而不是更新的版本!有人知道uribuilder包含了哪些依赖项,以及我应该从pom.xml中删除哪些依赖项吗。我可以只包括球衣包吗?在pom.xml的最后几行中,我包含了两个jar,它们不在构建路径中。这对他们来说是正确的吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题