Hi Chris,
I got it to work by simply commenting out the class mapping for Pet as
such:
and letting Castor introspect the class.
The MappingLoader doesn't like the fact the the Pet class doesn't have a
default (no arg) constructor.
I'll have to look into removing that limitation from the Ma
Hi Keith,
If you generated your sources using Castor Source Generator then you
DON'T need a mapping file. Just make sure the descriptors classes are
compiled and in your classpath.
Arnaud
> -Original Message-
> From: Keith Koski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 20
Hi,
Ok as Mickaƫl is suggesting, this is not a BUG. So can anyone suggest how to
implement
the following cases, considering Concurrent Access ---
1. Student --> Professor
Each Student will have multiple Professors. Also each Professor will have multiple
Students.
So this is an M:N r
Keith:
I apologize for being thick, but I'm still lost on this one...
I have created a real simple example that tries to follow your advice to
Matthias of setting the type of the object that the
handler is expecting to receive. in my case I assume its not a string
(but I'm not 100% sure)...
Ross,
The xsd is irrelevant to JDO - it just cares about what is in the object and
mapping. In this case, as long as the identity field is accessible via
getter/setter in the class (which could be defined on a superclass), then
JDO will be fine with it.
HTH -
Margaret
-Original Message-
F
I hope this helps.
// the classloader will use the classpath to find the mapping file
// it can be in a jar file or a war file
String mappingFile = "/myapp/mapping.xml";
Mapping mapping = new Mapping();
mapping.loadMapping( this.getClass().getResource(
m
Hmmm. It's educational, but still doesn't suggest anything to me - I'm
interested in using Castor strictly to serialize XML, not for JDO. Unless
I'm missing out on some major magic here. Which is hardly unlikely, since
using Javadocs as one's primary programming reference is a great way to
learn to
This gets the mapping.xml and database.xml creates a jdo and binds
it to the the jndi tree. All you would need to do for the war case
is just place your xml files in the web-inf/classes directory.
Hope this helps
package vanderbilt.ed.utils;
import java.util.Hashtable;
import javax.naming.C
Margaret,
I really can't say without seeing what kind of code "grabs files from a jar
via a classloader". That is to say, a context that justifies why you'd go
to all that much trouble when (excepting requests for factories, drivers,
and other dynamic items) you can generally simply reference the
Thanks, Bruce. You're right, initially I tried the JDO stuff by implementing
Persistent in the source generated classes. I will remove that and retry.
On a related issue, do all of the elements/complex types in my XSD need to
have an identity field in order to work with JDO, or can the mapping fil
Sorry, I'm afraid I'm simply too dense to get something that works
from hints and fragments. I posted what I did and what happened -
or didn't - not too long ago, but nobody told me what I did wrong.
Tim
On 2002-12-17 16:43 "Lanaghan, Kevin M" wrote:
> You can use a mapping from a war. Just p
This one time, at band camp, Ross Larner said:
RL>RL>I am a fairly new user to Castor, and I have a basic question I hope someone
could
RL>answer:
RL>RL>
RL>RL>is there a way to have Castor autogenerate the Java classes that implement
RL>Persistent from an XSD?
RL>RL>
RL>RL>For example, the Pro
Hi Ross,
The source generator can generate more Castor-JDO friendly code by doing
a few things.
1. Enable the extra collection methods by uncommenting the following
line
from castorbuilder.properties (or adding it to your local copy)
# Set to true if you want the generated source code to con
RL>I am a fairly new user to Castor, and I have a basic question I hope
someone could answer:RL>RL>is there a way to have Castor
autogenerate the Java classes that implement Persistent from an
XSD?RL>RL>For example, the Product.java file that is used in the
jdo example - could this type of f
Hello, Arnaud:
I just pulled down the latest cvs tree, and unfortunately was not able to
make the SourceGenerator tests run correctly
Here is recap of the steps I took
cvs -d :pserver:[EMAIL PROTECTED]:/cvs/castor login
cvs -d :pserver:[EMAIL PROTECTED]:/cvs/castor checkout castor
cd $
Arnaud:
D'accord...
just finished downloading will let you know.
chris
- Original Message -
From: "Arnaud Blandin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 16, 2002 11:38 PM
Subject: Re: [castor-dev] question about java primitive types to wrapper
You can use a mapping from a war. Just put the mapping files in
the classpath and retrieve it the way you would a properties file
--On Tuesday, December 17, 2002 2:10 PM -0500 Tim Holloway
<[EMAIL PROTECTED]> wrote:
Personally, I was stopped dead in the water because there was no
easy way to
Tim,
Are there issues that are unique to putting the mapping files in a war that
differ from putting them in a jar and grabbing via a classloader? We
deployed ours in the jar with no problems -
Margaret
-Original Message-
From: Tim Holloway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, Decemb
I agree. I have Castor working on multiple platforms ( Solaris, Linux,
Windows ) and with multiple app servers (Tomcat , WebSphere).
- Original Message -
From: "Bruce Snyder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 2:41 PM
Subject: Re: [castor-dev] Here
Keith Koski wrote:
however, i get a SAX exception when i try to unmarshal a file. i.e.
"Text data found as child of: "
i've attached a jar file of the code. what am i doing wrong? is it
because i'm using a mapping file?
my apologies, my mapping file is incomplete.
i added the following fragm
This one time, at band camp, Tim Holloway said:
TH>Personally, I was stopped dead in the water because there was no easy way to
TH>use a mapping from a WAR. I admit to some personal self-interest here,
TH>but that really DOES seem to me to be a critical need if you want Castor to
TH>be seen as a p
21 matches
Mail list logo