• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Service with build.xml

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Ranch Hand
Posts: 59
Hibernate Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Adriano Ferreira
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 59
Hibernate Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 44
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !!
 
Adriano Ferreira
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, I made the changes and configuration, but is happening the same error:



help me please
 
Rick Roberts
Ranch Hand
Posts: 59
Hibernate Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Show us your build.properties file.
 
Adriano Ferreira
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is it:

 
Rick Roberts
Ranch Hand
Posts: 59
Hibernate Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks

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

 
reply
    Bookmark Topic Watch Topic
  • New Topic