java - Context failed to start when deploy web-service in netbeans to tomcat-apache -


i try follow getting started jax-ws web services tutorial on netbeans site. create web-service-app (java ee 6 web, tomcat 7.0), when add web-service class netbeans asks me if want use metro (because server does't jsr-109), yes , adds metro libraries.

now webservice using javax.ejb.stateless selected "implement web service stateless session bean" checkbox, no library containing class added , error in netbeans:

import javax.ejb.stateless; ... @webservice(servicename = "webservicetest") @stateless() public class webservicetest {...} 

"cannot find symbol: class stateless"

ofcourse can't. when add "java ee web 6 api library - javaee-web-api-6.0.jar" error solved, when deploy project error thats whole lot more difficult, , error actual problem...

deployment in progress... deploy?config=file%3a%2fc%3a%2fusers%2ftjen%2fappdata%2flocal%2ftemp%2fcontext6376466830057976095.xml&path=/calculatorwsapplication fail - deployed application @ context path /calculatorwsapplication context failed start [here direction line of error] module has not been deployed.     @ org.netbeans.modules.j2ee.deployment.devmodules.api.deployment.deploy(deployment.java:187)     [...a whole lot of red-collored stack-trace stuff] build failed (total time: 1 second) 

at following line:

<nbdeploy clienturlpart="${client.urlpart}" debugmode="false" forceredeploy="${forceredeploy}"/> 

i put arguments on different lines this:

<nbdeploy  clienturlpart="${client.urlpart}"  debugmode="false"  forceredeploy="${forceredeploy}" /> 

which didn't me @ all(but maybe you), because eror @ line:

/> 

now if comment out stateless usage, , remove "java ee web 6 api library - javaee-web-api-6.0.jar" library, there no problem , works charm. (after 'clean , build' otherwise keeps going errored)

it doesn't matter library add, if do, same error. can example working, able add libraries without crashing...

hope solve mystery, tjen

ps: specs

  • product version: netbeans ide 7.0 (build 201104080000)
  • java: 1.6.0_21; java hotspot(tm) 64-bit server vm 17.0-b17
  • system: windows 7 version 6.1 running on amd64;
  • tomcat 7.0.11
  • i have jaxb-api.jar , jaxws-api.jar endorsed in jdk 1.6 platform

this because did not chose glassfish web server, in creating project must chose glassfish web server , jdk 1.7 @ least.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -