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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:10:32+00:00 2026-05-12T12:10:32+00:00

I generated a new form using sean-gen (seam new-form) and added another field to

  • 0

I generated a new form using sean-gen (seam new-form) and added another field to it using an @In annotation:

@Stateful
@Name("dummy")
public class DummyBean implements Dummy
{
    @Logger private Log log;

    @In StatusMessages statusMessages;

    @In private String bar;

    private String foo;

    public void doStuff()
    {
        String msg = "dummy.doStuff() action called with foo: #{dummy.foo} and bar: #{bar}. instance variable for bar:" + bar;
        log.info(msg);
        statusMessages.add(msg);
    }

    @Length(max = 10)
    public String getFoo()
    {
        return foo;
    }

    public void setFoo(String value)
    {
        this.foo = value;
    }

    @Remove
    public void destroy() {}

}

The interface is this one:

@Local
public interface Dummy
{
    public void doStuff();
    public String getFoo();
    public void setFoo(String value);
    public void destroy();
}

The problem is, when I try to access the properties I get:

javax.faces.FacesException: javax.el.ELException: /dummy.xhtml @22,52 value="#{dummy.foo}": Error reading 'foo' on type org.javassist.tmp.java.lang.Object_$$_javassist_seam_2
    at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
.
.
.
Caused by: javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: dummy.bar
    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)

My view is this:

<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="dummyForm">

        <rich:panel>
            <f:facet name="header">dummy header</f:facet>

             <s:decorate id="fooField" template="layout/edit.xhtml">
                <ui:define name="label">Foo</ui:define>
                <h:inputText id="foo" required="true"
                             value="#{dummy.foo}"/>
            </s:decorate>               

             <s:decorate id="barField" template="layout/edit.xhtml">
                <ui:define name="label">Bar</ui:define>
                <h:inputText id="bar" required="true"
                             value="#{bar}"/>
            </s:decorate>            

            <div style="clear:both"/>

        </rich:panel>

        <div class="actionButtons">
            <h:commandButton id="doStuff" value="doStuff"
                    action="#{dummy.doStuff}"/>
        </div>

    </h:form>

</ui:define>

</ui:composition>

If I remove either ‘fooField‘ or ‘barField‘ the view renders and works correctly, but if I try to use both at the same time I get the above exception.

I also noticed that if I use only @In annotations (remove the accessor methods from the bean) the page works.

Is this something expected and I should be doing my homework before asking?

I’m using JBoss 5.1.0.GA, Seam 2.2.0.GA and Java 6.

  • 1 1 Answer
  • 1 View
  • 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-05-12T12:10:33+00:00Added an answer on May 12, 2026 at 12:10 pm

    Turns out this is expected behavior, quoting an answer from the seam forum:

    Use @In(required=false) if the Seam component you’re injecting does not have the @AutoCreate annotation at the class level.

    So, changing:

    @In private String bar;
    

    to:

    @In (required=false) private String bar;
    

    fixes the issue.

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

Sidebar

Related Questions

A PDF generated in iReport using the 'Times New Roman' font appears to be
I have a Windows form that's generated using code (including buttons and what not).
I created a new JApplet form in NetBeans: public class UI extends javax.swing.JApplet {
My form elements are generated by Rails. <input id=agree_to_rules name=agree_to_rules type=checkbox value=1> I'm trying
i am trying to do a simple form that adds a new comment using
I have designed a form using WindowBuilder Pro , part of the generated code
Using a nested form I generated 5 UserPrices so users are filling out 5
I'm using Simple Form. I have a form for creating new items, and a
I have a form that when submitted successfully generates new elements on the page
I am new to jquery. I wanted to generated a set of image button

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.