Danke!

I'll fix this shortly...

By the way, if there's no path to "javap" then it's unlikely that there was
a path to "java" since the two are packaged together.  But I understand
your point, it's not robust.

Russell Butek
[EMAIL PROTECTED]


Thomas Börkel <[EMAIL PROTECTED]> on 02/06/2002 02:23:33 PM

Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:
Subject:  RE: Current build: Emitter hangs while reading class file (bug
      found in Axis, fix inside)




HI!

I  found the bug and I have the fix for it:

In  class org.apache.axis.utils.JavapUtils, method javap(), line  174:

Before:
             Process pr = rt.exec("javap -classpath " + cp + " -private -l
" +  cls.getName());

Now:
             Process pr = rt.exec("javap -classpath \"" + cp + "\" -private
-l " +  cls.getName());


Reason: CLASSPATH may contain SPACEs.

BTW:  This call to "javap" could be more robust anyway. What if there is no
PATH to  "javap"? I think, it will then hang also.

Regards,
Thomas

-----Original Message-----
From: Thomas Börkel
Sent: Mittwoch, 6. Februar 2002 17:46
To: Axis  Mailinglist
Subject: Current build: Emitter hangs while reading  class file



HI!

I tried out the Emitter class from the current nightly build  and
apparently, it hangs while trying to read the class file. This happens
with Emitter.emit() and Emitter.getWSDL(). This does not happen with
alpha3.

Using JDK 1.4 RC1. Classes are compiled with FastJavac from  NetBeans
3.3.1.

This is what I do:
        emitter = new  Emitter();
         emitter.setCls(Class.forName(completeName));
         emitter.setAllowedMethods(allowedMethods.toString());
         emitter.setServiceName(className);
        emitter.setIntfNamespace("http://"; + packageName +
".p2plus.apag.com");
         emitter.setUseInheritedMethods(true);
        emitter.setLocationUrl("http://localhost:2037/"; + packageName + "/"
+ className + ".jws");
        def =  emitter.getWSDL();

This is the stacktrace:

        at  java.io.FileInputStream.readBytes(Native Method)
        at  java.io.FileInputStream.read(FileInputStream.java:192)
        at  java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
        at  java.io.BufferedInputStream.read(BufferedInputStream.java:277)
        - locked  <02A70DE8> (a java.io.BufferedInputStream)
        at
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:404)
        at
sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
        at  sun.nio.cs.StreamDecoder.read(StreamDecoder.java:179)
        - locked <02A70030> (a  java.io.InputStreamReader)
        at  java.io.InputStreamReader.read(InputStreamReader.java:167)
        at  java.io.BufferedReader.fill(BufferedReader.java:136)
        at  java.io.BufferedReader.readLine(BufferedReader.java:299)
        - locked <02A70030> (a  java.io.InputStreamReader)
        at  java.io.BufferedReader.readLine(BufferedReader.java:362)
        at  org.apache.axis.utils.JavapUtils.javap(Unknown Source)
        - locked <06DCFAA8> (a  java.lang.Class)
        at  org.apache.axis.utils.JavapUtils.getParameterNames(Unknown
Source)
        at
org.apache.axis.wsdl.fromJava.ClassRep.getParameterNames(Unknown Sour
ce)
        at
org.apache.axis.wsdl.fromJava.ClassRep.walkInheritanceChain(Unknown S
ource)
        at  org.apache.axis.wsdl.fromJava.ClassRep.addMethods(Unknown
Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.init(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.<init>(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.init(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.<init>(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.init(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.<init>(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.init(Unknown Source)
        at  org.apache.axis.wsdl.fromJava.ClassRep.<init>(Unknown Source)
        at
org.apache.axis.wsdl.fromJava.DefaultBuilderPortTypeClassRep.build(Un
known Source)
        at  org.apache.axis.wsdl.fromJava.Emitter.writePortType(Unknown
Source)
        at  org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Unknown Source)


Anyone any ideas?

Thanks!

Regards,
Thomas



Reply via email to