![]() |
![]() |
|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 8
|
|
| Author |
|
|
Novice Joined: Nov 20, 2008 Post Count: 40 Status: Offline |
Hi all, I have this error in my log file: WARN [MetaData] MetaData Parser encountered an error in file "file:/[file's path]" at line 3, column 6 : cvc-elt.1: Cannot find the declaration of element 'jdo'. - Please check your specification of DTD and the validity of the MetaData XML that you have specified. And I have this error for all jdo's files and all orm's files! All jdo's files start with: <?xml version="1.0"?> <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN" "http://java.sun.com/dtd/jdo_2_0.dtd"> <jdo> and all orm's files start with: <?xml version="1.0"?> <!DOCTYPE orm SYSTEM "file:/javax/jdo/orm.dtd"> <orm> Do you know where is the problem? Thank you in advance for your help! |
||
|
|
Expert Australia Joined: Nov 24, 2005 Post Count: 562 Status: Offline |
Try using this at the start of your .jdo files instead: <?xml version="1.0" encoding="UTF-8" ?>We were having a similar problem a few months ago. We changed our Javelin tool to output the above element instead of what it used to output and invoked a complete synchronization of all java files in our projects and the problem dissappeared. ---------------------------------------- Chris Colman http://visualclassworks.com Javelin: Visual modeling & coding with automatic JDO 2/DataNucleus meta data generation. http://expojo.com expojo: Simple dependency injection and exposed POJO domain model pattern |
||
|
|
Novice Joined: Nov 20, 2008 Post Count: 40 Status: Offline |
Thank you Chris, but there is a problem... Now I receive this error from the enchanter tool: (main) ERROR [DataNucleus.MetaData] - Parser error with file "file:/D:/Eclipseworkspace/Portale_Cyborg/home/build/classes/com/cdg/shared/business/Risorse.jdo" has cause Invalid byte 1 of 1-byte UTF-8 sequence. and I receive this error for all jdo's files! Are you sure of code? Perhaps you forgot some thing on the last row... but I don't know what it could be! Thanks again for your help! |
||
|
|
Expert Joined: Nov 16, 2005 Post Count: 844 Status: Offline |
Try to remove encoding="UTF-8" from your xml declaration Guido ---------------------------------------- Guido Anzuoni http://www.objectmagic.org |
||
|
|
Expert Australia Joined: Nov 24, 2005 Post Count: 562 Status: Offline |
The UTF-8 worked for our projects but I think I'll change Javelin to remove the UTF-8 if it's causing problems on yours. ---------------------------------------- Chris Colman http://visualclassworks.com Javelin: Visual modeling & coding with automatic JDO 2/DataNucleus meta data generation. http://expojo.com expojo: Simple dependency injection and exposed POJO domain model pattern |
||
|
|
Novice Joined: Nov 20, 2008 Post Count: 40 Status: Offline |
Thank you Guido and Chris, I tried to delete the encoding from the JDO's files but I didn't resolve... However, as I wrote in another post I have some problem with the charset and perhaps this could be the solution because the problem is only after the commit! Can you suggest me something for resolve it? Chris, I ask you a stupid thing: what do you mean with: "I'll change Javelin to remove the UTF-8"? Are you speaking about the jsp's files? Or about the files on my persistence's package (JDO, ORM and Java files)? (I suppose the second thing, but as I said it doesn't resolve the problem...) |
||
|
|
Novice Joined: Nov 20, 2008 Post Count: 40 Status: Offline |
I have some news!!! I resolve the problem! I found this web page: http://db.apache.org/jdo/jdo_dtd.html and I simply copied the code that I found on it: <?xml version="1.0" encoding="UTF-8" ?> <jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo http://java.sun.com/xml/ns/jdo/jdo_2_0.xsd"> It seems like the Chris' code but it works! I use a screen reader on my computer because I'm blind so perhaps I didn't see some some difference on letters' case however now It works and thank you again for your help!!! |
||
|
|
Expert Australia Joined: Nov 24, 2005 Post Count: 562 Status: Offline |
The difference I can see is that my example uses jdo_2_2.xsd intead od jdo_2_0.xsd. We're using the latest DN with the latest JDO Jar and using jdo_2_2.xsd seems to work fine with that for us. The main thing I recall was that using the DTD form of schema definition seemed to stop working for us a while back and the only solution we could find was to switch to the .xsd form of the schema definition. We never quite worked out why the DTD stopped working but as the .xsd form of the definition worked fine we just switched over to that form for everything. ---------------------------------------- Chris Colman http://visualclassworks.com Javelin: Visual modeling & coding with automatic JDO 2/DataNucleus meta data generation. http://expojo.com expojo: Simple dependency injection and exposed POJO domain model pattern ---------------------------------------- [Edit 1 times, last edit by chrisco at Jun 30, 2009 10:36:26 PM] |
||
|
|
|
|
|
Current timezone is GMT Sep 2, 2010 8:41:34 PM |