gpt4 book ai didi

java - Glassfish:EJB 容器初始化错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:26:05 25 4
gpt4 key购买 nike

我编写了一个小型网络服务,当我尝试将其部署到 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)

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

最佳答案

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

的第 17 个(索引从 0 开始)字符时出现问题
file:/C:/Program Files/glassfish-3.1.1/glassfish/...

这似乎是空间。这是指已修复的错误:GLASSFISH-17242您的选择是:

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

关于java - Glassfish:EJB 容器初始化错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9144232/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com