• 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

java.lang NullPointerException with EJB 3 stateless web services (JBoss 5 CR1)

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I get an error while deploying a Stateless session bean defined as a web service on JBoss 5 CR1.
It seems to be a problem of version of JRE since it works with JRE 5 but does not work with JRE 6.
I am using Eclipse 3.4

My interface looks like this :
@WebService
@SOAPBinding(style = Style.RPC)
public interface Test extends Remote {
...
}

My bean looks like this :

@Stateless
@WebService(endpointInterface ="Test")
@Remote(Test.class)
public class TestBean {
...
}

It deploys with jre 1.5 but it fails miserably using jre 1.6. Here is the stack trace (the web services are developped inside the VenteEnLigneEJB project, with Eclipse 3.4):


And the version of java that i use :




If i comment out the annotations @Webservice on the class AND the interface, it deploys correctly, no error.

Does anyone know what is wrong here ?

Thanks
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you made sure the Eclipse version you have matches the jdk you have installed? Have you set your environmental variables correctly?

Did you change something in the project settings? Sometimes with jdk1.6, it errors out because something doesn't match in eclipse.

Let me know if this works.
 
Celinio Fernandes
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, thanks for helping.
well yes i am sure, the version of the JRE installed on my computer is the same i use in Eclipse :


Any idea ? thanks
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
What is your webService name?

Try with
@WebService(name = "abc", serviceName = "abcService").

The Ideal way of defining WebService in EJB 3.0

@Stateless
@Local(abc.class)
@Remote(abc.class)
@WebService(name = "abc", serviceName = "abcService")
public class abcBean implements abc
{
.....
.....
}

Sanjay
 
reply
    Bookmark Topic Watch Topic
  • New Topic