Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E482E11770 for ; Thu, 24 Apr 2014 06:51:36 +0000 (UTC) Received: (qmail 62441 invoked by uid 500); 24 Apr 2014 06:51:33 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 60985 invoked by uid 500); 24 Apr 2014 06:51:20 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 60486 invoked by uid 99); 24 Apr 2014 06:51:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 06:51:15 +0000 Date: Thu, 24 Apr 2014 06:51:15 +0000 (UTC) From: "Prashant Pandey (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AXIS2-5474) DefaultSchemaGenerator : properly handle failure when a bean property has no getReadMethod() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-5474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13979362#comment-13979362 ] Prashant Pandey commented on AXIS2-5474: ---------------------------------------- Hi Mark, I am facing same issue, I took updated kernel.jar now it shoes me property name and class name, my property is of type java String how can I avoid this error, thanks in advance > DefaultSchemaGenerator : properly handle failure when a bean property has no getReadMethod() > -------------------------------------------------------------------------------------------- > > Key: AXIS2-5474 > URL: https://issues.apache.org/jira/browse/AXIS2-5474 > Project: Axis2 > Issue Type: Improvement > Components: kernel > Affects Versions: 1.6.2 > Reporter: Philippe Le Berre > Priority: Trivial > Labels: patch > Attachments: patch.diff > > > Deployment of service (aar file) might failed with : > Caused by: org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: null > at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:396) > ... 35 more > Caused by: java.lang.NullPointerException > at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.generateSchema(DefaultSchemaGenerator.java:606) > at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.generateSchemaTypeforNameCommon(DefaultSchemaGenerator.java:1092) > In which the getReadMethod() is returning null for a bean property, thus to make it more friendly and avoid anyone loosing time on such things : > --- DefaultSchemaGenerator.java 2013-01-08 10:09:33.000000000 +0100 > +++ DefaultSchemaGenerator.java.new 2013-01-08 10:09:17.000000000 +0100 > @@ -603,6 +603,9 @@ > String propertyName = property.getName(); > if (!property.getName().equals("class") && (property.getPropertyType() != null)) { > if ((beanExcludeInfo == null) || !beanExcludeInfo.isExcludedProperty(propertyName)) { > + if (property.getReadMethod() == null) { > + throw new Exception("Failed property ("+property.getName()+") has no getReadMethod() method in Class ("+javaType+")"); > + } > Type genericFieldType = property.getReadMethod().getGenericReturnType(); > if(genericFieldType instanceof ParameterizedType){ > ParameterizedType aType = (ParameterizedType) genericFieldType; -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org