the Synopsis says it all. Here are the details.
My team is working on Enterprise Pack portion of NetBeans preview release of 5.5
We execute a custom Ant Task in the NetBeans (Ant Task runs in the IDE VM); all works fine in JDK 1.5. We have been asked to try Mustang. I acquired Mustang from
http://download.java.net/download/jdk6/binaries/jdk-6-rc-bin-b70-windows-i586-02_feb_2006.exe
See Screen shot attachment of About Dialog in Netbeans FWIW.
While the NetBeans IDE bits come from a build in Prague, the rest of the Enterprise Pack comes from a local build on my Windows laptop with JDK 1.5.0-06 and the Ant Task in question and its dependent code is also built on my machine with JDK 1.5.0-06. The Ant Task function is to compile BPEL xml file. The compile function is processing a WSDL file too and from a WSDL4J object model of this WSDL is attempting to check whether a QName referring to a schema type is in fact a XML schema simple type. The solution which use APIs from
com.sun.org.apache.xerces.internal.xs.XSModel;
com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
The problem is that this is yielding the value 'false' in the caller yet trying to returning the value 'true'
XSTypeDefinition typeDef = _model.getTypeDefinition(type.getLocalPart(),
type.getNamespaceURI());
return (typeDef != null)
&& (typeDef.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE);
The debugger (see screen shots) not only shows that the Class 'typeDef' is
com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition
which is hardcoded to return
public short getTypeCategory () {
return SIMPLE_TYPE;
}
but Watch expressions show the return expression equaluating to 'true' to stipulate the logic of it all. How can a method return true but yield false in the calling code?
Simpler reproducable case:
"reproduce from command line without NetBeans just running Ant using Mustang"
1) Download and unzip PXE
http://balui.sfbay.sun.com/cache/CCRproto/fivesight_pxe/latest/pxe-200602020325.zip
whereever you unzip
pxe.home=<install-location>/intalio-pxe
2) grab CR attachment "CR_6381295_AltAsyncClient.zip" and unzip to
${pxe.home}/examples
(next to all the other examples like HelloWorld
you should have then
${pxe.home}/examples/AltAsyncClient
3) edit ${pxe.home}/examples/example.properties so that pxe.java.home is set to Mustang (actually this is not used in this case but its necessary to have the Ant Project run)
e.g.
pxe.java.home=C:\\java\\jdk\\jdk1.6.0-b70
4) set environment variable JAVA_HOME to mustang
5) cd to ${pxe.home}/examples/AltAsyncClient
6) run
ant bpelc
The indication of the bug is an error processing the BPEL Property extension in the WSDL file which results in this error message
${pxe.home}\examples\example-build.xml:45: The following error occurred while executing this line:
${pxe.home}\examples\example-build.xml:61: com.fs.pxe.bom.wsdl.PropertyImpl@2f8b5a: error: [Proper
tyDeclaredWithComplexType] PropertyDeclaredWithComplexType: {http://www.mycomp.org/AltAsyncClient}correlatorProp {http://www.w3.org/2001/XML
Schema}int {2} {3} {4} {5} {6} {7}
If you want to see the FLIPPED boolean in the debugger the src code to PXE is here
http://balui.sfbay.sun.com/cache/CCRproto/fivesight_pxe/latest/pxe-200602020325-src.zip
The two src files which frame the problem are
./utils/src/java/com/fs/utils/xsd/SchemaModelImpl.java
method: isSimpleType(QName)
line: 117 (return statement sends true)
./bpel-compiler/src/java/com/fs/pxe/bpel/compiler/BpelCompiler.java
method: compile(Property)
line: 732 yields false calling isSimpleType()
My team is working on Enterprise Pack portion of NetBeans preview release of 5.5
We execute a custom Ant Task in the NetBeans (Ant Task runs in the IDE VM); all works fine in JDK 1.5. We have been asked to try Mustang. I acquired Mustang from
http://download.java.net/download/jdk6/binaries/jdk-6-rc-bin-b70-windows-i586-02_feb_2006.exe
See Screen shot attachment of About Dialog in Netbeans FWIW.
While the NetBeans IDE bits come from a build in Prague, the rest of the Enterprise Pack comes from a local build on my Windows laptop with JDK 1.5.0-06 and the Ant Task in question and its dependent code is also built on my machine with JDK 1.5.0-06. The Ant Task function is to compile BPEL xml file. The compile function is processing a WSDL file too and from a WSDL4J object model of this WSDL is attempting to check whether a QName referring to a schema type is in fact a XML schema simple type. The solution which use APIs from
com.sun.org.apache.xerces.internal.xs.XSModel;
com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
The problem is that this is yielding the value 'false' in the caller yet trying to returning the value 'true'
XSTypeDefinition typeDef = _model.getTypeDefinition(type.getLocalPart(),
type.getNamespaceURI());
return (typeDef != null)
&& (typeDef.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE);
The debugger (see screen shots) not only shows that the Class 'typeDef' is
com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition
which is hardcoded to return
public short getTypeCategory () {
return SIMPLE_TYPE;
}
but Watch expressions show the return expression equaluating to 'true' to stipulate the logic of it all. How can a method return true but yield false in the calling code?
Simpler reproducable case:
"reproduce from command line without NetBeans just running Ant using Mustang"
1) Download and unzip PXE
http://balui.sfbay.sun.com/cache/CCRproto/fivesight_pxe/latest/pxe-200602020325.zip
whereever you unzip
pxe.home=<install-location>/intalio-pxe
2) grab CR attachment "CR_6381295_AltAsyncClient.zip" and unzip to
${pxe.home}/examples
(next to all the other examples like HelloWorld
you should have then
${pxe.home}/examples/AltAsyncClient
3) edit ${pxe.home}/examples/example.properties so that pxe.java.home is set to Mustang (actually this is not used in this case but its necessary to have the Ant Project run)
e.g.
pxe.java.home=C:\\java\\jdk\\jdk1.6.0-b70
4) set environment variable JAVA_HOME to mustang
5) cd to ${pxe.home}/examples/AltAsyncClient
6) run
ant bpelc
The indication of the bug is an error processing the BPEL Property extension in the WSDL file which results in this error message
${pxe.home}\examples\example-build.xml:45: The following error occurred while executing this line:
${pxe.home}\examples\example-build.xml:61: com.fs.pxe.bom.wsdl.PropertyImpl@2f8b5a: error: [Proper
tyDeclaredWithComplexType] PropertyDeclaredWithComplexType: {http://www.mycomp.org/AltAsyncClient}correlatorProp {http://www.w3.org/2001/XML
Schema}int {2} {3} {4} {5} {6} {7}
If you want to see the FLIPPED boolean in the debugger the src code to PXE is here
http://balui.sfbay.sun.com/cache/CCRproto/fivesight_pxe/latest/pxe-200602020325-src.zip
The two src files which frame the problem are
./utils/src/java/com/fs/utils/xsd/SchemaModelImpl.java
method: isSimpleType(QName)
line: 117 (return statement sends true)
./bpel-compiler/src/java/com/fs/pxe/bpel/compiler/BpelCompiler.java
method: compile(Property)
line: 732 yields false calling isSimpleType()