- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
< bindings xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.1" >
< bindings schemaLocation="ead.xsd" version="1.0">
< bindings node="//xs:complexType[@name='title']">
< bindings node=".//xs:attribute[@name='type']">
< property name="TAttribute"/>
< /bindings>
< /bindings>
< /bindings>
< /bindings>
parsing a schema...
Exception in thread "main" java.lang.AssertionError: javax.xml.bind.JAXBException
with linked exception:
[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
com.sun.xml.bind.api.impl.NameConverter is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at com.sun.xml.bind.api.impl.NameConverter
at public com.sun.xml.bind.api.impl.NameConverter com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding.nameConverter
at com.sun.tools.xjc.reader.xmlschema.bindinfo.BIGlobalBinding
]
at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getCustomizationContext(BindInfo.java:356)
at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getCustomizationUnmarshaller(BindInfo.java:362)
有什么问题吗?
最佳答案
你用的是哪个xjc?我建议使用 jdk1.6 内置的 xjc 来生成所需的绑定(bind)。
关于java - EAD xsd 生成的 JAXBException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17173280/
我得到以下形式的 JAXBException class SomeClass nor any of its super class is known to this context. 完整的堆栈跟踪如
我正在分析一些代码,其中 JAXB 是序列化机制,但我无法定义 JAXB 执行可以合理表示的条件: 验证(我们的代码中未使用) XML 有效性 - 只能进行解码。我们对我们曾经使用过的所有旧版 JAX
在编码 JUnit 测试时,我无法找到强制 JAXBException 的方法。有没有人有任何想法? 这是我的编码代码: public String toXml() { lo
来自那里的 XSD:http://www.loc.gov/ead/ead.xsd JAXB 命令:xjc ead.xsd -b ead.xjb ead.xjb :
我有一个应用程序通过了 CircleCI 上的 lint 测试,但在本地计算机上失败并出现以下错误 java.lang.NoClassDefFoundError: javax/xml/bind/JAX
我正在尝试对解码方法进行 JUnit 异常测试。 这是我的解码方法(注意:由于使用预期字符串进行正常测试解码测试,我返回一个字符串)。 public String UnMarshalling(Stri
当我将应用程序作为独立的 Java 程序运行时,它运行良好。当我将它作为小程序运行时,它会抛出 JAXBException 并带有以下堆栈跟踪信息。 javax.xml.bind.JAXBExcept
今天我试图将一个 Android 项目添加到 CIRCLE CI,我正在其中运行 ./gradlew lint 测试作为构建是否通过的检查。问题是我遇到了一些烦人的错误,我花了几个小时才解决它们: 在
在 Apache Crunch 管道中实现的 MapReduce 作业失败并显示错误消息 Error injecting constructor, javax.xml.bind.JAXBExcepti
我正在尝试运行 ./gradlew clean 检查,但遇到以下错误: > Task :app:kaptDebugKotlin FAILED e: java.lang.NoClassDefFoundE
我使用的是 Mule 3.6。我有一个用 JAXB 绑定(bind)注释的对象,我正在尝试将其转换为 Mule 中的 XML。每当我尝试这样做时,都会收到 javax.xml.bind.JAXBExc
我正在尝试更新到 gradle 5.4 以及 JDK 11,但在构建时遇到错误: Task :app:compileDesarrolloDebugJavaWithJavac FAILED FAILU
我有一个较旧的小部件应用程序,它使用 JAXB,现在正在迁移到 Java 11。 我知道 java.xml.bind/JAXB 已在此版本中删除,因此我们尝试用 Jakarta 替换它。 我们有 ja
我必须将我的 tomcat 迁移到新的物理服务器。因此我决定使用 Java11 而不是我之前在我的 tomcat 机器上使用的 Java8。当然,我遇到了现在丢失的软件包转移到外部源的麻烦。我阅读了这
在整理我的 Java 代码时: Marshaller marshaller = context.createMarshaller(); marshaller.setProper
我正在尝试将我的 Hibernate Gradle 项目更新到 Java 10。我收到以下错误: Caused by: org.hibernate.internal.util.config.Confi
将 Comment 对象编码为 JSON 时出现以下异常: javax.xml.bind.JAXBException: class javax.jdo.identity.LongIdentity no
我已经使用 cxf-codegen-plugin 生成了一个网络服务客户端,我在本地运行这段代码很好,它连接到网络服务。 当我尝试将我的应用程序部署到我们的 WebLogic 服务器时,问题出现了。当
我的项目中有一个 faSTLane 设置,但失败并显示 java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException在 gradle(tas
我有一个在Android Studio中创建的Android项目,它运行良好。最近,我开始使用IntelliJ IDEA,并且每次我要构建项目时,都会出现以下异常: e: java.lang.NoCl
我是一名优秀的程序员,十分优秀!