我试图在jboss eap 6.3服务器上部署一个war(Rest based Webservice)文件.部署失败,出现以下跟踪.
我查看了所有依赖项,一切看起来都很好.
我错过了什么吗?
11:22:57,659 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "RestService.war" (runtime-name: "RestService.war")
11:22:58,074 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,074 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$Text' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'
11:22:58,075 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: …
Run Code Online (Sandbox Code Playgroud) 我一直在尝试使用maven设置ear的远程部署,但是失败了,因为jboss-cli.bat脚本无法连接到服务器。它因堆栈跟踪而失败:
C:\Users\pstephens\Programming\jboss-eap-6.2\jboss-eap-6.2\bin>jboss-cli.bat --controller=172.22.2.29:9999 --connect --user=pstephens --password=#######
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:284)
at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:262)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.modules.Module.run(Module.java:292)
at org.jboss.modules.Main.main(Main.java:455)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at 172.22.2.29:9990
at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:969)
at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:808)
at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:784)
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:282)
... 8 more
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://172.22.2.29:9990. The connection timed out
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:947)
... 11 more
Caused by: java.net.ConnectException: JBAS012144: …
Run Code Online (Sandbox Code Playgroud) 我的JSF应用程序中有一个注销链接,使会话无效以将用户注销.它可以工作,但它不会将用户重定向到登录页面.它保持在同一页面上.如果我再次尝试访问同一页面,它会直接返回登录.我想要立即发生这种情况.
注销链接:
<h:form>
<h:panelGroup id="loginout">
<h:outputText value="#{todoController.loggedInUser}" />
<h:commandLink value="logout" action="#{todoController.logout}" />
</h:panelGroup>
</h:form>
Run Code Online (Sandbox Code Playgroud)
注销码:
public String logout()
{
System.out.println("testing logout");
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
final HttpServletRequest r = (HttpServletRequest)ec.getRequest();
r.getSession( false ).invalidate();
return "../login.html?faces-redirect=true";
}
Run Code Online (Sandbox Code Playgroud) 我正在使用 Infinispan 缓存来存储值。代码每 10 分钟写入一次缓存,缓存达到大约 400mb 的大小。它有大约 2 小时的生存时间,最大条目为 1600 万,尽管目前在我的测试中条目数量不超过 200 万左右(我可以通过检查 jconsole 中的 mbeans/metrics 看到这一点) .
当我启动 jboss 时,java 堆大小是 1.5Gb 到 2Gb。分配给 jboss 的最大内存的 -Xmx 设置为 4Gb。
当我禁用 Infinispan 缓存时,堆内存使用量保持在 1.5Gb 到 2Gb 左右。它非常稳定并保持在那个水平。
=> 问题是:当我启用Infinispan 缓存时,java 堆大小增长到大约 3.5Gb/4Gb,这超出了预期。我做了一个堆转储来检查 Eclipse MAT 中缓存的大小,它只有 300 或 400mb(没关系)。所以我希望内存使用量达到 2.5Gb 并保持稳定在这个水平,因为初始堆大小是 2Gb,最大缓存大小应该只有 500mb 左右。
然而,它会随着时间的推移继续增长和增长。每 2 或 3 小时完成一次垃圾收集,这将使用量降低到大约 1 或 1.5Gb,但随后在 30 分钟内再次增加到 3.5Gb。条目数稳定在大约 200 万个,因此这不仅仅是因为更多条目进入缓存。(此外,驱逐次数保持为 0)。
如果缓存只有 400-500 mb,那么什么可以保留这么大的内存?我的垃圾收集设置有问题吗?还是我应该查看 Infinispan 设置?
谢谢!
编辑:您可以在此处查看随时间变化的堆大小。奇怪的是,即使在看起来像完整的 GC 之后,内存也会再次回升到 3Gb。这对应于进入缓存的更多条目。
编辑:事实证明这与 …
jboss6.x ×4
java ×3
caching ×1
infinispan ×1
java-ee ×1
jboss ×1
jboss7.x ×1
jsf ×1
rest ×1
web-services ×1