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.

Bug 245045 - Getting Cannot access WADL.Please restart your REST application and refresh this page" for a Maven based REST web service in Netbeans 8.0 using Glassfish or Tomcat
Summary: Getting Cannot access WADL.Please restart your REST application and refresh t...
Status: RESOLVED INCOMPLETE
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 8.0.2
Hardware: All All
: P1 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 16:53 UTC by nishath1
Modified: 2016-04-22 15:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nishath1 2014-06-13 16:53:16 UTC
Hi,
I am trying to create a REST webservice using Maven build tool and Netbeans 8.0.When I test the REST web service I am getting the error "Cannot access WADL.Please restart your REST application and refresh this page".I was able to succesfully test this REST web service without maven on this IDE.

Please help.Its kind of urgent.
Comment 1 Milan Kuchtiak 2014-06-16 07:59:05 UTC
Could you please describe the steps that led to this error.
Or, the best, attach the sample project documenting the error.

I tested:

RESTful Web Services -> Sample Service node -> Test ResourceUri action
RESTful Web Services -> Test RESTful Web Services action, with Web Test Client option (the Locally Generated Client option doesn't work properly)

Both worked as expected.

(Tested with Netbeans 8.0, JDK 1.8, GlassFish 4.0)
Comment 2 pkevin 2015-01-29 16:17:31 UTC
I can confirm that this bug exists when creating the web application with maven, using NB 8.0.  After trying many times to do just that and continually getting a WADL not found error, I created the web app project without using maven, and everything worked the first time I tried.
Comment 3 ayushmathur 2015-03-11 04:00:57 UTC
Hi,

I'm also facing the same issue. Here are the steps I followed:

1. Created a web application structure.,
2. Created a RESTful web service from Database.
3. Changed the application path and resource path as required.
4. Clean, build and deployed the service on JBOSS AS 7.
5. Run Test RESTful Web Services which is persistently showing me the error: "Cannot access WADL: Please restart your REST application, and refresh this page."

Kindly let me know how can I resolve the problem as its already been 2 weeks while struggling and working around to resolve it.
Comment 4 jmontoyac 2015-03-28 21:25:29 UTC
(In reply to ayushmathur from comment #3)
> Hi,
> 
> I'm also facing the same issue. Here are the steps I followed:
> 
> 1. Created a web application structure.,
> 2. Created a RESTful web service from Database.
> 3. Changed the application path and resource path as required.
> 4. Clean, build and deployed the service on JBOSS AS 7.
> 5. Run Test RESTful Web Services which is persistently showing me the error:
> "Cannot access WADL: Please restart your REST application, and refresh this
> page."
> 
> Kindly let me know how can I resolve the problem as its already been 2 weeks
> while struggling and working around to resolve it.

I´m experiencing the same problem, but with different server, I´m using Glassfish 4.1, and followed the steps to create and test the RESTful web services from tutorial "Getting Started with RESTful Web Services" https://netbeans.org/kb/docs/websvc/rest.html

The server should not be the problem.

Hope someone can help with this old issue.

Regards
Comment 5 Petr Hejl 2015-03-30 10:08:45 UTC
I went through the tutorial but it works just ok for me. The only issue I have found is #251500. Please provide the exact steps to reproduce.

(In reply to jmontoyac from comment #4)
> I´m experiencing the same problem, but with different server, I´m using
> Glassfish 4.1, and followed the steps to create and test the RESTful web
> services from tutorial "Getting Started with RESTful Web Services"
> https://netbeans.org/kb/docs/websvc/rest.html
> 
> The server should not be the problem.
> 
> Hope someone can help with this old issue.
> 
> Regards
Comment 6 Petr Hejl 2015-03-30 10:09:22 UTC
(In reply to ayushmathur from comment #3)
> Hi,
> 
> I'm also facing the same issue. Here are the steps I followed:
> 
> 1. Created a web application structure.,
> 2. Created a RESTful web service from Database.
> 3. Changed the application path and resource path as required.
> 4. Clean, build and deployed the service on JBOSS AS 7.
> 5. Run Test RESTful Web Services which is persistently showing me the error:
> "Cannot access WADL: Please restart your REST application, and refresh this
> page."
> 
> Kindly let me know how can I resolve the problem as its already been 2 weeks
> while struggling and working around to resolve it.

What is the exact JBoss version you use?
Comment 8 Petr Hejl 2015-03-30 14:22:21 UTC
I have found another related issue #251509. However I'm not able to reproduce issue in mentioned in comment #2.
Comment 9 Petr Hejl 2015-03-31 12:43:32 UTC
I have improved the message - web-main 48f62bc72674.
Comment 10 Quality Engineering 2015-04-01 02:54:01 UTC
Integrated into 'main-silver', will be available in build *201504010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/48f62bc72674
User: Petr Hejl <phejl@netbeans.org>
Log: #245045 - Getting Cannot access WADL.Please restart your REST application and refresh this page" for a Maven based REST web service in Netbeans 8.0 using Glassfish or Tomcat
Comment 11 ayushmathur 2016-03-22 08:08:58 UTC
Hi,
I have created, deployed and tested the REST services successfully on Wildfly 9.0.1. However, to my surprise the WADL file was not generated for the REST services, which should be created in building process I believe.
As an alternative, I have added the dependency for maven-wadl-plugin with a dependency to xercesImpl with versions 1.19.1 and 2.11.0 respectively.

I then compiled the project to create the WADL (application.wadl) and then maven build to generate the WAR file. I cross-checked if WADL is present in WAR and it was present.

The following are the configs to access my service endpoints:
Context-root: /psiava (defined in jboss-web.xml)
App Path: service (defined for class extending Application)

However, when I'm trying to access the WADL with URL: http://localhost:8080/psiava/service/application.wadl, I'm getting the following error (stack trace):

15:52:39,540 WARN  [org.jboss.resteasy.core.ExceptionHandler] (default task-9) failed to execute: javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8080/psiava/service/application.wadl
        at org.jboss.resteasy.core.registry.ClassNode.match(ClassNode.java:73)
        at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.java:48)
        at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:444)
        at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:234)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:171)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
        at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
        at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)