What about upgrading the javolution jar from 3.1.1 to 4.2.8 (latest
stable release)? I'm testing it and the attached patch contains the changes needed by the upgrade. Jacopo |
Sorry,
here is the patch. Jacopo Cappellato wrote: > What about upgrading the javolution jar from 3.1.1 to 4.2.8 (latest > stable release)? > > I'm testing it and the attached patch contains the changes needed by the > upgrade. > > Jacopo Index: framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java =================================================================== --- framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java (revisione 533556) +++ framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java (copia locale) @@ -27,7 +27,7 @@ import java.util.Set; import javolution.lang.Reusable; -import javolution.realtime.ObjectFactory; +import javolution.context.ObjectFactory; import javolution.util.FastList; import javolution.util.FastMap; import javolution.util.FastSet; Index: framework/entity/src/org/ofbiz/entity/GenericPK.java =================================================================== --- framework/entity/src/org/ofbiz/entity/GenericPK.java (revisione 533556) +++ framework/entity/src/org/ofbiz/entity/GenericPK.java (copia locale) @@ -20,7 +20,7 @@ import java.util.Map; -import javolution.realtime.ObjectFactory; +import javolution.context.ObjectFactory; import org.ofbiz.entity.model.ModelEntity; Index: framework/entity/src/org/ofbiz/entity/GenericValue.java =================================================================== --- framework/entity/src/org/ofbiz/entity/GenericValue.java (revisione 533556) +++ framework/entity/src/org/ofbiz/entity/GenericValue.java (copia locale) @@ -25,7 +25,7 @@ import java.util.Map; import javolution.lang.Reusable; -import javolution.realtime.ObjectFactory; +import javolution.context.ObjectFactory; import javolution.util.FastMap; import org.ofbiz.base.util.Debug; Index: framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java =================================================================== --- framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (revisione 533556) +++ framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (copia locale) @@ -35,10 +35,11 @@ import freemarker.template.Template; import freemarker.template.TemplateException; import freemarker.template.TemplateHashModel; -import javolution.lang.Text; +import javolution.text.CharArray; +import javolution.text.Text; import javolution.util.FastMap; import javolution.xml.sax.Attributes; -import javolution.xml.sax.RealtimeParser; +import javolution.xml.sax.XMLReaderImpl; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -217,7 +218,8 @@ } */ - RealtimeParser parser = new RealtimeParser(16384); + //RealtimeParser parser = new RealtimeParser(16384); + XMLReaderImpl parser = new XMLReaderImpl(); parser.setContentHandler(this); parser.setErrorHandler(this); @@ -280,7 +282,7 @@ public void endDocument() throws org.xml.sax.SAXException {} - public void endElement(CharSequence namespaceURI, CharSequence localName, CharSequence fullName) throws org.xml.sax.SAXException { + public void endElement(CharArray namespaceURI, CharArray localName, CharArray fullName) throws org.xml.sax.SAXException { if (Debug.verboseOn()) Debug.logVerbose("endElement: localName=" + localName + ", fullName=" + fullName + ", numberRead=" + numberRead, module); String fullNameString = fullName.toString(); if ("entity-engine-xml".equals(fullNameString)) { @@ -402,24 +404,24 @@ } } - public void endPrefixMapping(CharSequence prefix) throws org.xml.sax.SAXException {} + public void endPrefixMapping(CharArray prefix) throws org.xml.sax.SAXException {} public void ignorableWhitespace(char[] values, int offset, int count) throws org.xml.sax.SAXException { // String value = new String(values, offset, count); // Debug.logInfo("ignorableWhitespace: value=" + value, module); } - public void processingInstruction(CharSequence target, CharSequence instruction) throws org.xml.sax.SAXException {} + public void processingInstruction(CharArray target, CharArray instruction) throws org.xml.sax.SAXException {} public void setDocumentLocator(org.xml.sax.Locator locator) { this.locator = locator; } - public void skippedEntity(CharSequence name) throws org.xml.sax.SAXException {} + public void skippedEntity(CharArray name) throws org.xml.sax.SAXException {} public void startDocument() throws org.xml.sax.SAXException {} - public void startElement(CharSequence namepsaceURI, CharSequence localName, CharSequence fullName, Attributes attributes) throws org.xml.sax.SAXException { + public void startElement(CharArray namepsaceURI, CharArray localName, CharArray fullName, Attributes attributes) throws org.xml.sax.SAXException { if (Debug.verboseOn()) Debug.logVerbose("startElement: localName=" + localName + ", fullName=" + fullName + ", attributes=" + attributes, module); String fullNameString = fullName.toString(); if ("entity-engine-xml".equals(fullNameString)) { @@ -534,7 +536,7 @@ } //public void startPrefixMapping(String prefix, String uri) throws org.xml.sax.SAXException {} - public void startPrefixMapping(CharSequence arg0, CharSequence arg1) throws SAXException {} + public void startPrefixMapping(CharArray arg0, CharArray arg1) throws SAXException {} // ======== ErrorHandler interface implementations ======== |
In reply to this post by Jacopo Cappellato
Your patch looks pretty similar to the one I started a while ago to update this (included below). I did things slightly different with the EntitySaxReader. I didn't commit this at the time because something wasn't working right, but I don't remember what. I was working against 4.2.5 and it may be that the problem was in that version of Javolution. Anyway, if OFBiz loads fine and basic stuff like a checkout in ecommerce actually works, and in this case a entity XML import as well, then yeah it would be great to get this updated. -David On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: > What about upgrading the javolution jar from 3.1.1 to 4.2.8 (latest > stable release)? > > I'm testing it and the attached patch contains the changes needed > by the upgrade. > > Jacopo > =========================================================== Index: framework/base/lib/javolution.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: framework/base/lib/javolution-4.2.5.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: framework/base/lib/javolution-4.2.5.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: framework/base/src/base/org/ofbiz/base/util/collections/ MapStack.java =================================================================== --- framework/base/src/base/org/ofbiz/base/util/collections/ MapStack.java (revision 510441) +++ framework/base/src/base/org/ofbiz/base/util/collections/ MapStack.java (working copy) @@ -26,8 +26,8 @@ import java.util.Map; import java.util.Set; +import javolution.context.ObjectFactory; import javolution.lang.Reusable; -import javolution.realtime.ObjectFactory; import javolution.util.FastList; import javolution.util.FastMap; import javolution.util.FastSet; Index: framework/entity/src/org/ofbiz/entity/GenericPK.java =================================================================== --- framework/entity/src/org/ofbiz/entity/GenericPK.java (revision 510441) +++ framework/entity/src/org/ofbiz/entity/GenericPK.java (working copy) @@ -20,7 +20,7 @@ import java.util.Map; -import javolution.realtime.ObjectFactory; +import javolution.context.ObjectFactory; import org.ofbiz.entity.model.ModelEntity; Index: framework/entity/src/org/ofbiz/entity/GenericValue.java =================================================================== --- framework/entity/src/org/ofbiz/entity/GenericValue.java (revision 510441) +++ framework/entity/src/org/ofbiz/entity/GenericValue.java (working copy) @@ -24,8 +24,8 @@ import java.util.List; import java.util.Map; +import javolution.context.ObjectFactory; import javolution.lang.Reusable; -import javolution.realtime.ObjectFactory; import javolution.util.FastMap; import org.ofbiz.base.util.Debug; Index: framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java =================================================================== --- framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (revision 510441) +++ framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (working copy) @@ -29,21 +29,11 @@ import java.util.List; import java.util.Map; -import freemarker.ext.beans.BeansWrapper; -import freemarker.ext.dom.NodeModel; -import freemarker.template.Configuration; -import freemarker.template.Template; -import freemarker.template.TemplateException; -import freemarker.template.TemplateHashModel; -import javolution.lang.Text; +import javolution.text.CharArray; +import javolution.text.Text; import javolution.util.FastMap; import javolution.xml.sax.Attributes; -import javolution.xml.sax.RealtimeParser; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; +import javolution.xml.sax.XMLReaderImpl; import org.ofbiz.base.util.Base64; import org.ofbiz.base.util.Debug; @@ -57,7 +47,19 @@ import org.ofbiz.entity.model.ModelField; import org.ofbiz.entity.transaction.GenericTransactionException; import org.ofbiz.entity.transaction.TransactionUtil; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; +import freemarker.ext.beans.BeansWrapper; +import freemarker.ext.dom.NodeModel; +import freemarker.template.Configuration; +import freemarker.template.Template; +import freemarker.template.TemplateException; +import freemarker.template.TemplateHashModel; + /** * SAX XML Parser Content Handler for Entity Engine XML files */ @@ -217,7 +219,7 @@ } */ - RealtimeParser parser = new RealtimeParser(16384); + XMLReaderImpl parser = new XMLReaderImpl(); parser.setContentHandler(this); parser.setErrorHandler(this); @@ -550,4 +552,28 @@ public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException { Debug.logWarning(exception, "Warning reading XML on line " + exception.getLineNumber() + ", column " + exception.getColumnNumber (), module); } + + public void endElement(CharArray namespaceURI, CharArray localName, CharArray fullName) throws SAXException { + this.endElement(namespaceURI, localName, fullName); + } + + public void endPrefixMapping(CharArray prefix) throws SAXException { + this.endPrefixMapping(prefix); + } + + public void processingInstruction(CharArray target, CharArray instruction) throws SAXException { + this.processingInstruction(target, instruction); + } + + public void skippedEntity(CharArray name) throws SAXException { + this.skippedEntity(name); + } + + public void startElement(CharArray namepsaceURI, CharArray localName, CharArray fullName, Attributes attributes) throws SAXException { + this.startElement(namepsaceURI, localName, fullName, attributes); + } + + public void startPrefixMapping(CharArray arg0, CharArray arg1) throws SAXException { + this.startPrefixMapping(arg0, arg1); + } } Index: .classpath =================================================================== --- .classpath (revision 510441) +++ .classpath (working copy) @@ -69,7 +69,6 @@ <classpathentry kind="lib" path="framework/base/lib/junitperf.jar"/> <classpathentry kind="lib" path="framework/base/lib/junit.jar"/> <classpathentry kind="lib" path="framework/base/lib/jdbm.jar"/> - <classpathentry kind="lib" path="framework/base/lib/javolution.jar"/> <classpathentry kind="lib" path="framework/base/lib/jakarta- regexp.jar"/> <classpathentry kind="lib" path="framework/base/lib/icu4j_3_4.jar"/> <classpathentry kind="lib" path="framework/base/lib/httpunit.jar"/> @@ -124,5 +123,6 @@ <classpathentry kind="lib" path="framework/webapp/lib/jdom-1.0.jar"/> <classpathentry kind="lib" path="framework/webapp/lib/fop-0.93.jar"/> <classpathentry kind="lib" path="framework/webapp/lib/barcode4j-fop- ext-0.93.jar"/> + <classpathentry kind="lib" path="framework/base/lib/ javolution-4.2.5.jar"/> <classpathentry kind="output" path="bin"/> </classpath> smime.p7s (3K) Download Attachment |
David,
that's great, thanks. I will quickly test and then commit if it is good; of course after the vote to upgrade to java 1.5 has passed, because this version of javolution requires it. For now it seems to work fine (I run "ant run-install" etc...) Do you think that adding the overloaded methods to the EntitySaxReader class is better than changing the signatures (like I did)? David E. Jones wrote: > > Your patch looks pretty similar to the one I started a while ago to > update this (included below). I did things slightly different with the > EntitySaxReader. > > I didn't commit this at the time because something wasn't working right, > but I don't remember what. I was working against 4.2.5 and it may be > that the problem was in that version of Javolution. > > Anyway, if OFBiz loads fine and basic stuff like a checkout in ecommerce > actually works, and in this case a entity XML import as well, then yeah > it would be great to get this updated. > > -David > > > On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: > >> What about upgrading the javolution jar from 3.1.1 to 4.2.8 (latest >> stable release)? >> >> I'm testing it and the attached patch contains the changes needed by >> the upgrade. >> >> Jacopo >> > > > > =========================================================== > Index: framework/base/lib/javolution.jar > =================================================================== > Cannot display: file marked as a binary type. > svn:mime-type = application/octet-stream > Index: framework/base/lib/javolution-4.2.5.jar > =================================================================== > Cannot display: file marked as a binary type. > svn:mime-type = application/octet-stream > > Property changes on: framework/base/lib/javolution-4.2.5.jar > ___________________________________________________________________ > Name: svn:mime-type > + application/octet-stream > > Index: > framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java > =================================================================== > --- > framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java > (revision 510441) > +++ > framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java > (working copy) > @@ -26,8 +26,8 @@ > import java.util.Map; > import java.util.Set; > +import javolution.context.ObjectFactory; > import javolution.lang.Reusable; > -import javolution.realtime.ObjectFactory; > import javolution.util.FastList; > import javolution.util.FastMap; > import javolution.util.FastSet; > Index: framework/entity/src/org/ofbiz/entity/GenericPK.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/GenericPK.java (revision > 510441) > +++ framework/entity/src/org/ofbiz/entity/GenericPK.java (working copy) > @@ -20,7 +20,7 @@ > import java.util.Map; > -import javolution.realtime.ObjectFactory; > +import javolution.context.ObjectFactory; > import org.ofbiz.entity.model.ModelEntity; > Index: framework/entity/src/org/ofbiz/entity/GenericValue.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/GenericValue.java (revision > 510441) > +++ framework/entity/src/org/ofbiz/entity/GenericValue.java (working > copy) > @@ -24,8 +24,8 @@ > import java.util.List; > import java.util.Map; > +import javolution.context.ObjectFactory; > import javolution.lang.Reusable; > -import javolution.realtime.ObjectFactory; > import javolution.util.FastMap; > import org.ofbiz.base.util.Debug; > Index: framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > (revision 510441) > +++ framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > (working copy) > @@ -29,21 +29,11 @@ > import java.util.List; > import java.util.Map; > -import freemarker.ext.beans.BeansWrapper; > -import freemarker.ext.dom.NodeModel; > -import freemarker.template.Configuration; > -import freemarker.template.Template; > -import freemarker.template.TemplateException; > -import freemarker.template.TemplateHashModel; > -import javolution.lang.Text; > +import javolution.text.CharArray; > +import javolution.text.Text; > import javolution.util.FastMap; > import javolution.xml.sax.Attributes; > -import javolution.xml.sax.RealtimeParser; > -import org.w3c.dom.Document; > -import org.w3c.dom.Element; > -import org.w3c.dom.Node; > -import org.xml.sax.ErrorHandler; > -import org.xml.sax.SAXException; > +import javolution.xml.sax.XMLReaderImpl; > import org.ofbiz.base.util.Base64; > import org.ofbiz.base.util.Debug; > @@ -57,7 +47,19 @@ > import org.ofbiz.entity.model.ModelField; > import org.ofbiz.entity.transaction.GenericTransactionException; > import org.ofbiz.entity.transaction.TransactionUtil; > +import org.w3c.dom.Document; > +import org.w3c.dom.Element; > +import org.w3c.dom.Node; > +import org.xml.sax.ErrorHandler; > +import org.xml.sax.SAXException; > +import freemarker.ext.beans.BeansWrapper; > +import freemarker.ext.dom.NodeModel; > +import freemarker.template.Configuration; > +import freemarker.template.Template; > +import freemarker.template.TemplateException; > +import freemarker.template.TemplateHashModel; > + > /** > * SAX XML Parser Content Handler for Entity Engine XML files > */ > @@ -217,7 +219,7 @@ > } > */ > - RealtimeParser parser = new RealtimeParser(16384); > + XMLReaderImpl parser = new XMLReaderImpl(); > parser.setContentHandler(this); > parser.setErrorHandler(this); > @@ -550,4 +552,28 @@ > public void warning(org.xml.sax.SAXParseException exception) throws > org.xml.sax.SAXException { > Debug.logWarning(exception, "Warning reading XML on line " + > exception.getLineNumber() + ", column " + exception.getColumnNumber(), > module); > } > + > + public void endElement(CharArray namespaceURI, CharArray localName, > CharArray fullName) throws SAXException { > + this.endElement(namespaceURI, localName, fullName); > + } > + > + public void endPrefixMapping(CharArray prefix) throws SAXException { > + this.endPrefixMapping(prefix); > + } > + > + public void processingInstruction(CharArray target, CharArray > instruction) throws SAXException { > + this.processingInstruction(target, instruction); > + } > + > + public void skippedEntity(CharArray name) throws SAXException { > + this.skippedEntity(name); > + } > + > + public void startElement(CharArray namepsaceURI, CharArray > localName, CharArray fullName, Attributes attributes) throws SAXException { > + this.startElement(namepsaceURI, localName, fullName, attributes); > + } > + > + public void startPrefixMapping(CharArray arg0, CharArray arg1) > throws SAXException { > + this.startPrefixMapping(arg0, arg1); > + } > } > Index: .classpath > =================================================================== > --- .classpath (revision 510441) > +++ .classpath (working copy) > @@ -69,7 +69,6 @@ > <classpathentry kind="lib" path="framework/base/lib/junitperf.jar"/> > <classpathentry kind="lib" path="framework/base/lib/junit.jar"/> > <classpathentry kind="lib" path="framework/base/lib/jdbm.jar"/> > - <classpathentry kind="lib" path="framework/base/lib/javolution.jar"/> > <classpathentry kind="lib" > path="framework/base/lib/jakarta-regexp.jar"/> > <classpathentry kind="lib" path="framework/base/lib/icu4j_3_4.jar"/> > <classpathentry kind="lib" path="framework/base/lib/httpunit.jar"/> > @@ -124,5 +123,6 @@ > <classpathentry kind="lib" path="framework/webapp/lib/jdom-1.0.jar"/> > <classpathentry kind="lib" path="framework/webapp/lib/fop-0.93.jar"/> > <classpathentry kind="lib" > path="framework/webapp/lib/barcode4j-fop-ext-0.93.jar"/> > + <classpathentry kind="lib" > path="framework/base/lib/javolution-4.2.5.jar"/> > <classpathentry kind="output" path="bin"/> > </classpath> > |
On Apr 30, 2007, at 3:29 AM, Jacopo Cappellato wrote: > David, > > that's great, thanks. > I will quickly test and then commit if it is good; of course after > the vote to upgrade to java 1.5 has passed, because this version of > javolution requires it. > For now it seems to work fine (I run "ant run-install" etc...) > > Do you think that adding the overloaded methods to the > EntitySaxReader class is better than changing the signatures (like > I did)? those methods, so the only point would be a "just in case" type of thing. -David smime.p7s (3K) Download Attachment |
In reply to this post by Jacopo Cappellato
Jacopo,
I attempted this a few months ago but ran into some serious problems with the entity import (EntitySaxReader) operations. My patch (which at first glance) looked at lot like yours, but 100% of the time throw out of memory issues which importing data (from scratch). Can you test your patch and see if you have any of the same problems? Andrew On Apr 30, 2007, at 4:31 AM, Jacopo Cappellato wrote: > Sorry, > > here is the patch. > > Jacopo Cappellato wrote: >> What about upgrading the javolution jar from 3.1.1 to 4.2.8 >> (latest stable release)? >> I'm testing it and the attached patch contains the changes needed >> by the upgrade. >> Jacopo > > Index: framework/base/src/base/org/ofbiz/base/util/collections/ > MapStack.java > =================================================================== > --- framework/base/src/base/org/ofbiz/base/util/collections/ > MapStack.java (revisione 533556) > +++ framework/base/src/base/org/ofbiz/base/util/collections/ > MapStack.java (copia locale) > @@ -27,7 +27,7 @@ > import java.util.Set; > > import javolution.lang.Reusable; > -import javolution.realtime.ObjectFactory; > +import javolution.context.ObjectFactory; > import javolution.util.FastList; > import javolution.util.FastMap; > import javolution.util.FastSet; > Index: framework/entity/src/org/ofbiz/entity/GenericPK.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/GenericPK.java (revisione > 533556) > +++ framework/entity/src/org/ofbiz/entity/GenericPK.java (copia > locale) > @@ -20,7 +20,7 @@ > > import java.util.Map; > > -import javolution.realtime.ObjectFactory; > +import javolution.context.ObjectFactory; > > import org.ofbiz.entity.model.ModelEntity; > > Index: framework/entity/src/org/ofbiz/entity/GenericValue.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/GenericValue.java > (revisione 533556) > +++ framework/entity/src/org/ofbiz/entity/GenericValue.java (copia > locale) > @@ -25,7 +25,7 @@ > import java.util.Map; > > import javolution.lang.Reusable; > -import javolution.realtime.ObjectFactory; > +import javolution.context.ObjectFactory; > import javolution.util.FastMap; > > import org.ofbiz.base.util.Debug; > Index: framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > =================================================================== > --- framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > (revisione 533556) > +++ framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java > (copia locale) > @@ -35,10 +35,11 @@ > import freemarker.template.Template; > import freemarker.template.TemplateException; > import freemarker.template.TemplateHashModel; > -import javolution.lang.Text; > +import javolution.text.CharArray; > +import javolution.text.Text; > import javolution.util.FastMap; > import javolution.xml.sax.Attributes; > -import javolution.xml.sax.RealtimeParser; > +import javolution.xml.sax.XMLReaderImpl; > import org.w3c.dom.Document; > import org.w3c.dom.Element; > import org.w3c.dom.Node; > @@ -217,7 +218,8 @@ > } > */ > > - RealtimeParser parser = new RealtimeParser(16384); > + //RealtimeParser parser = new RealtimeParser(16384); > + XMLReaderImpl parser = new XMLReaderImpl(); > > parser.setContentHandler(this); > parser.setErrorHandler(this); > @@ -280,7 +282,7 @@ > > public void endDocument() throws org.xml.sax.SAXException {} > > - public void endElement(CharSequence namespaceURI, CharSequence > localName, CharSequence fullName) throws org.xml.sax.SAXException { > + public void endElement(CharArray namespaceURI, CharArray > localName, CharArray fullName) throws org.xml.sax.SAXException { > if (Debug.verboseOn()) Debug.logVerbose("endElement: > localName=" + localName + ", fullName=" + fullName + ", > numberRead=" + numberRead, module); > String fullNameString = fullName.toString(); > if ("entity-engine-xml".equals(fullNameString)) { > @@ -402,24 +404,24 @@ > } > } > > - public void endPrefixMapping(CharSequence prefix) throws > org.xml.sax.SAXException {} > + public void endPrefixMapping(CharArray prefix) throws > org.xml.sax.SAXException {} > > public void ignorableWhitespace(char[] values, int offset, int > count) throws org.xml.sax.SAXException { > // String value = new String(values, offset, count); > // Debug.logInfo("ignorableWhitespace: value=" + value, > module); > } > > - public void processingInstruction(CharSequence target, > CharSequence instruction) throws org.xml.sax.SAXException {} > + public void processingInstruction(CharArray target, CharArray > instruction) throws org.xml.sax.SAXException {} > > public void setDocumentLocator(org.xml.sax.Locator locator) { > this.locator = locator; > } > > - public void skippedEntity(CharSequence name) throws > org.xml.sax.SAXException {} > + public void skippedEntity(CharArray name) throws > org.xml.sax.SAXException {} > > public void startDocument() throws org.xml.sax.SAXException {} > > - public void startElement(CharSequence namepsaceURI, > CharSequence localName, CharSequence fullName, Attributes > attributes) throws org.xml.sax.SAXException { > + public void startElement(CharArray namepsaceURI, CharArray > localName, CharArray fullName, Attributes attributes) throws > org.xml.sax.SAXException { > if (Debug.verboseOn()) Debug.logVerbose("startElement: > localName=" + localName + ", fullName=" + fullName + ", > attributes=" + attributes, module); > String fullNameString = fullName.toString(); > if ("entity-engine-xml".equals(fullNameString)) { > @@ -534,7 +536,7 @@ > } > > //public void startPrefixMapping(String prefix, String uri) > throws org.xml.sax.SAXException {} > - public void startPrefixMapping(CharSequence arg0, CharSequence > arg1) throws SAXException {} > + public void startPrefixMapping(CharArray arg0, CharArray arg1) > throws SAXException {} > > // ======== ErrorHandler interface implementations ======== > smime.p7s (3K) Download Attachment |
In reply to this post by Jacopo Cappellato
I was using 1.4 and a 1.4 compiled version of javolution maybe that
was *my* problem... On Apr 30, 2007, at 5:29 AM, Jacopo Cappellato wrote: > David, > > that's great, thanks. > I will quickly test and then commit if it is good; of course after > the vote to upgrade to java 1.5 has passed, because this version of > javolution requires it. > For now it seems to work fine (I run "ant run-install" etc...) > > Do you think that adding the overloaded methods to the > EntitySaxReader class is better than changing the signatures (like > I did)? > > > David E. Jones wrote: >> Your patch looks pretty similar to the one I started a while ago >> to update this (included below). I did things slightly different >> with the EntitySaxReader. >> I didn't commit this at the time because something wasn't working >> right, but I don't remember what. I was working against 4.2.5 and >> it may be that the problem was in that version of Javolution. >> Anyway, if OFBiz loads fine and basic stuff like a checkout in >> ecommerce actually works, and in this case a entity XML import as >> well, then yeah it would be great to get this updated. >> -David >> On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: >>> What about upgrading the javolution jar from 3.1.1 to 4.2.8 >>> (latest stable release)? >>> >>> I'm testing it and the attached patch contains the changes needed >>> by the upgrade. >>> >>> Jacopo >>> >> =========================================================== >> Index: framework/base/lib/javolution.jar >> =================================================================== >> Cannot display: file marked as a binary type. >> svn:mime-type = application/octet-stream >> Index: framework/base/lib/javolution-4.2.5.jar >> =================================================================== >> Cannot display: file marked as a binary type. >> svn:mime-type = application/octet-stream >> Property changes on: framework/base/lib/javolution-4.2.5.jar >> ___________________________________________________________________ >> Name: svn:mime-type >> + application/octet-stream >> Index: framework/base/src/base/org/ofbiz/base/util/collections/ >> MapStack.java >> =================================================================== >> --- framework/base/src/base/org/ofbiz/base/util/collections/ >> MapStack.java (revision 510441) >> +++ framework/base/src/base/org/ofbiz/base/util/collections/ >> MapStack.java (working copy) >> @@ -26,8 +26,8 @@ >> import java.util.Map; >> import java.util.Set; >> +import javolution.context.ObjectFactory; >> import javolution.lang.Reusable; >> -import javolution.realtime.ObjectFactory; >> import javolution.util.FastList; >> import javolution.util.FastMap; >> import javolution.util.FastSet; >> Index: framework/entity/src/org/ofbiz/entity/GenericPK.java >> =================================================================== >> --- framework/entity/src/org/ofbiz/entity/GenericPK.java >> (revision 510441) >> +++ framework/entity/src/org/ofbiz/entity/GenericPK.java >> (working copy) >> @@ -20,7 +20,7 @@ >> import java.util.Map; >> -import javolution.realtime.ObjectFactory; >> +import javolution.context.ObjectFactory; >> import org.ofbiz.entity.model.ModelEntity; >> Index: framework/entity/src/org/ofbiz/entity/GenericValue.java >> =================================================================== >> --- framework/entity/src/org/ofbiz/entity/GenericValue.java >> (revision 510441) >> +++ framework/entity/src/org/ofbiz/entity/GenericValue.java >> (working copy) >> @@ -24,8 +24,8 @@ >> import java.util.List; >> import java.util.Map; >> +import javolution.context.ObjectFactory; >> import javolution.lang.Reusable; >> -import javolution.realtime.ObjectFactory; >> import javolution.util.FastMap; >> import org.ofbiz.base.util.Debug; >> Index: framework/entity/src/org/ofbiz/entity/util/ >> EntitySaxReader.java >> =================================================================== >> --- framework/entity/src/org/ofbiz/entity/util/ >> EntitySaxReader.java (revision 510441) >> +++ framework/entity/src/org/ofbiz/entity/util/ >> EntitySaxReader.java (working copy) >> @@ -29,21 +29,11 @@ >> import java.util.List; >> import java.util.Map; >> -import freemarker.ext.beans.BeansWrapper; >> -import freemarker.ext.dom.NodeModel; >> -import freemarker.template.Configuration; >> -import freemarker.template.Template; >> -import freemarker.template.TemplateException; >> -import freemarker.template.TemplateHashModel; >> -import javolution.lang.Text; >> +import javolution.text.CharArray; >> +import javolution.text.Text; >> import javolution.util.FastMap; >> import javolution.xml.sax.Attributes; >> -import javolution.xml.sax.RealtimeParser; >> -import org.w3c.dom.Document; >> -import org.w3c.dom.Element; >> -import org.w3c.dom.Node; >> -import org.xml.sax.ErrorHandler; >> -import org.xml.sax.SAXException; >> +import javolution.xml.sax.XMLReaderImpl; >> import org.ofbiz.base.util.Base64; >> import org.ofbiz.base.util.Debug; >> @@ -57,7 +47,19 @@ >> import org.ofbiz.entity.model.ModelField; >> import org.ofbiz.entity.transaction.GenericTransactionException; >> import org.ofbiz.entity.transaction.TransactionUtil; >> +import org.w3c.dom.Document; >> +import org.w3c.dom.Element; >> +import org.w3c.dom.Node; >> +import org.xml.sax.ErrorHandler; >> +import org.xml.sax.SAXException; >> +import freemarker.ext.beans.BeansWrapper; >> +import freemarker.ext.dom.NodeModel; >> +import freemarker.template.Configuration; >> +import freemarker.template.Template; >> +import freemarker.template.TemplateException; >> +import freemarker.template.TemplateHashModel; >> + >> /** >> * SAX XML Parser Content Handler for Entity Engine XML files >> */ >> @@ -217,7 +219,7 @@ >> } >> */ >> - RealtimeParser parser = new RealtimeParser(16384); >> + XMLReaderImpl parser = new XMLReaderImpl(); >> parser.setContentHandler(this); >> parser.setErrorHandler(this); >> @@ -550,4 +552,28 @@ >> public void warning(org.xml.sax.SAXParseException exception) >> throws org.xml.sax.SAXException { >> Debug.logWarning(exception, "Warning reading XML on line >> " + exception.getLineNumber() + ", column " + >> exception.getColumnNumber(), module); >> } >> + >> + public void endElement(CharArray namespaceURI, CharArray >> localName, CharArray fullName) throws SAXException { >> + this.endElement(namespaceURI, localName, fullName); >> + } >> + >> + public void endPrefixMapping(CharArray prefix) throws >> SAXException { >> + this.endPrefixMapping(prefix); >> + } >> + >> + public void processingInstruction(CharArray target, CharArray >> instruction) throws SAXException { >> + this.processingInstruction(target, instruction); >> + } >> + >> + public void skippedEntity(CharArray name) throws SAXException { >> + this.skippedEntity(name); >> + } >> + >> + public void startElement(CharArray namepsaceURI, CharArray >> localName, CharArray fullName, Attributes attributes) throws >> SAXException { >> + this.startElement(namepsaceURI, localName, fullName, >> attributes); >> + } >> + >> + public void startPrefixMapping(CharArray arg0, CharArray >> arg1) throws SAXException { >> + this.startPrefixMapping(arg0, arg1); >> + } >> } >> Index: .classpath >> =================================================================== >> --- .classpath (revision 510441) >> +++ .classpath (working copy) >> @@ -69,7 +69,6 @@ >> <classpathentry kind="lib" path="framework/base/lib/ >> junitperf.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/junit.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/jdbm.jar"/> >> - <classpathentry kind="lib" path="framework/base/lib/ >> javolution.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/jakarta- >> regexp.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/ >> icu4j_3_4.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/ >> httpunit.jar"/> >> @@ -124,5 +123,6 @@ >> <classpathentry kind="lib" path="framework/webapp/lib/ >> jdom-1.0.jar"/> >> <classpathentry kind="lib" path="framework/webapp/lib/ >> fop-0.93.jar"/> >> <classpathentry kind="lib" path="framework/webapp/lib/ >> barcode4j-fop-ext-0.93.jar"/> >> + <classpathentry kind="lib" path="framework/base/lib/ >> javolution-4.2.5.jar"/> >> <classpathentry kind="output" path="bin"/> >> </classpath> > > smime.p7s (3K) Download Attachment |
Yes, I was trying to maintain the 1.4 compatibility too, hopefully it will work better without that... ;) -David On Apr 30, 2007, at 3:40 PM, Andrew Zeneski wrote: > I was using 1.4 and a 1.4 compiled version of javolution maybe that > was *my* problem... > > On Apr 30, 2007, at 5:29 AM, Jacopo Cappellato wrote: > >> David, >> >> that's great, thanks. >> I will quickly test and then commit if it is good; of course after >> the vote to upgrade to java 1.5 has passed, because this version >> of javolution requires it. >> For now it seems to work fine (I run "ant run-install" etc...) >> >> Do you think that adding the overloaded methods to the >> EntitySaxReader class is better than changing the signatures (like >> I did)? >> >> >> David E. Jones wrote: >>> Your patch looks pretty similar to the one I started a while ago >>> to update this (included below). I did things slightly different >>> with the EntitySaxReader. >>> I didn't commit this at the time because something wasn't working >>> right, but I don't remember what. I was working against 4.2.5 and >>> it may be that the problem was in that version of Javolution. >>> Anyway, if OFBiz loads fine and basic stuff like a checkout in >>> ecommerce actually works, and in this case a entity XML import as >>> well, then yeah it would be great to get this updated. >>> -David >>> On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: >>>> What about upgrading the javolution jar from 3.1.1 to 4.2.8 >>>> (latest stable release)? >>>> >>>> I'm testing it and the attached patch contains the changes >>>> needed by the upgrade. >>>> >>>> Jacopo >>>> >>> =========================================================== >>> Index: framework/base/lib/javolution.jar >>> =================================================================== >>> Cannot display: file marked as a binary type. >>> svn:mime-type = application/octet-stream >>> Index: framework/base/lib/javolution-4.2.5.jar >>> =================================================================== >>> Cannot display: file marked as a binary type. >>> svn:mime-type = application/octet-stream >>> Property changes on: framework/base/lib/javolution-4.2.5.jar >>> ___________________________________________________________________ >>> Name: svn:mime-type >>> + application/octet-stream >>> Index: framework/base/src/base/org/ofbiz/base/util/collections/ >>> MapStack.java >>> =================================================================== >>> --- framework/base/src/base/org/ofbiz/base/util/collections/ >>> MapStack.java (revision 510441) >>> +++ framework/base/src/base/org/ofbiz/base/util/collections/ >>> MapStack.java (working copy) >>> @@ -26,8 +26,8 @@ >>> import java.util.Map; >>> import java.util.Set; >>> +import javolution.context.ObjectFactory; >>> import javolution.lang.Reusable; >>> -import javolution.realtime.ObjectFactory; >>> import javolution.util.FastList; >>> import javolution.util.FastMap; >>> import javolution.util.FastSet; >>> Index: framework/entity/src/org/ofbiz/entity/GenericPK.java >>> =================================================================== >>> --- framework/entity/src/org/ofbiz/entity/GenericPK.java >>> (revision 510441) >>> +++ framework/entity/src/org/ofbiz/entity/GenericPK.java >>> (working copy) >>> @@ -20,7 +20,7 @@ >>> import java.util.Map; >>> -import javolution.realtime.ObjectFactory; >>> +import javolution.context.ObjectFactory; >>> import org.ofbiz.entity.model.ModelEntity; >>> Index: framework/entity/src/org/ofbiz/entity/GenericValue.java >>> =================================================================== >>> --- framework/entity/src/org/ofbiz/entity/GenericValue.java >>> (revision 510441) >>> +++ framework/entity/src/org/ofbiz/entity/GenericValue.java >>> (working copy) >>> @@ -24,8 +24,8 @@ >>> import java.util.List; >>> import java.util.Map; >>> +import javolution.context.ObjectFactory; >>> import javolution.lang.Reusable; >>> -import javolution.realtime.ObjectFactory; >>> import javolution.util.FastMap; >>> import org.ofbiz.base.util.Debug; >>> Index: framework/entity/src/org/ofbiz/entity/util/ >>> EntitySaxReader.java >>> =================================================================== >>> --- framework/entity/src/org/ofbiz/entity/util/ >>> EntitySaxReader.java (revision 510441) >>> +++ framework/entity/src/org/ofbiz/entity/util/ >>> EntitySaxReader.java (working copy) >>> @@ -29,21 +29,11 @@ >>> import java.util.List; >>> import java.util.Map; >>> -import freemarker.ext.beans.BeansWrapper; >>> -import freemarker.ext.dom.NodeModel; >>> -import freemarker.template.Configuration; >>> -import freemarker.template.Template; >>> -import freemarker.template.TemplateException; >>> -import freemarker.template.TemplateHashModel; >>> -import javolution.lang.Text; >>> +import javolution.text.CharArray; >>> +import javolution.text.Text; >>> import javolution.util.FastMap; >>> import javolution.xml.sax.Attributes; >>> -import javolution.xml.sax.RealtimeParser; >>> -import org.w3c.dom.Document; >>> -import org.w3c.dom.Element; >>> -import org.w3c.dom.Node; >>> -import org.xml.sax.ErrorHandler; >>> -import org.xml.sax.SAXException; >>> +import javolution.xml.sax.XMLReaderImpl; >>> import org.ofbiz.base.util.Base64; >>> import org.ofbiz.base.util.Debug; >>> @@ -57,7 +47,19 @@ >>> import org.ofbiz.entity.model.ModelField; >>> import org.ofbiz.entity.transaction.GenericTransactionException; >>> import org.ofbiz.entity.transaction.TransactionUtil; >>> +import org.w3c.dom.Document; >>> +import org.w3c.dom.Element; >>> +import org.w3c.dom.Node; >>> +import org.xml.sax.ErrorHandler; >>> +import org.xml.sax.SAXException; >>> +import freemarker.ext.beans.BeansWrapper; >>> +import freemarker.ext.dom.NodeModel; >>> +import freemarker.template.Configuration; >>> +import freemarker.template.Template; >>> +import freemarker.template.TemplateException; >>> +import freemarker.template.TemplateHashModel; >>> + >>> /** >>> * SAX XML Parser Content Handler for Entity Engine XML files >>> */ >>> @@ -217,7 +219,7 @@ >>> } >>> */ >>> - RealtimeParser parser = new RealtimeParser(16384); >>> + XMLReaderImpl parser = new XMLReaderImpl(); >>> parser.setContentHandler(this); >>> parser.setErrorHandler(this); >>> @@ -550,4 +552,28 @@ >>> public void warning(org.xml.sax.SAXParseException exception) >>> throws org.xml.sax.SAXException { >>> Debug.logWarning(exception, "Warning reading XML on line >>> " + exception.getLineNumber() + ", column " + >>> exception.getColumnNumber(), module); >>> } >>> + >>> + public void endElement(CharArray namespaceURI, CharArray >>> localName, CharArray fullName) throws SAXException { >>> + this.endElement(namespaceURI, localName, fullName); >>> + } >>> + >>> + public void endPrefixMapping(CharArray prefix) throws >>> SAXException { >>> + this.endPrefixMapping(prefix); >>> + } >>> + >>> + public void processingInstruction(CharArray target, >>> CharArray instruction) throws SAXException { >>> + this.processingInstruction(target, instruction); >>> + } >>> + >>> + public void skippedEntity(CharArray name) throws SAXException { >>> + this.skippedEntity(name); >>> + } >>> + >>> + public void startElement(CharArray namepsaceURI, CharArray >>> localName, CharArray fullName, Attributes attributes) throws >>> SAXException { >>> + this.startElement(namepsaceURI, localName, fullName, >>> attributes); >>> + } >>> + >>> + public void startPrefixMapping(CharArray arg0, CharArray >>> arg1) throws SAXException { >>> + this.startPrefixMapping(arg0, arg1); >>> + } >>> } >>> Index: .classpath >>> =================================================================== >>> --- .classpath (revision 510441) >>> +++ .classpath (working copy) >>> @@ -69,7 +69,6 @@ >>> <classpathentry kind="lib" path="framework/base/lib/ >>> junitperf.jar"/> >>> <classpathentry kind="lib" path="framework/base/lib/junit.jar"/> >>> <classpathentry kind="lib" path="framework/base/lib/jdbm.jar"/> >>> - <classpathentry kind="lib" path="framework/base/lib/ >>> javolution.jar"/> >>> <classpathentry kind="lib" path="framework/base/lib/jakarta- >>> regexp.jar"/> >>> <classpathentry kind="lib" path="framework/base/lib/ >>> icu4j_3_4.jar"/> >>> <classpathentry kind="lib" path="framework/base/lib/ >>> httpunit.jar"/> >>> @@ -124,5 +123,6 @@ >>> <classpathentry kind="lib" path="framework/webapp/lib/ >>> jdom-1.0.jar"/> >>> <classpathentry kind="lib" path="framework/webapp/lib/ >>> fop-0.93.jar"/> >>> <classpathentry kind="lib" path="framework/webapp/lib/ >>> barcode4j-fop-ext-0.93.jar"/> >>> + <classpathentry kind="lib" path="framework/base/lib/ >>> javolution-4.2.5.jar"/> >>> <classpathentry kind="output" path="bin"/> >>> </classpath> >> >> > smime.p7s (3K) Download Attachment |
Maybe java 1.4 was the issue.
With the latest javolution release java 1.5+ is required and with it I could run "ant run-install" without issues. Jacopo David E. Jones wrote: > > Yes, I was trying to maintain the 1.4 compatibility too, hopefully it > will work better without that... ;) > > -David > > > On Apr 30, 2007, at 3:40 PM, Andrew Zeneski wrote: > >> I was using 1.4 and a 1.4 compiled version of javolution maybe that >> was *my* problem... >> >> On Apr 30, 2007, at 5:29 AM, Jacopo Cappellato wrote: >> >>> David, >>> >>> that's great, thanks. >>> I will quickly test and then commit if it is good; of course after >>> the vote to upgrade to java 1.5 has passed, because this version of >>> javolution requires it. >>> For now it seems to work fine (I run "ant run-install" etc...) >>> >>> Do you think that adding the overloaded methods to the >>> EntitySaxReader class is better than changing the signatures (like I >>> did)? >>> >>> >>> David E. Jones wrote: >>>> Your patch looks pretty similar to the one I started a while ago to >>>> update this (included below). I did things slightly different with >>>> the EntitySaxReader. >>>> I didn't commit this at the time because something wasn't working >>>> right, but I don't remember what. I was working against 4.2.5 and it >>>> may be that the problem was in that version of Javolution. >>>> Anyway, if OFBiz loads fine and basic stuff like a checkout in >>>> ecommerce actually works, and in this case a entity XML import as >>>> well, then yeah it would be great to get this updated. >>>> -David >>>> On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: >>>>> What about upgrading the javolution jar from 3.1.1 to 4.2.8 (latest >>>>> stable release)? >>>>> >>>>> I'm testing it and the attached patch contains the changes needed >>>>> by the upgrade. >>>>> >>>>> Jacopo >>>>> >>>> =========================================================== >>>> Index: framework/base/lib/javolution.jar >>>> =================================================================== >>>> Cannot display: file marked as a binary type. >>>> svn:mime-type = application/octet-stream >>>> Index: framework/base/lib/javolution-4.2.5.jar >>>> =================================================================== >>>> Cannot display: file marked as a binary type. >>>> svn:mime-type = application/octet-stream >>>> Property changes on: framework/base/lib/javolution-4.2.5.jar >>>> ___________________________________________________________________ >>>> Name: svn:mime-type >>>> + application/octet-stream >>>> Index: >>>> framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java >>>> =================================================================== >>>> --- >>>> framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java >>>> (revision 510441) >>>> +++ >>>> framework/base/src/base/org/ofbiz/base/util/collections/MapStack.java >>>> (working copy) >>>> @@ -26,8 +26,8 @@ >>>> import java.util.Map; >>>> import java.util.Set; >>>> +import javolution.context.ObjectFactory; >>>> import javolution.lang.Reusable; >>>> -import javolution.realtime.ObjectFactory; >>>> import javolution.util.FastList; >>>> import javolution.util.FastMap; >>>> import javolution.util.FastSet; >>>> Index: framework/entity/src/org/ofbiz/entity/GenericPK.java >>>> =================================================================== >>>> --- framework/entity/src/org/ofbiz/entity/GenericPK.java >>>> (revision 510441) >>>> +++ framework/entity/src/org/ofbiz/entity/GenericPK.java (working >>>> copy) >>>> @@ -20,7 +20,7 @@ >>>> import java.util.Map; >>>> -import javolution.realtime.ObjectFactory; >>>> +import javolution.context.ObjectFactory; >>>> import org.ofbiz.entity.model.ModelEntity; >>>> Index: framework/entity/src/org/ofbiz/entity/GenericValue.java >>>> =================================================================== >>>> --- framework/entity/src/org/ofbiz/entity/GenericValue.java >>>> (revision 510441) >>>> +++ framework/entity/src/org/ofbiz/entity/GenericValue.java >>>> (working copy) >>>> @@ -24,8 +24,8 @@ >>>> import java.util.List; >>>> import java.util.Map; >>>> +import javolution.context.ObjectFactory; >>>> import javolution.lang.Reusable; >>>> -import javolution.realtime.ObjectFactory; >>>> import javolution.util.FastMap; >>>> import org.ofbiz.base.util.Debug; >>>> Index: framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java >>>> =================================================================== >>>> --- >>>> framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java >>>> (revision 510441) >>>> +++ >>>> framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java >>>> (working copy) >>>> @@ -29,21 +29,11 @@ >>>> import java.util.List; >>>> import java.util.Map; >>>> -import freemarker.ext.beans.BeansWrapper; >>>> -import freemarker.ext.dom.NodeModel; >>>> -import freemarker.template.Configuration; >>>> -import freemarker.template.Template; >>>> -import freemarker.template.TemplateException; >>>> -import freemarker.template.TemplateHashModel; >>>> -import javolution.lang.Text; >>>> +import javolution.text.CharArray; >>>> +import javolution.text.Text; >>>> import javolution.util.FastMap; >>>> import javolution.xml.sax.Attributes; >>>> -import javolution.xml.sax.RealtimeParser; >>>> -import org.w3c.dom.Document; >>>> -import org.w3c.dom.Element; >>>> -import org.w3c.dom.Node; >>>> -import org.xml.sax.ErrorHandler; >>>> -import org.xml.sax.SAXException; >>>> +import javolution.xml.sax.XMLReaderImpl; >>>> import org.ofbiz.base.util.Base64; >>>> import org.ofbiz.base.util.Debug; >>>> @@ -57,7 +47,19 @@ >>>> import org.ofbiz.entity.model.ModelField; >>>> import org.ofbiz.entity.transaction.GenericTransactionException; >>>> import org.ofbiz.entity.transaction.TransactionUtil; >>>> +import org.w3c.dom.Document; >>>> +import org.w3c.dom.Element; >>>> +import org.w3c.dom.Node; >>>> +import org.xml.sax.ErrorHandler; >>>> +import org.xml.sax.SAXException; >>>> +import freemarker.ext.beans.BeansWrapper; >>>> +import freemarker.ext.dom.NodeModel; >>>> +import freemarker.template.Configuration; >>>> +import freemarker.template.Template; >>>> +import freemarker.template.TemplateException; >>>> +import freemarker.template.TemplateHashModel; >>>> + >>>> /** >>>> * SAX XML Parser Content Handler for Entity Engine XML files >>>> */ >>>> @@ -217,7 +219,7 @@ >>>> } >>>> */ >>>> - RealtimeParser parser = new RealtimeParser(16384); >>>> + XMLReaderImpl parser = new XMLReaderImpl(); >>>> parser.setContentHandler(this); >>>> parser.setErrorHandler(this); >>>> @@ -550,4 +552,28 @@ >>>> public void warning(org.xml.sax.SAXParseException exception) >>>> throws org.xml.sax.SAXException { >>>> Debug.logWarning(exception, "Warning reading XML on line " >>>> + exception.getLineNumber() + ", column " + >>>> exception.getColumnNumber(), module); >>>> } >>>> + >>>> + public void endElement(CharArray namespaceURI, CharArray >>>> localName, CharArray fullName) throws SAXException { >>>> + this.endElement(namespaceURI, localName, fullName); >>>> + } >>>> + >>>> + public void endPrefixMapping(CharArray prefix) throws >>>> SAXException { >>>> + this.endPrefixMapping(prefix); >>>> + } >>>> + >>>> + public void processingInstruction(CharArray target, CharArray >>>> instruction) throws SAXException { >>>> + this.processingInstruction(target, instruction); >>>> + } >>>> + >>>> + public void skippedEntity(CharArray name) throws SAXException { >>>> + this.skippedEntity(name); >>>> + } >>>> + >>>> + public void startElement(CharArray namepsaceURI, CharArray >>>> localName, CharArray fullName, Attributes attributes) throws >>>> SAXException { >>>> + this.startElement(namepsaceURI, localName, fullName, >>>> attributes); >>>> + } >>>> + >>>> + public void startPrefixMapping(CharArray arg0, CharArray arg1) >>>> throws SAXException { >>>> + this.startPrefixMapping(arg0, arg1); >>>> + } >>>> } >>>> Index: .classpath >>>> =================================================================== >>>> --- .classpath (revision 510441) >>>> +++ .classpath (working copy) >>>> @@ -69,7 +69,6 @@ >>>> <classpathentry kind="lib" >>>> path="framework/base/lib/junitperf.jar"/> >>>> <classpathentry kind="lib" path="framework/base/lib/junit.jar"/> >>>> <classpathentry kind="lib" path="framework/base/lib/jdbm.jar"/> >>>> - <classpathentry kind="lib" >>>> path="framework/base/lib/javolution.jar"/> >>>> <classpathentry kind="lib" >>>> path="framework/base/lib/jakarta-regexp.jar"/> >>>> <classpathentry kind="lib" >>>> path="framework/base/lib/icu4j_3_4.jar"/> >>>> <classpathentry kind="lib" path="framework/base/lib/httpunit.jar"/> >>>> @@ -124,5 +123,6 @@ >>>> <classpathentry kind="lib" >>>> path="framework/webapp/lib/jdom-1.0.jar"/> >>>> <classpathentry kind="lib" >>>> path="framework/webapp/lib/fop-0.93.jar"/> >>>> <classpathentry kind="lib" >>>> path="framework/webapp/lib/barcode4j-fop-ext-0.93.jar"/> >>>> + <classpathentry kind="lib" >>>> path="framework/base/lib/javolution-4.2.5.jar"/> >>>> <classpathentry kind="output" path="bin"/> >>>> </classpath> >>> >>> >> > |
I see the update, nice work! I'm happy to see that updated. They had
a number of performance improvements since the last version we were using. Andrew On May 1, 2007, at 5:00 AM, Jacopo Cappellato wrote: > Maybe java 1.4 was the issue. > With the latest javolution release java 1.5+ is required and with > it I could run "ant run-install" without issues. > > Jacopo > > > David E. Jones wrote: >> Yes, I was trying to maintain the 1.4 compatibility too, hopefully >> it will work better without that... ;) >> -David >> On Apr 30, 2007, at 3:40 PM, Andrew Zeneski wrote: >>> I was using 1.4 and a 1.4 compiled version of javolution maybe >>> that was *my* problem... >>> >>> On Apr 30, 2007, at 5:29 AM, Jacopo Cappellato wrote: >>> >>>> David, >>>> >>>> that's great, thanks. >>>> I will quickly test and then commit if it is good; of course >>>> after the vote to upgrade to java 1.5 has passed, because this >>>> version of javolution requires it. >>>> For now it seems to work fine (I run "ant run-install" etc...) >>>> >>>> Do you think that adding the overloaded methods to the >>>> EntitySaxReader class is better than changing the signatures >>>> (like I did)? >>>> >>>> >>>> David E. Jones wrote: >>>>> Your patch looks pretty similar to the one I started a while >>>>> ago to update this (included below). I did things slightly >>>>> different with the EntitySaxReader. >>>>> I didn't commit this at the time because something wasn't >>>>> working right, but I don't remember what. I was working against >>>>> 4.2.5 and it may be that the problem was in that version of >>>>> Javolution. >>>>> Anyway, if OFBiz loads fine and basic stuff like a checkout in >>>>> ecommerce actually works, and in this case a entity XML import >>>>> as well, then yeah it would be great to get this updated. >>>>> -David >>>>> On Apr 30, 2007, at 2:29 AM, Jacopo Cappellato wrote: >>>>>> What about upgrading the javolution jar from 3.1.1 to 4.2.8 >>>>>> (latest stable release)? >>>>>> >>>>>> I'm testing it and the attached patch contains the changes >>>>>> needed by the upgrade. >>>>>> >>>>>> Jacopo >>>>>> >>>>> =========================================================== >>>>> Index: framework/base/lib/javolution.jar >>>>> ================================================================== >>>>> = >>>>> Cannot display: file marked as a binary type. >>>>> svn:mime-type = application/octet-stream >>>>> Index: framework/base/lib/javolution-4.2.5.jar >>>>> ================================================================== >>>>> = >>>>> Cannot display: file marked as a binary type. >>>>> svn:mime-type = application/octet-stream >>>>> Property changes on: framework/base/lib/javolution-4.2.5.jar >>>>> __________________________________________________________________ >>>>> _ >>>>> Name: svn:mime-type >>>>> + application/octet-stream >>>>> Index: framework/base/src/base/org/ofbiz/base/util/collections/ >>>>> MapStack.java >>>>> ================================================================== >>>>> = >>>>> --- framework/base/src/base/org/ofbiz/base/util/collections/ >>>>> MapStack.java (revision 510441) >>>>> +++ framework/base/src/base/org/ofbiz/base/util/collections/ >>>>> MapStack.java (working copy) >>>>> @@ -26,8 +26,8 @@ >>>>> import java.util.Map; >>>>> import java.util.Set; >>>>> +import javolution.context.ObjectFactory; >>>>> import javolution.lang.Reusable; >>>>> -import javolution.realtime.ObjectFactory; >>>>> import javolution.util.FastList; >>>>> import javolution.util.FastMap; >>>>> import javolution.util.FastSet; >>>>> Index: framework/entity/src/org/ofbiz/entity/GenericPK.java >>>>> ================================================================== >>>>> = >>>>> --- framework/entity/src/org/ofbiz/entity/GenericPK.java >>>>> (revision 510441) >>>>> +++ framework/entity/src/org/ofbiz/entity/GenericPK.java >>>>> (working copy) >>>>> @@ -20,7 +20,7 @@ >>>>> import java.util.Map; >>>>> -import javolution.realtime.ObjectFactory; >>>>> +import javolution.context.ObjectFactory; >>>>> import org.ofbiz.entity.model.ModelEntity; >>>>> Index: framework/entity/src/org/ofbiz/entity/GenericValue.java >>>>> ================================================================== >>>>> = >>>>> --- framework/entity/src/org/ofbiz/entity/GenericValue.java >>>>> (revision 510441) >>>>> +++ framework/entity/src/org/ofbiz/entity/GenericValue.java >>>>> (working copy) >>>>> @@ -24,8 +24,8 @@ >>>>> import java.util.List; >>>>> import java.util.Map; >>>>> +import javolution.context.ObjectFactory; >>>>> import javolution.lang.Reusable; >>>>> -import javolution.realtime.ObjectFactory; >>>>> import javolution.util.FastMap; >>>>> import org.ofbiz.base.util.Debug; >>>>> Index: framework/entity/src/org/ofbiz/entity/util/ >>>>> EntitySaxReader.java >>>>> ================================================================== >>>>> = >>>>> --- framework/entity/src/org/ofbiz/entity/util/ >>>>> EntitySaxReader.java (revision 510441) >>>>> +++ framework/entity/src/org/ofbiz/entity/util/ >>>>> EntitySaxReader.java (working copy) >>>>> @@ -29,21 +29,11 @@ >>>>> import java.util.List; >>>>> import java.util.Map; >>>>> -import freemarker.ext.beans.BeansWrapper; >>>>> -import freemarker.ext.dom.NodeModel; >>>>> -import freemarker.template.Configuration; >>>>> -import freemarker.template.Template; >>>>> -import freemarker.template.TemplateException; >>>>> -import freemarker.template.TemplateHashModel; >>>>> -import javolution.lang.Text; >>>>> +import javolution.text.CharArray; >>>>> +import javolution.text.Text; >>>>> import javolution.util.FastMap; >>>>> import javolution.xml.sax.Attributes; >>>>> -import javolution.xml.sax.RealtimeParser; >>>>> -import org.w3c.dom.Document; >>>>> -import org.w3c.dom.Element; >>>>> -import org.w3c.dom.Node; >>>>> -import org.xml.sax.ErrorHandler; >>>>> -import org.xml.sax.SAXException; >>>>> +import javolution.xml.sax.XMLReaderImpl; >>>>> import org.ofbiz.base.util.Base64; >>>>> import org.ofbiz.base.util.Debug; >>>>> @@ -57,7 +47,19 @@ >>>>> import org.ofbiz.entity.model.ModelField; >>>>> import org.ofbiz.entity.transaction.GenericTransactionException; >>>>> import org.ofbiz.entity.transaction.TransactionUtil; >>>>> +import org.w3c.dom.Document; >>>>> +import org.w3c.dom.Element; >>>>> +import org.w3c.dom.Node; >>>>> +import org.xml.sax.ErrorHandler; >>>>> +import org.xml.sax.SAXException; >>>>> +import freemarker.ext.beans.BeansWrapper; >>>>> +import freemarker.ext.dom.NodeModel; >>>>> +import freemarker.template.Configuration; >>>>> +import freemarker.template.Template; >>>>> +import freemarker.template.TemplateException; >>>>> +import freemarker.template.TemplateHashModel; >>>>> + >>>>> /** >>>>> * SAX XML Parser Content Handler for Entity Engine XML files >>>>> */ >>>>> @@ -217,7 +219,7 @@ >>>>> } >>>>> */ >>>>> - RealtimeParser parser = new RealtimeParser(16384); >>>>> + XMLReaderImpl parser = new XMLReaderImpl(); >>>>> parser.setContentHandler(this); >>>>> parser.setErrorHandler(this); >>>>> @@ -550,4 +552,28 @@ >>>>> public void warning(org.xml.sax.SAXParseException >>>>> exception) throws org.xml.sax.SAXException { >>>>> Debug.logWarning(exception, "Warning reading XML on >>>>> line " + exception.getLineNumber() + ", column " + >>>>> exception.getColumnNumber(), module); >>>>> } >>>>> + >>>>> + public void endElement(CharArray namespaceURI, CharArray >>>>> localName, CharArray fullName) throws SAXException { >>>>> + this.endElement(namespaceURI, localName, fullName); >>>>> + } >>>>> + >>>>> + public void endPrefixMapping(CharArray prefix) throws >>>>> SAXException { >>>>> + this.endPrefixMapping(prefix); >>>>> + } >>>>> + >>>>> + public void processingInstruction(CharArray target, >>>>> CharArray instruction) throws SAXException { >>>>> + this.processingInstruction(target, instruction); >>>>> + } >>>>> + >>>>> + public void skippedEntity(CharArray name) throws >>>>> SAXException { >>>>> + this.skippedEntity(name); >>>>> + } >>>>> + >>>>> + public void startElement(CharArray namepsaceURI, CharArray >>>>> localName, CharArray fullName, Attributes attributes) throws >>>>> SAXException { >>>>> + this.startElement(namepsaceURI, localName, fullName, >>>>> attributes); >>>>> + } >>>>> + >>>>> + public void startPrefixMapping(CharArray arg0, CharArray >>>>> arg1) throws SAXException { >>>>> + this.startPrefixMapping(arg0, arg1); >>>>> + } >>>>> } >>>>> Index: .classpath >>>>> ================================================================== >>>>> = >>>>> --- .classpath (revision 510441) >>>>> +++ .classpath (working copy) >>>>> @@ -69,7 +69,6 @@ >>>>> <classpathentry kind="lib" path="framework/base/lib/ >>>>> junitperf.jar"/> >>>>> <classpathentry kind="lib" path="framework/base/lib/ >>>>> junit.jar"/> >>>>> <classpathentry kind="lib" path="framework/base/lib/ >>>>> jdbm.jar"/> >>>>> - <classpathentry kind="lib" path="framework/base/lib/ >>>>> javolution.jar"/> >>>>> <classpathentry kind="lib" path="framework/base/lib/jakarta- >>>>> regexp.jar"/> >>>>> <classpathentry kind="lib" path="framework/base/lib/ >>>>> icu4j_3_4.jar"/> >>>>> <classpathentry kind="lib" path="framework/base/lib/ >>>>> httpunit.jar"/> >>>>> @@ -124,5 +123,6 @@ >>>>> <classpathentry kind="lib" path="framework/webapp/lib/ >>>>> jdom-1.0.jar"/> >>>>> <classpathentry kind="lib" path="framework/webapp/lib/ >>>>> fop-0.93.jar"/> >>>>> <classpathentry kind="lib" path="framework/webapp/lib/ >>>>> barcode4j-fop-ext-0.93.jar"/> >>>>> + <classpathentry kind="lib" path="framework/base/lib/ >>>>> javolution-4.2.5.jar"/> >>>>> <classpathentry kind="output" path="bin"/> >>>>> </classpath> >>>> >>>> >>> > > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |