|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
[Fwd: Strange problem with taskdef and antlib.xml](forwarded from the ant-user list...) Hi, i've written a bunch of anttasks. Those tasks are collected in a jar. The Jar has an antlib.xml with a mapping of the classnames to tasknames <antlib> <taskdef name="mfscan" classname="de. ... . ..."/> <taskdef name="setloglevel" classname="de. ... . ..."/> ... </antlib> The jar lies under %ANT_HOME%/lib the taskdefs are imported via = <taskdef resource="de/.../.../ant/antlib.xml"> Yesterday a workmate added a new task and also referenced it in the antlib.xml From that on a strange problem appeared = one ant script with <taskdef resource="de/.../.../ant/antlib.xml"> is started from a class like that /* java.io.File buildFile = new java.io.File(args[0]); org.apache.tools.ant.Project p = new org.apache.tools.ant.Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); org.apache.tools.ant.DefaultLogger consoleLogger = new org.apache.tools.ant.DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(org.apache.tools.ant.Project.MSG_INF O); p.addBuildListener(consoleLogger); try { p.fireBuildStarted(); p.init(); ... etc. */ Until the new class came in it ran fine but now it produces = Error reading project file jar:file:/E:/SCM_Sync/tools/ant/lib/hukit13ant.jar!/de/huk/it13/ant/antl ib.xml: oversubscribed dynamic bit lengths tree whereas other scripts running with the same line <taskdef resource="de/.../.../ant/antlib.xml"> and the same jar run fine as before. I checked the antlib.xml for non UTF-8 chars and things like that, but didn't find any. Also googling didn't bring up something helpful except for some cryptic bugreport @ sun Env = Windows 2000/2003, ant 1.6.5, jdk 5 any ideas ?? Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]On Thu, 26 Jun 2008, Gilbert Rebhan <ant@...> wrote:
> Error reading project file > jar:file:/E:/SCM_Sync/tools/ant/lib/hukit13ant.jar!/de/huk/it13/ant/antl > ib.xml: oversubscribed dynamic bit lengths tree sounds like an encoding issue, I agree. > whereas other scripts running with the same line > <taskdef resource="de/.../.../ant/antlib.xml"> > and the same jar run fine as before. Are the other scripts using the same Java VM? I've found Sun's JVMs to be more forgiving than IBM's for example (Websphere challenged 8-). > I checked the antlib.xml for non UTF-8 chars and things like that, > but didn't find any. Is there any more information you could provide (like the actual exception being thrown)? It could be the ZIP reading library as well. Hmm, <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4188883> suggest problems with the archive rather than the XML file. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]Hi, Stefan Stefan Bodewig schrieb: >> Error reading project file >> jar:file:/E:/SCM_Sync/tools/ant/lib/hukit13ant.jar!/de/huk/it13/ant/antl >> ib.xml: oversubscribed dynamic bit lengths tree > > sounds like an encoding issue, I agree. It did always run fine without any problems. I have an eclipse project, do the coding and then export -> jar ok i'll write an antfile for that, if i have time too ;-) All editing including antlib.xml happened in my workspace. I even saw some tabs and trailing spaces in the antlib.xml in the working version of the jar. >> whereas other scripts running with the same line >> <taskdef resource="de/.../.../ant/antlib.xml"> >> and the same jar run fine as before. Forget it, it got even stranger in the meantime. I had a deeper look at the new task from my teammate and corrected some flaws, tuned it. The situation now = the myanttasks.jar with the new class and the extended antlib.xml runs fine on my developer instance and on our test machine, but it fails in production :-( Now the error occurs _whenever_ the jar gets involved via <taskdef resource="de. ... .antlib.xml"/> !! ..oversubscribed dynamic bit lengths tree Oh, boy, 3 machines = 1.mine = Win2000, jdk 1.5.0_11, ant 1.6.5 2.test = Win2003, jdk 1.5.0_11, ant 1.6.5 3.prod = Win2003, jdk 1.5.0_11, ant 1.6.5 1. + 2. run fine but 3. fails on any occasion the jar with the anttasks gets involved. What's new in the jarfile with the anttasks is a new class and the antlib.xml was extended with a new line. The class has no flaws, the antlib.xml is that of the old backuped version with only one line more. Elcipse is set to UTF-8. Another editor checking the antlib.xml, PSPad says, it's UTF-8, in Hex view there are no fishy chars > Are the other scripts using the same Java VM? I've found Sun's JVMs > to be more forgiving than IBM's for example (Websphere challenged 8-). yup, all of our ant scripts run with sun jdk 1.5.0_11 only >> I checked the antlib.xml for non UTF-8 chars and things like that, >> but didn't find any. > > Is there any more information you could provide (like the actual > exception being thrown)? It could be the ZIP reading library as > well. no i get only the line i already posted our server uses a class that is similar to the AntBuilder of Cruise Control, it kicks off ant scripts; the exception comes from ant, taskdef task i think, when he wants to read antlib.xml via ZipInputStream or something > <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4188883> suggest > problems with the archive rather than the XML file. that was one of the bug reports i already found but it wasn't very helpful. I also tried a concurrent access of the jarfile, means running a class that opens a ZIPInputStream on the file with the anttasks then starting the antscript that has <taskdef resource=".... .antlib.xml"/> => same behaviour, runs on two machines but fails in production i wish i had an idea what goes on here ... btw. what's the meaning of = "oversubscribed dynamic bit lengths tree" ? simple words please ;-) Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]On Fri, 27 Jun 2008, Gilbert Rebhan <ant@...> wrote:
> Stefan Bodewig schrieb: >> Is there any more information you could provide (like the actual >> exception being thrown)? It could be the ZIP reading library as >> well. > > no i get only the line i already posted our server uses a class that > is similar to the AntBuilder of Cruise Control, it kicks off ant > scripts; the exception comes from ant, taskdef task i think, when he > wants to read antlib.xml via ZipInputStream or something I'm even more convinced that it is something with the ZIP archive itself. >> <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4188883> >> suggest problems with the archive rather than the XML file. > > that was one of the bug reports i already found but it wasn't very > helpful. Sure not, but together with > btw. what's the meaning of = > "oversubscribed dynamic bit lengths tree" ? > simple words please ;-) and my only response "I have no idea" we get deeply into zlib. If you use the serach machine that is not a verb on that phrase you will only find references to zlib or other code using zlib internally to read a zip archive. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]Stefan Bodewig schrieb: > I'm even more convinced that it is something with the ZIP archive > itself. hm ,works fine on two machines, but failed on a third one. all run with the same version of jdk, ant and the same OS the error message = "Error reading project file: ... " occurs only in ProjectHelper and ProjectHelperImpl classes in ant 1.6.5 and comes from the catch block of an InputStream my last tests with <taskdef resource="de/.../.../ant/antlib.xml"> <classpath path="path/tothejar/that/didnt/work/> </taskdef> and the same jar that didn't work with <taskdef resource="de/.../.../ant/antlib.xml"/> and %ANT_HOME%/lib/xxx.jar worked like a charm on the production machine with a small test script that loads some selfwritten tasks ?!?!?!? completely baffled ... but i'm not allowed to try it again with the real production scripts and <taskdef resource="de/.../.../ant/antlib.xml"/> combined with %ANT_HOME%/lib/thejarthatdidntworklateley.jar is there a difference between jar loading when a) taskdef with classpath path="..." b) taskdef with jar in %ANT_HOME%/lib why does the same jar file fails only on one machine, is there a kind of jdk configuration when dealing with ImputStreams or loading of jar files ?! it did run fine on all machines before adding the new task and extending the antlib.xml >> btw. what's the meaning of = >> "oversubscribed dynamic bit lengths tree" ? >> simple words please ;-) > > and my only response "I have no idea" we get deeply into zlib. If you > use the serach machine that is not a verb on that phrase you will only > find references to zlib or other code using zlib internally to read a > zip archive. i know it's not an ant bug but a java problem, as the ProjectHelper* classes only use a simple InputStream, but i thought someone on that list could help, already came across the same problem. Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]On Tue, 01 Jul 2008, Gilbert Rebhan <ant@...> wrote:
> Stefan Bodewig schrieb: >> I'm even more convinced that it is something with the ZIP archive >> itself. > > hm ,works fine on two machines, but failed on a third one. > all run with the same version of jdk, ant and the same OS but different physical instances of the same jar file. What does jar tf your-file.jar report - make sure to use the jar command of the same JDK that you are using to run Ant as well. > is there a difference between jar loading > when > a) taskdef with classpath path="..." > b) taskdef with jar in %ANT_HOME%/lib In a way, yes. If it is in ANT_HOME/lib it will be loaded by a different ClassLoader but should be using the same ZIP-reading classes. >>> btw. what's the meaning of = >>> "oversubscribed dynamic bit lengths tree" ? >>> simple words please ;-) >> >> and my only response "I have no idea" we get deeply into zlib. If >> you use the serach machine that is not a verb on that phrase you >> will only find references to zlib or other code using zlib >> internally to read a zip archive. > > i know it's not an ant bug but a java problem, I hope I didn't sound like "go away". > as the ProjectHelper* classes only use a simple InputStream, but i > thought someone on that list could help, already came across the > same problem. Fair enough. I've never faced that situation myself and am running out of ideas, sorry. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]Stefan Bodewig schrieb:
> but different physical instances of the same jar file. yes, of course > What does jar tf your-file.jar report - make sure to use the jar > command of the same JDK that you are using to run Ant as well. i didn't try that, but wrote a test class that uses an InputStream as ant does, wrote a test ant script that uses <taskdef resource="..."> <classpath path="..."/> </taskdef> that runs on all machines. So finally i doubt, the jar is corrupted. Therefore my question whether there's a difference ... but i'll try jar -tvf ... >> is there a difference between jar loading >> when >> a) taskdef with classpath path="..." >> b) taskdef with jar in %ANT_HOME%/lib > > In a way, yes. If it is in ANT_HOME/lib it will be loaded by a > different ClassLoader but should be using the same ZIP-reading > classes. In substance there should be no difference, after all it's an InputStream >> i know it's not an ant bug but a java problem, > I hope I didn't sound like "go away". No problem, i got the meaning :-) >> as the ProjectHelper* classes only use a simple InputStream, but i >> thought someone on that list could help, already came across the >> same problem. > > Fair enough. I've never faced that situation myself and am running > out of ideas, sorry. you hit the nail on the head, that's exactly how i feel ;-) Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: [Fwd: Strange problem with taskdef and antlib.xml]> that runs on all machines. So finally i doubt, the > jar is corrupted. Therefore my question whether there's > a difference ... > > but i'll try jar -tvf ... jar -tvf problem.jar didn't come up with any exception / extraordinary , just the usual listing of all files contained in the archive. >>> is there a difference between jar loading >>> when >>> a) taskdef with classpath path="..." >>> b) taskdef with jar in %ANT_HOME%/lib >> >> In a way, yes. If it is in ANT_HOME/lib it will be loaded by a >> different ClassLoader but should be using the same ZIP-reading >> classes. So, finally i run of ideas. I'll let it rest, and tell you again, when putting the next task into the jar, extending the antlib.xml again. Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free Forum Powered by Nabble | Forum Help |