RE: XMLC Taskdef jdk1.4.1_02
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Merg, What does your <xmlc> or <localize> task look like? Based on testing I did under j2sdk1.4.1_02, the Xmlc taskdef looks for the options.xmlc file (or whatever named file you specified for the "options" attribute) in the same directory, or subdirectory, of the path given to the "srcdir" attribute. However, it seems that what might be the issue is that the Xmlc taskdef is requiring individual .xmlc files for each html file. For instance, you might try something like this... CashPositionReport.html CashPositionReport.xmlc You wouldn't necessarily have to put anything in that .xmlc file. Just make sure it is available to the Xmlc taskdef. That said, I'm really not sure why the Xmlc taskdef is requiring this? It could be the change that was done by David Li to perform xmlc recompilation when it detects not only that the .html file has been updated, but also when the .xmlc file has been updated. It could have had the side effect of requiring that a corresponding .xmlc file must exist for each and every .html file. Here's how I"d approach this.... 1. Try adding an empty CashPositionReport.xmlc (assuming one doesn't already exist) and see if that fixes the problem 2. If it does, you might want to evaluate the Xmlc taskdef and see where it is requiring the existence of a corresponding .xmlc file for each .html file that exists and see how we might make the tasdef ignore the non-existence of those .xmlc files. Send a patch if you find something that works for you. If you don't have time for this, I can put it on my todo list, but I can't guarantee it will get done immediately. Make sure you let me know whether you are going to work on it or not so we don't both end up do the same thing at the same time. Again, the XMLC source is at... http://debian-sf.objectweb.org/cvs/?group_id=49 I guess the one other oddity is that it works, but with a warning under JDK1.3.1 and completely fails under j2sdk1.4.1. Weird! Jake At 10:13 AM 4/4/2003 +0200, you wrote: >I just put an options.xmlc file and got the same results with 1.4.1. >When I use the jdk 1.3.1 i get the following info about the options file. > >xmlc_globalcashpositionreport: > [xmlc] No options file could not be located for > CashPositionReport.html in paths > \dvl\Java\gtsc\global\src\com\jnj\gtsc\global\barracuda\cashpositionreport\screens, > \dvl\Java\ >gtsc\global\html\global\cashpositionreport > [xmlc] Invoke XMLC on > \dvl\Java\gtsc\global\html\global\cashpositionreport\CashPositionReport.html > [xmlc] No options file could not be located for CPReportResult.html > in paths > \dvl\Java\gtsc\global\src\com\jnj\gtsc\global\barracuda\cashpositionreport\screens, > \dvl\Java\gtsc >\global\html\global\cashpositionreport > [xmlc] Invoke XMLC on > \dvl\Java\gtsc\global\html\global\cashpositionreport\CPReportResult.html > > >Regards, >Merg >-----Original Message----- >From: Jacob Kjome [mailto:[email protected]] >Sent: Friday, 4 April 2003 09:57 >To: [email protected] >Subject: Re: [Barracuda] XMLC Taskdef jdk1.4.1_02 > > >Nope, that's not the problem. The org.enhydra.pache.xerces package, >because it is wrapped inside the enhydra package, no longer clashes with >the regular xerces packages. That's the beauty of XMLC-2.2. No more >worries about endorsed packages and Xerces2 clashing with XMLC's xerces >version. > >The issue is the that it can't find the xmlc options file. Stefan, this >was the patch that you sent to me and I applied to XMLC's version of the >Xmlc taskdef. Remember...where the options file could be in a parent >directory and the taskdef would just look back up the directory path until >it finds the file? Apparently, no file has been provided in the >path. Either that, or there is a bug in the patch or the way I patched it. > >So, the solution is one of two things. > >1. Make sure the xmlc options file is somewhere in the directory path >where the Xmlc taskdef can find it. It needs to be in one of the >following paths (based on the stacktrace): > >\dvl\Java\gtsc\global\src\com\jnj\gtsc\global\barracuda\accountreport\screens >or >\dvl\Java\gtsc\global\html\global\accountreport > >2. If it does exist and still isn't finding it, maybe there is a bug and >you can look at the XMLC CVS to see the source for it. >http://debian-sf.objectweb.org/cvs/?group_id=49 > > >Jake > >At 09:30 AM 4/4/2003 +0200, you wrote: >>Hi, >> >>JDK 1.4 comes with XML classes itself. These are more recent, than those >>XMLC wants to use. Since JDKs XML implementation has a higher priority >>for the classloader, the new ones are used. >>You could override that behaviour by using the "endorsed" mechanism (see >>http://java.sun.com/j2se/1.4.1/docs/guide/standards/index.html). >> >>org.enhydra.xml.xmlc.metadata.MetaDataElement extends >>org.enhydra.apache.xerces.dom.ElementImpl. The latter is located in >>xerces-1.4.4-xmlc-2.2.jar. >> >>So, I'd try to put xerces-1.4.4-xmlc-2.2.jar into the endorsed >>directory. >> >>Regards, >>Stefan >> >>Am Fre, 2003-04-04 um 07.58 schrieb [email protected]: >> > When using XMLC (the one that comes with Barracuda) with jdk1.4.1_02 >> > and ant 1.5.1 I get the error below. Everything runs fine with jdk >> > 1.3.1 Am I overlooking something? >> > >> > >> > This is the taskdef >> > >> > <path id="xmlc.class.path"> >> > <pathelement path="${lib-dir}/gnu-regexp-1.1.4.jar"/> >> > <pathelement path="${lib-dir}/jtidy-r7-xmlc-2.2.jar"/> >> > <pathelement path="${lib-dir}/xerces-1.4.4-xmlc-2.2.jar"/> >> > <pathelement path="${lib-dir}/xmlc-2.2.jar"/> >> > <pathelement path="${lib-dir}/xmlc-taskdef-xmlc-2.2.jar"/> >> > </path> >> > >> > <taskdef name="xmlc" classname="org.enhydra.barracuda.taskdefs.Xmlc" >> > classpathref="xmlc.class.path"/> >> > >> > >> > >> > The error we get: >> > >> > xmlc_globalaccountreport: >> > [xmlc] No options file could not be located for AccountList.html >> > in paths >> > >> \dvl\Java\gtsc\global\src\com\jnj\gtsc\global\barracuda\accountreport\screens, >> \dvl\Java\gtsc\global\ >> > html\global\accountreport >> > [xmlc] Invoke XMLC on >> > \dvl\Java\gtsc\global\html\global\accountreport\AccountList.html >> > [xmlc] java.lang.reflect.InvocationTargetException >> > [xmlc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> > Method) >> > [xmlc] at >> > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> > [xmlc] at >> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> > [xmlc] at java.lang.reflect.Method.invoke(Method.java:324) >> > [xmlc] at >> > org.enhydra.barracuda.taskdefs.Xmlc.execute(Xmlc.java:591) >> > [xmlc] at org.apache.tools.ant.Task.perform(Task.java:319) >> > [xmlc] at >> > org.apache.tools.ant.Target.execute(Target.java:309) >> > [xmlc] at >> > org.apache.tools.ant.Target.performTasks(Target.java:336) >> > [xmlc] at >> > org.apache.tools.ant.Project.executeTarget(Project.java:1306) >> > [xmlc] at >> > org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371) >> > [xmlc] at >> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) >> > [xmlc] at org.apache.tools.ant.Task.perform(Task.java:319) >> > [xmlc] at >> > org.apache.tools.ant.Target.execute(Target.java:309) >> > [xmlc] at >> > org.apache.tools.ant.Target.performTasks(Target.java:336) >> > [xmlc] at >> > org.apache.tools.ant.Project.executeTarget(Project.java:1306) >> > [xmlc] at >> > org.apache.tools.ant.Project.executeTargets(Project.java:1250) >> > [xmlc] at org.apache.tools.ant.Main.runBuild(Main.java:610) >> > [xmlc] at org.apache.tools.ant.Main.start(Main.java:196) >> > [xmlc] at org.apache.tools.ant.Main.main(Main.java:235) >> > [xmlc] Caused by: java.lang.VerifyError: (class: >> > org/enhydra/xml/xmlc/metadata/MetaDataElement, method: mergeElement >> > signature: (Lorg/enhydra/xml/xmlc/metadata/MetaDataElement >> > ;)V) Incompatible object argument for function call >> > [xmlc] at java.lang.Class.forName0(Native Method) >> > [xmlc] at java.lang.Class.forName(Class.java:140) >> > [xmlc] at >> > >> org.enhydra.xml.xmlc.metadata.MetaDataDocument.class$(MetaDataDocument.java) >> > [xmlc] at >> > >> org.enhydra.xml.xmlc.metadata.MetaDataDocument.<clinit>(MetaDataDocument.java:89) >> > [xmlc] at >> > >> org.enhydra.xml.xmlc.commands.options.OptionsParser.getMetaData(OptionsParser.java:337) >> > [xmlc] at >> > >> org.enhydra.xml.xmlc.commands.options.OptionsParser.parse(OptionsParser.java:315) >> > [xmlc] at >> > >> org.enhydra.xml.xmlc.commands.xmlc.XMLCOptionsParser.parse(XMLCOptionsParser.java:75) >> > [xmlc] at >> > org.enhydra.xml.xmlc.commands.xmlc.XMLC.parseArgs(XMLC.java:78) >> > [xmlc] at >> > org.enhydra.xml.xmlc.commands.xmlc.XMLC.compile(XMLC.java:97) >> > [xmlc] at >> > org.enhydra.xml.xmlc.commands.xmlc.XMLC.compileHandleErrors(XMLC.java:118) >> > [xmlc] at >> > org.enhydra.xml.xmlc.commands.xmlc.XMLC.main(XMLC.java:129) >> > [xmlc] ... 19 more >> > >> > BUILD FAILED >> > file:C:/Dvl/Java/gtsc/global/build.xml:628: >> > java.lang.reflect.InvocationTargetException >> >>_______________________________________________ >>Barracuda mailing list >>[email protected] >>http://barracudamvc.org/lists/listinfo/barracuda