axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1534) Misleading and confusing "null serializer factory specified" message
Date Fri, 27 Aug 2004 16:59:20 GMT
The following comment has been added to this issue:

     Author: Niall Smart
    Created: Fri, 27 Aug 2004 9:58 AM
       Body:
By the way, I could not run the unit tests -- the build system is too broken :(
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1534?page=comments#action_37858

---------------------------------------------------------------------
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:58 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


Mime
View raw message