Glassfish:EJB 容器初始化错误

发布于 2025-01-02 16:38:46 字数 1808 浏览 2 评论 0原文

我编写了一个小型 Web 服务,当我尝试将其部署到 glassfish 时,出现此错误:部署期间发生错误:加载应用程序时出现异常:EJB 容器初始化错误。请参阅 server.log 了解更多详细信息。

@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);
    }
}

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)

如果有人能告诉我我做错了什么,我将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

关于从前 2025-01-09 16:38:46

server.log 的内容很好地告诉您,当尝试解析

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

This 似乎是空格的第 17 个(索引从 0 开始)字符时出现问题。这指的是已经修复的错误: GLASSFISH-17242
您的选择是:

  1. 更新 Glassfish
  2. 避免在路径中使用空格

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文