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/10/22 22:12:27 UTC
[jira] Created: (AXIS-1617) WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1617
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1617
Summary: WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Versions:
beta-2
Assignee:
Reporter: Sébastien Tardif
Created: Fri, 22 Oct 2004 1:11 PM
Updated: Fri, 22 Oct 2004 1:11 PM
Environment: cvs updated 9/23/2004
Description:
Here the parameter sent to wsdl2Java and the stack trace:
[axis-wsdl2java] WSDL2Java C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Parsing XML file: C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
[axis-wsdl2java] verbose:true
[axis-wsdl2java] debug:true
[axis-wsdl2java] quiet:false
[axis-wsdl2java] server-side:true
[axis-wsdl2java] skeletonDeploy:false
[axis-wsdl2java] helperGen:false
[axis-wsdl2java] factory:null
[axis-wsdl2java] nsIncludes:[]
[axis-wsdl2java] nsExcludes:[]
[axis-wsdl2java] factoryProps:[]
[axis-wsdl2java] testCase:true
[axis-wsdl2java] noImports:false
[axis-wsdl2java] NStoPkg:{}
[axis-wsdl2java] output:C:\docHarborWebServices\srcGenerated
[axis-wsdl2java] protocolHandlerPkgs:
[axis-wsdl2java] deployScope:Application
[axis-wsdl2java] URL:C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] all:true
[axis-wsdl2java] typeMappingVersion:1.1
[axis-wsdl2java] timeout:-1
[axis-wsdl2java] failOnNetworkErrors:false
[axis-wsdl2java] printStackTraceOnFailure:true
[axis-wsdl2java] namespaceMappingFile:null
[axis-wsdl2java] username:null
[axis-wsdl2java] :passwordnull
[axis-wsdl2java] :noWrappedfalse
[axis-wsdl2java] :implementationClassNamenull
[axis-wsdl2java] :classpathnull
[axis-wsdl2java] http.proxyHost=null
[axis-wsdl2java] http.proxyPort=null
[axis-wsdl2java] http.proxyUser=null
[axis-wsdl2java] http.proxyPassword=null
[axis-wsdl2java] socks.proxyHost=null
[axis-wsdl2java] socks.proxyPort=null
[axis-wsdl2java] java.lang.NullPointerException
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2876)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2556)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2465)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
[axis-wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
[axis-wsdl2java] at java.lang.Thread.run(Thread.java:534)
The problem is that typeEntry is null, meaning it doesn't find the Part it expecting.
An error message giving the Mime component and the part that it doesn't find should be provided.
private Use addMIMETypes(
BindingEntry bEntry, MIMEMultipartRelated mpr, Operation op)
throws IOException {
Use bodyType = Use.ENCODED;
List parts = mpr.getMIMEParts();
Iterator i = parts.iterator();
while (i.hasNext()) {
MIMEPart part = (MIMEPart) i.next();
List elems = part.getExtensibilityElements();
Iterator j = elems.iterator();
while (j.hasNext()) {
Object obj = j.next();
if (obj instanceof MIMEContent) {
MIMEContent content = (MIMEContent) obj;
TypeEntry typeEntry = findPart(op, content.getPart());
String dims = typeEntry.getDimensions();
if ((dims.length() <= 0)
&& (typeEntry.getRefType() != null)) {
Node node = typeEntry.getRefType().getNode();
if (getInnerCollectionComponentQName(node) != null) {
dims += "[]";
}
}
---------------------------------------------------------------------
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
[jira] Resolved: (AXIS-1617) WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-1617?page=history ]
Davanum Srinivas resolved AXIS-1617:
------------------------------------
Resolution: Fixed
Fixed. Thanks.
-- dims
> WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
> -------------------------------------------------------------------------------------------
>
> Key: AXIS-1617
> URL: http://issues.apache.org/jira/browse/AXIS-1617
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: beta-2
> Environment: cvs updated 9/23/2004
> Reporter: Sébastien Tardif
> Attachments: docHarbor.wsdl
>
> Here the parameter sent to wsdl2Java and the stack trace:
> [axis-wsdl2java] WSDL2Java C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java] Parsing XML file: C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
> [axis-wsdl2java] verbose:true
> [axis-wsdl2java] debug:true
> [axis-wsdl2java] quiet:false
> [axis-wsdl2java] server-side:true
> [axis-wsdl2java] skeletonDeploy:false
> [axis-wsdl2java] helperGen:false
> [axis-wsdl2java] factory:null
> [axis-wsdl2java] nsIncludes:[]
> [axis-wsdl2java] nsExcludes:[]
> [axis-wsdl2java] factoryProps:[]
> [axis-wsdl2java] testCase:true
> [axis-wsdl2java] noImports:false
> [axis-wsdl2java] NStoPkg:{}
> [axis-wsdl2java] output:C:\docHarborWebServices\srcGenerated
> [axis-wsdl2java] protocolHandlerPkgs:
> [axis-wsdl2java] deployScope:Application
> [axis-wsdl2java] URL:C:\docHarborWebServices/etc/docHarbor.wsdl
> [axis-wsdl2java] all:true
> [axis-wsdl2java] typeMappingVersion:1.1
> [axis-wsdl2java] timeout:-1
> [axis-wsdl2java] failOnNetworkErrors:false
> [axis-wsdl2java] printStackTraceOnFailure:true
> [axis-wsdl2java] namespaceMappingFile:null
> [axis-wsdl2java] username:null
> [axis-wsdl2java] :passwordnull
> [axis-wsdl2java] :noWrappedfalse
> [axis-wsdl2java] :implementationClassNamenull
> [axis-wsdl2java] :classpathnull
> [axis-wsdl2java] http.proxyHost=null
> [axis-wsdl2java] http.proxyPort=null
> [axis-wsdl2java] http.proxyUser=null
> [axis-wsdl2java] http.proxyPassword=null
> [axis-wsdl2java] socks.proxyHost=null
> [axis-wsdl2java] socks.proxyPort=null
> [axis-wsdl2java] java.lang.NullPointerException
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2876)
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2556)
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2465)
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
> [axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
> [axis-wsdl2java] at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
> [axis-wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
> [axis-wsdl2java] at java.lang.Thread.run(Thread.java:534)
> The problem is that typeEntry is null, meaning it doesn't find the Part it expecting.
> An error message giving the Mime component and the part that it doesn't find should be provided.
>
> private Use addMIMETypes(
> BindingEntry bEntry, MIMEMultipartRelated mpr, Operation op)
> throws IOException {
> Use bodyType = Use.ENCODED;
> List parts = mpr.getMIMEParts();
> Iterator i = parts.iterator();
> while (i.hasNext()) {
> MIMEPart part = (MIMEPart) i.next();
> List elems = part.getExtensibilityElements();
> Iterator j = elems.iterator();
> while (j.hasNext()) {
> Object obj = j.next();
> if (obj instanceof MIMEContent) {
> MIMEContent content = (MIMEContent) obj;
> TypeEntry typeEntry = findPart(op, content.getPart());
> String dims = typeEntry.getDimensions();
> if ((dims.length() <= 0)
> && (typeEntry.getRefType() != null)) {
> Node node = typeEntry.getRefType().getNode();
> if (getInnerCollectionComponentQName(node) != null) {
> dims += "[]";
> }
> }
--
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
[jira] Updated: (AXIS-1617) WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Posted by ax...@ws.apache.org.
The following issue has been updated:
Updater: Sébastien Tardif (mailto:at925@freenet.carleton.ca)
Date: Fri, 22 Oct 2004 1:13 PM
Changes:
Attachment changed to docHarbor.wsdl
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXIS-1617?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1617
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1617
Summary: WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Versions:
beta-2
Assignee:
Reporter: Sébastien Tardif
Created: Fri, 22 Oct 2004 1:11 PM
Updated: Fri, 22 Oct 2004 1:13 PM
Environment: cvs updated 9/23/2004
Description:
Here the parameter sent to wsdl2Java and the stack trace:
[axis-wsdl2java] WSDL2Java C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Parsing XML file: C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
[axis-wsdl2java] verbose:true
[axis-wsdl2java] debug:true
[axis-wsdl2java] quiet:false
[axis-wsdl2java] server-side:true
[axis-wsdl2java] skeletonDeploy:false
[axis-wsdl2java] helperGen:false
[axis-wsdl2java] factory:null
[axis-wsdl2java] nsIncludes:[]
[axis-wsdl2java] nsExcludes:[]
[axis-wsdl2java] factoryProps:[]
[axis-wsdl2java] testCase:true
[axis-wsdl2java] noImports:false
[axis-wsdl2java] NStoPkg:{}
[axis-wsdl2java] output:C:\docHarborWebServices\srcGenerated
[axis-wsdl2java] protocolHandlerPkgs:
[axis-wsdl2java] deployScope:Application
[axis-wsdl2java] URL:C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] all:true
[axis-wsdl2java] typeMappingVersion:1.1
[axis-wsdl2java] timeout:-1
[axis-wsdl2java] failOnNetworkErrors:false
[axis-wsdl2java] printStackTraceOnFailure:true
[axis-wsdl2java] namespaceMappingFile:null
[axis-wsdl2java] username:null
[axis-wsdl2java] :passwordnull
[axis-wsdl2java] :noWrappedfalse
[axis-wsdl2java] :implementationClassNamenull
[axis-wsdl2java] :classpathnull
[axis-wsdl2java] http.proxyHost=null
[axis-wsdl2java] http.proxyPort=null
[axis-wsdl2java] http.proxyUser=null
[axis-wsdl2java] http.proxyPassword=null
[axis-wsdl2java] socks.proxyHost=null
[axis-wsdl2java] socks.proxyPort=null
[axis-wsdl2java] java.lang.NullPointerException
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2876)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2556)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2465)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
[axis-wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
[axis-wsdl2java] at java.lang.Thread.run(Thread.java:534)
The problem is that typeEntry is null, meaning it doesn't find the Part it expecting.
An error message giving the Mime component and the part that it doesn't find should be provided.
private Use addMIMETypes(
BindingEntry bEntry, MIMEMultipartRelated mpr, Operation op)
throws IOException {
Use bodyType = Use.ENCODED;
List parts = mpr.getMIMEParts();
Iterator i = parts.iterator();
while (i.hasNext()) {
MIMEPart part = (MIMEPart) i.next();
List elems = part.getExtensibilityElements();
Iterator j = elems.iterator();
while (j.hasNext()) {
Object obj = j.next();
if (obj instanceof MIMEContent) {
MIMEContent content = (MIMEContent) obj;
TypeEntry typeEntry = findPart(op, content.getPart());
String dims = typeEntry.getDimensions();
if ((dims.length() <= 0)
&& (typeEntry.getRefType() != null)) {
Node node = typeEntry.getRefType().getNode();
if (getInnerCollectionComponentQName(node) != null) {
dims += "[]";
}
}
---------------------------------------------------------------------
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
[jira] Commented: (AXIS-1617) WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: Sébastien Tardif
Created: Fri, 22 Oct 2004 2:02 PM
Body:
Here the patch:
RCS file: /home/cvspublic/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
retrieving revision 1.107
diff -r1.107 SymbolTable.java
2881a2882,2885
> if (typeEntry == null )
> {
> throw new RuntimeException("Cannot find part [" + content.getPart() +"] for operation ["+ op.getName() +"] using MIMEContent type [" + content.getType() +"]");
> }
Now the stack look much better.
[axis-wsdl2java] java.lang.RuntimeException: Cannot find part [document] for operation [importDocumentAsAttachment] using MIMEContent type [application/octet-stream]
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2884)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2562)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2471)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
[axis-wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
[axis-wsdl2java] at java.lang.Thread.run(Thread.java:534)
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXIS-1617?page=comments#action_54513
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-1617
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-1617
Summary: WSDL2Java throw NullPointerException instead of useful error message when doesn't find Part
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis
Components:
WSDL processing
Versions:
beta-2
Assignee:
Reporter: Sébastien Tardif
Created: Fri, 22 Oct 2004 1:11 PM
Updated: Fri, 22 Oct 2004 2:02 PM
Environment: cvs updated 9/23/2004
Description:
Here the parameter sent to wsdl2Java and the stack trace:
[axis-wsdl2java] WSDL2Java C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Parsing XML file: C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] Running Wsdl2javaAntTask with parameters:
[axis-wsdl2java] verbose:true
[axis-wsdl2java] debug:true
[axis-wsdl2java] quiet:false
[axis-wsdl2java] server-side:true
[axis-wsdl2java] skeletonDeploy:false
[axis-wsdl2java] helperGen:false
[axis-wsdl2java] factory:null
[axis-wsdl2java] nsIncludes:[]
[axis-wsdl2java] nsExcludes:[]
[axis-wsdl2java] factoryProps:[]
[axis-wsdl2java] testCase:true
[axis-wsdl2java] noImports:false
[axis-wsdl2java] NStoPkg:{}
[axis-wsdl2java] output:C:\docHarborWebServices\srcGenerated
[axis-wsdl2java] protocolHandlerPkgs:
[axis-wsdl2java] deployScope:Application
[axis-wsdl2java] URL:C:\docHarborWebServices/etc/docHarbor.wsdl
[axis-wsdl2java] all:true
[axis-wsdl2java] typeMappingVersion:1.1
[axis-wsdl2java] timeout:-1
[axis-wsdl2java] failOnNetworkErrors:false
[axis-wsdl2java] printStackTraceOnFailure:true
[axis-wsdl2java] namespaceMappingFile:null
[axis-wsdl2java] username:null
[axis-wsdl2java] :passwordnull
[axis-wsdl2java] :noWrappedfalse
[axis-wsdl2java] :implementationClassNamenull
[axis-wsdl2java] :classpathnull
[axis-wsdl2java] http.proxyHost=null
[axis-wsdl2java] http.proxyPort=null
[axis-wsdl2java] http.proxyUser=null
[axis-wsdl2java] http.proxyPassword=null
[axis-wsdl2java] socks.proxyHost=null
[axis-wsdl2java] socks.proxyPort=null
[axis-wsdl2java] java.lang.NullPointerException
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.addMIMETypes(SymbolTable.java:2876)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.fillInBindingInfo(SymbolTable.java:2556)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2465)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:732)
[axis-wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:531)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
[axis-wsdl2java] at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
[axis-wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
[axis-wsdl2java] at java.lang.Thread.run(Thread.java:534)
The problem is that typeEntry is null, meaning it doesn't find the Part it expecting.
An error message giving the Mime component and the part that it doesn't find should be provided.
private Use addMIMETypes(
BindingEntry bEntry, MIMEMultipartRelated mpr, Operation op)
throws IOException {
Use bodyType = Use.ENCODED;
List parts = mpr.getMIMEParts();
Iterator i = parts.iterator();
while (i.hasNext()) {
MIMEPart part = (MIMEPart) i.next();
List elems = part.getExtensibilityElements();
Iterator j = elems.iterator();
while (j.hasNext()) {
Object obj = j.next();
if (obj instanceof MIMEContent) {
MIMEContent content = (MIMEContent) obj;
TypeEntry typeEntry = findPart(op, content.getPart());
String dims = typeEntry.getDimensions();
if ((dims.length() <= 0)
&& (typeEntry.getRefType() != null)) {
Node node = typeEntry.getRefType().getNode();
if (getInnerCollectionComponentQName(node) != null) {
dims += "[]";
}
}
---------------------------------------------------------------------
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