7
votes

I wrote a small webservice and when i try to deploy it to glassfish i get this error: Error occurred during deployment: Exception while loading the app : EJB Container initialization error. Please see server.log for more details.

@WebService(serviceName = "Mathematics")
public class Mathematics
{
    @WebMethod(operationName = "add")
    public double add(@WebParam(name = "a") double a,
            @WebParam(name = "b") double b)
    {
        return NovusMath.add(a, b);
    }
}

Relevant portions of server.log:

[#|2012-02-04T21:25:45.437+0100|WARNING|glassfish3.1.1|
javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=39;
_ThreadName=Thread-2;|Illegal character in path at index 16:
file:/C:/Program Files/glassfish-3.1.1/glassfish/domains/domain1/applications/
Mathematics-web-1.0-SNAPSHOT/WEB-INF/lib/Mathematics-lib-1.0-SNAPSHOT.jar

java.net.URISyntaxException: Illegal character in path at index 16:
file:/C:/Program Files/glassfish-3.1.1/glassfish/domains/domain1/applications/
Mathematics-web-1.0-SNAPSHOT/WEB-INF/lib/Mathematics-lib-1.0-SNAPSHOT.jar
        at java.net.URI$Parser.fail(URI.java:2827)
        at java.net.URI$Parser.checkChars(URI.java:3000)

...

[#|2012-02-04T21:25:45.906+0100|SEVERE|glassfish3.1.1|
javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|
_ThreadID=39;_ThreadName=Thread-2;|
Exception while loading the app : EJB Container initialization error
javax.xml.ws.WebServiceException: WS00056 : Deployment cannot proceed as the ejb has a
null endpoint address uri.

Potential cause may be webservice endpoints not supported in embedded ejb case
at org.glassfish.webservices.WebServiceEjbEndpointRegistry.
registerEndpoint(WebServiceEjbEndpointRegistry.java:117)

If anyone could tell me what I am doing wrong I would greatly appreciate it.

1
"Please see the server.log for details" is crucial here :) - Kris
Let me beat a dead horse...did you "see server.log for more details"? You're asking for your problem to be solved without providing the exception and you're leaving us to guess which line the error occurred on. This is "StackOverflow", not "PsychicOverflow" :) - Paul
server.log here -- pastebin.com/gpDArm5k - user520288
Looks like one possible cause might be the error for reading your jar file? - Peter Svensson
i am using netbeans and it is a .war from a maven web application... what could i be doing wrong? it's just a simple build :( - user520288

1 Answers

6
votes

Content of the server.log tells you nicely that problem occurs when trying to parse 17th (indexing starts from 0) character of

file:/C:/Program Files/glassfish-3.1.1/glassfish/...

This seems to be space. This refers to already fixed bug: GLASSFISH-17242 Your options are:

  1. update Glassfish
  2. avoid using space in path