• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Reading env-entry in Jax-ws web service  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having some issues reading an env-entry from within a @WebService annotated class on Glassfish 3.1,

here is the relevant code


the sun-javaws.xml is the following

here is the service impl

if i comment out the configPath declaration i get the following exception

Exception while deploying the app [TestApp] : No matching injection setter method or injection field found for injection property configPath on class test.TestService for component dependency Env-Prop: configPath@Method-Injectable Resource. Class name =test.TestService Method =null@java.lang.String@/opt/project/conf@@Path to ExternalConfiguration Files
java.lang.NoSuchFieldException: configPath

if i leave it in the implementation, the exception isn't thrown but the value is never set. Im sure this is a simple problem but for some reason I cannot seem to work through it. Also, no difference was made if I annotated the field with @Resource

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried adding a setConfigPath method taking a parameter of the type string?
Since you use injection with the deployment descriptor you do not need to annotate neither the field nor the setter method.
Best wishes!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!