无法通过Netbeans调试调试部署在WebLogic 12.2.1(管理服务器)上的REST应用程序

时间:2018-01-18 18:53:12

标签: debugging java-8 cdi netbeans-8 weblogic12c

问题:我无法通过Netbeans调试工具在WebLogic 12.2.1(管理服务器)上调试CDI / REST应用程序。不确定是什么问题。

我注意到以下内容,但不确定这些事情是否与问题有关......

服务器日志

WARNING: The following warnings have been detected: WARNING: Cannot create new registration for component type class org.glassfish.json.jaxrs.JsonStructureBodyReader: Existing previous registration found for the type.
WARNING: Cannot create new registration for component type class org.glassfish.json.jaxrs.JsonStructureBodyWriter: Existing previous registration found for the type.

WebLogic控制台/部署

under "Deployments", the application "unknown" under the "Type" column

当应用“开始”时,浏览器会显示以下内容...

javax.ws.rs.NotFoundException: HTTP 404 Not Found at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326) at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259) at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651) at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270) at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348) at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333) at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54) at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406) at weblogic.work.ExecuteThread.run(ExecuteThread.java:346) 

请注意,我可以通过WebLogic控制台手动部署应用程序

让我知道我可以提供哪些其他相关数据来帮助。

感谢关于如何在此应用程序上成功使用Netbeans 8.2调试器的任何想法/方向(部署到WebLogic版本12.2.1.2.0)

1 个答案:

答案 0 :(得分:0)

似乎使用这种技术我习惯于缩短REST URL路径(不需要'/ resources'部分)...即,

<强> MyApplication.java

@ApplicationPath("/")
public class MyApplication extends javax.ws.rs.core.Application {

}

...导致我上面描述的问题。

当我删除该类时,调试器开始工作(即,应用程序工作[部署到weblogic服务器]应该如此)。

由于 : - )