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 8099639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:28:33+00:00 2026-06-05T22:28:33+00:00

Blockquote I am trying to make a REST application with Seam 3. Hello world

  • 0

Blockquote

I am trying to make a REST application with Seam 3. Hello world works nice. But I tried to use injection within the Rest Application with the annotation @Inject but the object is still null.

Does someone has a piece of code that initialize a component called within a REST Class ?

thanks a lot.
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<servlet>
    <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <load-on-startup>1</load-on-startup>
    </servlet>
</web-app>

REST Application

@ApplicationPath("object")
@Path("creation")
@RequestScoped
public class ObjectApplication extends javax.ws.rs.core.Application {

@Inject   
ObjectManager objectManager;
....

@POST
@GET
@Path("create")
@Produces(MediaType.APPLICATION_XML)
@Consumes(MediaType.APPLICATION_XML)
public String createObject(ObjectType objectType) {
...
}
}

and Object Manager

@Stateless
public class ObjectManager {
}

.

20:30:50,362 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016008: Starting weld service for deployment ObjectRest.war
20:30:50,420 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."ObjectRest.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ObjectRest.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ObjectManager] with qualifiers [@Default] at injection point [[field] @Inject com.qc.api.rest.ObjectApplication.objectManager]
  • 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-05T22:28:35+00:00Added an answer on June 5, 2026 at 10:28 pm

    How I succeed :
    Put all in the same project in eclipse.
    And remove :

    <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <load-on-startup>1</load-on-startup>
    </servlet>
    

    It seems that the problem was that there was two project :

    XXXRest
     +--XXXCore
    

    and the injection was not done…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a login application so you can view grades/email teachers/etc.
I'm trying to use tinymce editor with facebox modal window. But tinymce doesn't load
This CSS creates a nice effect when applied against a single blockquote within the
I am trying to use the InternalsVisibleTo assembly attribute to make my internal classes
I'm trying to style a blockquote to look like this: At the moment it
I am trying to check to make sure a custom-field is not blank before
I'm trying to float a large left curly quote so that the blockquote sits
I am trying to use Pagedown to convert some markdown into HTML. I have
I am trying to use jQuery Ajax in my form to submit... Here is
I'm trying to make a script that scrapes a website to retrieve the latest

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.