Issue Details (XML | Word | Printable)

Key: JDO-421
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Michelle Caisse
Reporter: Michelle Caisse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Enhancer log contains ERRORs, but output appears to be fine

Created: 08/Sep/06 08:58 PM   Updated: 05/Oct/06 07:01 PM
Return to search
Component/s: tck2
Affects Version/s: JDO 2 maintenance release 1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works jdori-pmf.properties.patch 2006-09-09 07:03 AM Andy Jefferson 0.5 kB
Text File Licensed for inclusion in ASF works log4j.properties.patch 2006-09-09 07:04 AM Andy Jefferson 1.0 kB

Resolution Date: 05/Oct/06 07:01 PM


 Description  « Hide
There are numerous errors in the enhancer log, yet the enhancer runs to completion and produces valid output. These messages should be warnings at most.

17:12:15,804 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "package.jdo" at line 9, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:15,804 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "package.jdo" at line 9, column 47 : Document is invalid: no grammar found. - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:16,104 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/api/instancecallbacks/package.jdo" at line 8, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:16,104 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/api/instancecallbacks/package.jdo" at line 8, column 47 : Document is invalid: no grammar found. - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:16,795 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/company/package.jdo" at line 5, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:16,795 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/company/package.jdo" at line 5, column 47 : Document is invalid: no grammar found. - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:17,015 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/companyMapWithoutJoin/package.jdo" at line 5, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:17,015 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/companyMapWithoutJoin/package.jdo" at line 5, column 47 : Document is invalid: no grammar found. - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:17,055 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/fieldtypes/AllTypes.jdo" at line 5, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:17,055 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/fieldtypes/AllTypes.jdo" at line 5, column 47 : Document is invalid: no grammar found. - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

17:12:17,065 (main) ERROR [JPOX.MetaData] - MetaData Parser encountered an error in file "org/apache/jdo/tck/pc/fieldtypes/ArrayCollections.jdo" at line 5, column 47 : Document root element "jdo", must match DOCTYPE root "null". - Please check your specification of DTD and the validity of the MetaData XML that you have specified.

...

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 09/Sep/06 06:23 AM
These are warnings in JPOX CVS.
As I posted on the mailing list a long time ago, if you add
org.jpox.metadata.validate=false

to
trunk/tck20/src/conf/jdori-pmf.properties
you wont get any of that.

Andy Jefferson made changes - 09/Sep/06 07:03 AM
Field Original Value New Value
Attachment jdori-pmf.properties.patch [ 12340501 ]
Andy Jefferson added a comment - 09/Sep/06 07:04 AM
Patch to fix logging categories to remove dup entries.

Andy Jefferson made changes - 09/Sep/06 07:04 AM
Attachment log4j.properties.patch [ 12340502 ]
Craig Russell added a comment - 09/Sep/06 03:31 PM
I think that there is value in having validation without requiring a connection to the Sun server where the xsd is defined. Don't you have a copy of the xsd cached in JPOX somewhere, so you can validate without being online?

Andy Jefferson added a comment - 09/Sep/06 06:08 PM
It isn't a question of having xsd cached somewhere. JPOX metadata parsing does not support validation using XML Schema, only via DTD. If you want to contribute support for XSD validation in JPOX that would be welcome and there's a JIRA already existing for it. We have other priorities right now.

Craig Russell added a comment - 09/Sep/06 06:16 PM
I wasn't trying to make a distinction between validation via xsd or dtd. I was only making the point that the fact that there is no dtd or xsd at the URI should not affect your ability to validate. Using an EntityResolver with your xml parser allows you to use the dtd or xsd reference as a key to use a cached local artifact instead of going online.

I appreciate you have priorities other than these.

Craig Russell added a comment - 12/Sep/06 03:40 AM
Considering that this is only a JPOX issue, and the TCK doesn't need to validate schema, I think Andy's proposed patch to jdori-pmf.properties is a good solution.

I'm not clear on all the changes to log4j.properties, though. Could you please annotate the changes?

 # JPOX loggers
 log4j.logger.JPOX = INFO, JPOX
-log4j.additivity.JPOX = false
+log4j.additivity.JPOX = false

Ok, this removes a trailing blank.

 #log4j.logger.JPOX.JDO = INFO, JPOX
 #log4j.logger.JPOX.Cache = INFO, JPOX
-#log4j.logger.JPOX.MetaData = INFO, JPOX
+#log4j.logger.JPOX.MetaData = DEBUG, JPOX

This appears to add more metdata information to the log, correct?

 #log4j.logger.JPOX.General = DEBUG, JPOX
 #log4j.logger.JPOX.Utility = INFO, JPOX
 #log4j.logger.JPOX.Transaction = INFO, JPOX
@@ -64,7 +64,8 @@
 #log4j.logger.JPOX.RDBMS = DEBUG, JPOX
 
 log4j.logger.JPOX.Enhancer = INFO, JPOX
-log4j.logger.JPOX.SchemaTool = INFO, JPOX

The following line (+2) seems to comment this line. Could you explain why?

+log4j.additivity.JPOX.Enhancer = false

I don't know what this change does.

+#log4j.logger.JPOX.SchemaTool = INFO, JPOX

Andy Jefferson added a comment - 12/Sep/06 05:43 AM
Sorry for the lack of description of the log changes.

This line removes duplicate entries in the Log4J log (a message is printed twice if you dont put this in)
+log4j.additivity.JPOX.Enhancer = false
That is really the only change.

The one about SchemaTool was just moving it down a line but patch decided to take it out and then add it back in later. The one about log4j.logger.JPOX.MetaData is commented out anyway and so you can omit ;-) Hope thats clearer.

Michelle Caisse added a comment - 19/Sep/06 08:42 PM
Thanks for the patches. I applied them, but still get the errors reported above. I verified that jdori-pmf.properties is being read and that it contains org.jpox.metadata.validate=false.

Andy Jefferson added a comment - 24/Sep/06 03:48 PM
JPOX CVS supports XSD validation using local copies of xsd files assuming that the underlying SAXParser supports it ... and Crimson in JDK1.4 doesnt, though JDK1.5 does.

Craig Russell added a comment - 04/Oct/06 09:22 PM
Need to verify against latest JPOX release.

Craig Russell made changes - 04/Oct/06 09:22 PM
Assignee Michelle Caisse [ mcaisse ]
Repository Revision Date User Message
ASF #453315 Thu Oct 05 19:00:47 UTC 2006 mcaisse JDO-421 Error messages in enhancer log
Files Changed
MODIFY /db/jdo/trunk/tck20/src/conf/log4j.properties
MODIFY /db/jdo/trunk/tck20/src/conf/jdori-pmf.properties

Michelle Caisse added a comment - 05/Oct/06 07:01 PM
Fixed with revision: 453315
Verified that with the current JPOX, these patches, and JDK 1.5, there are no error messages in the enhancer log.

Michelle Caisse made changes - 05/Oct/06 07:01 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]