3852Re: [xml-dbms] Re: No KeyGenerator added for the key generator named HighLow
- Oct 9, 2008Hello,
For some reason, Yahoo Groups won't let me see the entire thread, so I
assume the error you are having is that that HighLow class is not found.
To solve this, you need to download the HighLow.java class, which you
have done, compile it, and somehow include it in your classpath, which
is a list of places Java looks for .class files.
You can either include HighLow.class in the xmldbms20.jar file and point
your classpath at this jar file. Or you can set your classpath to
include both the jar file and the directory containing the HighLow.class
file. For more information about all this Java stuff, see the Java
tutorials on Sun's Web site:
As to whether you even really need the HighLow key generator, my
comments below are still relevant. Maps generated by the MapManager
usually contain mistakes that a human would not make. And, as a general
rule, you only need key generators (which generate primary key values)
in a limited number of cases. Usually, there is an element or attribute
in your XML that can be used as a primary key, such as an order ID. (I
took a quick look at the XML Schema for Nessus files and there are no
obvious candidates for keys, so a key generator might be relevant in
your case.) XML-DBMS can also use keys generated by the database.
As to newer releases, the answer is no, and there probably never will
be. (The code is stable, so I really should just get rid of the alpha 3
name, make a few minor changes, and call it version 2.0...) For reasons
When you say you are using XML-DBMS with Nessus, I assume you mean you
are using XML-DBMS to store the information generated by Nessus in a
> Is there a newer release than Alpha3?
> I am attempting to use xml-dbms with Nessus a popular security
> vulnerability scanner.
> I have everything loaded, database seHighLow.javtup and am trying to
> test the sample code and am getting the same error as the guy that
> started this thread.
> I don't know alot about JAVA, and am using your code on an Ubunutu box.
> I have never created a jar file, but I'm going to find out how to here
> shortly. I downloaded the HighLow.JAVA file, and will try to build
> the jar file with it.
> If you have any other inputs, please let me know.. thanks!
> --- In email@example.com, Ronald Bourret <rpbourret@...> wrote:
>>>Yes I am using alpha 3. Is there a newer version? I downloaded the
>>>latest files from CVS and failed to compile the files.
>>The CVS files are newer than the alpha 3 files, but I have not done a
>>formal alpha 4 release yet. I still have more changes I want to make
>>before I do this.
>>Which files failed and what were the compile errors? I would expect that
>>the only files you would have trouble with are:
>>-- the files in org.xmlmiddleware.xmldbms.datahandlers.external
>>-- the files in org.xmlmiddlware.db (if you are using JDK 1.2 or later)
>>The files in org.xmlmiddleware.xmldbms.datahandlers.external do not
>>matter if you are not using the specified databases/JDBC drivers.
>>To compile the files in org.xmlmiddleware.db, you need to uncomment
>>various lines in the code -- see the comments in the code for details.
>>>I am not putting the HighLow and KeyGenerator in orders.map. In fact
>>>I am creating the orders.map and orders.sql using the mapmanager
>>>running the following command:
>>>java org.xmlmiddleware.xmldbms.tools.MapManager File1=parser.props
>>>File2=db.props Input=DTD DTDFile=orders.dtd Output1=Map
>>>MapFile=orders.map Output2=SQL SQLFile=orders.sql
>>You are (indirectly) putting HighLow in orders.map. The map manager
>>always uses generated keys and the HighLow key generator when it
>>generates a map from a DTD. This is because the map manager cannot
>>identify which element types / attributes to use as primary keys, so it
>>has no choice but to use generated keys.
>>This is a perfect example of why you should not use a map generated by
>>the map manager without first checking that the generated map makes
>>sense. In the case of a map generated from orders.dtd, there are two
>>1) The map uses generated keys even though there are element types and
>>attributes in the DTD that could be used as primary and foreign keys.
>>2) The map generator incorrectly determines the relationship between
>>some of the tables. For example, it assumes that there is a one-to-many
>>relationship between the sales order table and the customers table and
>>places the primary key in this relationship in the sales order table. In
>>fact, it is the other way around -- there is a many-to-one relationship
>>between these two tables and the primary key is in the customers table.
>>>JavaDoc does not contain any info about
>>Worse yet -- I just noticed that the HighLow class isn't even shipped in
>>the alpha 3 release. (The reason was that it wasn't written until after
>>the alpha 3 release was made.)
>>You can download this from the CVS tree. Be sure to use version 1.1.
>>Later versions probably won't work with the rest of the alpha 3 code.
>>>I am not exactly sure what you mean by Tell the high/low key
>>>generator how to connect to the database, which
>>>>means specifying these properties on your call to Transfer. For
>>>Could you send me an example?
>>Once you've downloaded the correct version of HighLow.java, you can
>>either generate the JavaDoc for it or just look at the comments at the
>>start of the class -- these contain an example.
>>>Thanks, Ardavan Kanani
>>You're welcome, and sorry about all the confusion on this.
> To post a message, send it to: firstname.lastname@example.org
> To unsubscribe, send a blank message to: email@example.comYahoo! Groups Links
- << Previous post in topic