SYNOPSIS
--------
java.nio.BufferOverflowException when running wsgen in the Japanese locale
OPERATING SYSTEM
----------------
Tested on Windows and Linux, problem seen on both.
FULL JDK VERSION
----------------
Reproducible with all Java 6 Update Releases.
JDK 1.6.0_24
JDK EA 1.6.0_25-b03.
Not Reproducible with JDK 7-b64 or later
(b63 and earlier fail in the same way as Java 6).
PROBLEM DESCRIPTION
-------------------
java.nio.BufferOverflowException is thrown from internal javac code when running wsgen in our customer's environment. The attached testcase is a pared down and sanitized version of their code.
REPRODUCTION INSTRUCTIONS
-------------------------
1. Unzip attached testcase.
2. Set locale to Japanese (in Windows go to Control Panel -> Regional
and Language Options)
3. Run the following command:
wsgen.exe -cp target/bin; -d target/bin -r target/resources -s target/src -wsdl -keep -verbose jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne
Expected behaviour
------------------
?: ap round: 1
[ProcessedMethods Class: jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[should process method: generate hasWebMethods: true ]
[endpointReferencesInterface: false]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: generate(jp.xxxx.bk.soa.normal.generate.data.GenerateInput)]
[method.getDeclaringType(): jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[requestWrapper: jp.xxxx.bk.soa.normal.generate.jaxws.Generate]
[ProcessedMethods Class: java.lang.Object]
jp\xxxx\bk\soa\normal\generate\jaxws\Generate.java
jp\xxxx\bk\soa\normal\generate\jaxws\GenerateResponse.java
?: ap round: 2
Observed behaviour
------------------
Æì: ap round: 1
[ProcessedMethods Class: jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[should process method: generate hasWebMethods: true ]
[endpointReferencesInterface: false]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: generate(jp.xxxx.bk.soa.normal.generate.data.GenerateInput)]
[method.getDeclaringType(): jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[requestWrapper: jp.xxxx.bk.soa.normal.generate.jaxws.Generate]
[ProcessedMethods Class: java.lang.Object]
jp\xxxx\bk\soa\normal\generate\jaxws\Generate.java
jp\xxxx\bk\soa\normal\generate\jaxws\GenerateResponse.java
âAâvâèâPü[âVâçâôé+ùßèOé¬ö¡ÉÂéÁé_éÁé¢ (1.6.0_24)üBBug Parade é+ô»éÂâoâOé¬ôoÿ^é¦éÛé-éóé+éóé¦éãéé¦èmöFé¦ÅÒüAJava Developer
Connection (http://java.sun.com/webapps/bugreport) é+é-âoâOé¦ôoÿ^éé¿èÞéóéóé¢éÁé_éÀüB âîâ|ü[âgé+é-üAé+é¦âvâìâOâëâÇéãë¦ï
Lé¦ÉfÆfôÓùeéè_é¯é-é¡é¥é¦éóüBé¦ïªù-éáéÞé¬éãéñé¦é¦éóé_éÀüB
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:495)
at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
at com.sun.tools.javac.util.DefaultFileManager.decode(DefaultFileManager.java:830)
at com.sun.tools.javac.util.DefaultFileManager.access$300(DefaultFileManager.java:76)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1353)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1252)
at com.sun.tools.javac.main.JavaCompiler.complete(JavaCompiler.java:646)
at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1869)
at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763)
at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951)
at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:842)
at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:901)
at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:957)
at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:986)
at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1162)
at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1714)
at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1547)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390)
at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:607)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399)
at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:410)
at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1000)
at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:967)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:464)
at com.sun.tools.javac.comp.Enter.main(Enter.java:442)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:250)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:204)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)
--------
java.nio.BufferOverflowException when running wsgen in the Japanese locale
OPERATING SYSTEM
----------------
Tested on Windows and Linux, problem seen on both.
FULL JDK VERSION
----------------
Reproducible with all Java 6 Update Releases.
JDK 1.6.0_24
JDK EA 1.6.0_25-b03.
Not Reproducible with JDK 7-b64 or later
(b63 and earlier fail in the same way as Java 6).
PROBLEM DESCRIPTION
-------------------
java.nio.BufferOverflowException is thrown from internal javac code when running wsgen in our customer's environment. The attached testcase is a pared down and sanitized version of their code.
REPRODUCTION INSTRUCTIONS
-------------------------
1. Unzip attached testcase.
2. Set locale to Japanese (in Windows go to Control Panel -> Regional
and Language Options)
3. Run the following command:
wsgen.exe -cp target/bin; -d target/bin -r target/resources -s target/src -wsdl -keep -verbose jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne
Expected behaviour
------------------
?: ap round: 1
[ProcessedMethods Class: jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[should process method: generate hasWebMethods: true ]
[endpointReferencesInterface: false]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: generate(jp.xxxx.bk.soa.normal.generate.data.GenerateInput)]
[method.getDeclaringType(): jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[requestWrapper: jp.xxxx.bk.soa.normal.generate.jaxws.Generate]
[ProcessedMethods Class: java.lang.Object]
jp\xxxx\bk\soa\normal\generate\jaxws\Generate.java
jp\xxxx\bk\soa\normal\generate\jaxws\GenerateResponse.java
?: ap round: 2
Observed behaviour
------------------
Æì: ap round: 1
[ProcessedMethods Class: jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[should process method: generate hasWebMethods: true ]
[endpointReferencesInterface: false]
[declaring class has WebSevice: true]
[returning: true]
[WrapperGen - method: generate(jp.xxxx.bk.soa.normal.generate.data.GenerateInput)]
[method.getDeclaringType(): jp.xxxx.bk.soa.normal.generate.NormalGenerateServiceOne]
[requestWrapper: jp.xxxx.bk.soa.normal.generate.jaxws.Generate]
[ProcessedMethods Class: java.lang.Object]
jp\xxxx\bk\soa\normal\generate\jaxws\Generate.java
jp\xxxx\bk\soa\normal\generate\jaxws\GenerateResponse.java
âAâvâèâPü[âVâçâôé+ùßèOé¬ö¡ÉÂéÁé_éÁé¢ (1.6.0_24)üBBug Parade é+ô»éÂâoâOé¬ôoÿ^é¦éÛé-éóé+éóé¦éãéé¦èmöFé¦ÅÒüAJava Developer
Connection (http://java.sun.com/webapps/bugreport) é+é-âoâOé¦ôoÿ^éé¿èÞéóéóé¢éÁé_éÀüB âîâ|ü[âgé+é-üAé+é¦âvâìâOâëâÇéãë¦ï
Lé¦ÉfÆfôÓùeéè_é¯é-é¡é¥é¦éóüBé¦ïªù-éáéÞé¬éãéñé¦é¦éóé_éÀüB
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:495)
at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
at com.sun.tools.javac.util.DefaultFileManager.decode(DefaultFileManager.java:830)
at com.sun.tools.javac.util.DefaultFileManager.access$300(DefaultFileManager.java:76)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1353)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1252)
at com.sun.tools.javac.main.JavaCompiler.complete(JavaCompiler.java:646)
at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1869)
at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763)
at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951)
at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:842)
at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:901)
at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:957)
at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:986)
at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1162)
at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1714)
at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1547)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390)
at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:607)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399)
at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:410)
at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1000)
at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:967)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:763)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:464)
at com.sun.tools.javac.comp.Enter.main(Enter.java:442)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:250)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:204)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)