[castor-dev] How to Trim strings when unmarshaling an XML file? (Resent)

2004-03-04 Thread Paul Spencer
How can I force strings to be trimmed when unmarshaling an XML file? Using the example: This is some text The element unmarshals to: "/nThis is some text/n " I expected the element to unmarshal to: "This is some text" Is their a property or something I need to change? Pau

[castor-dev] NullPointerException during validation

2004-03-04 Thread Jeremy Haile
Any idea why I would be receiving the exception below? If I turn off validation via unmarshaller.setValidation( false ); then it unmarshalls fine. I am unmarshalling a large object graph, so I am not sure what mapping/XML is causing this exception. However, I don't think this should ever happen

Re: [castor-dev] Does latest Map functionality support references as the

2004-03-04 Thread Keith Visco
Hi Paul, What happens when you change node="element" to node="attribute" for the Address field mapping: --Keith --- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of:

Re: [castor-dev] Problem getting started

2004-03-04 Thread Keith Visco
Steve, What happens if you replace type="strings" with type="string" ? --Keith > "Oliver, Steve" wrote: > > Hi all, > > I just started using castor yesterday. I’ve started with the Person > example and added an array. When I try to unmarshal I get the > following error > > org.xml.sax.SAXE

[castor-dev] Problem getting started

2004-03-04 Thread Oliver, Steve
Title: Problem getting started Hi all, I just started using castor yesterday. I’ve started with the Person example and added an array. When I try to unmarshal I get the following error org.xml.sax.SAXException: Illegal Text data found as child of: Name   value: "Tom"{file: [not available];

[castor-dev] Does latest Map functionality support references as the value object?

2004-03-04 Thread Paul Grillo
The basic problem is that I can marshal and unmarshal a Map with key=Integer and value=AddressObject and it works fine When I try to use a reference to AddressObject, it “almost” works.   Any help will  be appreciated  Hope I can use references, our maps generally have duplicate objects

Re: [castor-dev] XML SourceGenerator to generate java.sql.date instead

2004-03-04 Thread Keith Visco
Hi Tim, Castor doesn't support switching the date class out-of-the-box, but here is a workaround: Grab a copy of the Castor Source Code, there is a file called XSDate.java: /castor/src/main/org/exolab/castor/builder/types/XSDate.java You can modify this file so that it uses java.sql.Date ins

Re: [castor-dev] unmarshalling elements with html tags inside

2004-03-04 Thread Keith Visco
Castor XML follows the syntax rules of XML...so if you want Castor to ignore the then you have two options: 1. Change it to the following: or 2. Change it to the following:
--Keith Dario Di wrote: > > Hi all, > I'm using Castor to unmarshall xml files; I am using >

[castor-dev] mod_deflate with mod_jk2

2004-03-04 Thread Bryan Field-Elliot
On my site, I have Apache 2.0 fronting Tomcat 4.1 using the mod_jk2 connector. I'm trying to enable mod_deflate to automatically compress output from Tomcat, using this line in my apache config: AddOutputFilterByType DEFLATE text/html But the DEFLATE filter is ignoring output from Tomcat, while

Re: [castor-dev] saving a java-project

2004-03-04 Thread Jens Saade
Again, I can only guess without code. //Jens Katja wrote: Hi, I found my mistake. Any class needs a nullary constructor. I didn't have it. This mistake I'm getting now: org.xml.sax.SAXException: unable to instantiate a new type of: GUI.MainFrame$ImageAndPositionData{file: [not available]; line: 2

Re: [castor-dev] saving a java-project

2004-03-04 Thread Katja
Hi, I found my mistake. Any class needs a nullary constructor. I didn't have it. This mistake I'm getting now: org.xml.sax.SAXException: unable to instantiate a new type of: GUI.MainFrame$ImageAndPositionData{file: [not available]; line: 2; column: 341} Could it be because ImageAndPositionData is

Re: [castor-dev] Problem with connections pooling for Oracle

2004-03-04 Thread Patrice Fleurier
Werner, I have an error with your correction. The error is: javax.servlet.ServletException: Nested error: org.xml.sax.SAXException: unable to add attribute "min-limit" to 'oracle.jdbc.pool.OracleConnectionCacheImpl' due to the following error: org.exolab.castor.mapping.MappingRuntimeException: N

Re: [castor-dev] saving a java-project

2004-03-04 Thread Katja
Hello Jens, This is the code of the class SaveData : public class SaveData implements Serializable { private DemosProject proj; private HashMap graphicData; public SaveData(DemosProject project,HashMap imgData){ this.proj=project; this.graphicData=imgData; }

Re: [castor-dev] Problem with connections pooling for Oracle

2004-03-04 Thread Werner Guttmann
Patrice, please make this and things should work. Werner On Thu, 04 Mar 2004 03:02:46 -0700, Bruce Snyder wrote: >Werner Guttmann wrote: > >> Patrice, >> >> I have just been pointed to online documentation for this Oracle class mentioned >> below. As OracleCo

Re: [castor-dev] Problem with connections pooling for Oracle

2004-03-04 Thread Patrice Fleurier
Werner, You can acces to the Oracle Online Doc at : SQLJ & JDBC The PDF Format : http://download-uk.oracle.com/docs/cd/A91202_01/901_doc/java.901/a90211.pdf     For your question : oracle.jdbc.pool.OracleConnectionCacheImpl implements   oracle.jdbc.pool.OracleConnectionCache AN

Re: [castor-dev] Problem with connections pooling for Oracle

2004-03-04 Thread Werner Guttmann
Patrice, I have just been pointed to online documentation for this Oracle class mentioned below. As OracleConnectionCacheImpl implements javax.sql.DataSource, you will have to use the element to configure all this. Please note that due to still existing inconsistencies you will have to use

Re: [castor-dev] saving a java-project

2004-03-04 Thread Jens Saade
Hi Katja, comments inline ... Katja wrote: Hello Jens, Thank you for answering my 'beginner questions'. I already thought that I cannot write to object to one file. I correct it by creating new class SaveData with two attributes -the two objects, I want to save. SaveData dataToSave=new SaveData

[castor-dev] unmarshalling elements with html tags inside

2004-03-04 Thread Dario Di
Hi all, I'm using Castor to unmarshall xml files; I am using an xsd schema but not using a name space; I have the following problem: when unmarshalling a string element like this: I'd like castor to ignore the i.e. to treat it as text and bind the whole string ' ' to the st

[castor-dev] XML SourceGenerator to generate java.sql.date instead of castor custom date?

2004-03-04 Thread Leeuw van der, Tim
Hi, When I specify a type of 'xsd:date' in my xml schema, the generated classes have a Castor specific date type. All my code uses java.sql.Date. This gives a lot of ugly-looking code. Is it possible to coerce the SourceGenerator to generate java.sql.Date instead? And if so, how? I currently

Re: [castor-dev] Problem with connections pooling for Oracle

2004-03-04 Thread Werner Guttmann
Patrice, Bruce, whilst it is true that I have been working on an improvement for handling parameters for database connections, this simply would not apply to this case as Patrice is using the element whilst I am working on the element. Patrice, can I ask you a couple of questions about Orac