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/08/27 18:54:20 UTC
[jira] Updated: (AXIS-1534) Misleading and confusing "null serializer factory specified" message
The following issue has been updated:
Updater: Niall Smart (mailto:niall@pobox.com)
Date: Fri, 27 Aug 2004 9:53 AM
Comment:
BaseSerializerFactory/BaseDeserializerFactory should not ignore exceptions.
Changes:
Attachment changed to NullSerializerFactory.patch
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXIS-1534?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1534
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1534
Summary: Misleading and confusing "null serializer factory specified" message
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
Serialization/Deserialization
Versions:
1.1
Assignee:
Reporter: Niall Smart
Created: Fri, 27 Aug 2004 9:52 AM
Updated: Fri, 27 Aug 2004 9:53 AM
Description:
When a required class is not in Axis' CLASSPATH the deployment can fail with the useless and misleading error message: "null serializer factory specified". The stack trace gives no hint as to the root cause or missing class.
In detail, the scenario is:
1) a beanMapping is specified for acme.SomeClass in the deploy WSDD.
2) acme.SomeClass references acme.OtherClass, however no beanMapping element is present for this (possibly because it is only used internally by acme.SomeClass).
3) acme.SomeClass is present in Axis' CLASSPATH
4) acme.OtherClass is not present in Axis' CLASSPATH.
The sequence of events in the code is:
1) At some stage Axis calls Class.forName("acme.SomeClass") when it sees the the beanMapping to verify that acme.SomeClass is in the CLASSPATH. This will succeed and return a new Class object (see more detail below).
2) WSDDService.deployTypeMapping() calls BaseSerializerFactory.createFactory() [line 549]
3) BaseSerializerFactory.createFactory() instantiates a BeanSerializerFactory [line 257]
4) BeanSerializerFactory's constructor calls JavaUtils.isEnumClass() [line 81]
5) JavaUtils.isEnumClass() calls Class.getMethod() [line 985], at this point a NoClassDefFoundError is thrown by the JVM, because acme.OtherClass is not in the CLASSPATH.
6) BaseSerializerFactory catches and ignores the exception and returns null.
7) TypeMappingImpl.register() throws a exception because the serializer factory passed to it is null, this is the source of the "null serializer factory specified" message.
The solution is that BaseSerializerFactory should not ignore exceptions. I am attaching a patch which causes IllegalAccessException, InstantiationException and InvocationTargetException to be propagated to the caller.
It would be really nice to see this in Axis 1.2! It has been brought up on the mailing list several times.
---------------------------------------------------------------------
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