Problem with running sample code from XML Schema Processor for Java

Hi there,
I downloaded the XML Schema Processor for Java and tried it out. Unfortunately, it failed at the first step. FYI, I included all xmlparserv2.jar and xmlschema.jar in my classpath.
I compiled XSDSample.java with a warning: XSDSample.java uses a deprecated API. Recompile with "-deprecation" for details. There was no problem with compiling XSDSetSchema.java.
When I tried to run report.xml by typing java XSDSample report.xml, I got Parsing report.xml
NonParserException: null.
I guess that report.xml from the sample is not valid.
Could any one give me a hint? Any suggestion would be greatly appreciated.
---Denali
null

Please post this message at:
Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

Similar Messages

  • Error downloading XML schema processor for java from OTN

    I'm getting error downloading this product from otn site. http://technet.oracle.com/tech/xml/schema_java/index.htm
    I login to OTN, go to this site, enter registration information and then I get the following error when I try to submit my info.
    Runtime error occured. Do you wish to debug?
    Line: 20
    Error :'e_mail_valid' is undefined.
    When I say 'No' for debug, it takes me to 'XML parser for java' download page instead of 'XML Schema processor'.
    please help.
    thankx
    null

    The 'e_mail_valid' is undefined" has to do with the format of or lack of the email address. The routing problem is ours and should be fixed later today or by tomorrow morning.
    Thanks,
    Oracle XML Team

  • Problems with using sample code for WebService client

    Hi <br /><br />Ive downloaded the sample code from the Adobe <br />website but when i run the client i get an error which i dont understand:<br /><br />client side:<br />ERROR: java.lang.NullPointerException<br />AxisFault<br /> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException<br /> faultSubcode: <br /> faultString: java.lang.NullPointerException<br /> faultActor: <br /> faultNode: <br /> faultDetail: <br />     {http://xml.apache.org/axis/}hostname:GRFNZTS1SRV<br /><br />java.lang.NullPointerException<br />     at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)<br />     at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)<br />     at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:10 87)<br />     at weblogic.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1411)<br />     at weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:16 13)<br />     at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumen tScanner.java:1174)<br />     at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:399 )<br />     at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1138)<br />     at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)<br />     at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:133)<br />     at javax.xml.parsers.SAXParser.parse(Unknown Source)<br />     at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)<br />     at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)<br />     at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)<br />     at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) <br />     at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)<br />     at org.apache.axis.client.Call.invokeEngine(Call.java:2784)<br />     at org.apache.axis.client.Call.invoke(Call.java:2767)<br />     at org.apache.axis.client.Call.invoke(Call.java:2443)<br />     at org.apache.axis.client.Call.invoke(Call.java:2366)<br />     at org.apache.axis.client.Call.invoke(Call.java:1812)<br />     at com.adobe.livecycle.samples.pdfgenerator.axis.PdfGenSoapBindingStub.getConfigurationXML(P dfGenSoapBindingStub.java:373)<br />     at com.adobe.livecycle.samples.pdfgenerator.webserviceclient.WebServiceClient.generatePDF(We bServiceClient.java:174)<br />     at com.adobe.livecycle.samples.pdfgenerator.webserviceclient.WebServiceClient.main(WebServic eClient.java:95)<br /><br />and on the server side:<br /><Error> <com.adobe.idp.um.businesslogic.authentication.AuthenticationManagerBean> <000000> <UserM:GENERIC_ERROR:     [Thread: ExecuteThread: '58' for queue: 'default', hc: 735284715 ]No Auth Providers found > <br /><Sep 17, 2007 8:27:43 PM IDT> <Warning> <com.adobe.idp.common.errors.exception.IDPLoggedException> <000000> <UserM:GENERIC_WARNING:     [Thread: ExecuteThread: '58' for queue: 'default', hc: 735284715 ]| [AuthenticationManagerBean] errorCode:12801 errorCodeHEX:0x3201 message:No Auth Providers found in Config>

    i get this exception
    C:\Program Files\JMF2.1.1e\bin\video>javac FrameAccess.java
    C:\Program Files\JMF2.1.1e\bin\video>java FrameAccess C:\Program Files\JMF2.1.1e
    \bin\video\gtrevor.avi
    Failed to create a processor from the given url: javax.media.NoProcessorExceptio
    n: Cannot find a Processor for: C:\Program
    how to solve it

  • Request for sample code, Validating XML Schema

    Does anyone have some sample code to validate
    an XML Schema with the Oracle parser?
    Also, the classgen code seems to have more XML Schema classes in it. There is an xschema.jar full of XML Schema related code. Would it be possible to use this code?
    I've tried DOMSample.java with the v2 parser. It seems to happily echo Schema based XML files that are obviously wrong. (I use Tibco's XML Authority to verify the XML file and XML Schema).

    I do not have sample code but it is not a difficult API to call. I have worked on it before, so if you have a specific question on it, happy to help out if I can.

  • Problems with running quote server from Java Tutorial

    Hello
    The problem is this: I try to run QuoteServer from java tutorial (Trail: Deployment
    Lesson: Applets, A Simple Network Client Applet) and server compiles but when I try to run it following message shows up:
    QuoteServer listening on port: 32769
    Exception in thread "QuoteServer" java.lang.NullPointerException
    at java.net.DatagramPacket.setData(DatagramPacket.java:244)
    at java.net.DatagramPacket.<init>(DatagramPacket.java:62)
    at java.net.DatagramPacket.<init>(DatagramPacket.java:78)
    at QuoteServerThread.run(QuoteServerThread.java:38)
    And then server stops. What's going on?.
    Cheers

    Line 38 of QuoteServer.java is: packet = new DatagramPacket(buf, 256);
    And that's where the problem is because in line 31 is written byte[] buf = null;
    And what I get when I run QuoteServer.java with gcj version of java (gives more clues) is:
    java QuoteServer
    QuoteServer listening on port: 32785
    Exception in thread "QuoteServer" java.lang.NullPointerException: Null buffer
    at java.net.DatagramPacket.setData(byte[], int, int) (/usr/lib/libgcj.so.6.0.0)
    at java.net.DatagramPacket.DatagramPacket(byte[], int, int) (/usr/lib/libgcj.so.6.0.0)
    at java.net.DatagramPacket.DatagramPacket(byte[], int) (/usr/lib/libgcj.so.6.0.0)
    at QuoteServerThread.run() (Unknown Source)
    at .GC_start_routine (/usr/lib/libgcj.so.6.0.0)
    at .__clone (/lib/libc-2.3.5.so)
    So the problem is with this null buffer. What enter in line 31 instead of null?.
    What values can byte[] reach except null?. I tried to find byte[] in java API but there is only Byte variable. I get the same output with java 5.0 compiler (but less clues).
    Message was edited by:
    macmacmac

  • Problem with special characters loaded from XML

    I have an XML whose elements contain special characters (for example: ñ, Ñ, á, Á, etc..), When I load the XML and make a Trace () the loaded element, I see that it is loaded correctly, but then in the text field is not special characters. For example in the XML I have the text Baños, but in the text field shown Baos.
    It is clear that in the text field are incorporated upper case, lower case, numerals, punctuation symbols and Basic Latin.
    I also tested with the judgment System.useCodePage = true in the code but does not work.
    Thanks for any help you can give me.
    Garchabig.
    PD: Sorry for poor English, I'm Latino. -

    Hi, before reading your answer I tried embedding all characters and surprise surprise, it worked!
    So then I was testing with embedded characters to see what was the need to display special characters (like "ñ", "í", etc..) and discovered that it has to be built or yes is Latin I (194/388 glyphs).
    Thank you very much also for the answer.
    Greetings, Garchabig. -

  • Problem with HttpUploadBean sample code

    Hello,
    I need upload files to a database and download files from database. I have some problems and i'm trying the sample in the help "File Upload and Download JavaBean and Class Descriptions" - "The HttpUploadBean".
    File UploadBean.html:
    <html><body>
    <form action="beanUploadExample.jsp" ENCTYPE="multipart/form-data" method=POST>
    <br> File to upload: <INPUT TYPE="FILE" NAME="File" SIZE="50" MAXLENGTH="120" >
    <br><INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Send"> </form>
    </body></html>
    File beanUploadExample.jsp:
    <%@ page language="java" import="java.util.*, oracle.jsp.webutil.fileaccess.*"
    %>
    <html><body>
    <% String userdir = "fileaccess"; %> // user's part of the upload directory
    <jsp:useBean id="upbean"
    class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
    <jsp:setProperty name="upbean" property="destination" value="<%= userdir %>"
    />
    </jsp:useBean>
    <%
    upbean.setBaseDir(application, request);
    upbean.upload(request);
    Enumeration fileNames = upbean.getFileNames();
    while (fileNames.hasMoreElements()) { %>
    <br><%= (String)fileNames.nextElement() %>
    <% } %>
    <br>Done!
    </body></html>
    Content of fileaccess.properties file in directory G:\jdeveloper9i\jdev\mywork\AccessFiles\Upload\public_html\WEB-INF
    fileaccess.basedir=G:\jdeveloper9i\jdev\mywork\AccessFiles\Upload\public_html\files
    (the directory files has been created)
    Interner Explorer (version 5.00.3315.1000) show error 500 (Internal Server Error) after to select the file and click in the buttom "Send"
    In Debug mode, to press F8 (Step over) in the line upbean.upload(request); show the error:
    "Unable to find source file for package oracle.jsp.runtime, filename httpJsp.java"
    I'm trying jDeveloper9i version 9.0.2.829
    Any help is welcome
    Thanks

    Hi,
    I will try the HttpUploadBean very soon but haven't test it. Will this article would help : Re: File Upload tag and Bean
    Rgds.

  • Trouble running sample code from the java trails

    I'm trying to run Sun's DocumentEventDemo available on the trails. I can get it to compile successfully but I get several errors when I try to run it. After compiling the source, this is what I get when I try to run it:
    C:\listen>java -cp . DocumentEventDemo
    Exception in thread "main" java.lang.NoClassDefFoundError: DocumentEventDemo (wr
    ong name: events/DocumentEventDemo)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    The source is available from the java trails using the name DocumentEventDemo
    Thanks
    ~Sklave

    actually that is really helpful. My directories are most likely incorrect, but I'm coming to java from a c/c++ background and don't know how to make the directories correctly for the given package. I'll look that up and see what I get. In the meantime, if you or anyone else could follow up with a link or a quick explanation on packages and directories that'd be great too.
    ~Sklave

  • Xml SQL Utility for java and Dr.Watson for WIN-NT

    hello everybody.
    when i am running the sample code in xml Sql utility for java documentation,
    Dr. watson for windows NT error occures.
    what may be the problem? please suggest a solution
    thanks
    dev

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • Help needed with XML Schema Processor sample

    I'm trying to run the sample that came with the Oracle XML Schema Processor (XSDSample.java) and get the following error:
    -- process file: catalogue.xml
    file:/D:/java/xml/ORACLE/XSD/catalogue.xml<Line 8, Column 32>: XSD-2001: (Error) Can not create instance of: 'oracle.xml.parser.schema.XSDBuilder'
    What am I doing wrong. I am running the sample unchanged.
    thx,
    e
    null

    Looks like unzipping the jar and making sure its in your classpath fixed the problem. not sure why explicitly having the xschema.jar in the classpath didn't work.
    e

  • Using "XML Document from XML Schema" in JDeveloper

    Hi Experts,
    I have a requirement to generate XML Document from XML Schema.
    For this I have used "XML Document from XML Schema" feature in JDeveloper. It is found in File->New->General->XML Document form XML Schema.
    I have registered a schema with jdev and got an XML document output for that successfully.
    Now, I want to implement this feature in my code for generating XML documents when XSD files are provided.
    Can any one please provide me with pointers to do that? I am sure there should be some libraries which can implement this feature.
    Thanks,
    Dilbagh

    Create an XML document from a Schema with the Oracle SchemaClassGenerator.
    import oracle.xml.classgen.SchemaClassGenerator;
    XMLSchema schema=new XMLSchema();
    XSDBuilder builder = new XSDBuilder();
    URL    url =  new URL(schemaUrl);     
    schema = (XMLSchema)builder.build(url);
    SchemaClassGenerator generator = new SchemaClassGenerator();
    Generate the Java classes from the example XML Schema.
    generator.generate(schema);With the java classes construct an XML document.

  • Problems with running Applet through HTML

    I am currently having problems with running my file through the HTML. For some reason when I open it in the browser it keeps saying Error. I am programming in NetBeans.
    The code I am using is:
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <applet code=”CarApplet.class” codebase="RedCarApplet.jar" width=690 height=300></applet>
    </body>
    </html>

    Heres the error message, I see that it cannot find the class I have stated above. Any solutions?
    My class is in the 'build' folder but, the HTML file is in the 'src' folder. Now my applet contains a 'jar' file, do I need to add that to the HTML code?
    load: class ‚Ä?TunerApplet.class‚Ä? not found.
    java.lang.ClassNotFoundException: ‚Ä?TunerApplet.class‚Ä?
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: C:\Users\*****\*******\NetBeansProjects\RadioApplet\src\‚Ä?TunerApplet\class‚Ä?.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 9 more
    Exception: java.lang.ClassNotFoundException: ”TunerApplet.class”

  • Problem with running a java program from the command line

    I have this code:
    package pkg;
    import jxl.*;
    import java.io.File;
    public class TestClass {
         public static void main(String[] args) {
              try{
                   Workbook book = Workbook.getWorkbook(new File("d:/testWorkspace/excFile.xls"));
                   Sheet sheet = book.getSheet(0);
                   String s=sheet.getCell(4, 2).getContents();
                   System.out.println(s);     
              }catch (Exception e){System.err.println(e);}
    }I've wrote it in Eclipse, added jxl.jar to the buildpath, and it works fine.
    Then I tried to run it from the command line and I did it like this:
    D:\testWorkspace\testProject\bin> java -cp \jxl.jar pkg.TestClassThe result was:
    Exception in thread "main" java.lang.NoClassDefFoundError: pkg/TestClass
    Caused by: java.lang.ClassNotFoundException: pkg.TestClass
    ...but the file TestClass.class DOES exist in the folder d:\testWorkspace\testProject\bin\pkg\ and the file jxl.jar IS on the root of drive D (like I already wrote, it worked fine inside the Eclipse).
    So, my question is: How to run this code from the command line?
    I have no idea what went wrong.
    Can someone help me, please?

    The current directory is not implied in the classpath.
    D:\testWorkspace\testProject\bin> java -cp .;d:\ pkg.TestClassor
    D:\testWorkspace\testProject\bin> java -cp .;d:\jxl.jar pkg.TestClassI always forget which is right since I never work with jars...

  • Hi I need this asap... "Java code to generate XML File from XML Schema"

    Hi all....
    I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...
    PS: I already posted in the afternoon... this is the second posting.

    take look at :
    http://sourceforge.net/projects/jaxme/
    this might help...

  • Java code to generate XML File from XML Schema

    Hi I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...

    JAXB has been available as an early release download for some time. There are also XML Binding packages available from Borland (JBuilder) and Castor. These tools create Java classes from a source document, xml,dtd etc. You can use these classes to marshal-unmarshal XML documents.
    Dave

Maybe you are looking for

  • How to share an external drive?

    hello helpful mac folks! I have a PC networked to my mac, and I am able to see my harddrive from it and share the files on that, but I have recently added a firewire external harddrive to my imac and I would like to be able to access one of the parti

  • Gatekeeper settings problem

    I can't set the gatekeeper settings to allow downloaded apps. It won't let me select the "Anywhere" tickmark. Everytime I select the tickmark it'll jump back to "Mac App store and identified developers". Any help appreciated!

  • Extract Title + Decription from HTML

    I'm looking for a Efficient way to extract the Title and Desription from a Webpage. I guess it will need to parse the HTML for the tags and extract whatever is between them. Any ideas? Thanks.

  • Charged for Free iPhone Apps?

    I just got an iPhone yesterday and I downloaded some free applications from the App Store, but when I went to look at my bank account there was two charges from the App Store. Unless there is some fee for creating an account, these charges are entire

  • Static IP Subnet Network

    I have a communications bundle, meaning my provider provides television and internet services across a single connection. While they also provide a telephone connection but I declined that service. The net result is the my provider forces me to use t