Java 1.7 wsgen target error

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Java 1.7 wsgen target error相关的知识,希望对你有一定的参考价值。

我将java升级到1.7, 在用ant编译的时候遇到了这个错误, 应该怎么解决呢?
onse.java
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\QueryNodeByID.java
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\QueryNodeByIDResponse.java
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\RemoveLink.java
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\RemoveLinkResponse.java
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\RemoveUserJustifications.ja
va
[wsgen] com\alterpoint\sosgi\topo\provider\jaxws\RemoveUserJustificationsRes
ponse.java
[wsgen] Note: ap round: 2
[wsgen] Exception in thread "main" javax.xml.ws.WebServiceException: Unable
to create JAXBContext
[wsgen] at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(A
bstractSEIModelImpl.java:158)
[wsgen] at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(Abstrac
tSEIModelImpl.java:87)
[wsgen] at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(Runtime
Modeler.java:262)
[wsgen] at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.jav
a:218)
[wsgen] at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
[wsgen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wsgen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:57)
[wsgen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
[wsgen] at java.lang.reflect.Method.invoke(Method.java:601)
[wsgen] at com.sun.tools.ws.Invoker.invoke(Invoker.java:116)
[wsgen] at com.sun.tools.ws.WsGen.main(WsGen.java:52)
[wsgen] Caused by: java.security.PrivilegedActionException: com.sun.xml.bind
.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions

[wsgen] java.lang.StackTraceElement does not have a no-arg default construct
or.
[wsgen] this problem is related to the following location:
[wsgen] at java.lang.StackTraceElement
[wsgen] at public java.lang.StackTraceElement[] java.lang.Throwa
ble.getStackTrace()

你先看一下是否是你项目JDK编译的问题,右键单击项目名称-->properties-->Java Compiler中的Compiler compliance level的下拉选项是否是jdk1.7,如果不是就选择7,然后重新启动tomcat试试

追问

没有7这个选项。。。。

追答

那在你的下拉列表当中都有什么选项,粘贴出来看一下

参考技术A 环境设置不对追问

如果你能够给我解决这个问题, 我可以给你加分

以上是关于Java 1.7 wsgen target error的主要内容,如果未能解决你的问题,请参考以下文章

webservice

错误 [ERR_PACKAGE_PATH_NOT_EXPORTED]:在@babel/helper-compilation-targets/package.json 中没有解决“导出”主要问题

[Err] 1093 - You can't specify target table 'master_data' for update in FROM clause

错误:“错误太多重定向” Prestashop 1.7

关于mysql 5.7版本“报[Err] 1093 - You can't specify target table 'XXX' for update in FROM clau

maven maven.compiler.source和maven.compiler.target的坑