com.sun.jersey.spi.inject.Errors$ErrorMessagesException

Java.net JIRA | mwoigt | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm creating a REST classes code generator (using freemarker and apt-jelly) for my project. One of the generated classes have a method with the following signature: @Path("isRoleNameAvailableForPrivateRoleAndClients/{roleNames}/{clientDTOs}") @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) public java.lang.Boolean isRoleNameAvailableForPrivateRoleAndClients( @PathParam("roleNames") java.util.Map<mydomain.entities.common.LanguageCode, java.lang.String> roleNames, @PathParam("clientDTOs") java.util.List<mydomain.entities.model.dto.ClientDTO> clientDTOs) throws ApplicationException, SystemException { Obviously, this is not recongnized by the com.sun.jersey.spi.container.servlet.ServletContainer as a valid method, which implies that my generated class is invalid. The problem is that my com.sun.jersey.spi.container.servlet.ServletContainer is configured as a startup-servlet of my web application. When it tries to start, I got an exception: com.sun.jersey.spi.inject.Errors$ErrorMessagesException at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) This com.sun.jersey.spi.inject.Errors$ErrorMessagesException is a very generic exception which actually don't display the problem. This error happens on jersey-core-1.9.1 / jersey-core-1.10 and jersey-core-1.11 . What I did was get the source code from http://www.jarvana.com/jarvana/view/com/sun/jersey/jersey-bundle/1.9.1/jersey-bundle-1.9.1-sources.jar!/com/sun/jersey/spi/inject/Errors.java?format=ok and implement the following blocks: IN THE INNER CLASS Errors.ErrorMessagesException: public static class ErrorMessagesException extends RuntimeException { public final List<ErrorMessage> messages; private ErrorMessagesException(List<ErrorMessage> messages) { this.messages = messages; } //CREATED THE TOSTRING METHOD public String toString() { StringBuffer sb = new StringBuffer(); if ( messages != null ) { Iterator itr = messages.iterator(); while(itr.hasNext()) { ErrorMessage em = (ErrorMessage) itr.next(); sb.append(em.toString() + "\n"); } } return sb.toString(); } } IN THE INNER CLASS Errors.ErrorMessages: public static class ErrorMessage { final String message; final boolean isFatal; private ErrorMessage(String message, boolean isFatal) { this.message = message; this.isFatal = isFatal; } @Override public int hashCode() { int hash = 3; hash = 37 * hash + (this.message != null ? this.message.hashCode() : 0); hash = 37 * hash + (this.isFatal ? 1 : 0); return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ErrorMessage other = (ErrorMessage) obj; if ((this.message == null) ? (other.message != null) : !this.message.equals(other.message)) { return false; } if (this.isFatal != other.isFatal) { return false; } return true; } //CREATED THE TOSTRING METHOD: public String toString() { return message; } } Now my stack trace is: ####<29/12/2011 14h13min11s BRST> <Warning> <Deployer> <cit006052> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1325175191406> <BEA-149078> <Stack trace for message 149004 weblogic.application.ModuleException: [HTTP:101216]Servlet: "Jersey REST Service" failed to preload on startup in Web application: "/portal-orion-ws". Missing dependency for method public java.lang.Boolean mydomain.security.services.SecurityRESTServices.isRoleNameAvailableForPrivateRoleAndClients(java.util.Map,java.util.List) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException at parameter at index 0 Method, public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForPrivateRoleAndClients(java.util.Map,java.util.List) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException, annotated with GET of resource, class mydomain.portalorion.security.services.SecurityRESTServices, is not recognized as valid resource method. Missing dependency for method public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForSharedRole(java.util.Map) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException at parameter at index 0 Method, public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForSharedRole(java.util.Map) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException, annotated with GET of resource, class mydomain.portalorion.security.services.SecurityRESTServices, is not recognized as valid resource method. at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:188) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:154) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:217) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) :com.sun.jersey.spi.inject.Errors.ErrorMessagesException:null at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:188) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:154) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:217) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) So as you can see, now I can understand the ErrorMessages, instead of having only a com.sun.jersey.spi.inject.Errors$ErrorMessagesException . I would appreciate a lot if this fix be part of the next release. Thanks in advance, Murilo

    Java.net JIRA | 5 years ago | mwoigt
    com.sun.jersey.spi.inject.Errors$ErrorMessagesException
  2. 0

    I'm creating a REST classes code generator (using freemarker and apt-jelly) for my project. One of the generated classes have a method with the following signature: @Path("isRoleNameAvailableForPrivateRoleAndClients/{roleNames}/{clientDTOs}") @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) public java.lang.Boolean isRoleNameAvailableForPrivateRoleAndClients( @PathParam("roleNames") java.util.Map<mydomain.entities.common.LanguageCode, java.lang.String> roleNames, @PathParam("clientDTOs") java.util.List<mydomain.entities.model.dto.ClientDTO> clientDTOs) throws ApplicationException, SystemException { Obviously, this is not recongnized by the com.sun.jersey.spi.container.servlet.ServletContainer as a valid method, which implies that my generated class is invalid. The problem is that my com.sun.jersey.spi.container.servlet.ServletContainer is configured as a startup-servlet of my web application. When it tries to start, I got an exception: com.sun.jersey.spi.inject.Errors$ErrorMessagesException at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) This com.sun.jersey.spi.inject.Errors$ErrorMessagesException is a very generic exception which actually don't display the problem. This error happens on jersey-core-1.9.1 / jersey-core-1.10 and jersey-core-1.11 . What I did was get the source code from http://www.jarvana.com/jarvana/view/com/sun/jersey/jersey-bundle/1.9.1/jersey-bundle-1.9.1-sources.jar!/com/sun/jersey/spi/inject/Errors.java?format=ok and implement the following blocks: IN THE INNER CLASS Errors.ErrorMessagesException: public static class ErrorMessagesException extends RuntimeException { public final List<ErrorMessage> messages; private ErrorMessagesException(List<ErrorMessage> messages) { this.messages = messages; } //CREATED THE TOSTRING METHOD public String toString() { StringBuffer sb = new StringBuffer(); if ( messages != null ) { Iterator itr = messages.iterator(); while(itr.hasNext()) { ErrorMessage em = (ErrorMessage) itr.next(); sb.append(em.toString() + "\n"); } } return sb.toString(); } } IN THE INNER CLASS Errors.ErrorMessages: public static class ErrorMessage { final String message; final boolean isFatal; private ErrorMessage(String message, boolean isFatal) { this.message = message; this.isFatal = isFatal; } @Override public int hashCode() { int hash = 3; hash = 37 * hash + (this.message != null ? this.message.hashCode() : 0); hash = 37 * hash + (this.isFatal ? 1 : 0); return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ErrorMessage other = (ErrorMessage) obj; if ((this.message == null) ? (other.message != null) : !this.message.equals(other.message)) { return false; } if (this.isFatal != other.isFatal) { return false; } return true; } //CREATED THE TOSTRING METHOD: public String toString() { return message; } } Now my stack trace is: ####<29/12/2011 14h13min11s BRST> <Warning> <Deployer> <cit006052> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1325175191406> <BEA-149078> <Stack trace for message 149004 weblogic.application.ModuleException: [HTTP:101216]Servlet: "Jersey REST Service" failed to preload on startup in Web application: "/portal-orion-ws". Missing dependency for method public java.lang.Boolean mydomain.security.services.SecurityRESTServices.isRoleNameAvailableForPrivateRoleAndClients(java.util.Map,java.util.List) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException at parameter at index 0 Method, public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForPrivateRoleAndClients(java.util.Map,java.util.List) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException, annotated with GET of resource, class mydomain.portalorion.security.services.SecurityRESTServices, is not recognized as valid resource method. Missing dependency for method public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForSharedRole(java.util.Map) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException at parameter at index 0 Method, public java.lang.Boolean mydomain.portalorion.security.services.SecurityRESTServices.isRoleNameAvailableForSharedRole(java.util.Map) throws mydomain.framework.exception.ApplicationException,mydomain.framework.exception.SystemException, annotated with GET of resource, class mydomain.portalorion.security.services.SecurityRESTServices, is not recognized as valid resource method. at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:188) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:154) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:217) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) :com.sun.jersey.spi.inject.Errors.ErrorMessagesException:null at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:188) at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:154) at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:217) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:242) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) So as you can see, now I can understand the ErrorMessages, instead of having only a com.sun.jersey.spi.inject.Errors$ErrorMessagesException . I would appreciate a lot if this fix be part of the next release. Thanks in advance, Murilo

    Java.net JIRA | 5 years ago | mwoigt
    com.sun.jersey.spi.inject.Errors$ErrorMessagesException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [HTTP:101216]Servlet: "jersey" failed to preload on startup in Web application:"

    Oracle Community | 3 years ago | 4ebb406f-2b46-42da-9262-e12f5bff8829
    com.sun.jersey.spi.inject.Errors$ErrorMessagesException
  5. 0

    How to ignore a @FormParam from swagger UI in jersey.

    GitHub | 3 years ago | poonkothai408425
    com.sun.jersey.spi.inject.Errors$ErrorMessagesException

  1. tvrmsmith 1 times, last 10 months ago
13 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.sun.jersey.spi.inject.Errors$ErrorMessagesException

    No message provided

    at com.sun.jersey.spi.inject.Errors.processErrorMessages()
  2. jersey-core
    Errors.processWithErrors
    1. com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
    2. com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136)
    3. com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199)
    3 frames
  3. Jersey
    WebApplicationImpl.initiate
    1. com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:779)
    2. com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:767)
    2 frames
  4. Jersey
    ServletContainer.init
    1. com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489)
    2. com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319)
    3. com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609)
    4. com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
    5. com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
    6. com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
    6 frames
  5. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:242)
    1 frame
  6. Atmosphere weblogic
    StubSecurityHelper$ServletInitAction.run
    1. weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    1 frame
  7. weblogic.security.acl
    AuthenticatedSubject.doAs
    1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    1 frame
  8. weblogic.security.service
    SecurityManager.runAs
    1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    1 frame
  9. Atmosphere weblogic
    WebAppModule.start
    1. weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    2. weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    3. weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    4. weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    5. weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
    6. weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
    7. weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
    8. weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    9. weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
    10. weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
    10 frames
  10. weblogic.application.internal
    ModuleStateDriver$3.next
    1. weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
    2. weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
    2 frames
  11. weblogic.application.utils
    StateMachineDriver.nextState
    1. weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54)
    1 frame
  12. weblogic.application.internal
    BaseDeployment$2.next
    1. weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    2. weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
    3. weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
    3 frames
  13. weblogic.application.utils
    StateMachineDriver.nextState
    1. weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54)
    1 frame
  14. weblogic.application.internal
    DeploymentStateChecker.activate
    1. weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
    2. weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    3. weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    3 frames
  15. weblogic.deploy.internal
    DeploymentServiceDispatcher.commit
    1. weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    2. weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    3. weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    4. weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    5. weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    6. weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    7. weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    8. weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    9. weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
    9 frames
  16. weblogic.deploy.service
    DeploymentReceiverCallbackDeliverer$2.run
    1. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
    2. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    3. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
    3 frames
  17. weblogic.work
    ExecuteThread.run
    1. weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    2. weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    3. weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    3 frames