Hi Ranjan,

thanks for creating the new issue.

A problem with to many open files has not been reported before. Maybe others do reuse their mapping as loading it needs a valueable amount of time. Could you please also fill a new issue for that problem.

Regards
Ralf


Ranjan Kumar Baisak schrieb:
Yes I created a JIRA issue for double name space problem.

http://jira.codehaus.org/browse/CASTOR-2105

There is another issue, I am facing with Castor 1.1.2.1 related to mapping file handling. Castor might not be closing all mapping files properly and I am getting IOException *Too Many Files Opened*. This generally occurs after marshallling too many files. Can you confirm whether this has been reported earlier?

- R

Werner Guttmann wrote:

Hi,

can you please create a new Jira issue at

http://jira.codehaus.org/browse/CASTOR

and attach the files there ?

Regards
Werner

Ranjan Kumar Baisak wrote:
To reproduce double name space problem, I have attached a simple java
file (Description.java) and mapping file (Description.xml). You can use
following code to get Description object converted to XML.


try
       {
           DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
           DocumentBuilder builder = factory.newDocumentBuilder();
                     Mapping mapping = new Mapping();
           mapping.setBaseURL("src/conf/mapping");
                     mapping.loadMapping("Description.xml");
           org.w3c.dom.Document document = builder.newDocument();
           Marshaller marshaller = new Marshaller(document);
           marshaller.setSuppressXSIType(true);
           marshaller.setMapping(mapping);
                     Description desc = new Description(1111,"This is
test");
                     marshaller.marshal(desc);
                     Document dom4jDoc = new DOMReader().read(document);
// this converts org.w3c.dom.Document to org.d4j.Document to extract
string XML
from Document

                     System.out.println(dom4jDoc.asXML());
                 }catch(Exception e)
       {
           e.printStackTrace();
       }

Let me know if you need any more information.



- R

Ralf Joachim wrote:
Can you provide us with a minimal test case to reproduce the problem
and the workaround / patch that you used to fix that with 0.9.6. I
hope this will help us to fix that namespace issue.

Are you able to tell us if the problem you faced with 0.9.6 (random
blank tags) still exists?

Ralf


Ranjan Kumar Baisak schrieb:
I just started upgrading to v 1.1.2.1 but faced issues related to
namespace (http://jira.codehaus.org/browse/CASTOR-201). I had a fix
in my code base for this JIRA issue and it was working perfectly for
me with v0.9.6. Now I am getting double namespace prefixed to all
elements with v 1.1.2.1 e.g.

<?xml version="1.0" encoding="UTF-8"?>
<YMIA:YMIA:Description xmlns:YMIA=""
xmlns:YMIA="urn:schemas-music-yamaha-com:ymia">

??

- R

Werner Guttmann wrote:

I'd appreciate an upgrade to at least 1.1 (or higher, if possible), as the XML class descriptor resolver has been rewritten/refactored, and as part of that work a few inconsistencies related to 'deducing' XML names
and class names have been fixed.

In other words, can you please re-test with 1.1. or higher, and let us
know whether the issue still happens to be around.

Regards
Werner

PS I'd hold back from creating a Jira issue for the time being, as
clearly Castor 0.9.6 is quite old, and a lot of time has gone into
maintaining and progressing Castor. So let's see what difference a
version upgrades makes (first).


Jim Manico wrote:
Bingo. This is the problem. Something to do with how Castor caches
objects in an inheritance hierarchy might still be flawed. Upgrade to
the latest version of Castor and see if you can repeat your
problem, if
so, please, file a JIRA issue with an exact test case. You are on to
something here, and it could help all of us using Castor.....

Yes lots of inheritance.

When using a inheritance with Castor, I was also getting a case
where
it maps differently each time I call that code. I did a "ant clean
compile", and that seemed to fix my problem - but out of curiosity,
does this mapping involve inheritance?

I generally use it in web-application so cannot do clean build
always.
What kind of inheritance do you use in your code base. If you can
paste some example then it would help me.

- R
Hello Gurus,
I some how getting some data lost problem when I
convert Java Objects to XML using Castor API v 0.9.6. Basically
I am
getting blank tags without any data. This is not happening always
rather randomly. Has anybody faced  such problem? Many times I
thought of replacing with latest build but due to some customized
wrappers which I have developed, I tend to use v 0.9.6 and also
I am
not sure whether this problem will get solved with latest
version. I
have already wasted days of work on debugging. I would appreciate
your valuable comments on this. Also ready to provide any
information that might help for suggestions.

- R

---------------------------------------------------------------------

To unsubscribe from this list please visit:

  http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------

To unsubscribe from this list please visit:

  http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

  http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

  http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to