It's not a secret anymore!*
The moose likes Web Services and the fly likes Web Service with build.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service with build.xml" Watch "Web Service with build.xml" New topic
Author

Web Service with build.xml

Adriano Ferreira
Ranch Hand

Joined: Jan 05, 2011
Posts: 34
Hi, Im trying to execute a Web Service with NetBeans 6.9.1 IDE, but happens the following error

Target "run-main" does not exist in the project "WebServiceIDM".

Someone??
Rick Roberts
Ranch Hand

Joined: Apr 07, 2005
Posts: 59

You didn't give us much to go on, but here is my best guess:

Your default is probably set to "=run-main", but you have no "run-main" target defined in your build.xml.

This is probably incomplete because I just did a few quick cut 'n pastes to have an example for you, but....
Here is a sample build.xml where you can see my default and my target defined:



In this example, the main() will be in my "com.sample.Client" class.

SCJP
"Stay on the path."
Adriano Ferreira
Ranch Hand

Joined: Jan 05, 2011
Posts: 34
Hi, thanks for your answer

Can you look my xml file? Its that:



I have to execute a Web Service with NetBeans 6.9.1 but now is happenning the following errors:
C:\Documents and Settings\abalbino\Meus documentos\NetBeansProjects\WebServiceIDM\build.xml:68: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
run-main:
Running the web services sample: ${classname}
java.lang.NoClassDefFoundError: ${classname}
Caused by: java.lang.ClassNotFoundException: ${classname}
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
Java Result: 1

someone please?

thanks
Rick Roberts
Ranch Hand

Joined: Apr 07, 2005
Posts: 59

Can you get the "compile" to complete?
Try this at the command line:


I have not worked with NetBeans in a long time, but there is a way to select a target using it, instead of just going with the default.
If you can't figure it out, then you can change the 1st line in your build.xml from:

to this:


Also, this looks suspicious at line 113:

Actually, this looks like it could be your problem. The error looks like a classpath related message.
That value is probably being set in your build.properties file.
Take a look at build.properties and double check your values.
Murali Sridhar
Ranch Hand

Joined: Feb 16, 2009
Posts: 44

Hi Ferreira,

Can you check the Ant Runtime classpath entries in your NetBeans IDE.
We do the ANT Runtme classpath setup in Eclipse ISE at : Windows->Preferences->Ant->Runtime->Classpath
Here you can make sure 'Ant home entries ' are all installed jars from ant home and Global entries point to tools.jar from your Jdk install.

Please check for the similar properties setup in NetBeans( I have provided the Eclipse IDE)

Good luck !!


Regards,
Murali
Adriano Ferreira
Ranch Hand

Joined: Jan 05, 2011
Posts: 34
hi, I made the changes and configuration, but is happening the same error:



help me please
Rick Roberts
Ranch Hand

Joined: Apr 07, 2005
Posts: 59

Show us your build.properties file.
Adriano Ferreira
Ranch Hand

Joined: Jan 05, 2011
Posts: 34
This is it:

Rick Roberts
Ranch Hand

Joined: Apr 07, 2005
Posts: 59

See these lines in your build.xml?

Your error is saying that ${classname} has not been supplied.

Although, I'm not sure why your <echo> message didn't print its message.
Probably need a "depends=classname-check" somewhere, but I'm thinking that you can get past this error if you just:

Specify -Dclassname=<classname> where <classname> is a fully qualified classname

Which means that you just need to pass java an argument called "classname".
i.e java -Dclassname="myClassName"

Or tell NetBeans to do it.
Adriano Ferreira
Ranch Hand

Joined: Jan 05, 2011
Posts: 34
thanks

I tried but I didn't reach. Someone knows NetBeans ?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service with build.xml