• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 3.0, JBoss 4.2, JPA, JNDI, and Web Services  RSS feed

 
mike murray
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having trouble getting a very simple web service to work. My WSDL is generated correctly, but when I try to invoke one of my web methods with a SOAP request, I get this response back:




I am fairly certain that this code is very closely related to the problem:


Because when I comment that code out, all of the sudden my service will send back valid responses. So I'm assuming that means my problem has something to do with JNDI or JPA.

Here is the entity i'm trying to persist in the web method:
http://devk.it/ec0DhwS7NB

Here is my persistence.xml:
http://devk.it/37vCj4EReq

Here is my ds.xml (which is in my /deploy/ folder):
http://devk.it/f13G5pC7xq

Here is the Service Bean:
http://devk.it/6b0451wccr

And here is my Remote interface:
http://devk.it/14etOF2X0O


I've been researching away trying to get my EJB setup working, but things are moving very slow because of this problem. All help is very appreciated!

Thank you,
Mike Murray
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,

Welcome to JavaRanch

Please post the entire exception stacktrace and the bean code.
 
mike murray
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bean code is here:
http://devk.it/6b0451wccr

Here is the exception stack trace:



And here is the section of my console dump that I'm fairly certain is closely related to my problem:




So it says:
Cannot find service endpoint target: jboss.j2ee:name=ServiceBean,service=EJB3,jar=Battleship.jar

Does that mean its not deploying my EJB at all? I was pretty sure that the EJB was being deployed correctly. Like I said before, when I comment out the entity manager the add web method works perfectly.

I'm pretty confused while it's getting that exception in the first place. As you can see in my Bean ( http://devk.it/6b0451wccr ), I've annotated endpointInterface="org.battleship.ejb.ServiceRemote", which is the correct class name of my Remote interface.

It looks like everything may be because of this guy:

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:name=bshipDs,service=DataSourceBinding
State: NOTYETINSTALLED
Depends On Me:
persistence.units:jar=Battleship.jar,unitName=bship


And I noticed that my DS is listed under "packages waiting for a deployer" with a state of INIT_WAITING_DEPLOYER. Did I deploy my DataSource incorrectly?

All I did was put ds.xml in /deploy/ and add the mysql jdbc drivers to /lib/, are there more steps?

[ December 05, 2008: Message edited by: mike murray ]
[ December 05, 2008: Message edited by: mike murray ]
 
mike murray
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case anyone stumbles upon this, it turns out my problem was an improperly named data source file.

My file was named ds.xml, while it should be *-ds.xml.

Jaikiran discovered my fault and answered on another forum.
 
Sarvesh Renghe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for posting your solution. It saved me some time.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!