Menu

Schema changes

Help
Mai
2005-12-21
2013-04-03
  • Mai

    Mai - 2005-12-21

    Hello,

    since it seems that you don't have much time at the moment to continue developing GDAPI 0.96 I tried to extend it by myself because I need it for a project. (By the way, thank you for developing it.)

    I use the csv version and get Errors like

    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:folder

    So I thought that might have something to do with a changed schema again. And wanted to ask if gdapi will run when I only change the gdsdk.xsd or if I need to add something else somewhere in the source.

     
    • Mai

      Mai - 2005-12-21

      Hello,

      I've got another question, too. Does anybody know where I can find the schema GDS uses. I found one in the GD-SDK but it does not include a property 'folder'. I thought since it gives this error (mentioned before) they added such an element 'folder'.

       
      • Maso Gato

        Maso Gato - 2005-12-21

        I have asked this question to GD Team, and I'm waiting for response.

        Thanks

         
        • Mai

          Mai - 2005-12-21

          Thank you for your answers!

          Unfortunately I can not really extend the xsd because of the reason that GD seems to don't have 'published' the current schema as you said.

          I thought maybe it's possible to just ignore all elements that are not specified/known. I think that could help a little bit if those elements are not too important. Do you know of a way to accomplish this?

           
          • Maso Gato

            Maso Gato - 2005-12-21

            Yes, may be. There are 3 posible ways:
            1 - Change schema to specificate that "any other tag is valid" to this schema. (I don't know if it is possible)
            2 - Try to change JAXB implementation, to test if other one doesn't throws a FATAL error when a tag don't appear in schema.
            3 - Unfortunatly, don't use JAXB until GD team release XML specifications.

            Thank you very much.

             
            • Mai

              Mai - 2005-12-21

              I've never used JAXB before (I know about it but never used it) so I don't know if it doesn't work or if I'm doing something wrong. I found at http://archives.java.sun.com/cgi-bin/wa?A2=ind0303&L=jaxb-interest&D=0&P=29776
              that there's a possiblity to add 'wildcards' to a shema using

              <xs:any namespace="##any" processContents="strict" minOccurs="0" maxOccurs="unbounded">
                  <xs:annotation>
                      <xs:appinfo><jxb:property name="Extension"/></xs:appinfo>
                  </xs:annotation>
              </xs:any>

              I tried to put this in the gdsdk.xsd an tried to rebuilt it but it still gives the same Error message.

              Maybe someone else could try it to see if it works. That'd be nice.

               
    • Maso Gato

      Maso Gato - 2005-12-21

      Hello Mai,

      Thanks a lot for your collaboration.
      I'm sorry for the delayed project developing.

      I have decided to stop the project developing until GD team publish the XML specification (schema or text document)

      The problem is that without XML specification I have to develop throw test/error system: Release 0.9.6, wait for N bugs, release 0.9.7, wait for N bugs and so on.
      ( this is very high cost).

      I have asked this question to GD Team, and I'm waiting for response.

      Of course, your changes are welcome!

      When you change schema file, you must run ant target called "xjc" ( create java classes for access to XML -xsd compliant ). The ant build xml is in :
      http://cvs.sourceforge.net/viewcvs.py/gdapi/gdapi/build.xml?view=markup

      After that, GDAPI may works well.

       
      • Mai

        Mai - 2005-12-22

        Hello,

        I read that one can get the xml output by adding &format=xml to the search query so I got the xml and could see which elements are not in the gdsdk.xsd (I know it would be better to have the schema but since I need a solution soon I will try it this way) but I could get it to work anyway. I think the gdsdk.xsd is o.k. now but I probably built the jar the wrong way.

        I hope I don't bother you with this question but maybe you could write again how I need to build the jar. I do

        ant

        using the build.xml file and it's building it without any errors (only 2 warnings but only because of the javadoc) but it doesn't work anyway. The element I added in the gdsdk.xsd is still not found when I execute a query.

         
        • Maso Gato

          Maso Gato - 2005-12-22

          Hi Mai,
          You don't bother me.
          Ok. I think that you are in the good way.
          Now, you only have to run ant build.xml "xjc" target, but not default target.
          Probably you have run default target, that compile, package, make javadoc, etc.; but not generate schema classes. This is, you only can generate schema classes running "xjc" ant target.
          For instance: >ant xjc

          Please, let me know if it works.

          Thanks!

           
          • Mai

            Mai - 2005-12-22

            Thank you very much! Now everything works.

             
    • Elaine

      Elaine - 2006-01-20

      I have been wondering why I don't see the error message DefaultValidationEventHandler: [ERROR]: Unexpected element {}:folder, since I don't have "folder" in the gdsdk.xsd file.  I am using the latest CVS code.  Is this because JGDQuery does not use ValidationEventHandler?  I thought from Mai's messages that it should be a problem.

      I also do not see folder as an element of the xml when the result is an email. Is this because it is not listed in gdsdk.xsd or is folder really not being returned for all of my email results?

      I am just wondering if I should add folder to the gdsdk.xsd since my application will be used by others and then how would I test it?

      I saw a message on the Google Desktop Developer Group dated 12/26/05 that said Google does not want to document tags such as event_id, doc_id, message_id and folder because they are for internal use.  Maso, you mentioned in your 12/21 message that you are waiting for a response - have you heard from them yet.

      Thanks

       
    • Elaine

      Elaine - 2006-01-24

      Hi,

      I was able to test the Java API on another computer and did get the folder error, so I will need to update gdsdk.xsd file.

      Thanks

       
    • Gunner

      Gunner - 2007-07-11

      Hi there. I only recently downloaded the gdapi v.2. My class path has been edited to include all the jar files. However, when I try to run a progam (I tried running the bit code from the javadoc index file), I get the error message below. I really don't get it. Every help will be appreciated. Thanks. W

      [INFO] JGDRegister - compReg=jgd.comapi.ComponentRegistrator@5718203{jacobDLLPath=C:\Java APIs\gdapi2.0.0\x86\, GUID={488A5393-D843-4f60-A357-68EC5BA63C92}}

      Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Java APIs\gdapi2.0.0\x86\jacob.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

          at java.lang.ClassLoader$NativeLibrary.load(Native Method)

          at java.lang.ClassLoader.loadLibrary0(Unknown Source)

          at java.lang.ClassLoader.loadLibrary(Unknown Source)

          at java.lang.Runtime.loadLibrary0(Unknown Source)

          at java.lang.System.loadLibrary(Unknown Source)

          at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:57)

          at com.jacob.com.JacobObject.<clinit>(JacobObject.java:150)

          at jgd.comapi.ComponentRegistrator.registerQueryComponent(Unknown Source)

          at jgd.register.JGDRegister.generateCookie(Unknown Source)

          at jgd.register.JGDRegister.register(Unknown Source)

          at jgd.JGDQuery.<init>(Unknown Source)

          at DesktopSearch.main(DesktopSearch.java:13)

       

Log in to post a comment.

MongoDB Logo MongoDB