I placed the following request for information in the JBoss Tools forum and they refered me to JBossws. I hope someone can help me with this issue.
I am using Eclipse 3.3 and JBoss Tools Core 2.0.1.GA. I created a SEAM Web service (TestWs) which runs correctly. I start JBoss Server from the JBoss Server View. I check the console and I can find a reference to my TestWs Web service. I make some changes to my Web service and then right click on my moduel (within by JBoss Server view) and do a full publish of that service again. This time I do not see a reference to my web service. I'm using the Eclipse web service explorer to test my web service. When I try to use it again (after the changes and the redeploy) I get a could not create deployment - endpoint already registered error (see below). If I completely shutdown Eclipse, reopen and start JBoss Server again it works fine but after the first test (in debug mode) it will get the same message again and I will have to shut down and restart Eclipse again. This is very time consuming and any help would be greatly apprecaited.
11:46:59,969 ERROR [MainDeployer] Could not create deployment: file:/C:/Eclipse/Servers/jboss-4.2.2.GA/jboss-4.2.2.GA/server/all/deploy/PSDynamicWebProject-ear.ear/PSDynamicWebProject.war/
java.lang.IllegalStateException: Endpoint already registered: jboss.ws:context=PSDynamicWebProject,endpoint=TestWs
at $Proxy54.create(Unknown Source)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at $Proxy9.deploy(Unknown Source)
I would like to provide additional information for this issue. Our whole team has looked at this issue and cannot find a work around or the cause of the issue but we have figured out the sequence that triggers the issue.
1) We created a web service using annotations (@WebService(name = "TestWs") and it runs fine.
2) We created a class (People) that is annotated for xml marshalling (@XmlRootElement).
3) In the web service a database is queried and the data is stored in the People class.
4) Using javax.xml.bind the class is marshalled into a xml string.
5) At this point, in debut mode, there are occasions (depending upon the class fields) the marshaller will either work fine or the it wil fail. If it works fine the xml string is returned to the Web Service Explorer (built into Eclipse) and if it fails the error message string is returned to the Web Service Explorer.
6) Then we make changes to the People class (add or delete fields) and we get a message asking us if we want to continue, stop or restart the server. If we select continue the server runs find but only picks up the old version of the People class and not the new changes. The issues begin when we chose stop or restart server.
When the server is restarted there are two key issues: (1) If I search the console I cannot find a reference to my web service after the restart. The first time I start the server I see a reference that the web service was deplyed. (2) When I used the Web Service Explorer to find the web service I get an exception: javax.xml.ws.WebServiceException: Cannot obtain endpoint for: jboss.ws:context=/PSDynamicWebProject,endpoint=TestWs
At this point nothing we do in Eclipse can eliminate this exception. We have tried restarting the JBoss server, clicking on the module and doing a full publish and nothing works. The only resolution to get around this at this point has been to shutdwon Eclipse completely and restart it. This works until we have to change the class again and we go through the same steps.
We are in the start-up phase of re-writing our web applicaitons here and are evaluating JBoss and JBoss tools. We would really like to find a reslution to this since we are using Eclipse as our IDE and any help would be apprecaited.
Additional information. This issue appears to only happen when in Debug mode within Eclipse.
Generally speaking, the "Endpoint already registered" error can be caused by a failed deploy/undeploy that left the endpoint registry in a inconsistent state (i.e. the endpoint is registered but is actually not available). Do the errors you get somehow influence the deploy/undeploy?
I am now bitten by this. I am less interested in solving the bug than in cleaning it up. Where is this "endpoint registry" and how might I revert it to a clean state?
I highly suggest you to switch to JBoss 6.1.0.GA or JBoss 7.0.2
Should be fixed there
Unfortumately, this may not be not an option for me. I am constrained by the policies of the corporation for which I'm working. At present 5.1.0-GA is the only platform they'll support, and they WILL NOT ever support 6.x.x, but there is some talk of supporting in the not-too-distant future 7.x.x. I will try to press and see if this may be pushed forward.