simple-support Mailing List for Simple (Page 62)
Brought to you by:
niallg
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(13) |
May
(13) |
Jun
(27) |
Jul
(4) |
Aug
(14) |
Sep
(7) |
Oct
|
Nov
(6) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
(15) |
May
(24) |
Jun
(24) |
Jul
(30) |
Aug
(5) |
Sep
(19) |
Oct
(27) |
Nov
(16) |
Dec
(24) |
| 2009 |
Jan
(34) |
Feb
(24) |
Mar
(35) |
Apr
(26) |
May
(8) |
Jun
(17) |
Jul
(28) |
Aug
(31) |
Sep
(36) |
Oct
(35) |
Nov
(20) |
Dec
(16) |
| 2010 |
Jan
(40) |
Feb
(21) |
Mar
(47) |
Apr
(45) |
May
(34) |
Jun
(68) |
Jul
(46) |
Aug
(39) |
Sep
(47) |
Oct
(20) |
Nov
(42) |
Dec
(13) |
| 2011 |
Jan
(41) |
Feb
(16) |
Mar
(32) |
Apr
(44) |
May
(28) |
Jun
(35) |
Jul
(37) |
Aug
(33) |
Sep
(60) |
Oct
(20) |
Nov
(35) |
Dec
(23) |
| 2012 |
Jan
(34) |
Feb
(23) |
Mar
(34) |
Apr
(21) |
May
(48) |
Jun
(24) |
Jul
(31) |
Aug
(39) |
Sep
(25) |
Oct
(10) |
Nov
(27) |
Dec
(28) |
| 2013 |
Jan
(32) |
Feb
(24) |
Mar
(24) |
Apr
(9) |
May
(4) |
Jun
(6) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
(12) |
| 2014 |
Jan
(14) |
Feb
(16) |
Mar
(5) |
Apr
(3) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
(6) |
Oct
|
Nov
(6) |
Dec
|
| 2015 |
Jan
(3) |
Feb
(15) |
Mar
(7) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
|
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Barrie S. <bs...@ri...> - 2009-08-07 13:55:53
|
How do you control the output date format. I'd like to have just 2009-01-01, but the default is 2009-11-01 16:51:33.203 EST Thanks, Barrie The most important thing in communication is hearing What isn't being said. Anonymous Disclaimer: This e-mail message is intended only for the personal use of the recipient(s) named above. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message. This e-mail expresses views only of the sender, which are not to be attributed to Rite Aid Corporation and may not be copied or distributed without this statement. |
|
From: <nia...@rb...> - 2009-08-07 07:09:46
|
Hi,
In the class Primitive.java change the following
private Object readElement(InputNode node, Instance value) throws Exception {
Object result = read(node, field);
if(result != null) {
value.setInstance(result);
}
return result;
}
To
private Object readElement(InputNode node, Instance value) throws Exception {
Object result = read(node, field);
if(value != null) {
value.setInstance(result);
}
return result;
}
It will work then.
Niall
Niall Gallagher
RBS Global Banking & Markets
Office: +44 7879498724
-----Original Message-----
From: Timo Rumland [mailto:cr...@ol...]
Sent: 02 August 2009 22:14
To: Niall Gallagher
Cc: GALLAGHER, Niall, GBM; Johannes Ohlemacher; sim...@li...
Subject: Re: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found
Hi Niall,
> Ya, could be something like that. Whats most annoying about this is
> that if works without issue on a Mac with Java 1.6, but on windows it
> does not work for 1.6. Just plain odd.
I'm glad you were able to reproduce the problem.
This is actually a weird thing... to do some debugging, we added some logger instructions to the code. Before that, the missing ref was always "100" - after adding the logger lines, suddenly the missing ref was "65". How can some lines of logger code change the error- behavior? I don't know...
If I can help in any way, please say so.
Thanks a lot
Regards,
Timo
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority.
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: Timo R. <cr...@ol...> - 2009-08-05 22:04:04
|
Hello Niall, I just wanted to ask, could you make some progress with the deserialization-bug under windows? I really need to get that fixed, I tried to debug the thing myself, but to be honest, I don't quite understand all the code yet so it is hard for me to help out. I need to finish a project in about 10 days which relies on SimpleXML. But when we can't find a reason for that bug and fix it, I must find another solution and replace Simple with another technology, what I really don't want to. Can you make any assumptions on when you may isolate the problem? When I can do anything to help you debug it, or when I can try something out for you, please say so. Thanks a lot Best regards, Timo |
|
From: Timo R. <tim...@di...> - 2009-08-05 21:14:02
|
Hello Niall, I just wanted to ask, could you make some progress with the deserialization-bug under windows? I really need to get that fixed, I tried to debug the thing myself, but to be honest, I don't quite understand all the code yet so it is hard for me to help out. I need to finish a project in about 10 days which relies on SimpleXML. But when we can't find a reason for that bug and fix it, I must find another solution and replace Simple with another technology, what I really don't want to. Can you make any assumptions on when you may isolate the problem? When I can do anything to help you debug it, or when I can try something out for you, please say so. Thanks a lot Best regards, Timo |
|
From: Niall G. <gal...@ya...> - 2009-08-05 17:42:10
|
Hi, If anyone can think of any more exceptions that are particularly cryptic then let me know and I will expand on the message. Thanks, Niall --- On Wed, 8/5/09, Rob Griffin <rob...@qu...> wrote: > From: Rob Griffin <rob...@qu...> > Subject: [Simple-support] Simple doesn't provide enough context when an error occurs > To: "sim...@li..." <sim...@li...> > Date: Wednesday, August 5, 2009, 2:14 AM > Hello, > > Niall, in general we are very happy with Simple, it works > really well for what we are doing; storing quite complex > system configuration. > > However sometime we come across issue where Simple could be > improved. > > Here is one such case: > > We got this exception: > > org.simpleframework.xml.core.TextException: Value for > @org.simpleframework.xml.Text(data=false, empty=, > required=true) on field 'key' is null > at > org.simpleframework.xml.core.Composite.writeText(Composite.java:908) > at > org.simpleframework.xml.core.Composite.write(Composite.java:761) > at > org.simpleframework.xml.core.Composite.write(Composite.java:736) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:217) > at > org.simpleframework.xml.core.CompositeList.write(CompositeList.java:211) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) > at > org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) > at > org.simpleframework.xml.core.Composite.write(Composite.java:760) > at > org.simpleframework.xml.core.Composite.write(Composite.java:736) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:217) > at > org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) > at > org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) > at > org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) > at > org.simpleframework.xml.core.Composite.write(Composite.java:760) > at > org.simpleframework.xml.core.Composite.write(Composite.java:736) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:217) > at > org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) > at > org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) > at > org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) > at > org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) > at > org.simpleframework.xml.core.Composite.write(Composite.java:760) > at > org.simpleframework.xml.core.Composite.write(Composite.java:736) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:217) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:190) > at > org.simpleframework.xml.core.Traverser.write(Traverser.java:168) > at > org.simpleframework.xml.core.Persister.write(Persister.java:921) > at > org.simpleframework.xml.core.Persister.write(Persister.java:903) > at > org.simpleframework.xml.core.Persister.write(Persister.java:884) > at > org.simpleframework.xml.core.Persister.write(Persister.java:1000) > at > com.quest.adk.util.xml.SimpleXMLUtils.toString(SimpleXMLUtils.java:79) > at > com.quest.adk.util.xml.SimpleXMLUtils.toXML(SimpleXMLUtils.java:92) > .... etc. > > My problem with this exception is that there is > insufficient context to be able to quickly pinpoint the > problem. We have a large number of classes that we serialize > with Simple, several of which have a key field. Could the > error message be expanded to include the class whose field > is incorrect? That would be really helpful. > > Thanks, > > > Rob Griffin > Quest Software > > www.quest.com > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Smith, M. (BRS) <Mat...@bl...> - 2009-08-05 12:25:20
|
Hi Niall, I just wanted to pipe up and add my support for this. I recently tried to replace my use of JAXB with Simple, but I had to give up because it was taking too long to figure out all the little issues I was having, similar to what Mr. Griffin is talking about. Having more informative errors would almost certainly give me the courage to try again. Keep up the stellar work. -Matthew -----Original Message----- From: nia...@rb... [mailto:nia...@rb...] Sent: Wednesday, August 05, 2009 5:43 AM To: rob...@qu...; sim...@li... Subject: Re: [Simple-support] Simple doesn't provide enough context whenan error occurs Hi, Ya, sure Ill make sure to add this. Niall Niall Gallagher RBS Global Banking & Markets Office: +44 7879498724 -----Original Message----- From: Rob Griffin [mailto:rob...@qu...] Sent: 05 August 2009 10:15 To: sim...@li... Subject: [Simple-support] Simple doesn't provide enough context when an error occurs Hello, Niall, in general we are very happy with Simple, it works really well for what we are doing; storing quite complex system configuration. However sometime we come across issue where Simple could be improved. Here is one such case: We got this exception: org.simpleframework.xml.core.TextException: Value for @org.simpleframework.xml.Text(data=false, empty=, required=true) on field 'key' is null at org.simpleframework.xml.core.Composite.writeText(Composite.java:908) at org.simpleframework.xml.core.Composite.write(Composite.java:761) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeList.write(CompositeList.java:211) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineLi st.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineLi st.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineLi st.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineLi st.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.Traverser.write(Traverser.java:190) at org.simpleframework.xml.core.Traverser.write(Traverser.java:168) at org.simpleframework.xml.core.Persister.write(Persister.java:921) at org.simpleframework.xml.core.Persister.write(Persister.java:903) at org.simpleframework.xml.core.Persister.write(Persister.java:884) at org.simpleframework.xml.core.Persister.write(Persister.java:1000) at com.quest.adk.util.xml.SimpleXMLUtils.toString(SimpleXMLUtils.java:79) at com.quest.adk.util.xml.SimpleXMLUtils.toXML(SimpleXMLUtils.java:92) .... etc. My problem with this exception is that there is insufficient context to be able to quickly pinpoint the problem. We have a large number of classes that we serialize with Simple, several of which have a key field. Could the error message be expanded to include the class whose field is incorrect? That would be really helpful. Thanks, Rob Griffin Quest Software www.quest.com ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support ************************************************************************ *********** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com ************************************************************************ *********** ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof. |
|
From: <nia...@rb...> - 2009-08-05 09:43:18
|
Hi, Ya, sure Ill make sure to add this. Niall Niall Gallagher RBS Global Banking & Markets Office: +44 7879498724 -----Original Message----- From: Rob Griffin [mailto:rob...@qu...] Sent: 05 August 2009 10:15 To: sim...@li... Subject: [Simple-support] Simple doesn't provide enough context when an error occurs Hello, Niall, in general we are very happy with Simple, it works really well for what we are doing; storing quite complex system configuration. However sometime we come across issue where Simple could be improved. Here is one such case: We got this exception: org.simpleframework.xml.core.TextException: Value for @org.simpleframework.xml.Text(data=false, empty=, required=true) on field 'key' is null at org.simpleframework.xml.core.Composite.writeText(Composite.java:908) at org.simpleframework.xml.core.Composite.write(Composite.java:761) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeList.write(CompositeList.java:211) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.Traverser.write(Traverser.java:190) at org.simpleframework.xml.core.Traverser.write(Traverser.java:168) at org.simpleframework.xml.core.Persister.write(Persister.java:921) at org.simpleframework.xml.core.Persister.write(Persister.java:903) at org.simpleframework.xml.core.Persister.write(Persister.java:884) at org.simpleframework.xml.core.Persister.write(Persister.java:1000) at com.quest.adk.util.xml.SimpleXMLUtils.toString(SimpleXMLUtils.java:79) at com.quest.adk.util.xml.SimpleXMLUtils.toXML(SimpleXMLUtils.java:92) .... etc. My problem with this exception is that there is insufficient context to be able to quickly pinpoint the problem. We have a large number of classes that we serialize with Simple, several of which have a key field. Could the error message be expanded to include the class whose field is incorrect? That would be really helpful. Thanks, Rob Griffin Quest Software www.quest.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
|
From: Rob G. <rob...@qu...> - 2009-08-05 09:27:49
|
Hello, Niall, in general we are very happy with Simple, it works really well for what we are doing; storing quite complex system configuration. However sometime we come across issue where Simple could be improved. Here is one such case: We got this exception: org.simpleframework.xml.core.TextException: Value for @org.simpleframework.xml.Text(data=false, empty=, required=true) on field 'key' is null at org.simpleframework.xml.core.Composite.writeText(Composite.java:908) at org.simpleframework.xml.core.Composite.write(Composite.java:761) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeList.write(CompositeList.java:211) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:257) at org.simpleframework.xml.core.CompositeInlineList.write(CompositeInlineList.java:235) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:983) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:964) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:854) at org.simpleframework.xml.core.Composite.write(Composite.java:760) at org.simpleframework.xml.core.Composite.write(Composite.java:736) at org.simpleframework.xml.core.Traverser.write(Traverser.java:217) at org.simpleframework.xml.core.Traverser.write(Traverser.java:190) at org.simpleframework.xml.core.Traverser.write(Traverser.java:168) at org.simpleframework.xml.core.Persister.write(Persister.java:921) at org.simpleframework.xml.core.Persister.write(Persister.java:903) at org.simpleframework.xml.core.Persister.write(Persister.java:884) at org.simpleframework.xml.core.Persister.write(Persister.java:1000) at com.quest.adk.util.xml.SimpleXMLUtils.toString(SimpleXMLUtils.java:79) at com.quest.adk.util.xml.SimpleXMLUtils.toXML(SimpleXMLUtils.java:92) .... etc. My problem with this exception is that there is insufficient context to be able to quickly pinpoint the problem. We have a large number of classes that we serialize with Simple, several of which have a key field. Could the error message be expanded to include the class whose field is incorrect? That would be really helpful. Thanks, Rob Griffin Quest Software www.quest.com |
|
From: Niall G. <gal...@ya...> - 2009-08-04 06:10:50
|
Hi, Yes this is very easy to do. I will post an example on the tutorial because I get quite a few questions on this very topic. Ill let the mailing list know when the tutorial is online. Thanks, Niall --- On Mon, 8/3/09, Herz, Erich <Eri...@cm...> wrote: > From: Herz, Erich <Eri...@cm...> > Subject: [Simple-support] Simplifying the XML when using polymorphism > To: "sim...@li..." <sim...@li...> > Date: Monday, August 3, 2009, 2:55 PM > > > > > > > > > > Hi, > > I am using Simple for the configuration of a tool > I’m developing. While Simple was not necessarily > designed for configuration, I find it easily provides me > flexibility that would otherwise be difficult to > implement. For instance, defining nested > objects. > I am using polymorphism in the objects that are being > deserialized, but this makes writing configurations > non-intuitive for users so I’d like to simplify this > process. For example, here’s a filter definition > that nests two other filters with “and” > logic: > > > <filter > class="full.package.path.to.AndFilter"> > > <filter1 > class=”full.package.path.to.FilterA”> > > <regex>.*blah.*</regex> > > </filter1> > > <filter2 > class=”full.package.path.to.FilterB”> > > <regex>.*blah.*</regex> > > </filter2> > > </filter> > > > Is there any way to have Simple determine what class > to instantiate based on the uniqueness of the names > used? For instance, I’d like to do something > like this: > > > <and> > > <filterA> > > <regex>.*blah.*</regex> > > </filterA> > > <filterB> > > <regex>.*blah.*</regex> > > </filterB> > > </and> > > This would be much more intuitive and much easier to > read. The only solution I can think of right now is to > provide shorter package paths. Any help you can > provide is appreciated. > > Thanks, > > -Erich > > > > > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > -----Inline Attachment Follows----- > > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Herz, E. <Eri...@cm...> - 2009-08-03 22:32:06
|
Hi,
I am using Simple for the configuration of a tool I'm developing. While Simple was not necessarily designed for configuration, I find it easily provides me flexibility that would otherwise be difficult to implement. For instance, defining nested objects. I am using polymorphism in the objects that are being deserialized, but this makes writing configurations non-intuitive for users so I'd like to simplify this process. For example, here's a filter definition that nests two other filters with "and" logic:
<filter class="full.package.path.to.AndFilter">
<filter1 class="full.package.path.to.FilterA">
<regex>.*blah.*</regex>
</filter1>
<filter2 class="full.package.path.to.FilterB">
<regex>.*blah.*</regex>
</filter2>
</filter>
Is there any way to have Simple determine what class to instantiate based on the uniqueness of the names used? For instance, I'd like to do something like this:
<and>
<filterA>
<regex>.*blah.*</regex>
</filterA>
<filterB>
<regex>.*blah.*</regex>
</filterB>
</and>
This would be much more intuitive and much easier to read. The only solution I can think of right now is to provide shorter package paths. Any help you can provide is appreciated.
Thanks,
-Erich
|
|
From: Timo R. <cr...@ol...> - 2009-08-02 21:14:32
|
Hi Niall, > Ya, could be something like that. Whats most annoying about this is > that if works without issue on a Mac with Java 1.6, but on windows > it does not work for 1.6. Just plain odd. I'm glad you were able to reproduce the problem. This is actually a weird thing... to do some debugging, we added some logger instructions to the code. Before that, the missing ref was always "100" - after adding the logger lines, suddenly the missing ref was "65". How can some lines of logger code change the error- behavior? I don't know... If I can help in any way, please say so. Thanks a lot Regards, Timo |
|
From: Niall G. <gal...@ya...> - 2009-08-02 13:52:31
|
Hi, Ya, could be something like that. Whats most annoying about this is that if works without issue on a Mac with Java 1.6, but on windows it does not work for 1.6. Just plain odd. I will look in to it. Niall --- On Sun, 8/2/09, Timo Rumland <tim...@di...> wrote: > From: Timo Rumland <tim...@di...> > Subject: Re: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found > To: nia...@rb... > Cc: "Johannes Ohlemacher" <joh...@di...>, sim...@li... > Date: Sunday, August 2, 2009, 2:00 AM > Hallo Niall, > > after further debugging, we came up with some understanding > of what > might be the bug. Please see again the problematic > XML-part: > > ------------ > [...] > <r2:protocolChangeLog xid="97"> > <r2:mission xref="0"/> > <r2:time xid="98">2009-07-28 > 20:18:17.360 CEST</r2:time> > <r2:property > xid="99">person.title</r2:property> > <r2:value xid="100"></r2:value> > </r2:protocolChangeLog> > [...] > <r2:protocolChangeLog xid="129"> > <r2:mission xref="0"/> > <r2:time xid="130">2009-07-28 > 20:18:19.112 CEST</r2:time> > <r2:property xref="99"/> > <r2:value xref="100"/> > </r2:protocolChangeLog> > [...] > ------------ > > > The line "<r2:value xid="100"></r2:value>" of > SimpleXML's point of > view is "null". We saw that by adding some debug lines to > the method > > xml.core.Primitive.readElement > > The point is, that the result of the line > > "Object result = read(node, field)" > > returns null for the the xid="100". > > We now think that the "null" can't be added correctly to > the > "lookup-map" (class ReadGraph, where the keys are stored) > and thus > can't be read to lookup the value for that key/ref during > the > deserialization process. > > These are just ideas, we can't tell exactly what happens > here. > > Another thing is, that we discovered a missing "xid" in > the > problematic XML file, so there was a xref="152" with an > xid="152", > maybe there is a problem with the serialization process > also. > > > I hope we could help a bit with those informations > > > Thanks a lot > > > Best regards, > Timo > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Timo R. <tim...@di...> - 2009-08-02 09:13:55
|
Hallo Niall,
after further debugging, we came up with some understanding of what
might be the bug. Please see again the problematic XML-part:
------------
[...]
<r2:protocolChangeLog xid="97">
<r2:mission xref="0"/>
<r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time>
<r2:property xid="99">person.title</r2:property>
<r2:value xid="100"></r2:value>
</r2:protocolChangeLog>
[...]
<r2:protocolChangeLog xid="129">
<r2:mission xref="0"/>
<r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time>
<r2:property xref="99"/>
<r2:value xref="100"/>
</r2:protocolChangeLog>
[...]
------------
The line "<r2:value xid="100"></r2:value>" of SimpleXML's point of
view is "null". We saw that by adding some debug lines to the method
xml.core.Primitive.readElement
The point is, that the result of the line
"Object result = read(node, field)"
returns null for the the xid="100".
We now think that the "null" can't be added correctly to the
"lookup-map" (class ReadGraph, where the keys are stored) and thus
can't be read to lookup the value for that key/ref during the
deserialization process.
These are just ideas, we can't tell exactly what happens here.
Another thing is, that we discovered a missing "xid" in the
problematic XML file, so there was a xref="152" with an xid="152",
maybe there is a problem with the serialization process also.
I hope we could help a bit with those informations
Thanks a lot
Best regards,
Timo
|
|
From: Timo R. <cr...@ol...> - 2009-08-02 09:10:45
|
Hello again, a small correction to my last email: > Another thing is, that we discovered a missing "xid" in the > problematic XML file, so there was a xref="152" with an xid="152", > maybe there is a problem with the serialization process also. of course I meant "so there was a xref="152" WITHOUT an xid="152" " Best regards, Timo |
|
From: Timo R. <cr...@ol...> - 2009-08-02 09:03:46
|
Hallo Niall,
(sorry, the first mail came wrong the wrong email address)
after further debugging, we came up with some understanding of what
might be the bug. Please see again the problematic XML-part:
------------
[...]
<r2:protocolChangeLog xid="97">
<r2:mission xref="0"/>
<r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time>
<r2:property xid="99">person.title</r2:property>
<r2:value xid="100"></r2:value>
</r2:protocolChangeLog>
[...]
<r2:protocolChangeLog xid="129">
<r2:mission xref="0"/>
<r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time>
<r2:property xref="99"/>
<r2:value xref="100"/>
</r2:protocolChangeLog>
[...]
------------
The line "<r2:value xid="100"></r2:value>" of SimpleXML's point of
view is "null". We saw that by adding some debug lines to the method
xml.core.Primitive.readElement
The point is, that the result of the line
"Object result = read(node, field)"
returns null for the the xid="100".
We now think that the "null" can't be added correctly to the
"lookup-map" (class ReadGraph, where the keys are stored) and thus
can't be read to lookup the value for that key/ref during the
deserialization process.
These are just ideas, we can't tell exactly what happens here.
Another thing is, that we discovered a missing "xid" in the
problematic XML file, so there was a xref="152" with an xid="152",
maybe there is a problem with the serialization process also.
I hope we could help a bit with those informations
Thanks a lot
Best regards,
Timo
|
|
From: Timo R. <cr...@ol...> - 2009-07-31 20:28:53
|
Hello Niall,
> I will look in to it. For now, a _hack_ that would work would be to
> "return null" instead of throwning the exception for the missing
> reference.
were you able to make some progress? We could isolate some XML data and
can safely reproduce the error / exception. Somehow, SimpleXML is not
able to find a XML reference as desdribed... I'm using Java 1.6.0_14,
and I tried Simple versions 2.0.4 and 2.1.2.
> You should download the source and modify the CycleStrategy to dump
> out calls to getElement in the ReadGraph.java object. In the method
>
> public Value getElement(Class field, NodeMap node) throws Exception {
>
> Add the following line.
>
> [...]
> This will show the callbacks in to the strategy. It should show the
> references you mention. If it does not then there may be a problem.
We did modifiy the source code. The problematic xml ref was '100', and
the exception was:
Exception in thread "main" org.simpleframework.xml.strategy.CycleException: Invalid reference '100' found
The last lines of my output looks like this:
[...]
value: xid=128
protocolChangeLog: xid=129
einsatz: xref=0
time: xid=130
property: xref=99
value: xref=100
Exactly after this line the exception is thrown, please see the
stack trace:
-------------
Exception in thread "main" org.simpleframework.xml.strategy.CycleException: Invalid reference '100' found
at org.simpleframework.xml.strategy.ReadGraph.getReference(ReadGraph.java:158)
at org.simpleframework.xml.strategy.ReadGraph.getInstance(ReadGraph.java:125)
at org.simpleframework.xml.strategy.ReadGraph.getElement(ReadGraph.java:106)
at org.simpleframework.xml.strategy.CycleStrategy.getElement(CycleStrategy.java:205)
[...]
-------------
> I will look in to it. For now, a _hack_ that would work would be to
> "return null" instead of throwning the exception for the missing
> reference.
If we return null instead of throwing the exception, the
deserialization process finishes without any error. But what are the
exact consequences of this? Shouldn't we expcet the deserialized
object to be in an "invalid" state or that some data is missing?
Thanks a lot for your help
Regards,
Timo
|
|
From: <nia...@rb...> - 2009-07-30 15:16:41
|
Hi, I will look in to it. For now, a _hack_ that would work would be to "return null" instead of throwning the exception for the missing reference. Niall Niall Gallagher RBS Global Banking & Markets Office: +44 7879498724 -----Original Message----- From: Timo Rumland [mailto:cr...@ol...] Sent: 30 July 2009 15:57 To: GALLAGHER, Niall, GBM Cc: sim...@li... Subject: Re: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found Hallo Niall, > Looks like this breaks on a 1.6 VM, which is strange. I will look a > little closer in to this, and provide a fix that works with 1.5 and > 1.6. yes I'm using Java 1.6.0_13 and _14. Can you already confirm that this is a bug? Did you find something? (I had no time up to now to use the source code and inspect the xid and xref tags.) It would be really great if you are able to identify the problem, and maybe even fix it soon or, if you have no time to build a new releae, just say where I can fix the problem in the source code. Thanks a lot for your help Regards, Timo > Niall > Niall Gallagher > RBS Global Banking & Markets > Office: +44 7879498724 > -----Original Message----- > From: Timo Rumland [mailto:cr...@ol...] > Sent: 29 July 2009 22:04 > To: GALLAGHER, Niall, GBM > Cc: sim...@li... > Subject: Re: [Simple-support] Problem with deserializing, > CycleException: Invalid reference '100' found > Hello Niall, >> You should download the source and modify the CycleStrategy to dump >> out calls to getElement .... >> [...] > I really appreciate your help, I'm a bit under pressure right now to > get that working. I used SimpleXML for a long time now and never had such problems. > I will definitively do what you suggested. I think I can do it > tomorrow, and see what the output of the code is. > Perhaps it is possible for me to isolate the program code, write a > small example app to demonstrate the problem. > Until then, thanks a lot for your help, I will post the result from > the source code modification soon. > Regards, > Timo > ********************************************************************** > ************* The Royal Bank of Scotland plc. Registered in Scotland > No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc does not accept responsibility > for changes made to this message after it was sent. > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward transmission, opening or use of this message and any > attachments will not adversely affect its systems or data. No > responsibility is accepted by The Royal Bank of Scotland plc in this > regard and the recipient should carry out such virus and other checks > as it considers appropriate. > Visit our website at www.rbs.com > ********************************************************************** > ************* Beste Grüße, Timo |
|
From: Timo R. <cr...@ol...> - 2009-07-30 14:58:51
|
Hallo Niall, > Looks like this breaks on a 1.6 VM, which is strange. I will look a > little closer in to this, and provide a fix that works with 1.5 and > 1.6. yes I'm using Java 1.6.0_13 and _14. Can you already confirm that this is a bug? Did you find something? (I had no time up to now to use the source code and inspect the xid and xref tags.) It would be really great if you are able to identify the problem, and maybe even fix it soon or, if you have no time to build a new releae, just say where I can fix the problem in the source code. Thanks a lot for your help Regards, Timo > Niall > Niall Gallagher > RBS Global Banking & Markets > Office: +44 7879498724 > -----Original Message----- > From: Timo Rumland [mailto:cr...@ol...] > Sent: 29 July 2009 22:04 > To: GALLAGHER, Niall, GBM > Cc: sim...@li... > Subject: Re: [Simple-support] Problem with deserializing, > CycleException: Invalid reference '100' found > Hello Niall, >> You should download the source and modify the CycleStrategy to dump >> out calls to getElement .... >> [...] > I really appreciate your help, I'm a bit under pressure right now > to get that working. I used SimpleXML for a long time now and never had such problems. > I will definitively do what you suggested. I think I can do it > tomorrow, and see what the output of the code is. > Perhaps it is possible for me to isolate the program code, write a > small example app to demonstrate the problem. > Until then, thanks a lot for your help, I will post the result from > the source code modification soon. > Regards, > Timo > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. > > This e-mail message is confidential and for use by the > addressee only. If the message is received by anyone other > than the addressee, please return the message to the sender > by replying to it and then delete the message from your > computer. Internet e-mails are not necessarily secure. The > Royal Bank of Scotland plc does not accept responsibility for > changes made to this message after it was sent. > Whilst all reasonable care has been taken to avoid the > transmission of viruses, it is the responsibility of the recipient to > ensure that the onward transmission, opening or use of this > message and any attachments will not adversely affect its > systems or data. No responsibility is accepted by The > Royal Bank of Scotland plc in this regard and the recipient should carry > out such virus and other checks as it considers appropriate. > Visit our website at www.rbs.com > *********************************************************************************** Beste Grüße, Timo |
|
From: <nia...@rb...> - 2009-07-30 11:13:18
|
Hi, Looks like this breaks on a 1.6 VM, which is strange. I will look a little closer in to this, and provide a fix that works with 1.5 and 1.6. Niall Niall Gallagher RBS Global Banking & Markets Office: +44 7879498724 -----Original Message----- From: Timo Rumland [mailto:cr...@ol...] Sent: 29 July 2009 22:04 To: GALLAGHER, Niall, GBM Cc: sim...@li... Subject: Re: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found Hello Niall, > You should download the source and modify the CycleStrategy to dump > out calls to getElement .... > [...] I really appreciate your help, I'm a bit under pressure right now to get that working. I used SimpleXML for a long time now and never had such problems. I will definitively do what you suggested. I think I can do it tomorrow, and see what the output of the code is. Perhaps it is possible for me to isolate the program code, write a small example app to demonstrate the problem. Until then, thanks a lot for your help, I will post the result from the source code modification soon. Regards, Timo *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
|
From: Timo R. <cr...@ol...> - 2009-07-29 21:04:33
|
Hello Niall, > You should download the source and modify the CycleStrategy to dump > out calls to getElement .... > [...] I really appreciate your help, I'm a bit under pressure right now to get that working. I used SimpleXML for a long time now and never had such problems. I will definitively do what you suggested. I think I can do it tomorrow, and see what the output of the code is. Perhaps it is possible for me to isolate the program code, write a small example app to demonstrate the problem. Until then, thanks a lot for your help, I will post the result from the source code modification soon. Regards, Timo |
|
From: <nia...@rb...> - 2009-07-29 13:52:34
|
Hi,
You should download the source and modify the CycleStrategy to dump out calls to getElement in the ReadGraph.java object. In the method
public Value getElement(Class field, NodeMap node) throws Exception {
Add the following line.
Node xid = node.get("xid");
Node xref = node.get("xref");
if(xid != null) {
System.err.println(node.getName() + ": "+xid.getName() "=" +xid.getValue());
}
if(xref != null) {
System.err.println(node.getName() + ": "+xref.getName() "=" +xref.getValue());
}
This will show the callbacks in to the strategy. It should show the references you mention. If it does not then there may be a problem.
Niall Gallagher
RBS Global Banking & Markets
Office: +44 7879498724
-----Original Message-----
From: GALLAGHER, Niall, GBM
Sent: 29 July 2009 13:40
To: 'Timo Rumland'; sim...@li...
Subject: RE: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found
Hi,
This problem should be fixed in Simple 2.0.4 and above. What version are you deserializing with?
Niall
Niall Gallagher
RBS Global Banking & Markets
Office: +44 7879498724
-----Original Message-----
From: Timo Rumland [mailto:cr...@ol...]
Sent: 29 July 2009 13:02
To: sim...@li...
Subject: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found
Hello Niall,
I have an urgend problem with the deserialization process and I really hope you can help me with this. Please, have a look at this part of my XML (which was serialized with SimpleXML 2.0.4):
------------
[...]
<r2:protocolChangeLog xid="97">
<r2:mission xref="0"/>
<r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time>
<r2:property xid="99">person.title</r2:property>
<r2:value xid="100"></r2:value>
</r2:protocolChangeLog>
[...]
<r2:protocolChangeLog xid="129">
<r2:mission xref="0"/>
<r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time>
<r2:property xref="99"/>
<r2:value xref="100"/>
</r2:protocolChangeLog>
[...]
------------
I use CyclicStrategy and the id and reference tags are named "xid" and "xref".
When I now try to deserialize the XML above (the complete XML of course, not only that part), I get the following exception:
-------------
org.simpleframework.xml.graph.CycleException: Invalid reference '100' found
at org.simpleframework.xml.graph.ReadGraph.getReference(ReadGraph.java:158)
at org.simpleframework.xml.graph.ReadGraph.getInstance(ReadGraph.java:126)
at org.simpleframework.xml.graph.ReadGraph.getElement(ReadGraph.java:107)
at org.simpleframework.xml.graph.CycleStrategy.getElement(CycleStrategy.java:189)
-------------
Why is the reference '100' invalid? The "xid=100" comes before the "xref=100", and the xid=100 is not missing. What is the problem here?
Another example is this part of the XML:
-------------
[...]
<r2:doc xid="75">
<r2:mission xref="0"/>
<r2:person xid="76">
<r2:forename xid="77"></r2:forename>
</r2:person>
<r2:art xid="78">KOSTENANERKENNUNG</r2:art>
<r2:signature xref="77"/>
</r2:doc>
[...]
-------------
Also with this example, SimpleXML throws the same exception, this time with "Invalid reference '77' found". But you can clearly see that there IS the xid=77 present, both attributes are of type String.
Now is is hard for me to provide example code, since it ais part of a really big project. And it is also hard to reproduce the problem, until now I can't tell exactly under which conditions the exception is thrown. Unfortunately, it is a functionality that must work tomorrow... so it is kind of urgend to find a solution...
I hope you have any idea how to solve this or what to do to identify the problem.
I really appreciate your help!
Regards,
Timo
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority.
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: Timo R. <cr...@ol...> - 2009-07-29 13:42:08
|
Hello Niall, > This problem should be fixed in Simple 2.0.4 and above. What version > are you deserializing with? thanks a lot for your answer. I am serializing and deserializing with the same Version, with 2.0.4. Is there a chance, that this bug may not be solved in 2.0.4? Can I do anythink to help to identify the problem? I have the complete XML file that causes the error, but i'm not allowed to send it to you. I'll try anythink you say to help. Thanks a lot! Regards, Timo > Subject: [Simple-support] Problem with deserializing, > CycleException: Invalid reference '100' found > Hello Niall, > I have an urgend problem with the deserialization process and I > really hope you can help me with this. Please, have a look at this > part of my XML (which was serialized with SimpleXML 2.0.4): > ------------ > [...] > <r2:protocolChangeLog xid="97"> > <r2:mission xref="0"/> > <r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time> > <r2:property xid="99">person.title</r2:property> > <r2:value xid="100"></r2:value> > </r2:protocolChangeLog> > [...] > <r2:protocolChangeLog xid="129"> > <r2:mission xref="0"/> > <r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time> > <r2:property xref="99"/> > <r2:value xref="100"/> > </r2:protocolChangeLog> > [...] > ------------ > I use CyclicStrategy and the id and reference tags are named "xid" and "xref". > When I now try to deserialize the XML above (the complete XML of > course, not only that part), I get the following exception: > ------------- > org.simpleframework.xml.graph.CycleException: Invalid reference '100' found > at > org.simpleframework.xml.graph.ReadGraph.getReference(ReadGraph.java:158) > at > org.simpleframework.xml.graph.ReadGraph.getInstance(ReadGraph.java:126) > at > org.simpleframework.xml.graph.ReadGraph.getElement(ReadGraph.java:107) > at > org.simpleframework.xml.graph.CycleStrategy.getElement(CycleStrategy.java:189) > ------------- > Why is the reference '100' invalid? The "xid=100" comes before the > "xref=100", and the xid=100 is not missing. What is the problem here? > Another example is this part of the XML: > ------------- > [...] > <r2:doc xid="75"> > <r2:mission xref="0"/> > <r2:person xid="76"> > <r2:forename xid="77"></r2:forename> > </r2:person> > <r2:art xid="78">KOSTENANERKENNUNG</r2:art> > <r2:signature xref="77"/> > </r2:doc> > [...] > ------------- > Also with this example, SimpleXML throws the same exception, this > time with "Invalid reference '77' found". But you can clearly see > that there IS the xid=77 present, both attributes are of type String. > Now is is hard for me to provide example code, since it ais part of > a really big project. And it is also hard to reproduce the problem, > until now I can't tell exactly under which conditions the exception > is thrown. Unfortunately, it is a functionality that must work > tomorrow... so it is kind of urgend to find a solution... > I hope you have any idea how to solve this or what to do to identify the problem. > I really appreciate your help! > Regards, > Timo > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day trial. Simplify your report design, integration and > deployment - and focus on what you do best, core application coding. > Discover what's new with Crystal Reports now. > http://p.sf.net/sfu/bobj-july > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. > > This e-mail message is confidential and for use by the > addressee only. If the message is received by anyone other > than the addressee, please return the message to the sender > by replying to it and then delete the message from your > computer. Internet e-mails are not necessarily secure. The > Royal Bank of Scotland plc does not accept responsibility for > changes made to this message after it was sent. > Whilst all reasonable care has been taken to avoid the > transmission of viruses, it is the responsibility of the recipient to > ensure that the onward transmission, opening or use of this > message and any attachments will not adversely affect its > systems or data. No responsibility is accepted by The > Royal Bank of Scotland plc in this regard and the recipient should carry > out such virus and other checks as it considers appropriate. > Visit our website at www.rbs.com > *********************************************************************************** Beste Grüße, Timo |
|
From: <nia...@rb...> - 2009-07-29 12:40:14
|
Hi,
This problem should be fixed in Simple 2.0.4 and above. What version are you deserializing with?
Niall
Niall Gallagher
RBS Global Banking & Markets
Office: +44 7879498724
-----Original Message-----
From: Timo Rumland [mailto:cr...@ol...]
Sent: 29 July 2009 13:02
To: sim...@li...
Subject: [Simple-support] Problem with deserializing, CycleException: Invalid reference '100' found
Hello Niall,
I have an urgend problem with the deserialization process and I really hope you can help me with this. Please, have a look at this part of my XML (which was serialized with SimpleXML 2.0.4):
------------
[...]
<r2:protocolChangeLog xid="97">
<r2:mission xref="0"/>
<r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time>
<r2:property xid="99">person.title</r2:property>
<r2:value xid="100"></r2:value>
</r2:protocolChangeLog>
[...]
<r2:protocolChangeLog xid="129">
<r2:mission xref="0"/>
<r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time>
<r2:property xref="99"/>
<r2:value xref="100"/>
</r2:protocolChangeLog>
[...]
------------
I use CyclicStrategy and the id and reference tags are named "xid" and "xref".
When I now try to deserialize the XML above (the complete XML of course, not only that part), I get the following exception:
-------------
org.simpleframework.xml.graph.CycleException: Invalid reference '100' found
at org.simpleframework.xml.graph.ReadGraph.getReference(ReadGraph.java:158)
at org.simpleframework.xml.graph.ReadGraph.getInstance(ReadGraph.java:126)
at org.simpleframework.xml.graph.ReadGraph.getElement(ReadGraph.java:107)
at org.simpleframework.xml.graph.CycleStrategy.getElement(CycleStrategy.java:189)
-------------
Why is the reference '100' invalid? The "xid=100" comes before the "xref=100", and the xid=100 is not missing. What is the problem here?
Another example is this part of the XML:
-------------
[...]
<r2:doc xid="75">
<r2:mission xref="0"/>
<r2:person xid="76">
<r2:forename xid="77"></r2:forename>
</r2:person>
<r2:art xid="78">KOSTENANERKENNUNG</r2:art>
<r2:signature xref="77"/>
</r2:doc>
[...]
-------------
Also with this example, SimpleXML throws the same exception, this time with "Invalid reference '77' found". But you can clearly see that there IS the xid=77 present, both attributes are of type String.
Now is is hard for me to provide example code, since it ais part of a really big project. And it is also hard to reproduce the problem, until now I can't tell exactly under which conditions the exception is thrown. Unfortunately, it is a functionality that must work tomorrow... so it is kind of urgend to find a solution...
I hope you have any idea how to solve this or what to do to identify the problem.
I really appreciate your help!
Regards,
Timo
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority.
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: Timo R. <cr...@ol...> - 2009-07-29 12:28:03
|
Hello Niall,
I have an urgend problem with the deserialization process and I really
hope you can help me with this. Please, have a look at this part of my
XML (which was serialized with SimpleXML 2.0.4):
------------
[...]
<r2:protocolChangeLog xid="97">
<r2:mission xref="0"/>
<r2:time xid="98">2009-07-28 20:18:17.360 CEST</r2:time>
<r2:property xid="99">person.title</r2:property>
<r2:value xid="100"></r2:value>
</r2:protocolChangeLog>
[...]
<r2:protocolChangeLog xid="129">
<r2:mission xref="0"/>
<r2:time xid="130">2009-07-28 20:18:19.112 CEST</r2:time>
<r2:property xref="99"/>
<r2:value xref="100"/>
</r2:protocolChangeLog>
[...]
------------
I use CyclicStrategy and the id and reference tags are named "xid" and
"xref".
When I now try to deserialize the XML above (the complete XML of
course, not only that part), I get the following exception:
-------------
org.simpleframework.xml.graph.CycleException: Invalid reference '100' found
at org.simpleframework.xml.graph.ReadGraph.getReference(ReadGraph.java:158)
at org.simpleframework.xml.graph.ReadGraph.getInstance(ReadGraph.java:126)
at org.simpleframework.xml.graph.ReadGraph.getElement(ReadGraph.java:107)
at org.simpleframework.xml.graph.CycleStrategy.getElement(CycleStrategy.java:189)
-------------
Why is the reference '100' invalid? The "xid=100" comes before the
"xref=100", and the xid=100 is not missing. What is the problem here?
Another example is this part of the XML:
-------------
[...]
<r2:doc xid="75">
<r2:mission xref="0"/>
<r2:person xid="76">
<r2:forename xid="77"></r2:forename>
</r2:person>
<r2:art xid="78">KOSTENANERKENNUNG</r2:art>
<r2:signature xref="77"/>
</r2:doc>
[...]
-------------
Also with this example, SimpleXML throws the same exception, this time
with "Invalid reference '77' found". But you can clearly see that
there IS the xid=77 present, both attributes are of type String.
Now is is hard for me to provide example code, since it ais part of a
really big project. And it is also hard to reproduce the problem,
until now I can't tell exactly under which conditions the exception is
thrown. Unfortunately, it is a functionality that must work
tomorrow... so it is kind of urgend to find a solution...
I hope you have any idea how to solve this or what to do to identify
the problem.
I really appreciate your help!
Regards,
Timo
|
|
From: Joe K. <jpk...@gm...> - 2009-07-28 14:36:41
|
I have a class such as:
@Root
class Zoo {
@ElementList
private List<Animal> animals;
public interface Animal {}
public static class Dog implements Animal {}
public static class Cat implements Animal {}
}
I am trying to find a way to get this to unmarshal to this XML (or
something close - does not have to be exact):
<zoo>
<animals>
<dog/>
<cat/>
</animals>
</zoo>
Is there something I can do with either Strategy or Style to get this behavior?
Thanks.
BTW, I am really impressed with the design of this framework. I have
been evaluating JAXB, JiBX and others, but this is the has been the
most pleasant to work with.
|