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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:18:23+00:00 2026-06-18T03:18:23+00:00

The error /resources/components/hostForm.xhtml @25,84 value=#{cc.attrs.host.hostName}: Target Unreachable, ‘host’ returned null occurs after I added

  • 0

The error "/resources/components/hostForm.xhtml @25,84 value="#{cc.attrs.host.hostName}": Target Unreachable, 'host' returned null" occurs after I added

 <f:validateLength minimum="1" maximum="200"/> 

to an inputText field in a custom tag. Without the validation everything works well.

     <!-- INTERFACE -->
    <composite:interface>
        <composite:attribute name="host" />
        <composite:attribute name="prefix" />
    </composite:interface>
    <!-- IMPLEMENTATION -->
    <composite:implementation>
        <h:panelGrid columns="3" columnClasses="titleCell">
            <h:outputLabel for="#{cc.attrs.prefix}hostName" value="Host Name" />
            <h:inputText id="#{cc.attrs.prefix}hostName" value="#{cc.attrs.host.hostName}">
                <f:validateLength minimum="1" maximum="200"/>
                <rich:validator />
            </h:inputText>
            <rich:message for="#{cc.attrs.prefix}hostName" />
        </h:panelGrid>
    </composite:implementation>

The field is declared as

  @Named
  @Produces
  private Host newHost;

The custom tag invocation:

<my:hostForm prefix="c" host="#{newHost}"/>

What do I need to change to get this work with validation?

EDIT:

The Bean already has the @ConversationScoped annotation.
Adding a @ConversationScoped annotation to the fields leads to this error:

hostForm.xhtml @20,74 value=”#{cc.attrs.host.id}”: org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method: [field] @Named @ConversationScoped @Produces

  • 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-18T03:18:24+00:00Added an answer on June 18, 2026 at 3:18 am

    I moved the annotations from the attribute to a getter, and instantiate the object by myself. This works.

    @Produces
    @Named("newHost")
    public Host getNewHost() {
        if ( newHost == null ) {
            newHost = new Host();
        }
        return newHost;
    }
    

    https://community.jboss.org/thread/179527

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

Sidebar

Related Questions

Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: _CFXMLNodeGetInfoPtr Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in:
Here is my error: Warning: mysql_query() expects parameter 2 to be resource, null given...
while running my application I get the following error: javax.el.ELException: /view/doi/common/navigation.xhtml: Can't find bundle
From what I read elsewhere , the compiler error No resource identifier found for
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
Lots of resources say to let the errors bubble up from the lower layers,
I am getting the Resource id #3 error when I am trying to echo
I get the following error messages when I run the app: Description Resource Path
I'm trying to utilize setDebugFlags as recommended here to scan for opengl errors: http://developer.android.com/resources/articles/glsurfaceview.html
Error on link: ld: duplicate symbol _OBJC_METACLASS_$_Reachability in /Users/jmf/Documents/iOS Development/jmf_Client/jmf/jmf/ww_libs/libmfcbroem_ios.a(Reachability.o) and /Users/tpf/Library/Developer/Xcode/DerivedData/jmf-erlknghfcpoomnfanzovahfacgpv/Build/Intermediates/jmf.build/Debug-iphoneos/jmf.build/Objects-normal/armv7/Reachability.o for architecture

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.