Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8714277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:33:35+00:00 2026-06-13T05:33:35+00:00

My end goal is simple. I am building a website that has three components:

  • 0

My end goal is simple. I am building a website that has three components: a mobile interface, an admin web interface, and a web user interface. I plan to put each of these modules into separate WAR files and, together with an EJB module & possibly a common library module, bundle them all into a EAR for deployment on JBoss AS 7.1.

But first things first, can I deploy a very simple WAR file and get it to work – NO!

My war file has the following structure:

project-mobile.war:

   META-INF/MANIFEST.MF
   WEB-INF/jboss-web.xml
   WEB-INF/classes/org/dobbo/project/mobile/Accounts.class
   index.html

The manifest.mf file as the following content:

  Manifest-Version: 1.0
  Ant-Version: Apache Ant 1.8.0
  Created-By: 1.6.0_18-b18 (Sun Microsystems Inc.)
  Built-By: steve

The jboss-web.xml file’s content are:

<?xml version="1.0"?>
<jboss-web>
  <context-root>/mobile</context-root>
</jboss-web>

The Accounts.java file was based on the Library.java example from https://docs.jboss.org/author/display/AS71/Java+API+for+RESTful+Web+Services+(JAX-RS)
I did make some changes, added the Application subclassing and the AppicationPath annotation as this got me a little further in getting the deployment to work.

package org.dobbo.<project>.mobile;

import javax.ws.rs.*;
import javax.ws.rs.core.Application;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ApplicationPath("/accounts")
@Consumes({"application/xml"})
@Produces({"application/xml"})
public class Accounts
    extends Application {

    ...

    @GET
    @Path("/list")
    public Collection<UUID> getAccounts() {
    Collection<UUID> list = uuids.values();

    log.info("getAccounts: " + list);
    return list;
    }

    ...
}

So far so good.

When I deploy I get the following logged to the JBoss console (timestamp & log level INFO removed):

[org.jboss.as.repository] (management-handler-thread - 12) JBAS014900: Content added at location /home/jboss/jboss-7.1.1/standalone/data/content/11/e8cdaea9dfa4e984ada3e22b0c890970f0ba75/content
[org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment sokoban-mobile.war in 60ms
[org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "project-mobile.war"
[org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /mobile
[org.jboss.as.server] (management-handler-thread - 12) JBAS018565: Replaced deployment "project-mobile.war" with deployment "project-mobile.war"

So far all seems well. But when I point my browser at jboss-server:8080/mobile/accounts/list I get a:

HTTP Status 404 - Could not find resource for relative : /list of full path: http://jboss-server:8080/mobile/accounts/list

type Status report

message Could not find resource for relative : /list of full path: http://jboss-server:8080/mobile/accounts/list

description The requested resource (Could not find resource for relative : /list of full path: http://jboss-server:8080/mobile/accounts/list) is not available.

However, something is working because pointing the broswer at jboss-server:8080/mobile/ successfully returns the index.html file also included in the WAR file.

It’s probably just a simple configuration error on my part, but I can’t work it out for the life of me. Many thanks to all that take the trouble to read this issue and even more thanks for posting any ideas you have.

Steve

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:33:36+00:00Added an answer on June 13, 2026 at 5:33 am

    The logs shows that no REST resource is loaded.

    The resource is missing the @Path annotation.

    You need on Application class with the @ApplicationPath annotation (The class will be empty).

    Then you need to add the @Path annotation to your resource class (Accounts for your case)

    So you will have:

    @ApplicationPath("/")
    public class AccountApp
        extends Application {}
    

    And:

    @Path("accounts")
    @Consumes({"application/xml"})
    @Produces({"application/xml"})
    public class Accounts{
    
        ...
    
        @GET
        @Path("/list")
        public Collection<UUID> getAccounts() {
        Collection<UUID> list = uuids.values();
    
        log.info("getAccounts: " + list);
        return list;
        }
    
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My end goal is to produce a simple .deb package. For that I've read
I'm building a small web app that allows users to list their goals. I
My goal is to take HTML entered by an end user, remove certain unsafe
I am building a simple book check out application. One of the things that
I am working on a web application with an existing code base that has
The end goal is for the user to download a .csv file. Right now
The end goal of this part of my project is to be able to
My end goal is local development of a Radiant CMS installation. So, need rails
This is for the Apple platform. My end goal is to do a find
First off, let me define the end goal: I'd like to Wordpress (version 2.8)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.