Java 调 webservice 报如下错误

[2023-11-07 17:01:02.315] ERROR [scheduling-1] ToHisApiImpl.java:106 - No compiler detected, make sure you are running on top of a JDK instead of a JRE.
java.lang.IllegalStateException: No compiler detected, make sure you are running on top of a JDK instead of a JRE.
at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:193)
at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:136)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.compileJavaSrc(DynamicClientFactory.java:639)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:389)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:244)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:237)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:192)
at com.vipsoft.his.hospital.service.impl.GoodwillcisServiceImpl.archiveFile(GoodwillcisServiceImpl.java:85)
at com.vipsoft.his.hospital.service.impl.ToHisApiImpl.syncReport(ToHisApiImpl.java:92)
at com.vipsoft.his.hospital.schedule.HisTaskJob.syncReport(HisTaskJob.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.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)

安装 JDK 默认使用 JRE 环境,新增 JAVA_HOME 环境变量,指向 JDK 目录即可



如果还是不行,修改运行命令

java -jar XXX.jar

改成

"%JAVA_HOME%/BIN/JAVA" -jar XXX.jar

(XXX为你自己打包好的jar包名称)

No compiler detected, make sure you are running on top of a JDK instead of a JRE的更多相关文章

  1. A previous installation of Qt5 Visual Studio Add-in was detected. Please uninstall it before running this installer解决办法

    前段时间在安装Qt Visual Studio插件的时候,安装到一半不小心中止了,结果后来怎么安装都不行,提示已经安装了,要先卸载, 可是到哪里都找不到有卸载的,因为压根就没有安装完成.这可害苦我了. ...

  2. Android stadio 生成项目 Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE)

    解决方法 File-->Project-->Structrue-->SDK Location-->JDK location Use embedded JDK 前面勾去掉,指定一 ...

  3. maven install 报错 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    1.控制台打印信息 [INFO] Scanning for projects... [INFO] [INFO] ---------------------< org.cqupt.mauger:R ...

  4. No compiler is provided in this environment. Perhaps you are running on a JR

    maven编译项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3 ...

  5. 关于Maven项目build时出现No compiler is provided in this environment的处理

    版权声明:本文为博主原创文章,未经博主允许不得转载. http://blog.csdn.net/lslk9898/article/details/73836745 近日有同事遇到在编译Maven项目时 ...

  6. 关于Maven项目build时出现No compiler is provided in this environment的处理(转)

    本文转自https://blog.csdn.net/lslk9898/article/details/73836745 近日有同事遇到在编译Maven项目时出现[ERROR] No compiler ...

  7. 解决Maven项目报错Perhaps you are running on a JRE rather than a JDK?

    问题描述: 在创建SpringMVC项目运行构建项目的时候,发现构建失败.报错信息为Maven-No compiler is provided in this environment. Perhaps ...

  8. Atitit.java eval功能的实现  Compiler API

    Atitit.java eval功能的实现  Compiler API 输出echo2 输出目录配置2 针对编译器,JDK 设计了两个接口,分别是 JavaCompiler 和JavaCompiler ...

  9. Up and running with Apache Spark on Apache Kudu

    After the GA of Apache Kudu in Cloudera CDH 5.10, we take a look at the Apache Spark on Kudu integra ...

  10. Android Studio运行报错,Cannot find System Java Compiler. Ensure that you have installed a JDK......

    详细报错信息如下 Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Cannot find System J ...

随机推荐

  1. Java Exception最佳实践(转)

    https://www.dubby.cn/detail.html?id=9033 1.异常介绍 2.Java中的异常介绍 3.自定义异常 4.几个建议 1)不要生吞异常 2)申明具体的异常 3)尽可能 ...

  2. git中的ole mode 和 new mode提示问题

    git status 显示如下(文件内容其实并没有改变): old mode 100644 new mode 100755 原因是: 使用chmod修改过文件权限后,filemode会有变化. 解决办 ...

  3. 三维形体的表面积(3.25leetcode每日打卡)

    在 N * N 的网格上,我们放置一些 1 * 1 * 1  的立方体. 每个值 v = grid[i][j] 表示 v 个正方体叠放在对应单元格 (i, j) 上. 请你返回最终形体的表面积.   ...

  4. Cadence SPB 22.1 --学习基础01Day

    1.电路图设计 ①.原理图设计 原理图符号-->原理图库:代替实际电子元器件的符号,主要就是引脚数目.引脚序号与实物对应: ②.PCB设计 PCB符合-->PCB封装库:电子元器件的各种实 ...

  5. 做数据分析,我们需要懂多少excel知识?

    数据分析所需的Excel知识详解 在进行数据分析工作时,Excel是一个非常常用且强大的数据处理工具.以下是数据分析中常用的Excel知识点和技巧的详细描述. 1. 基本操作 在使用Excel进行数据 ...

  6. K8s容器debug高级技巧

    使用 kubectl exec 执行指令 如果您在 Kubernetes 上运行软件,您会想要在某些时候去调试您所部署的软件的一些方面.对于习惯于使用虚拟机 (VMs) 的人来说能自然使用的一种简单的 ...

  7. Mock框架moco学习笔记

    目录 一.Moco框架基本介绍 1. 什么是Moco 2. Moco原理简介 3. Moco的配置和运行 4. Moco启动以及第一个demo 二.mock 的启动及第一个demo 1. 创建star ...

  8. IDEA配置自定义标签,实现高亮注释~

    为什么要写这么一篇博客呢? 不知道大家有没有这样的一种苦恼,就是在写代码的时候遇到复杂的核心的代码,想加一个特殊的注释方便后期自己或者同事查看,但是这玩意IDEA好像只给我们提供了两个 FIXME : ...

  9. 【电影推荐系统】Spring Boot + Vue3 前后端分离项目

    目录 0 前言 1 项目前端介绍 1.1 项目启动和编译 1.1.1 项目启动 1.1.2 项目编译 1.2 前端技术栈 1.3 功能模块前端界面展示 1.3.1 基础功能模块 1.3.2 用户模块 ...

  10. CentOS7 安装Python3.9以上版本时。编译报错,原因是openssl版本低

    openssl-1.1.1安装 1.前因 python 导入clickhouse_driver需要import ssl和_ssl,报错 File"/home/oracle/python3/l ...