Java WSDP - run Client with Ant tool

i've created the server, deployed it
then i've created the client using ant build
then i've got generated classes using .wsdl file
but when i run client i get an error
exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (wrong name: _helloclient/HelloClient)...
what should i do?

we have tried to build tutorials' examples but when we type the ant build command and run. it gives errors like ....fileset doesnt support the nested <include> element..."
the i installed ant 1.5 and got the "org.apache.catalina.ant.installtask couldnt be foun..." error.
how can i solve any of these pro�blems??

Similar Messages

  • Create web service consumer client with Ant and wsdl

    How can I create a web service client with just Ant and WSDL?
    Thanks.

    Hi,
    Did you check this web log?
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    Eddy

  • Run application with ANT

    Hi,
    i have a clean,compile,..etc. tasks but i dont know how to create a run task in ant.
    how to create a run task in ant.?
    Thanks
    Edited by: fetishcode on Sep 30, 2008 4:50 PM

    &lt;target name="run"&gt;
    &lt;java classname="test.Main"&gt;
    &lt;arg value="-h"/&gt;
    &lt;classpath&gt;
    &lt;pathelement location="dist/test.jar"/&gt;
    &lt;pathelement path="${java.class.path}"/&gt;
    &lt;/classpath&gt;
    &lt;/java&gt;
    &lt;/target&gt;
    See http://ant.apache.org/manual/index.html for more information.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Java EE tutorial, problem with ANT populating database

    Hi!
    I have followed the instructions in the Java EE tutorial to set up the enviroment but when I execute the command "ant create tables" I get this output:
    C:\javaeetutorial5\examples\web\bookstore1>ant create-tables
    Buildfile: build.xml
    -pre-init:
    init:
    check:
    tools:
    start-db:
    BUILD FAILED
    C:\javaeetutorial5\examples\bp-project\app-server-ant.xml:140: The directory you specified does not existI have changed in the build.properties file to this:
    # The SDK's default installation on Windows is c:/Sun/SDK
    # The Application Server's default installation on Windows is
    # c:/Sun/AppServer
    javaee.home=C:\Sun\SDK
    javaee.tutorial.home=C:\javaeetutorial5
    # machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where the app-server is accessed by the users
    javaee.server.port=8080
    # port number where the admin server of the app-server is available
    javaee.adminserver.port=4848
    # Uncomment the property j2ee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property j2ee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by the glassfish app-server installation.
    javaee.server.passwordfile=${javaee.tutorial.home}\examples\common\admin-passwo rd.txt
    appserver.instance=server
    # Uncomment and set this property to the location of the browser you
    # choose to launch when an application is deployed.
    # On Windows and Mac OS X the default browser is used.
    #default.browser=\Applications\Firefox.app\Contents\MacOS\firefox-bin
    # Database vendor property for db tasks
    db.vendor=javadb
    # Digital certificate properties for mutual authentication
    keystore=${javaee.tutorial.home}\examples\jaxws\simpleclient-cert\support\clien t_keystore.jks
    truststore=${javaee.home}\domains\domain1\config\cacerts.jks
    keystore.password=changeit
    truststore.password=changeitAny idea which directory the error refers to?
    I�m using Netbeans 5.5 and have a connection to my local mysql database.

    Ok, this is the build.xml from bookstore1:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- You may freely edit this file. See commented blocks below for -->
    <!-- some examples of how to customize the build. -->
    <!-- (If you delete it and reopen the project it will be recreated.) -->
    <project name="bookstore1" default="default" basedir=".">
        <description>Builds, tests, and runs the project bookstore1.</description>
        <property name="is.war.module" value="true" />
        <property name="uses.db.sql.file" value="true"/>
        <path id="common.jars">
            <filelist dir="../bookstore" files="build.xml"/>
        </path>
        <macrodef name="iterate">
            <attribute name="target"/>
            <sequential>
                <subant target="@{target}" failonerror="false">
                    <buildpath refid="common.jars"/>
                </subant>
            </sequential>
        </macrodef>
        <import file="../../bp-project/main.xml" />
        <target name="-pre-deploy" unless="netbeans.home">
            <antcall target="create-tables"/>
        </target>
        <target name="-pre-compile" unless="netbeans.home" depends="init,build-common,copy-common-jars"/>
        <target name="build-common" unless="netbeans.home" depends="init">
            <iterate target="default"/>
        </target>
        <target name="copy-common-jars" unless="netbeans.home" depends="init">
            <mkdir dir="${build.web.dir}/WEB-INF/lib"/>
            <copy file="${reference.bookstore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
        </target>
    </project>And the build.xml in bookstore looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- You may freely edit this file. See commented blocks below for -->
    <!-- some examples of how to customize the build. -->
    <!-- (If you delete it and reopen the project it will be recreated.) -->
    <project name="bookstore1" default="default" basedir=".">
        <description>Builds, tests, and runs the project bookstore1.</description>
        <property name="is.war.module" value="true" />
        <property name="uses.db.sql.file" value="true"/>
        <path id="common.jars">
            <filelist dir="../bookstore" files="build.xml"/>
        </path>
        <macrodef name="iterate">
            <attribute name="target"/>
            <sequential>
                <subant target="@{target}" failonerror="false">
                    <buildpath refid="common.jars"/>
                </subant>
            </sequential>
        </macrodef>
        <import file="../../bp-project/main.xml" />
        <target name="-pre-deploy" unless="netbeans.home">
            <antcall target="create-tables"/>
        </target>
        <target name="-pre-compile" unless="netbeans.home" depends="init,build-common,copy-common-jars"/>
        <target name="build-common" unless="netbeans.home" depends="init">
            <iterate target="default"/>
        </target>
        <target name="copy-common-jars" unless="netbeans.home" depends="init">
            <mkdir dir="${build.web.dir}/WEB-INF/lib"/>
            <copy file="${reference.bookstore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
        </target>
    </project>And the main.xml in \bp-projects looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.  You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at:
    http://developer.sun.com/berkeley_license.html
    $Id: main.xml,v 1.2 2006/04/12 17:20:13 ie139813 Exp $ -->
    <!-- main.xml: this is the file that should be included by the project
         build files. It will figure out whether it is running from inside Netbeans
         or command line and include appropriate tasks.
         @Author: Inderjeet Singh -->
    <project name="main" default="dummy-default">
      <property file="build.properties"/>
      <property value="1.5" name="default.javac.source"/>
      <property value="1.5" name="default.javac.target"/>
      <condition property="common-ant-tasks-file"
              value="${ant.file}/../nbproject/build-impl.xml"
              else="${ant.file.main}/../command-line-ant-tasks.xml">
        <and>
        <isset property="netbeans.home"/>
        <available file="${ant.file}/../nbproject/build-impl.xml"/>
        </and>
      </condition>
      <import file="${common-ant-tasks-file}"/>
      <target name="dummy-default"/>
    </project>

  • Running Jar with Ant Can't Find Class-Path

    Hi there,,
    I was wondering if someone could give a tip about this problem I am having.
    I have a folder (in windows xp) where are all my .jars (dependencies of my application).
    In NetBeans I can add in Libraries (Project's Properties) all .jars necessary, however when compiling and trying to run using Ant in a console window, the classpath cant be reached, I mean the JVM does not find the jar files indicated in the xml file:
    The folder with all necessary jars is:
    C:/Projetos/Web/libs
    And my XML file is:
    project.libs.dir      = C:/Projetos/Web/libs
    <java jar="${dist.dir}/${project.name}.jar" fork="true">
    <classpath>
    <fileset dir="${project.libs.dir}" includes="*.jar"/>
    </classpath>
    </java>     
    Exception:
    [java] java.lang.NoClassDefFoundError: org/firebirdsql/jdbc/FBSQLException
    [java] at com.sikgraf.main.Main.main(Main.java:53)
    [java] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXTitledPanel
    [java] at com.sikgraf.main.Main$1.run(Main.java:63)
    [java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    [java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    [java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    Try using the pathelement tag instead of the fileset tag.
    Example I got from https://taglibrarydoc.dev.java.net/:
    <classpath>
    <pathelement location="${tools.lib}/tlddoc.jar"/>
    <pathelement location="${tools.lib}/xml-apis.jar"/>
    <pathelement location="${tools.lib}/xercesImpl.jar"/>
    <pathelement location="${tools.lib}/xalan.jar"/>
    </classpath>

  • Java 1.5 client with WLS 8.1 MBeans...

    Hi,
              I maintain http://www.hermesjms.com and am investigating a problem with Hermes, which uses a 1.5 VM, interrogating WLS MBeans with WLS on 1.4.
              This thread describes what users have seen and what I have also replicated:
              http://www.hermesjms.com/forum/viewtopic.php?t=126
              As you can see, setting -Djmx.serial.form=1.0 fixes the serialisation problem but I now get the InstanceNotFoundException.
              I invoke getMBean() from the getStatistics() method here:
              http://cvs.sourceforge.net/viewcvs.py/hermesjms/Hermes4/src/java/hermes/ext/weblogic/WebLogicJMSAdmin.java?view=markup
              Any kind soul out there know what the problem may be? I'm kinda confused...
              Many thanks,
              Colin.

    Hi Tom,
              When I upgrade to 9.0 client against 8.1 server I get the exceptions at the end of this mail. The server I am talking to is a single server, not in a cluster, and is just the out-of-the-box WLS 8.1 with a JMS server and some queues and topics configured.
              I don't get the ClassNotFoundException for WebLogicObjectName as this exists in weblogic.jar. Is there anything I need to do to WLS 8.1 to allow a 9.0 client to interop?
              Cheers,
              Colin.
              2005-08-04 08:25:41,753 [Timer-7] DEBUG hermes.ext.weblogic.WebLogicJMSAdmin - Constructed JMSDestination MBean name: mydomain:JMSServerRuntime=MyJMS Server,Location=myserver,Name=MyDistributed Queue,ServerRuntime=myserver,Type=JMSDestinationRuntime
              2005-08-04 08:25:41,773 [Timer-7] ERROR hermes.HermesWatchManager - Unexpected Exception
              weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception
                   at weblogic.management.internal.MBeanHomeImpl_814_WLStub.getMBean(Unknown Source)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getMBean(WebLogicJMSAdmin.java:329)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getStatistics(WebLogicJMSAdmin.java:155)
                   at hermes.ext.weblogic.WebLogicJMSAdmin.getDepth(WebLogicJMSAdmin.java:119)
                   at hermes.impl.HermesAdminAdapter.getDepth(HermesAdminAdapter.java:108)
                   at hermes.impl.DefaultHermesImpl.getDepth(DefaultHermesImpl.java:1187)
                   at hermes.HermesWatchManager.updateWatchStatistics(HermesWatchManager.java:202)
                   at hermes.HermesWatchManager.doUpdate(HermesWatchManager.java:170)
                   at hermes.HermesWatchManager.access$000(HermesWatchManager.java:38)
                   at hermes.HermesWatchManager$2.run(HermesWatchManager.java:84)
                   at java.util.TimerThread.mainLoop(Timer.java:512)
                   at java.util.TimerThread.run(Timer.java:462)
              Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
                   java.lang.ClassNotFoundException: weblogic.management.interop.WebLogicObjectName: This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on all other members of that cluster
                   at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191)
                   at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:155)
                   ... 12 more
              Caused by: java.lang.ClassNotFoundException: weblogic.management.interop.WebLogicObjectName: This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of a cluster is also deployed on all other members of that cluster
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:344)
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:258)
                   at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:253)
                   at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:327)
                   at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:316)
                   at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
                   at java.io.ObjectInputStream.readClassDesc(Unknown Source)
                   at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
                   at java.io.ObjectInputStream.readObject0(Unknown Source)
                   at java.io.ObjectInputStream.readObject(Unknown Source)
                   at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
                   at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:120)
                   at weblogic.management.internal.MBeanHomeImpl_WLSkel.invoke(Unknown Source)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
                   at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
                   at java.lang.Thread.startThreadFromVM(Unknown Source)
              2005-08-04 08:25:41,773 [Timer-7] DEBUG hermes.HermesWatchManager - closing Hermes WebLogic
              2005-08-04 08:25:41,783 [Timer-7] DEBUG hermes.impl.jms.ThreadLocalSessionManager - all sessions closed, closing Connection

  • Java WSDP - building client

    'm building a client to web service
    this code is written by sun in their tutorial
    i'm interesting in line
    HelloIF hello = (HelloIF)stub;
    this class (HelloIF) hasn't been represented
    HOW can i use it ?
    also i wanna know how to build
    MyHelloService_Impl class
    package staticstub;
    import javax.xml.rpc.Stub;
    public class HelloClient {
    private String endpointAddress;
    public static void main(String[] args) {
    System.out.println("Endpoint address = " + args[0]);
    try {
    Stub stub = createProxy();
    stub._setProperty
    (javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
    args[0]);
    HelloIF hello = (HelloIF)stub;
    System.out.println(hello.sayHello("Duke!"));
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Stub createProxy() {
    // Note: MyHelloService_Impl is implementation-specific.
    return
    (Stub) (new MyHelloService_Impl().getHelloIFPort());
    p.s. package staticstub does not cantain these classes

    Thank you.
    I was simply fielding the question in case one has become available over the last few years that I wasn't aware of.
    We are in fact using JNI for a few of our Java clients. Unfortunately, as described in another thread within this forum, I would like to both read and write to the same queue using different Java threads which is where we are having problems.
    Thanks again, Richard.

  • Problem in Creating .wsdl file and mapping.xml with ant

    hi
    i am created my .wsdl file and mapping.xml file with wscompile tool but when i run this by ant tool it show a problem.
    the command runs on command prompt but when run throught ant file it shows a following error :-
    Execute failed: java.io.IOException: CreateProces: wscompile -define -mapping build\classes\META-INF\mapping.xml -d . -nd build\.................and so on
    so if anybody have any idea then plz help me asap
    thanx

    The following Ant snippet is the way I've defined my wscompile task. I'm creating a web application and it looks like yours might be an EJB endpoint, but you can adjust where necessary:
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
         <classpath refid="compile.classpath" />
    </taskdef>
    <target name="init">
         <echo message="-------- ${appname} --------" />
    </target>
    <!-- This target compiles the server components using an existing WSDL as the driving document.
           The configuration file must use the <wsdl> element giving the location (local file system
           or URL) of the WSDL document.
           Note: the fork argument is needed to over come a bug when using the mapping argument. See
           http://forum.java.sun.com/thread.jspa?threadID=592994&tstart=0
      -->
         <target name="generate-server-from-WSDL" depends="init">
              <wscompile fork="yes"
                           keep="true"
                           base="${basedir}/WebContent/WEB-INF/classes"
                           import="true"
                           features="wsi"
                           xPrintStackTrace="true"
                           verbose="true"
                           mapping="${basedir}/WebContent/WEB-INF/jaxrpc-mapping.xml"
                           sourcebase="${basedir}/src"
                           config="${config.server.doclit.file}">
                   <classpath>
                        <path refid="compile.classpath" />
                   </classpath>
              </wscompile>
         </target>
         <target name="compile-server-from-WSDL" depends="generate-server-from-WSDL">
              <javac srcdir="${basedir}/src" destdir="${basedir}/WebContent/WEB-INF/classes" debug="${compile.debug}">
                   <classpath refid="compile.classpath" />
              </javac>
         </target>Just make sure that the named destination directories exist before you run the script.
    If you'd like more details on the wscompile Ant task, I found the following pages invaluable:
    https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html

  • Can not run client

    I write a simple session bean and deploy it in deploutool sucessfully,and when I run client with such command :
    java -cp HelloWorldClient.jar:%CLASSPATH% examples.HelloClient
    failure messages is:
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (wrong na
    me: examples/HelloClient)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help me with my fist simple session bean!

    here is my HelloClient source
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Properties;
    * This class is an example of client code which invokes
    * methods on a simple stateless session bean.
    public class HelloClient {
         public static void main(String[] args) throws Exception {
              * Setup properties for JNDI initialization.
              * These properties will be read-in from
              * the command-line.
              Properties props = System.getProperties();
              * Obtain the JNDI initial context.
              * The initial context is a starting point for
              * connecting to a JNDI tree. We choose our JNDI
              * driver, the network location of the server, etc
              * by passing in the environment properties.
              Context ctx = new InitialContext(props);
              * Get a reference to the home object - the
              * factory for Hello EJB Objects
              Object obj = ctx.lookup("HelloHome");
              * Home objects are RMI-IIOP objects, and so
              * they must be cast into RMI-IIOP objects
              * using a special RMI-IIOP cast.
              * See Appendix X for more details on this.
              HelloHome home = (HelloHome)
                   javax.rmi.PortableRemoteObject.narrow(
                        obj, HelloHome.class);
              * Use the factory to create the Hello EJB Object
              Hello hello = home.create();
              * Call the hello() method on the EJB object. The
              * EJB object will delegate the call to the bean,
              * receive the result, and return it to us.
              * We then print the result to the screen.
              System.out.println(hello.hello());
              * Done with EJB Object, so remove it.
              * The container will destroy the EJB object.
              hello.remove();

  • Java program not running by the Ant

    i have a small java program.
    its a classpath problem.
    cant figure out where is the problem.
    i am running the code via Ant.
    build.xml
    <?xml version="1.0"?>
    <project name="myproject" basedir="." default="all">
        <property name="src.dir"     value="src"/>
         <property name="classes.dir" value="classes"/>
         <property name="lib.dir"     value="C:/tomcat/webapps/axis/WEB-INF/lib"/>
         <property name="runclass" value="TestClient"/>
         <target name="all" depends="clean,compile"/>
         <target name="clean">
            <delete dir="${classes.dir}"/>
        </target>
        <path id="classpath">
            <fileset dir="${lib.dir}" includes="**/*.jar"/>
        </path>
        <target name="compile">
            <mkdir dir="${classes.dir}"/>
         <javac srcdir="${src.dir}"
          destdir="${classes.dir}"
          deprecation="on"
          debug="on">
       <classpath><path refid="classpath"/></classpath>
      </javac>
         </target>
         <target name="run" depends="compile">
       <!-- run the class -->
       <java classname="${runclass}">
            <classpath>
              <pathelement path="${classpath}"/>
              <fileset dir="${lib.dir}">
                <include name="**/*.jar"/>
            </fileset>
              </classpath>
           </java>
      </target>
         </project>i invoked
    ant runand got this
    Buildfile: build.xml
    compile:
    run:
         [java] Could not find TestClient. Make sure you have it in your classpath
         [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
    .java:170)
         [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
         [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
         [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
         [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
    va:275)
         [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
         [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
         [java]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
         [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
    a:1216)
         [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         [java]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
    faultExecutor.java:40)
         [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068
         [java]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
         [java]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
         [java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    BUILD SUCCESSFUL
    Total time: 2 secondsso, code is not running......its dfinitely a classpath problem , because error message says "Could not find TestClient. Make sure you have it in your classpat".
    TestClient is the name of main class file.
    not sure whats wrong with this build.xml ? whats wrong in it ?
    one thing , i guess, i did not mention "." , current directory in the build.xml ......is it because of that ?
    i browsed apache manual......To Run a Java program.....first, they are making a JAR file ...and then they are executing the JAR.
    i really, dont need the JAR file......i just want to run it.....thats enough.
    somewhere, i have to do some modification in this buld.xml.......do you have any idea ?
    thank you

    TestClient folder has
    1)src
    2)classes
    3)build.xml
    i have posted the build.xml already.
    now, src folder has TestClient.java
    TestClient.java
    ==================
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class TestClient {
       public static void main(String [] args) {
         try {
           String endpoint =
               "http://ws.apache.org:5049/axis/services/echo";
           Service  service = new Service();
           Call     call    = (Call) service.createCall();
           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           call.setOperationName(new QName("http://soapinterop.org/","echoString"));
           String ret = (String) call.invoke( new Object[] { "Hello!" } );
           System.out.println("Sent 'Hello!', got '" + ret + "'");
         } catch (Exception e) {
           System.err.println(e.toString());
    }and i did
    ant runand i got those errors.
    clearly, its not able to run it.
    looked the manual....did not find anything special about java task....still not working.

  • Problem with compiling build.xml ( ANT tools)  in Eclipse

    I was trying to compile my project thru ANT within eclipse...and it gave me error:
    Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:96)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557)
         at org.apache.tools.ant.Task.perform(Task.java:217)
         at org.apache.tools.ant.Target.execute(Target.java:184)
         at org.apache.tools.ant.Target.performTasks(Target.java:202)
         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
         at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:262)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.eclipse.ant.core.AntRunner.run(AntRunner.java:233)
         at org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFileRunner.java:59)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner(DefaultRunnerContext.java:413)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(DefaultRunnerContext.java:464)
         at org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunchWizard.java:117)
         at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
    Build exception: E:\MyPrograms\ejb\MEJB\Hello\build.xml:33: Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    I already set my JAVA_HOME with jdk1.3.1, but end up with the same error. JRE 1.3.1_07 is installed on my machine and my project contains the installed jre. It appears in both Project properties dialog box and in Installed JRE tab JAVA BUILD PATH of preferences...
    my ANT compilation works fine with command line.
    Please Help !!

    have you did some wrong with the build output path?
    i am dont understand clearful.but i am think so ;
    example :
    the eclipse's default build out path is 'bin',
    so,if you compile by this code:
    <target name="compile">
    <mkdir dir="./class" />
    <javac srcdir="./src" destdir="./class"
    classpath="com.Ostermiller.util.*"
    encoding="${ENCODING}"
    debug="on" optimize="off" deprecation="off" />
    </target>
    * the "ENCODING" 's value is setting in the properties file.
    you will maybe get the 'Cannot use classic compiler' error only.
    you can change the build output path ,or use the default path ;
    I am sorry ,
    I was limited in English and was a bigginer of java ,
    so that i cant to talk Clearly.
    if it cant working fine ,please mail to me :[email protected]
    good luck!
    Kou.huang

  • ANT tools and java card

    Hi,
    I used the ant tools going with the java card development kit 2.2 and I have the following errors when I run the build.xml
    testinit:
    [apdutool] Java Card Ant Tasks, Version 1.0
    [apdutool] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [apdutool] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
    [apdutool] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javacard/apdutool/Main
    If you have ever had this error, can you help me please to solve it?
    Thanks in advance.

    Hi,
    You are missing a JAR file. Check to make sure you have your classpath setup in your build file with the required libraries.
    Cheers,
    Shane

  • How can i use JWSDP1.6 from Ant tool to convert .wsdl file into Java class

    Hi All,
    i m very new in the development field.plese help me...
    i have a .wsdl file and i have to make some modification in the file and return this file with build file used in Ant tool.
    means my requirement is to conver the .wsdl file into java class,modify it and convert back to wsdl file.how can i do it using JWSDP1.6 and Ant tool.
    thanks in advance...
    Vikram Singh

    lemilanais wrote:
    hello!
    I have developpe an animation with flash. before give it to othe person in order to use it, i would like to secure it by integrated a security module inside the software.Secure it from what? Being played? Copied? Deleted? Modified?
    Because, i am a java developper, i have choose Netbeans 6.1 to secure it.That has to be the most random thing I've read in some time.
    do you know how can i do to integrate my animation .swf inside my java class?Java can't play SWF files and Flash can't handle Java classes, so what you're suggesting here doesn't make a lot of sense.

  • Problem using VB Client with a JAVA Webservice

    Hi people!
    I'm using JDeveloper (9.0.3) to create a JAVA Webservice on OC4J container. I followed tutorial of Oracle and I got to execute my webservice, including I can invoke my methods by HTTP using HTML forms.
    I need to invoke my methods using a VB Client with MIcrosoft SOAP ToolKit. My VB code is:
    Function autenticar(login As String, senha As String)
    Dim ObjWS As New MSSOAPLib30.SoapClient30
    Dim retorno As Variant
    Call ObjWS.MSSoapInit("http://10.71.200.40:8888/iSimp-Web-Root/br.gov.anp.isimp.controleVersao.ControleVersaoEJB?WSDL")
    retorno = ObjWS.autentica(login, senha)
    autenticar = retorno
    End Function
    My webservice publish a method called autentica that receives two parameters (a login and a password) and authenticates to obtain access to my system.
    When I try to execute this function, I got this message error:
    No deserializer found to deserialize a ":login" using encoding style "http://schemas.xmlsoap.org/soap/encoding/". [java.lang.illegalArgumentException]
    Anyone knows what is this error?

    If you could post what solved your problem that would be useful for others that run into the same issue. Thanks if possible!
    Mike.

  • Homgeneous System Copy with Java and DB2 with database tools.

    Hello,
    we have an single java stack (netweaver 2004s) and tried a system copy with database tools.
    Source System: DP2, dp2adm, db2dp2, sapdp2db
    Target System: SP2, sp2adm, db2sp2, ???
    We followed the documentation "System copy for SAP systems based on sap netweaver 2004s SR1 JAVA. We exported the SDM on the source system made a redirected restore with db tools and tried to install a new target system.
    During the import in the target system using sapinst we get in the
    phase run java migration tool kit the following error message.
    Caused by:
    com.sap.engine.frame.core.configuration.ConfigurationException: Error
    while connecting to DB.
    at
    com.sap.engine.core.configuration.bootstrap.ConfigurationManagerBootstrapImpl.(ConfigurationManagerBootstrapImpl.java:49)
    ... 14 more
    Caused by: com.ibm.db2.jcc.a.SqlException: Connection authorization
    failure occurred. Reason: userid revoked.
    What I didn't understand is, that in the documenation it is mentioned, that you have to use the same java database connect user. But during the installation of the target system (SP2) I cannot change the java database connect user to sapdp2db. I'm only allow to enter sapsp2db. That might then cause the connection problem.
    Regards
    Alexander Türk
    I

    Hi Alexander
    yes , give it a try , but see note
    970518 Hom./Het.System Copy SAP NetWeaver 2004s SR2
    and all other related notes , if it matches your environment .
    Best regards
    dirk

Maybe you are looking for