hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <Richard.Hens...@McKesson.com>
Subject RE: A question about an error message
Date Wed, 04 May 2005 21:51:42 GMT
Ok, I was unable to create a test case that shows the error I was having
because it was not what I thought it was. What I found was the following
method in the class BuilderPropertyFacet:

public boolean isAssignableToType(ServiceImplementationFactoryParameters
factoryParameters,
            Class targetType)
    {
        try
        {
            // TODO should Translator declare an analoguous
isAssignableToType method?
            Object facetValue = getFacetValue(factoryParameters,
targetType);

            if (facetValue == null)
                return !targetType.isPrimitive();

            return ConstructorUtils.isCompatible(targetType,
facetValue.getClass());
        }
        catch (ApplicationRuntimeException e)
        {
            return false;
        }
    }

That eat's the ApplicationRuntimeException by returning false. It turns out
that the error that occurs is something that I needed to debug the problem.

I'm not sure what can be done about this, but it was sure hard to find my
confiruation problem.

Richard 

-----Original Message-----
From: Hensley, Richard [mailto:Richard.Hensley@McKesson.com] 
Sent: Wednesday, May 04, 2005 2:41 PM
To: hivemind-user@jakarta.apache.org
Subject: RE: A question about an error message

I'm working on a unit test case now. It has to do with bean services that
are abstract classes for the interface and they instantiate a sub class. The
line

                if (!facet.isAssignableToType(_factoryParameters,
parameterTypes[i]))
                    continue outer;

Is returning false in that case. I think it is just a to bad situation.

Richard

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Wednesday, May 04, 2005 2:21 PM
To: hivemind-user@jakarta.apache.org
Subject: RE: A question about an error message

Richard, 

Back up a bit.  Where are you at in the code?  Please give a specific
example of what you're doing.  

James


-----Original Message-----
From: Hensley, Richard [mailto:Richard.Hensley@McKesson.com] 
Sent: Wednesday, May 04, 2005 5:05 PM
To: hivemind-user@jakarta.apache.org
Subject: A question about an error message


This method

    private Object instantiateExplicitConstructorInstance(Class
serviceClass, List builderParameters)

Throws this exception when bad things happen, is this the correct message.
I've been trying to figure out why autowiring was begin done, when I figured
out that it is not, the error message is just misleading.

        throw new
ApplicationRuntimeException(ServiceMessages.unableToFindAutowireConstructor(
),
                _parameter.getLocation(), null);

I think it should be something like, unable to find explicit constructor.


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message