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 214142 - web service maven project 404 not found
Summary: web service maven project 404 not found
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 14:44 UTC by vanob
Modified: 2017-08-02 10:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (363.83 KB, text/plain)
2012-06-13 14:46 UTC, vanob
Details
Working project. (6.73 KB, application/octet-stream)
2012-06-14 08:39 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vanob 2012-06-13 14:44:16 UTC
[ BUILD # : 201206110001 ]
[ JDK VERSION : 1.7.4 ]

I followed JavaEE Sanity

http://wiki.netbeans.org/TS_72_JavaEE_Sanity

Test suite: Create Java EE 6 Application
Creating Web Service project
Maven Project
On the step: Configure, Build and deploy the Web Service Endpoint
When I run the project, it's built successfully, but when the URL is opened in
the browser it shows
HTTP Status 404 - Not Found
type Status report

messageNot Found

descriptionThe requested resource (Not Found) is not available.
Comment 1 vanob 2012-06-13 14:46:34 UTC
Created attachment 120790 [details]
messages.log
Comment 2 Denis Anisimov 2012-06-13 17:19:15 UTC
1) Project doesn't work at runtime. So messages.log doesn't contain information
about error. Check the server.log.
2) Did you set all strings as required :
- Path for DukesAgeResource class ( @Path annotation value ) is "dukesAge".
- Set the context path to: /DukesAgeService ( for Project )
- Set "Relative URL" to /webresources/dukesAge ( for Project )
3) Check ApplicationConfig class @ApplicationPath annotation. It's value should be
"webresources". This class is autogenerated for JEE6 REST services.

The example will work only if all above requirement are satisfied.

The last thing : please check ApplicationConfig class . There was a bug fixed some
time ago. It should extend Application:
public class ApplicationConfig extends Application .

REST service will not work if ApplicationConfig is not configured properly.

I'm not able to reproduce the issue following the exact steps of example.
Comment 3 Jiri Skrivanek 2012-06-14 08:39:39 UTC
Created attachment 120814 [details]
Working project.

Attached project works for me on Windows.

Product Version: NetBeans IDE Dev (Build 201206140001)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Comment 4 vanob 2012-06-14 11:35:25 UTC
I've verified this with the build 201206140001 and JDK 1.7.0_05 and it seems to work fine.
Comment 5 vanob 2012-07-10 15:56:17 UTC
Reproducible in 201206291011 (7.2 fcs)
Solaris 11, jdk 1.7.0_05
glassfish-3.1.2.2
Comment 6 vanob 2012-07-10 16:07:21 UTC
Sorry, wrong build was used. It works with FCS.