You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/04 20:43:32 UTC
[jira] Created: (AXIS-1585) npe after using SerializationContext one-arg constructor
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1585
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1585
Summary: npe after using SerializationContext one-arg constructor
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
Versions:
1.1RC1
Assignee:
Reporter: toby cabot
Created: Mon, 4 Oct 2004 11:42 AM
Updated: Mon, 4 Oct 2004 11:42 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
axis cvs as of 2004-10-04
Description:
Hi.
I'm working on an application that needs to serialize trees of wsdl2java-generated objects e.g. to write them to disk as XML documents. I'm using code that looks like:
Writer out = new FileWriter("build/ECReport-test.xml");
SerializationContext ser = new SerializationContext(out);
ser.setPretty(true);
ser.serialize(new QName("ECReport"), new AttributesImpl(), output, null, false, Boolean.FALSE);
out.flush();
out.close();
When I tried running the code it didn't serialize, so I looked at SerializationContext and found a bug in getSerializerFromClass().
try {
Method method = javaType.getMethod(
SERIALIZER_METHOD, SERIALIZER_CLASSES);
if (method != null) {
serializer = (Serializer) method.invoke(null,
new Object[] {msgContext.getEncodingStyle(), javaType, qname});
}
} catch (Exception e) {
}
Because msgContext is null the call to msgContext.getEncodingStyle() will cause a NullPointerException. The NPE was being thrown away because of the catch(Exception e). I'll attach a patch that fixes this, and one downstream bug in BeanSerializer and seems to work for me.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1585) npe after using SerializationContext one-arg constructor
Posted by ax...@ws.apache.org.
The following issue has been updated:
Updater: Davanum Srinivas (mailto:davanum@gmail.com)
Date: Thu, 14 Oct 2004 1:14 PM
Comment:
1.1RC1 -> 1.2RC1
Changes:
Fix Version changed to 1.2RC1
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXIS-1585?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1585
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1585
Summary: npe after using SerializationContext one-arg constructor
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
Fix Fors:
1.2RC1
Versions:
1.1RC1
Assignee:
Reporter: toby cabot
Created: Mon, 4 Oct 2004 11:42 AM
Updated: Thu, 14 Oct 2004 1:14 PM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
axis cvs as of 2004-10-04
Description:
Hi.
I'm working on an application that needs to serialize trees of wsdl2java-generated objects e.g. to write them to disk as XML documents. I'm using code that looks like:
Writer out = new FileWriter("build/ECReport-test.xml");
SerializationContext ser = new SerializationContext(out);
ser.setPretty(true);
ser.serialize(new QName("ECReport"), new AttributesImpl(), output, null, false, Boolean.FALSE);
out.flush();
out.close();
When I tried running the code it didn't serialize, so I looked at SerializationContext and found a bug in getSerializerFromClass().
try {
Method method = javaType.getMethod(
SERIALIZER_METHOD, SERIALIZER_CLASSES);
if (method != null) {
serializer = (Serializer) method.invoke(null,
new Object[] {msgContext.getEncodingStyle(), javaType, qname});
}
} catch (Exception e) {
}
Because msgContext is null the call to msgContext.getEncodingStyle() will cause a NullPointerException. The NPE was being thrown away because of the catch(Exception e). I'll attach a patch that fixes this, and one downstream bug in BeanSerializer and seems to work for me.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS-1585) npe after using SerializationContext one-arg constructor
Posted by ax...@ws.apache.org.
The following issue has been updated:
Updater: toby cabot (mailto:toby@caboteria.org)
Date: Mon, 4 Oct 2004 11:45 AM
Comment:
patch to SerializationContext and BeanSerializer
Changes:
Attachment changed to axis-npe-patch.txt
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXIS-1585?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1585
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1585
Summary: npe after using SerializationContext one-arg constructor
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
Versions:
1.1RC1
Assignee:
Reporter: toby cabot
Created: Mon, 4 Oct 2004 11:42 AM
Updated: Mon, 4 Oct 2004 11:45 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
axis cvs as of 2004-10-04
Description:
Hi.
I'm working on an application that needs to serialize trees of wsdl2java-generated objects e.g. to write them to disk as XML documents. I'm using code that looks like:
Writer out = new FileWriter("build/ECReport-test.xml");
SerializationContext ser = new SerializationContext(out);
ser.setPretty(true);
ser.serialize(new QName("ECReport"), new AttributesImpl(), output, null, false, Boolean.FALSE);
out.flush();
out.close();
When I tried running the code it didn't serialize, so I looked at SerializationContext and found a bug in getSerializerFromClass().
try {
Method method = javaType.getMethod(
SERIALIZER_METHOD, SERIALIZER_CLASSES);
if (method != null) {
serializer = (Serializer) method.invoke(null,
new Object[] {msgContext.getEncodingStyle(), javaType, qname});
}
} catch (Exception e) {
}
Because msgContext is null the call to msgContext.getEncodingStyle() will cause a NullPointerException. The NPE was being thrown away because of the catch(Exception e). I'll attach a patch that fixes this, and one downstream bug in BeanSerializer and seems to work for me.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Closed: (AXIS-1585) npe after using SerializationContext one-arg constructor
Posted by ax...@ws.apache.org.
Message:
The following issue has been closed.
Resolver: Davanum Srinivas
Date: Thu, 14 Oct 2004 1:32 PM
Applied Patch.
thanks,
dims
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1585
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1585
Summary: npe after using SerializationContext one-arg constructor
Type: Bug
Status: Closed
Priority: Major
Resolution: FIXED
Project: Axis
Components:
Serialization/Deserialization
Fix Fors:
1.2RC1
Versions:
1.1RC1
Assignee:
Reporter: toby cabot
Created: Mon, 4 Oct 2004 11:42 AM
Updated: Thu, 14 Oct 2004 1:32 PM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
axis cvs as of 2004-10-04
Description:
Hi.
I'm working on an application that needs to serialize trees of wsdl2java-generated objects e.g. to write them to disk as XML documents. I'm using code that looks like:
Writer out = new FileWriter("build/ECReport-test.xml");
SerializationContext ser = new SerializationContext(out);
ser.setPretty(true);
ser.serialize(new QName("ECReport"), new AttributesImpl(), output, null, false, Boolean.FALSE);
out.flush();
out.close();
When I tried running the code it didn't serialize, so I looked at SerializationContext and found a bug in getSerializerFromClass().
try {
Method method = javaType.getMethod(
SERIALIZER_METHOD, SERIALIZER_CLASSES);
if (method != null) {
serializer = (Serializer) method.invoke(null,
new Object[] {msgContext.getEncodingStyle(), javaType, qname});
}
} catch (Exception e) {
}
Because msgContext is null the call to msgContext.getEncodingStyle() will cause a NullPointerException. The NPE was being thrown away because of the catch(Exception e). I'll attach a patch that fixes this, and one downstream bug in BeanSerializer and seems to work for me.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-1585) npe after using SerializationContext one-arg constructor
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: toby cabot
Created: Mon, 4 Oct 2004 11:47 AM
Body:
looks as if I picked the wrong "affects-version." it should be 1.2RC1, but I can't figure out how to change it.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXIS-1585?page=comments#action_53680
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1585
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1585
Summary: npe after using SerializationContext one-arg constructor
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
Versions:
1.1RC1
Assignee:
Reporter: toby cabot
Created: Mon, 4 Oct 2004 11:42 AM
Updated: Mon, 4 Oct 2004 11:47 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
axis cvs as of 2004-10-04
Description:
Hi.
I'm working on an application that needs to serialize trees of wsdl2java-generated objects e.g. to write them to disk as XML documents. I'm using code that looks like:
Writer out = new FileWriter("build/ECReport-test.xml");
SerializationContext ser = new SerializationContext(out);
ser.setPretty(true);
ser.serialize(new QName("ECReport"), new AttributesImpl(), output, null, false, Boolean.FALSE);
out.flush();
out.close();
When I tried running the code it didn't serialize, so I looked at SerializationContext and found a bug in getSerializerFromClass().
try {
Method method = javaType.getMethod(
SERIALIZER_METHOD, SERIALIZER_CLASSES);
if (method != null) {
serializer = (Serializer) method.invoke(null,
new Object[] {msgContext.getEncodingStyle(), javaType, qname});
}
} catch (Exception e) {
}
Because msgContext is null the call to msgContext.getEncodingStyle() will cause a NullPointerException. The NPE was being thrown away because of the catch(Exception e). I'll attach a patch that fixes this, and one downstream bug in BeanSerializer and seems to work for me.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira