2016-07-23 2 views
0

안녕하세요 저는 JibX를 처음 사용하고 있으며 샘플로 시작했습니다.jibX 바인딩에서 클래스를로드 할 수 없습니다.

C : \ Users \ Uvais \ JavaProject \ src \ com \ jibX> java -jar C : \ Drive \ jibx_1_2_6 \ jibx \ lib \ jibx- bind.jar binding.xml 오류 : 클래스 com.jibX.Person을로드 할 수 없습니다. 구조의 요소 (binding.xml에서 L 오프라인 3 COL 50)에 바인딩 컴파일러에게 org.jibx.runtime.JiBXException 실행 오류 : 바인딩 binding.xml 때문에 유효 ATION 오류 org.jibx 에서의 사용 불가능하다. binding.Utility.loadBinding (Utility.java:358) at org.jibx.binding.Utility.loadFileBinding (Utility.java:420) at org.jibx.binding.Compile.compile (Compile.java:217) at org.jibx.binding.Compile.main (Compile.java:384는) 다음

내 binding.xml입니다

<binding> 
<mapping name="customer" class="Customer" ordered="false"> 
    <structure name="person" field="person" > 
     <value name="cust-num" field="customerNumber" usage="optional"/> 
    </structure> 
    <value name="street" field="street" /> 
</mapping> 
,

하지만 binding.xml에 구조 태그를 언급하는 경우 이클립스 또한 명령 프롬프트에서 동일하게 컴파일 할 수 메신저. 친절하게도 도움이됩니다. 하나는 초보자를위한 JiBX는에 좋은 튜토리얼,

답변

0

모하메드, 당신이 당신의 패키지 이름에 경우에 문제가있을 수 있습니다처럼 보이는

를 공유 할 수있는 경우는, veryuseful 될 것입니다. Windows 파일 시스템은 대소 문자를 구분하지 않지만 Java는 기억하십시오.

클래스 com.jibX.Person 아마 com.jibx.Person해야한다.

왜 간단한 받는다는 기반의 샘플 중 하나를 시작하지 마십시오. 당신은 여기를 찾을 수 있습니다 :

http://jibx.sourceforge.net/maven-jibx-plugin/index.html

GitHub의의의 repo에서 몇 가지 좋은 사례도 있습니다. 이 사람은 아주 간단합니다 :

https://github.com/jibx/maven-plugin/tree/master/test-suite/base-binding-test

행운을 빕니다!

+0

jibx에서 jibx로 변경하는 경우에도 동일한 문제가 있습니다. –

+0

http://stackoverflow.com/questions/10467779/binding-in-jibx –

관련 문제