db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: [Torque 4] mvn install of templates failes
Date Tue, 05 Oct 2010 07:35:36 GMT
Hi Patrick,

> > ...
> > - Can you run the tests inside an IDE (e.g. eclipse) and set a
breakpoint
> > in org.apache.torque.generator.configuration.source.EntityReferences.
> > resolveEntity() (in the generator jar) and see whether it gets called
and
> > if yes why it fails ?
>
> I got the project to work with NetBeans and managed to debug. The
> resolveEntity method of EntityReferences is not called as far as I can
see.
>
> Could it have something to do with the fact that I use Linux as
> operating system?

I'd be astonished if yes. Rather it is the XML parser used.

Ok we need to trace from start here. Whats should happen is the following:
- On reading the configuration, the EntityReferenceSaxHandler in the
package org.apache.torque.generator.configuration.source should be invoked.
Please check that the startElement() method is hit and that on one of the
calls the system ids ishttp://db.apache.org/torque/4.0/templates/data
base.xsd. If yes, the references will be added to the configuration by
org.apache.torque.generator.configuration.controller.ControlConfigurationSaxHandler
 on line 275.
- Afterwards, the generator will try to read the sources. For this, a
org.apache.torque.generator.source.stream.XmlSourceSaxHandler will be
instantiated and it will get a
org.apache.torque.generator.configuration.source.EntityReferences object
passed. Check that the above system id is present in the entity references.
This SAX handler will then be used to read the sources.
- If we get so far then the reason for failure is that the entity resolver
method is not called by the SAX handler. We now need to find out which XML
parser is used. Create a breakpoint in the startElement method of
org.apache.torque.generator.source.stream.XmlSourceSaxHandler and ask your
IDE in which library the SAX Parser is located. If it is not xerces 2.9.1
then check if  xerces 2.9.1 is present in your class path at all. What you
can do additionally in this case is to run "mvn --debug install" which
prints a lot of information, but also which libraries are used for the
tests. This would also be good information to have.

Further action depends on the outcome of these steps.

    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message