繁体   English   中英

如何从Glassfish中删除球衣资源

[英]how to remove jersey resource from glassfish

我有一个Endpoint.java作为glassfish + netbeans中的资源。 我删除了此文件,并创建了另一个名为“用户”的资源。

Glassfish以以下内容开头:

INFO:   EJB5181:Portable JNDI names for EJB Endpoint: [java:global/rest/Endpoint, java:global/rest/Endpoint!com.shintsha.rest.server.Endpoint]

接着

我得到错误

 org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
[[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by @Consumes and @Produces annotations at Java methods public java.lang.String com.shintsha.rest.server.Users.getUser(java.lang.String) and public java.lang.String com.shintsha.rest.server.Endpoint.getUser(java.lang.String) at matching regular expression /([^/]+?). These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@7b77c647']
    at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:410)

我的ApplicationConfig.java无需任何代码即可简单地扩展rs.application。

我可以删除它吗? 我看着asadmin,但jndi没有显示。

解:

清理netbeans中的项目,将其关闭,然后重新启动并重新部署服务器。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM