小编And*_*ruz的帖子

JDK11 + spring boot = JAXBException:在模块路径或类路径上没有找到JAXB-API的实现

我有一个基于官方指南的简单 spring 项目来使用 Web 服务。此示例似乎针对 JDK 8,但我想使用最新的 LTS,JDK 11。

我已经修改了该pom.xml文件并添加了一些似乎已从 JDK 中删除的依赖项,即:

        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.3.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.2</version>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>rt</artifactId>
            <version>2.3.1</version>
        </dependency>

        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>javax.activation</artifactId>
            <version>1.2.0</version>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

但是,我似乎无法启动应用程序,总是收到此错误:

?  spring-test git:(master) mvn spring-boot:run
[INFO] Scanning for projects...
...
org.springframework.ws.soap.client.SoapFaultClientException: Implementation of JAXB-API has not been found on module path or classpath.
    at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault (SoapFaultMessageResolver.java:38)
    at org.springframework.ws.client.core.WebServiceTemplate.handleFault (WebServiceTemplate.java:830)
    at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive (WebServiceTemplate.java:624)
    at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive (WebServiceTemplate.java:555)
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive (WebServiceTemplate.java:390)
    at com.example.demo.CountryClient.getCountry (CountryClient.java:21)
    at com.example.demo.DemoApplication.lambda$lookup$0 …
Run Code Online (Sandbox Code Playgroud)

spring-boot

4
推荐指数
1
解决办法
6636
查看次数

如何使用(Py)Spark汇总数据集中数据点之间的距离?

我有一个时间段内用户的Lat/Lon格式的位置数据集.我想计算这些用户旅行的距离.样本数据集:

| 时间戳| 用户| 纬度|经度| | 1462838468 | 49B4361512443A4DA ... | 39.777982 | -7.054599 | | 1462838512 | 49B4361512443A4DA ... | 39.777982 | -7.054599 | | 1462838389 | 49B4361512443A4DA ... | 39.777982 | -7.054599 | | 1462838497 | 49B4361512443A4DA ... | 39.777982 | -7.054599 | | 1465975885 | 6E9E0581E2A032FD8 ... | 37.118362 | -8.205041 | | 1457723815 | 405C238E25FE0B9E7 ... | 37.177322 | -7.426781 | | 1457897289 | 405C238E25FE0B9E7 ... | 37.177922 | -7.447443 | | 1457899229 | 405C238E25FE0B9E7 ... …

apache-spark apache-spark-sql pyspark

0
推荐指数
1
解决办法
1926
查看次数