Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
 
Heather Rose
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
 
Sanjay Madhu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!