axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Created: (AXIS-1534) Misleading and confusing "null serializer factory specified" message
Date Fri, 27 Aug 2004 16:52:20 GMT

  A new issue has been created in JIRA.

View the issue:

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

   Reporter: Niall Smart

    Created: Fri, 27 Aug 2004 9:52 AM
    Updated: Fri, 27 Aug 2004 9:52 AM


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.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message