Problem with wscompile

Dear everybody,
I have a problem when trying to execute wscompile. I developed an Stateless Session Bean (in the background there are some Entity Beans and Database, etc). in Websphere Studio Application Developer 5.1.2 and built a webservice out of it. I deployed the Application to Websphere Application Server 5.1 and exported the WSDL. When I execute wscompile with the WSDL, I get a
java.lang.ClassCastException, and cannot figure out why.
Classpath:
set J2EEPATH=C:\Sun\AppServer\lib
set CLASSPATH=.\;C:\j2sdk1.4.2_08\lib
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\j2ee.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jaxrpc-api.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jaxrpc-api.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jaxrpc-impl.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jaxr-api.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jaxr-impl.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\jax-qname.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\saaj-api.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\saaj-impl.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\endorsed\dom.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\endorsed\xercesImpl.jar
set CLASSPATH=%CLASSPATH%;%J2EEPATH%\endorsed\xalan.jarWSCompile Command:
wscompile -gen:client -verbose -keep -classpath .\ config-wsdl.xmlMy WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://core.rbac.csap2" xmlns:impl="http://core.rbac.csap2" xmlns:intf="http://core.rbac.csap2" xmlns:tns2="http://exceptions.csap2" xmlns:tns3="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <schema elementFormDefault="qualified" targetNamespace="http://core.rbac.csap2" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://core.rbac.csap2" xmlns:intf="http://core.rbac.csap2" xmlns:tns3="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://xml.apache.org/xml-soap"/>
   <element name="dropActiveRole">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
      <element name="roleName" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="dropActiveRoleResponse">
    <complexType>
     <sequence/>
    </complexType>
   </element>
   <element name="getNotActiveRoles">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getNotActiveRolesResponse">
    <complexType>
     <sequence>
      <element name="getNotActiveRolesReturn" nillable="true" type="tns3:Vector"/>
     </sequence>
    </complexType>
   </element>
   <element name="getRoles">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getRolesResponse">
    <complexType>
     <sequence>
      <element name="getRolesReturn" nillable="true" type="tns3:Vector"/>
     </sequence>
    </complexType>
   </element>
   <element name="getActiveRoles">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getActiveRolesResponse">
    <complexType>
     <sequence>
      <element name="getActiveRolesReturn" nillable="true" type="tns3:Vector"/>
     </sequence>
    </complexType>
   </element>
   <element name="logout">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="logoutResponse">
    <complexType>
     <sequence/>
    </complexType>
   </element>
   <element name="addActiveRole">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
      <element name="roleName" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="addActiveRoleResponse">
    <complexType>
     <sequence/>
    </complexType>
   </element>
   <element name="loginAndCreateSession">
    <complexType>
     <sequence>
      <element name="name" nillable="true" type="xsd:string"/>
      <element name="password" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="loginAndCreateSessionResponse">
    <complexType>
     <sequence>
      <element name="loginAndCreateSessionReturn" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="hasAccess">
    <complexType>
     <sequence>
      <element name="sessionId" nillable="true" type="xsd:string"/>
      <element name="objectName" nillable="true" type="xsd:string"/>
      <element name="operationName" nillable="true" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="hasAccessResponse">
    <complexType>
     <sequence>
      <element name="hasAccessReturn" type="xsd:boolean"/>
     </sequence>
    </complexType>
   </element>
  </schema>
    <schema elementFormDefault="qualified" targetNamespace="http://exceptions.csap2" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://core.rbac.csap2" xmlns:intf="http://core.rbac.csap2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <complexType name="SystemSupportException">
    <complexContent>
     <extension base="tns2:CSAP2Exception">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
   <complexType name="CSAP2Exception">
    <sequence>
     <element name="message" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <element name="SystemSupportException" nillable="true" type="tns2:SystemSupportException"/>
   <complexType name="NoPermissionException">
    <complexContent>
     <extension base="tns2:CSAP2Exception">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
   <element name="NoPermissionException" nillable="true" type="tns2:NoPermissionException"/>
  </schema>
    <schema elementFormDefault="qualified" targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://core.rbac.csap2" xmlns:intf="http://core.rbac.csap2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <complexType name="Vector">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType"/>
    </sequence>
   </complexType>
  </schema>
  </wsdl:types>
  <wsdl:message name="getActiveRolesResponse">
    <wsdl:part element="impl:getActiveRolesResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="loginAndCreateSessionRequest">
    <wsdl:part element="impl:loginAndCreateSession" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getRolesRequest">
    <wsdl:part element="impl:getRoles" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="addActiveRoleResponse">
    <wsdl:part element="impl:addActiveRoleResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="addActiveRoleRequest">
    <wsdl:part element="impl:addActiveRole" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="hasAccessResponse">
    <wsdl:part element="impl:hasAccessResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="hasAccessRequest">
    <wsdl:part element="impl:hasAccess" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getActiveRolesRequest">
    <wsdl:part element="impl:getActiveRoles" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getRolesResponse">
    <wsdl:part element="impl:getRolesResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="dropActiveRoleResponse">
    <wsdl:part element="impl:dropActiveRoleResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getNotActiveRolesResponse">
    <wsdl:part element="impl:getNotActiveRolesResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="SystemSupportException">
    <wsdl:part element="tns2:SystemSupportException" name="fault"/>
  </wsdl:message>
  <wsdl:message name="loginAndCreateSessionResponse">
    <wsdl:part element="impl:loginAndCreateSessionResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="logoutRequest">
    <wsdl:part element="impl:logout" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getNotActiveRolesRequest">
    <wsdl:part element="impl:getNotActiveRoles" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="logoutResponse">
    <wsdl:part element="impl:logoutResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="dropActiveRoleRequest">
    <wsdl:part element="impl:dropActiveRole" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="NoPermissionException">
    <wsdl:part element="tns2:NoPermissionException" name="fault"/>
  </wsdl:message>
  <wsdl:portType name="SystemSupport">
    <wsdl:operation name="dropActiveRole">
      <wsdl:input message="impl:dropActiveRoleRequest" name="dropActiveRoleRequest"/>
      <wsdl:output message="impl:dropActiveRoleResponse" name="dropActiveRoleResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="getNotActiveRoles">
      <wsdl:input message="impl:getNotActiveRolesRequest" name="getNotActiveRolesRequest"/>
      <wsdl:output message="impl:getNotActiveRolesResponse" name="getNotActiveRolesResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="getRoles">
      <wsdl:input message="impl:getRolesRequest" name="getRolesRequest"/>
      <wsdl:output message="impl:getRolesResponse" name="getRolesResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="getActiveRoles">
      <wsdl:input message="impl:getActiveRolesRequest" name="getActiveRolesRequest"/>
      <wsdl:output message="impl:getActiveRolesResponse" name="getActiveRolesResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="logout">
      <wsdl:input message="impl:logoutRequest" name="logoutRequest"/>
      <wsdl:output message="impl:logoutResponse" name="logoutResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="addActiveRole">
      <wsdl:input message="impl:addActiveRoleRequest" name="addActiveRoleRequest"/>
      <wsdl:output message="impl:addActiveRoleResponse" name="addActiveRoleResponse"/>
      <wsdl:fault message="impl:NoPermissionException" name="NoPermissionException"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="loginAndCreateSession">
      <wsdl:input message="impl:loginAndCreateSessionRequest" name="loginAndCreateSessionRequest"/>
      <wsdl:output message="impl:loginAndCreateSessionResponse" name="loginAndCreateSessionResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
    <wsdl:operation name="hasAccess">
      <wsdl:input message="impl:hasAccessRequest" name="hasAccessRequest"/>
      <wsdl:output message="impl:hasAccessResponse" name="hasAccessResponse"/>
      <wsdl:fault message="impl:SystemSupportException" name="SystemSupportException"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SystemSupportSoapBinding" type="impl:SystemSupport">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="dropActiveRole">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="dropActiveRoleRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="dropActiveRoleResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getNotActiveRoles">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getNotActiveRolesRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getNotActiveRolesResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getRoles">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getRolesRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getRolesResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getActiveRoles">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getActiveRolesRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getActiveRolesResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="logout">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="logoutRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="logoutResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="addActiveRole">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="addActiveRoleRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="addActiveRoleResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="NoPermissionException">
        <wsdlsoap:fault name="NoPermissionException" use="literal"/>
      </wsdl:fault>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="loginAndCreateSession">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="loginAndCreateSessionRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="loginAndCreateSessionResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="hasAccess">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="hasAccessRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="hasAccessResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="SystemSupportException">
        <wsdlsoap:fault name="SystemSupportException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SystemSupportService">
    <wsdl:port binding="impl:SystemSupportSoapBinding" name="SystemSupport">
      <wsdlsoap:address location="http://pcrw171:9080/CSAP2SysSupRouter/services/SystemSupport"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>I could imagine it is because of the use of Vectors in that WSDL. I do not have problems when just Strings are included in a wsdl.
Any ideas?
Thanks and regards,
Simon

Running wscompile from a command line is hard work. It's much better to use the Ant task that comes with the JWSDP. The following link shows how to get it up and running:
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#2.1

Similar Messages

  • Problem with wscompile tool

    Hi,
    I'm trying to build the helloworld example in the jwstutorial13.
    When the build process reaches wscompile task it fails and generates a strange error:
    run-wscompile:
    [echo] Running wscompile:
    [echo] C:\jwsdp-1.3\apache-ant\../jaxrpc/bin/wscompile.bat -define -d build -nd build -classpath build config-interface.xml -model build/model.gz
    [exec] java.lang.NoClassDefFoundError: Files\Norton
    [exec] Exception in thread "main"
    [exec] Result: 1
    I don't understand the following:
    [exec] java.lang.NoClassDefFoundError: Files\Norton
    I'm building this on Windows 2000, and norton antivirus is installed. How could that effect the build process.
    Can someone tell me how to solve this problem.
    Thanks...

    When the build process reaches wscompile task it fails
    and generates a strange error:
    run-wscompile:
    [echo] Running wscompile:
    [echo]
    cho]
    C:\jwsdp-1.3\apache-ant\../jaxrpc/bin/wscompile.bat
    t -define -d build -nd build -classpath build
    config-interface.xml -model build/model.gz
    [exec] java.lang.NoClassDefFoundError:
    ror: Files\Norton
    [exec] Exception in thread "main"
    [exec] Result: 1
    I don't understand the following:
    [exec] java.lang.NoClassDefFoundError: Files\Norton
    I'm building this on Windows 2000, and norton
    antivirus is installed. How could that effect the
    build process.I've had the exact same problem today and haven't been able to find any information on this problem at all. But actually your problem helped me realize what is wrong.
    My problem was that wscompile gave me the error java.lang.NoClassDefFoundError: Ghost on a newly reinstalled machine. I have been able to run the examples before, so I didn't really know what to think of this.
    But the thing is that Norton Ghost and probably also Norton Antivirus puts entries into the path that contains paths with spaces in the name, ex. C:\Programmer\Norton Ghost
    The problem is that wscompile sees "Ghost" as not being part of the path and mistakes it for being a different paramter. When I removed the entry from my path, the examples ran without complaints.
    I have tried to put " " around the entry, but it didn't help. I don't know if there is any way to include paths with spaces in it , unless you write the paths using dos short filenames.
    I hope this solves your problem if you haven't figured it out yet!
    It's amazing that there isn't any information about this problem in the documentation, or maybe there is?
    Just think of the majority of people using the english version of windows with the program folder C:\Program Files.
    /Bo

  • Problem with WSDL generated with wscompile JAX-RPC

    Ok well I have successfully built a Web Service (From an existing wsdl) and Static Stub Client they work perfectly. I then I tried to connect to it using a Delphi Web Service Client. The client cant change, the problem I am getting is it is requesting using the variable name I am using and the WSDL has String_1.
    Ie. it gives me:
    unexpected element name: expected=String_1, actual= {targetNameSpace} [Variable Name]
    I suspect this is a problem with how the WSDL is generated any suggestions?

    THanks for the response, I originally used axis WSDL2Java. And only used the interface class. I think this is where my whole thing fell down. Although this worked with a static stub client that I used.
    I have now generated the server side java files using wscompile and am l looking how to implement the server. It doesn't look like it has a implementation class there. And there isn't much information on how to do it.

  • JAX RPC extension: Problem with document/literal and MyType[]

    Hi,
    I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding.
    Problem:
    A webservice server method like:
    public wineshop.model.common.SimpleProducer[] getSimpleProducerList() throws RemoteException;
    is translated into a stub method like:
    public UnknownType getSimpleProducerList() throws Exception {..}
    Is an array of own types with the binding style "document/literal" not supported in JAX RPC 1.4 or is it just a bug?
    The WSDL file is generated by JAX RPC 1.4.
    I have installed JWSDP-1.5 and generated a stub with wscompile from the WSDL file. The generated stub has the correct method return type:
    public wineshop.ws.client.SimpleProducer[] getSimpleProducerList()
    throws java.rmi.RemoteException
    It there a workaround like replacing some JDev JARs with JWSDP-1.5 to solve the problem?
    Any hints are welcome.
    Thanks Markus

    repost.....

  • Problems with J2ME and JAX-RPC

    Hi,
    I am trying to write a J2ME web service client. I have generated the stub classes with wscompile from the wsdl document at http://www.webservicex.net/stockquote.asmx?WSDL. However, when I try to run the MIDlet I always get the following error message:
    [wtkpreverify] Error preverifying class javax.xml.rpc.encoding.Serializer
    [wtkpreverify] java/lang/NoClassDefFoundError: java/io/Serializable
    I am using Eclipse 3.1, Antenna 0.9.13, the Web Service Development Kit 2.0 and the WTK 2.3 beta.
    The necessary jars (the WTK libs, rt.jar from the JRE, activation, mail, saaj and jax-rpc libraries from the WSDK) have been included in my classpath.
    Does anybody know how to fix this problem? Any help is much appreciated.
    Regards,
    Motivated

    Thanks, that was my mistake.
    Instead of using wscompile, you must generate the stub classes with the WTK. Then, you set a reference to the j2me-ws.jar (JSR-172). No additional libraries from the Web Service Development Kit are required.

  • Problem with the config.xml

    Dear all,
    After doing a wscompile on the config.xml file (JWSDP1.6), I am able to generate the wsdl for the interface defined.
    But now the config.xml shows an error
    "Cannot find the declaration of element 'configuration' "
    for the attribute xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"
    Any idea what is the problem as "http://java.sun.com/xml/ns/jax-rpc/ri/config" is no longer available on the sun site.
    Any alternate references to be made to this xml namespace declaration.
    Rgds,
    Seetesh

    My point above is that Project 2007 was extremely buggy and unless files are saved using Project 2007 SP3 first you are likely to experience problems with the files when opening in project 2010. Project 2007 to 2010 with no service packs is problematic.
    With SPs applied you should have far fewer problems.
    Doesn't look like a exe with SP2 is available yet so you need to add the service pack separately, probably in the updates folder.
    If all Project 2007 installs are already at SP3 then no need for this.
    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

  • I have problems with WS in NetBeans IDE

    HI ALL!
    Duiring the compilation of web application including webServise i have a problem.
    Illustrated:
    wscompile-init:
    D:\projects\tests\test\nbproject\build-impl.xml:226: taskdef class com.sun.xml.rpc.tools.ant.Wscompile cannot be found
    BUILD FAILED (total time: 0 seconds)And the string of file build.xml
    <target name="wscompile-init" depends="init">
            <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile" classpath="${wscompile.classpath}"/>
            <taskdef name="wsclientuptodate" classname="org.netbeans.modules.websvc.core.ant.WsClientUpToDate" classpath="${wsclientuptodate.classpath}"/>
    I have the NetBeans IDE 4.1 and JDK 1.5.0_5.
    Help me, please!

    I have similar problem with NetBeans 5.0 beta when I tried to create a simple web service.
    From the Project View, under the hierarchy
    ---- Libraries
    right click and Add Libraries
    add the JAX-RPC 1.6 (which netbeans point to "c:\netbeans-5.0beta\ide6\modules\ext\jaxrpc16\*.jar"
    Press Ctrl+2 or Window|File to go to File View,
    open the file under the hierarchy
    --- nbproject
    +- project.properties
    originally it was
    javac.classpath=\
    ${libs.jaxrpc16.classpath}
    wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}
    I changed it to
    wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}:${libs.jaxrpc16.classpath}

  • Problems with types using JAX-RPC

    Hi,
    I have to convert an RMI application into a JAX-RPC application. I thought it was easy but I have some problems with the parameter types and the return types of the remote methods.
    For example, how can I pass a java Object as a parameter or as a return type, supposing this object could be anything during runtime? Is there any way to do it because the only types one could use with JAX-RPC are not enough for my application.
    Regards,
    Vincent

    Thanks, that was my mistake.
    Instead of using wscompile, you must generate the stub classes with the WTK. Then, you set a reference to the j2me-ws.jar (JSR-172). No additional libraries from the Web Service Development Kit are required.

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with threads and ProgressMonitor

    Dear Friends:
    I have a little problem with a thread and a ProgressMonitor. I have a long time process that runs in a thread (the thread is in an separate class). The thread has a ProgressMonitor that works fine and shows the tasks progress.
    But I need deactivate the main class(the main class is the user interface) until the thread ends.
    I use something like this:
    LongTask myTask=new LongTask();
    myTask.start();
    myTask.join();
    Now, the main class waits for the task to end, but the progress monitor don`t works fine: it shows only the dialog but not the progress bar.
    What's wrong?

    Is the dialog a modal dialog? This can block other UI updates.
    In general, you should make sure that it isn't modal, and that your workThread has a fairly low priority so that the UI can do its updating

  • Problem with threads and/or memory

    I'm developing an application where there are 3 threads. One of them sends a request to the other, and if the 2nd can't answer it, it sends it to the 3rd (similar to CPU -> CACHE -> MEMORY). When i run the program with 1000-10.000 requests, no problem occurs. When i run it with 300.000-1.000.000 requests, it sometimes hangs. Is this a problem with the garbage collector, or should it be related to the threads mecanism.
    (note: eache thread is in execution using a finite state machine)

    i had been running the program inside Netbeans.
    Running the jar using the command line outside
    Netbeans i have no more problems... Does Netbeans use
    it's own JVM?Depends how you set it up, but look under the options. There are settings for the compiler and jvm that it uses.

Maybe you are looking for