For Programmers: Free Programming Magazines  


Home > Archive > Open Source Software > March 2005 > xmlbeans problems when compiling .java class









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author xmlbeans problems when compiling .java class
bolandino

2005-01-11, 7:06 am

Greetings to ya all!

I am learning xmlbeans and I was doing the tutorial found at http://xmlbeans.apache.org/document...getstarted.html

I followed the steps outlined in the tutorial, directory structure and all. I am doing this on windows environment. I ran the first command which was successful, this what I did:


C:\engine\xmlbeans-1.0.3>scomp -out tutorials\gettingstarted\lib\easypo.jar schemas\easypo\easypo.xsd
Time to build schema type system: 1.012 seconds
Time to generate code: 0.12 seconds
Time to compile code: 1.182 seconds
Compiled types to: tutorials\gettingstarted\lib\easypo.jar
C:\engine\xmlbeans-1.0.3>

After doing this, I try to run the second command compiling the .java class, this is what it gives me :

C:\engine\xmlbeans-1.0.3>javac -classpath %XMLBEANS_HOME%\lib\xbean.jar;tutorial
s\gettingstarted\lib\easypo.jar -d tutorials\gettingstarted\classes tutorials\gettingstarted\src\POUpdater.java
tutorials\gettingstarted\src\POUpdater.java:4: package org.apache.easypo does not exist
import org.apache.easypo.*;
^
tutorials\gettingstarted\src\POUpdater.java:20: cannot resolve symbol
symbol : class PurchaseOrderDocument
location: class POUpdater
PurchaseOrderDocument poDoc = null;
^
tutorials\gettingstarted\src\POUpdater.java:24: package PurchaseOrderDocument do
es not exist
poDoc = urchaseOrderDocument.Factory.parsepurchaseOrder);
^
tutorials\gettingstarted\src\POUpdater.java:39: cannot resolve symbol
symbol : class LineItem
location: class POUpdater
LineItem newItem = poDoc.getPurchaseOrder().addNewLineItem();
^
4 errors

C:\engine\xmlbeans-1.0.3>


I don't understand why am I getting this error, I have checked all, classpath, paths and everything else looks ok.

Please Help!!!!
Boland
jcharleb

2005-03-04, 1:33 pm

quote:
Originally posted by bolandino
Greetings to ya all!

I am learning xmlbeans and I was doing the tutorial found at http://xmlbeans.apache.org/document...getstarted.html

I followed the steps outlined in the tutorial, directory structure and all. I am doing this on windows environment. I ran the first command which was successful, this what I did:


C:\engine\xmlbeans-1.0.3>scomp -out tutorials\gettingstarted\lib\easypo.jar schemas\easypo\easypo.xsd
Time to build schema type system: 1.012 seconds
Time to generate code: 0.12 seconds
Time to compile code: 1.182 seconds
Compiled types to: tutorials\gettingstarted\lib\easypo.jar
C:\engine\xmlbeans-1.0.3>

After doing this, I try to run the second command compiling the .java class, this is what it gives me :

C:\engine\xmlbeans-1.0.3>javac -classpath %XMLBEANS_HOME%\lib\xbean.jar;tutorial
s\gettingstarted\lib\easypo.jar -d tutorials\gettingstarted\classes tutorials\gettingstarted\src\POUpdater.java
tutorials\gettingstarted\src\POUpdater.java:4: package org.apache.easypo does not exist
import org.apache.easypo.*;
^
tutorials\gettingstarted\src\POUpdater.java:20: cannot resolve symbol
symbol : class PurchaseOrderDocument
location: class POUpdater
PurchaseOrderDocument poDoc = null;
^
tutorials\gettingstarted\src\POUpdater.java:24: package PurchaseOrderDocument do
es not exist
poDoc = urchaseOrderDocument.Factory.parsepurchaseOrder);
^
tutorials\gettingstarted\src\POUpdater.java:39: cannot resolve symbol
symbol : class LineItem
location: class POUpdater
LineItem newItem = poDoc.getPurchaseOrder().addNewLineItem();
^
4 errors

C:\engine\xmlbeans-1.0.3>


I don't understand why am I getting this error, I have checked all, classpath, paths and everything else looks ok.

Please Help!!!!
Boland



Open easypo.jar in whatever your unzip program you use and make sure the folders org\apache\easypo are there. Also, remember it's case sensitive. The package might be Apache, not apache. Also, if you used the example in the link, the class would be org.openuri.easypo, not org.apache.easypo.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com