• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

Java Web Service wsdeploy error

Hi experts,

I am running an ant build that works on other computers, but for some reason, this step fails on my computer:


      <target name="process-war" depends="set-ws-scripts"
                  description="Runs wsdeploy to generate the ties and create a deployable WAR file">
            <delete file="${dist}/${deployable-war}" />  
            <exec executable="${wsdeploy}">
                  <arg line="-classpath"/>
                  <arg pathref="classpath" />
                  <arg line="-tmpdir"/>
                  <arg line="&quot;${build}/wsdeploy-generated&quot;"/>
                  <arg line="-o"/>
                  <arg line="&quot;${dist}/${deployable-war}&quot;"/>
                  <arg line="-verbose"/>            
                  <arg line="&quot;${dist}/${portable-war}&quot;"/>
            </exec>
      </target>

The error it gives is:
error: only one input war file can be specified: C:\myWebService\lib\jax-qname.jar
     [exec] Usage: wsdeploy <options> <war file>

I have checked, and the variable ${dist}/${portable-war} points at a valid war file.  jax-qname.jar also exists in the place it mentions.

I don't understand this error, since I am only providing this one input file.  It seems like wsdeploy is lying.

Thanks for any help
Dan
0
dbrownell83
Asked:
dbrownell83
  • 10
  • 5
1 Solution
 
dbrownell83Author Commented:
Ok, so i switched to using the class itself,

      <target name="process-war" depends="set-ws-scripts"
      description="Runs wsdeploy to generate the ties and create a deployable WAR file">
            <echo message="Running wsdeploy...."/>
            <wsdeploy  
                  classpathref="jwsdppath"
                  outWarFile="${dist}/${deployable-war}"
                  inWarFile="${dist}/${portable-war}"
                  verbose="true"
                  tmpdir="${build}/wsdeploy-generated"/>
      
      </target>

and now it complains:
BUILD FAILED: java.lang.NoClassDefFoundError: javax.mail.internet.MimeMultipart

arg
0
 
dbrownell83Author Commented:
MimeMultipart is in the directory mentioned:

    <path id="jwsdppath">
            <path refid="classpath" />
          <fileset dir="C:\\jwsdp-1.5/jwsdp-shared/lib">
            <include name="*.jar" />
          </fileset>
        <fileset dir="C:\\jwsdp-1.5/jaxrpc/lib">
            <include name="*.jar" />
        </fileset>
    </path>  
0
 
aozarovCommented:
run ant with -v option so you will get verbose output of what libraries are being used for your wsdeploy task.
Basically it needs the JavaMail API (I think should be in mail.jar or part of j2ee.jar).
You can be more agresive in the library search by using "**/*.jar" instead of "*.jar"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
dbrownell83Author Commented:
i printed out the command line that's being used, and it does include mail.jar in the classpath.

The addition of **/ didnt change anything
0
 
aozarovCommented:
>> and it does include mail.jar in the classpath
So what made you say: "MimeMultipart is in the directory mentioned"
0
 
dbrownell83Author Commented:
hmm, ok i added it to the eclipse ant class path, and it got past that step.  weird.

ill be back...
0
 
dbrownell83Author Commented:
i meant it's in mail.jar, which was in C:\\jwsdp-1.5/jwsdp-shared/lib
0
 
dbrownell83Author Commented:
Hmm, ok, so it made the deployable war, then i got it loaded in Tomcat Manager, but when i click 'start', it does nothing.

i'll mess around for a bit and check back.
0
 
dbrownell83Author Commented:
real helpful message: "FAIL - Application at context path /myprog-deployable could not be started"
0
 
aozarovCommented:
Try to change your tomcat logging verbosity.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/logger.html
0
 
dbrownell83Author Commented:
ah, i was looking in the stderr log, but i had to look in the localhost log.

SEVERE: Error configuring application listener of class com.sun.xml.rpc.server.http.JAXRPCContextListener
java.lang.ClassNotFoundException: com.sun.xml.rpc.server.http.JAXRPCContextListener

i'll take a look at it and be back soon
0
 
dbrownell83Author Commented:
i think i have to get my program's jars into the tomcat directory...
i'll try put em in the /classes folder, but feel free to tell me if im wrong
0
 
aozarovCommented:
you can bundle your jars inside your war file under the WEB-INF/lib folder
or put them in Tomcat common\lib folder
0
 
dbrownell83Author Commented:
thanks sir
0
 
aozarovCommented:
NP :-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 10
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now