JiBX(org.jibx.runtime.JiBXException:无法访问类的绑定信息...)

问题描述 投票:0回答:3

有人用过JiBX吗? JiBX网站

尝试运行时,我不断收到此错误,因为它尝试绑定:

org.jibx.runtime.JiBXException:无法访问类的绑定信息....

我正在使用 Netbeans,它不起作用,但它适用于我使用 Eclipse 的同事

eclipse netbeans jar jibx
3个回答
1
投票

确保绑定定义已编译到您的类文件中。

查看 JiBX-FAQsJiBX 绑定编译器使用其他 IDE 构建)文档。


1
投票

在maven中只需要配置如下插件即可

<plugin>
                <groupId>org.jibx</groupId>
                <artifactId>jibx-maven-plugin</artifactId>
                <version>${jibx.maven.version}</version>
                <configuration>
                    <schemaBindingDirectory>src/main/java/com/lute/serviceAccessor/farelogix/domain</schemaBindingDirectory>
                    <includeSchemaBindings>
                        <includeSchemaBindings>*-Binding.xml</includeSchemaBindings>
                    </includeSchemaBindings>
                    <verbose>true</verbose>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>bind</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

这样就可以了!!


0
投票

感谢提醒!

我在本地运行 alfresco-community-repo 版本 23.1.0.256 时遇到了类似的问题,

想法

jdk17

雄猫10

至于alfresco-global.properties配置这里就不细说了,我使用的是pg数据库

直接启动tomcat时就提示M2Model报错了: maven 模块为 : data-model

...

原因:org.jibx.runtime.JoBException:无法访问类 org.alfresco.repo.dictionary.M2Model 的绑定信息

...

···

Field 字段 = clas.getDeclaredField("JiBX_bindingList"); 这行报错

···

查看了class文件时发现没有这个字段,经过maven插件jibx jibx:bind命令后在class文件中生成了删除的字段,tomcat服务成功启动

© www.soinside.com 2019 - 2024. All rights reserved.