我正在开发一个Java Web项目,它使用NetBeans的自动机制从实体类创建RESTful Web服务(NetBeans 7.2,服务器GlassFish 3.1.2)。当我创建具有复合主键的实体类时,会创建两个类:EntityClass
和EntityClassPK
,使用@Embeddable
和@EmbeddedId
进行注释。我尝试使用GET
和REMOVE REST
资源。
应用程序部署正常,但是当我在NetBeans中尝试操作"Test RESTful Web Services"
时,WADL无法打开并附加此server.log:
SEVERE: The following errors and warnings have been detected with resource and/or provider classes: SEVERE: Missing dependency for method public void service.ColocacionesbyMadFacadeREST.remove(entity.ColocacionesbyMadPK) at parameter at index 0
SEVERE: Method, public void service.ColocacionesbyMadFacadeREST.remove(entity.ColocacionesbyMadPK), annotated with DELETE of resource, class service.ColocacionesbyMadFacadeREST, is not recognized as valid resource method.
SEVERE: Missing dependency for method public entity.ColocacionesbyMad service.ColocacionesbyMadFacadeREST.find(entity.ColocacionesbyMadPK) at parameter at index 0
SEVERE: Method, public entity.ColocacionesbyMad service.ColocacionesbyMadFacadeREST.find(entity.ColocacionesbyMadPK), annotated with GET of resource, class service.ColocacionesbyMadFacadeREST, is not recognized as valid resource method.
任何想法?谢谢!