[JBoss Tools] New message: "Target Unreachable, identifier 'object' resolved to null"
by Pablo Ochoa
User development,
A new message was posted in the thread "Target Unreachable, identifier 'object' resolved to null":
http://community.jboss.org/message/524594#524594
Author : Pablo Ochoa
Profile : http://community.jboss.org/people/zeroShade
Message:
--------------------------------------------------------------
Hello everyone, I'm just starting with SEAM so I'm sorry if this is an obvious question, but I can't resolve the following problem.
I started a new Seam Web Project in Eclipse using JBoss Tools, the home.seam page worked as expected. Then I changed the contents of home.xhtml following an example to 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"
template="layout/template.xhtml">
<ui:define name="body">
<f:view>
<h:form >
<h:panelGrid columns="2">
Value1: <h:inputText value="#{calculator.value1}"/>
Value2: <h:inputText value="#{calculator.value2}"/>
The resutl is:<h:outputText value="#{calculator.answer}"/>
</h:panelGrid>
<h:commandButton value="Add" action="#{calcAction.calculate}"/>
</h:form>
</f:view>
</ui:define>
</ui:composition>
I created a new class in the ejb/ejbModule called Calculator:
@Name("calculator")
public class Calculator {
private double value1;
private double value2;
private double answer;
public void setValue1(double value1) {
this.value1 = value1;
}
public double getValue1() {
return value1;
}
public void setValue2(double value2) {
this.value2 = value2;
}
public double getValue2() {
return value2;
}
public void setAnswer(double answer) {
this.answer = answer;
}
public double getAnswer() {
return answer;
}
public void add()
{
this.answer=value1+value2;
}
}
Also the CalcAction class:
@Stateless
@Name("calcAction")
public class CalcAction implements Calc {
@In
@Out
private Calculator calculator;
public String calculate()
{
calculator.add();
return "";
}
}
with the Calc interface
@Local
public interface Calc {
public String calculate();
}
The home.xhtml show all the elements, but when I click the Add button, I get the following exception:
23:03:38,019 WARNING [lifecycle] /home.xhtml @18,62 value="#{calculator.value1}": Target Unreachable, identifier 'calculator' resolved to null
javax.el.PropertyNotFoundException: /home.xhtml @18,62 value="#{calculator.value1}": Target Unreachable, identifier 'calculator' resolved to null
at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
at javax.faces.component.UIInput.validate(UIInput.java:868)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
at javax.faces.component.UIInput.processValidators(UIInput.java:672)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIForm.processValidators(UIForm.java:235)
at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
23:03:38,218 SEVERE [lifecycle] JSF1054: (Phase ID: PROCESS_VALIDATIONS 3, View ID: /home.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@55b768]
What I am doing wrong and should modify in order for the page to work.
Thanks a lot.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524594#524594
16 years, 5 months
[EJB 3.0 Development] New message: "Re: EJBTHREE-2007: VFS Abstraction"
by jaikiran pai
User development,
A new message was posted in the thread "EJBTHREE-2007: VFS Abstraction":
http://community.jboss.org/message/524557#524557
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
> jaikiran wrote:
>
> I don't mind having this new enforcer rule, but eventually i suspect that we are going to end up with a lengthy (trial and error, ever changing) excludes list
A bit OT - If Maven allowed a way to exclude an artifact irrespective of from which artifact it get's pulled in transitively from, then instead of something like this:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>${version.org.hibernate}</version>
<!-- Exclude org.hibernate:hibernate which is banned in
favour of org.hibernate:hibernate-core -->
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${version.org.hibernate.hibernate-entitymanager}</version>
<!-- Exclude org.hibernate:hibernate which is banned in
favour of org.hibernate:hibernate-core -->
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
</exclusions>
</dependency>
we could just have had:
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<!-- Instruct Maven to exclude this artifact from any dependency
of this project which pulls this in -->
<include-transitive/>
</exclusion>
</exclusions>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524557#524557
16 years, 5 months
[EJB 3.0 Development] New message: "Re: EJBTHREE-2007: VFS Abstraction"
by jaikiran pai
User development,
A new message was posted in the thread "EJBTHREE-2007: VFS Abstraction":
http://community.jboss.org/message/524556#524556
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
> ALRubinger wrote:
>
> Good! That way we can be ensured we're not depending upon VFS directly, no matter what comes in. And it future-proofs us.
>
> I know I asked if anyone thinks I'm being too strict; I don't think I am.
>
> So we should set exclusions appropriately and ensure that we only have it in "provided"; available to runtimes.
>
> S,
> ALR
I don't mind having this new enforcer rule, but eventually i suspect that we are going to end up with a lengthy (trial and error, ever changing) excludes list
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524556#524556
16 years, 5 months
[EJB 3.0 Development] New message: "Re: EJBTHREE-2007: VFS Abstraction"
by Andrew Rubinger
User development,
A new message was posted in the thread "EJBTHREE-2007: VFS Abstraction":
http://community.jboss.org/message/524555#524555
Author : Andrew Rubinger
Profile : http://community.jboss.org/people/ALRubinger
Message:
--------------------------------------------------------------
> jaikiran wrote:
>
> > ALRubinger wrote:
> >
> >
> > Something I want is an Enforcer Plugin configuration which will fail the build if any org.jboss:jboss-vfs is available in "compile" scope; this is a runtime dependency which should be restricted to "provided".
> >
> >
> I think with such a rule, we might run into trouble if that org.jboss:jboss-vfs is being pulled in transitively during compile scope from some other non-EJB3 module. Ex: core (depends on) --> some artifact (compile scope dependency on) --> org.jboss:jboss-vfs
Good! That way we can be ensured we're not depending upon VFS directly, no matter what comes in. And it future-proofs us.
I know I asked if anyone thinks I'm being too strict; I don't think I am.
So we should set exclusions appropriately and ensure that we only have it in "provided"; available to runtimes.
S,
ALR
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524555#524555
16 years, 5 months