This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create a Java EE 6 Web Application Create new "RESTful Web services from Patterns ..." Take Default "Simple Root Resource" Enter the package name "foo" and click on "Finish" Uncheck "Add Jersey library to project classpath" and click on "OK" Right-click project, Properties, Libraries Jersey library is selected even though it was explicitly unselected earlier. Deploying this project gives an error: Dec 29, 2011 4:55:35 PM com.sun.jersey.spi.inject.Errors processErrorMessages SEVERE: The following errors and warnings have been detected with resource and/or provider classes: at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) SEVERE: Missing dependency for field: private com.sun.jersey.oauth.server.spi.OAuthProvider com.sun.jersey.oauth.server.api.resources.AccessTokenRequest.provider SEVERE: Missing dependency for field: private com.sun.jersey.oauth.server.spi.OAuthProvider com.sun.jersey.oauth.server.api.resources.RequestTokenRequest.provider at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:60) Unselecting the library from Project Properties again proceeds successfully with the deployment.
Could this be a duplicate of bug 204573?
I don't think so, here the libraries are added to the path even though unselected.
(In reply to comment #2) > I don't think so, here the libraries are added to the path even though > unselected. Right, this is not a duplicate but it is related. Anyway it is fixed : web-main#5b087d108782
Says this is fixed, but I just upgraded to 7.1 and got this same error when trying to deploy a previously working project (and my project did include Jersey since I am producing web services). Using GlassFish 3.1.1, snippet from log below: INFO: Binding the EJB class com.omnistools.session.PublishedChecklistsFacade to EJBManagedComponentProvider INFO: Binding the EJB class com.omnistools.session.CompanyChecklistItemsFacade to EJBManagedComponentProvider SEVERE: The following errors and warnings have been detected with resource and/or provider classes: SEVERE: Missing dependency for field: private com.sun.jersey.oauth.server.spi.OAuthProvider com.sun.jersey.oauth.server.api.resources.AccessTokenRequest.provider SEVERE: Missing dependency for field: private com.sun.jersey.oauth.server.spi.OAuthProvider com.sun.jersey.oauth.server.api.resources.RequestTokenRequest.provider SEVERE: WebModule[/OmnisTools]StandardWrapper.Throwable 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:771) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:766) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) 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:373) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) at javax.servlet.GenericServlet.init(GenericServlet.java:244) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380) at com.sun.enterprise.web.WebModule.start(WebModule.java:497) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1997) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1648) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:101) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:455) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680) SEVERE: WebModule[/OmnisTools]PWC1396: Servlet /OmnisTools threw load() 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:771) at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:766) at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) 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:373) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) at javax.servlet.GenericServlet.init(GenericServlet.java:244) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1444) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1241) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5380) at com.sun.enterprise.web.WebModule.start(WebModule.java:497) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1997) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1648) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:101) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:455) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680)
>Says this is fixed, but I just upgraded to 7.1 How did you upgrade ? Do you use the latest dev build ? The fix is available only in the trunk which is 7.2 dev. The other thing : how this relates to Web Logic ( the original compoenent of the issue ) if you are saying you use GF ?
I cannot move this bug into the WS product for reason I don't understand. I'm closing this issue because the latest issue is absolutely unrelated to the current issue under question. This issue is about extending project classpath with Jersey jars even if option is unchecked and user don't want them in the classpath. This is fixed. The mentioned exception is just a consequence of WL classloader limitation . If you have some problems with GF then file a different issue with exact steps to reproduce.
Also works fine in NB 7.0.1 which uses Jersey 1.3, which is what is loaded on the server. Library for Jersey 1.3 doesn't include any OAuth* jars, only the following: asm-3.1.jar jersey-spring-1.3.jar jackson-core-asl-1.1.1.jar jettison-1.1.jar jersey-client-1.3.jar jsr311-api-1.1.1.jar jersey-core-1.3.jar mimepull-1.4.jar jersey-json-1.3.jar oauth-client-1.3.jar jersey-multipart-1.3.jar oauth-signature-1.3.jar jersey-server-1.3.jar NB 7.1 appears to include the OAuth modules and a newer version of Jersey: asm-3.1.jar jersey-json-1.8.jar jackson-core-asl-1.7.1.jar jersey-multipart-1.8.jar jackson-jaxrs-1.7.1.jar jersey-server-1.8.jar jackson-mapper-asl-1.7.1.jar jersey-simple-server-1.8.jar jackson-xc-1.7.1.jar jersey-spring-1.8.jar jersey-apache-client-1.8.jar jettison-1.1.jar jersey-atom-abdera-1.8.jar jsr311-api-1.1.1.jar jersey-client-1.8.jar oauth-client-1.8.jar jersey-core-1.8.jar oauth-server-1.8.jar jersey-guice-1.8.jar oauth-signature-1.8.jar And then just to confuse things even further, Glassfish says it uses Jersey 1.9-1.18
Mistakenly added my issue to this one before, not realizing it was a WL problem. The OAuth exception is identical to the GlassFish problem I'm seeing though.
Integrated into 'main-golden', will be available in build *201201110601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5b087d108782 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#206799 - Jersey library is packaged even though unselected
This was a frustrating bug. I am a complete beginner at JavaEE and tried the firstcup JavaEE Tutorial. The very first program you write is a Restful web service, and it instructs you to un-check the jersey library, which I did. Then when you have finished and try to run the program, it fails. It wasn't easy to find what the problem was, and as an Eclipse user at work, this really put me off trying Netbeans any further. A very bad experiance for a newbie.
If you are running the application from net-beans, follow the steps to deploy and run successfully. 1. Right click on the project and go to "properties" 2. Click on "Libraries" 3. Unchecked the "Jersey 1.8" from the "compile" tab. 4. Click "ok" 5. Do clean, build and deploy and after that run.
(In reply to comment #11) > If you are running the application from net-beans, follow the steps to deploy > and run successfully. > 1. Right click on the project and go to "properties" > 2. Click on "Libraries" > 3. Unchecked the "Jersey 1.8" from the "compile" tab. > 4. Click "ok" > 5. Do clean, build and deploy and after that run. it works thanks :)