JSF + EJB3.0 integration

Hi, I am trying to access a session bean from JSF page through managed bean.
I get an error message:
javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'greeting' from bean of type bean.Managed: java.lang.NullPointerException     at com.sun.faces.taglib.html_basic.OutputTextTag.doEndTag(OutputTextTag.java:183)     at untitled1.jspService(_untitled1.java:106)     [untitled1.jsp]
What is wrong?
Here is my source code:
//Managed bean:
package bean;
import project1.HelloWorldLocal;
import javax.ejb.EJB;
public class Managed {
@EJB HelloWorldLocal hello;
public String getGreeting () {
return hello.sayHi();
public Managed() {
//Session bean
package project1;
import javax.ejb.Local;
@Local
public interface HelloWorldLocal {
public String sayHi ();
package project1;
import javax.ejb.Stateless;
@Stateless(name="HelloWorld")
public class HelloWorldBean implements HelloWorldLocal {
public String sayHi() {
return "Hello world!";
//jsf page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
<f:view>
<afh:html>
<afh:head title="untitled1">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
</afh:head>
<afh:body>
<af:messages/>
<h:form>
<h:outputText value="#{managed.greeting}"/>
</h:form>
</afh:body>
</afh:html>
</f:view>
//faces-config.xml
<?xml version="1.0" encoding="windows-1252"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config xmlns="http://java.sun.com/JSF/Configuration">
<managed-bean>
<managed-bean-name>managed</managed-bean-name>
<managed-bean-class>bean.Managed</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>

You may not use entity bean directly as a managed bean ... entity bean are located in the model part ... managed bean are located in the view part they ... in your case a managed bean will invoke the session bean and manage the data persistence through his methods.
This role is played by data controls in adf framework i recommend to you.
To play with data control simply create a data control from your session bean and use these xml definitions from the control palette to create the ui interfaces you need to manipulate your data. JDevelopper will create the ui components and all necessary bindings (data and method invokation) to manage the persistence by calling the necessary methods from your session bean.
hope this is helping you

Similar Messages

  • JSF And Struts Integration

    Can any body give some info on integration of JSF to existing struts application

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • Jdeveloper JSF: works on integrated weblogic but not on remote weblogic

    I have a simple JSF application (just printing Hello World). When I deploy it through Jdeveloper to the integrated weblogic server it works fine. However, it fails to deploy to a remote standalone weblogic server it fails with this error in the logs
    +<Feb 9, 2012 11:01:55 AM EST> <Warning> <oracle.adf.share.config.ADFConfigFactory> <BEA-000000> <Resource META-INF/adf-config.xml not found on the classpath.>+
    +<Feb 9, 2012 11:01:55 AM EST> <Warning> <oracle.adf.share.config.ADFConfigFactory> <BEA-000000> <A default implementation of ADFConfig is being created for application. This can lead to unexpected results in some cases. Please add a basic META-INF/adf-config.xml to your classpath to avoid functional errors.>+
    +<Feb 9, 2012 11:02:37 AM EST> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RESTORE_VIEW 1+
    java.lang.NoClassDefFoundError: oracle/adf/model/RegionBinding
    +     at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.getLifecycleContext(ADFPhaseListener.java:168)+
    +     at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:131)+
    Steps:
    1. I installed JDeveloper 11gR2 (11.1.2.1.0) studio.
    2. After installation, I configured a weblogic server domain by running MW_HOME/wlserver_10.3/common/bin/config.sh.
    I selected the following products to include in the domain - Oracle JRF WebServices Asynchronous services, Oracle JRF - 11.1.1.0, Weblogic Advanced Web Services JAX-RPC, and Weblogic advanced web services for JAX-WS.
    3. Create a JSF hello world app in jdeveloper and deploy to Integrated weblogic server. It works.
    4. Now deploy the same JSF hello world app from jDeveloper to a Remote/standalone weblogic server. It fails.
    It is the same application source code and also, the weblogic standalone domain was created from the same jDeveloper installation. I also verified that the deployed libs in the two weblogic servers are identical.
    Appreciate any help, inputs.
    Thanks.

    You are confusing me a bit. You want to ran an app on a stand alone WLS, but installed JDev11.1.2.1?
    Normally you install a WLS (10.3.5 in your case) and then need to install two patches (only available via support) to make the stand alone WLS compatible to 11.1.2.1.
    Here is a post which shows which wls corresponds to which jdev: http://tompeez.wordpress.com/2011/09/14/jdeveloper-versions-vs-weblogic-server-versions/
    Here is one on how to install the stand alone WLS and patch it to 11.1.2.1 level: http://tompeez.wordpress.com/2011/06/29/follow-up-upgrading-wls-10-3-5-with-adf-runtime-11-1-2-0-0-sherman-patch/
    Timo

  • Deploy the JSF app to integrated Weblogic Server Error

    Hi, All,
    I just created a new ADF app and have only one single JSF page in which have one Calender component. After right click the ViewController project and select deploy to Integrated Weblogic server and i got the below error:
    [01:05:25 AM] ---- Deployment started. ----
    [01:05:25 AM] Target platform is (Weblogic 10.3).
    [01:05:26 AM] #### Deployment incomplete. ####
    [01:05:26 AM] [J2EE Deployment SPI:260010]Unable to connect to 't3://127.0.0.1:7101' as user, 'weblogic'. Error received: null
    [01:05:26 AM] [J2EE Deployment SPI:260010]Unable to connect to 't3://127.0.0.1:7101' as user, 'weblogic'. Error received: null
    [01:05:26 AM] [J2EE Deployment SPI:260010]Unable to connect to 't3://127.0.0.1:7101' as user, 'weblogic'. Error received: null
    [01:05:26 AM] t3://127.0.0.1:7101: Destination unreachable; nested exception is:
         java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 500 Server Error'; No available router to destination
    [01:05:26 AM] Destination unreachable; nested exception is:
         java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 500 Server Error'; No available router to destination
    If right click the simple JSF page and run directly will start the wl server and seems not to deploy the demo app. the log as below:
    Starting WLS with line:
    C:\PROGRA~1\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\PROGRA~1\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy "-Djavax.net.ssl.trustStore=C:\Program Files\Oracle\Middle Ware\wlserver_10.3\server\lib\DemoTrust.jks" -Dhttp.proxyHost=www-proxy.cn.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts= -Dhttps.proxyHost=www-proxy.cn.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts= -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -Dplatform.home=C:\PROGRA~1\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\PROGRA~1\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\PROGRA~1\Oracle\MIDDLE~1\WLSERV~1.3\server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1 -Dcommon.components.home=C:\PROGRA~1\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\PROGRA~1\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\config\FMWCON~1 -Doracle.server.config.dir=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.security.jps.config=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=C:\PROGRA~1\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\PROGRA~1\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\DOCUME~1\gerry\APPLIC~1\JDEVEL~1\SYSTEM~1.60\DEFAUL~1\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\PROGRA~1\Oracle\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath;C:\PROGRA~1\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic.Server
    <2010-10-15 上午01时13分40秒 VET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 16.0-b13 from Sun Microsystems Inc.>
    <2010-10-15 上午01时13分41秒 VET> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 >
    <2010-10-15 上午01时13分42秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <2010-10-15 上午01时13分42秒 VET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <2010-10-15 上午01时13分42秒 VET> <Notice> <LoggingService> <BEA-320400> <The log file C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <2010-10-15 上午01时13分42秒 VET> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log00020. Log messages will continue to be logged in C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log.>
    <2010-10-15 上午01时13分42秒 VET> <Notice> <Log Management> <BEA-170019> <The server log file C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <2010-10-15 上午01时13分44秒 VET> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <2010-10-15 上午01时13分48秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <2010-10-15 上午01时13分48秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <2010-10-15 上午01时13分51秒 VET> <Notice> <LoggingService> <BEA-320400> <The log file C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <2010-10-15 上午01时13分51秒 VET> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log00020. Log messages will continue to be logged in C:\Documents and Settings\gerry\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log.>
    <2010-10-15 上午01时13分51秒 VET> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <2010-10-15 上午01时13分52秒 VET> <Warning> <Server> <BEA-002611> <Hostname "gerry-cn.peoplesoft.com", maps to multiple IP addresses: 10.182.105.125, 192.168.149.1, 192.168.126.1>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.126.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 10.182.105.125:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 192.168.149.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <2010-10-15 上午01时13分52秒 VET> <Warning> <Server> <BEA-002611> <Hostname "GERRY-CN", maps to multiple IP addresses: 10.182.105.125, 192.168.149.1, 192.168.126.1>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <2010-10-15 上午01时13分52秒 VET> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    as normal there would have a URL link displayed in the weblogic log, is that right? any one can give tips?

    Looks like you have a proxy configured, and that proxy (of course) doesn't support routing to 127.0.0.1
    [01:05:26 AM] t3://127.0.0.1:7101: Destination unreachable; nested exception is:
    java.net.ProtocolException: unrecognized response from proxy: 'HTTP/1.1 500 Server Error'; No available router to destinationUnset your proxy (Tools->Preferences->Web Browser & Proxy)
    John

  • JSF/Tiles/Spring Integration Problem

    Hi,
    I have a JSF based web application, which uses Struts Tiles framework through the view-handler "org.apache.myfaces.tomahawk.application.jsp.JspTi lesViewHandlerImpl". Now I am trying to integrate this with the Spring framework by making use of the variable-resolver "org.springframework.web.jsf.DelegatingVariableRes olver". With this, when I try to access a page, (whose backing bean gets injected with Spring beans) I get the following exception:
    javax.faces.el.EvaluationException: Expression Error: Named Object: 'userSession' not found.
    at com.sun.faces.config.ManagedBeanFactory.getScopeFo rSingleExpression(ManagedBeanFactory.java:998)
    at com.sun.faces.config.ManagedBeanFactory.hasValidLi fespan(ManagedBeanFactory.java:931)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:892)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:553)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:234)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:253)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:79)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(Comple xValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:244)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:173)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:154)
    at javax.faces.component.UIOutput.getValue(UIOutput.j ava:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputR enderer.getValue(HtmlBasicInputRenderer.java:82)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.getCurrentValue(HtmlBasicRenderer.java:191)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeEnd(HtmlBasicRenderer.java:169)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:712)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:443)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:440)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at javax.faces.webapp.UIComponentTag.encodeChildren(U IComponentTag.java:600)
    at javax.faces.webapp.UIComponentTag.doEndTag(UICompo nentTag.java:537)
    at com.sun.faces.taglib.html_basic.PanelGridTag.doEnd Tag(PanelGridTag.java:460)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_panelGrid_0(jsf_002dlayout_jsp.jav a:269)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_form_0(jsf_002dlayout_jsp.java:222 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_f_view_0(jsf_002dlayout_jsp.java:188 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspService(jsf_002dlayout_jsp.java:99)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    I could get the application work with JSF and Spring, without Tiles.
    Appreciate any help in this regard.
    Thanks

    I'm assuming that since you are using JSF and Tiles, you are not using Spring's web framework. In that case, the integration of Spring with JSF is relatively trivial and you can neglect it for now. You might want to try the link below, if you are feeling lucky:
    http://www.google.com/search?q=myfaces+tiles

  • JSF 1.1 integration with shale-tiles-1.0.4 giving page cannot be displayed

    I am trying to get shale-tiles-1.0.4 work with JSF 1.1
    I am getting the page can not be displayed error.
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.
    Please try the following:
    Open the 10.21.31.170:8988 home page, and then look for links to the information you want.
    Click the Refresh button, or try again later.
    Click Search to look for information on the Internet.
    You can also see a list of related sites.
    HTTP 500 - Internal server error
    Internet Explorer
    These are the steps I have followed
    I have included shale-core-1.0.4.jar and shale-tiles-1.0.4.jar in /WEB-INF/lib
    I have included the following entry in web.xml
    <servlet>
    <servlet-name>Tiles Servlet</servlet-name>
    <servlet-class>org.apache.tiles.servlets.TilesServlet;/servlet-class>
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml;/param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <context-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml;/param-value>
    </context-param>
    <listener>
    <listener-class>
    org.apache.tiles.listener.TilesListener
    </listener-class>
    </listener>
    My tiles-defs.xml:
    <tiles-definitions>
    <definition name="/siteMainLayout" path="/tiles/layout.jsp";>
    <put name="header" value="/tiles/header.jsp";/>
    <put name="menu" value="/tiles/menu.jsp";/>
    <put name="content" value=""/>
    </definition>
    <definition name="/systemLogon" extends="/siteMainLayout">
    <put name="content" type="template" value="/welcome.jsp";/>
    </definition>
    <definition name="/systemChangePwd" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/changePassword.jsp";/>
    </definition>
    <definition name="/systemMain" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/mainPage.jsp";/>
    </definition>
    <definition name="/systemFailue" extends="/siteMainLayout">
    <put name="content" type="template" value="/failue.jsp";/>
    </definition>
    <definition name="/systemMain" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/mainPage.jsp";/>
    </definition>
    <definition name="/systemCancel" extends="/siteMainLayout">
    <put name="content" type="template" value="/application/Misc.jsp";/>
    </definition>
    </tiles-definitions>
    My layout.jsp:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    <h:panelGrid columns="2">
    <f:facet name="header">
    <f:subview id="header">
    <tiles:insert name="header" flush="false"/>
    </f:subview>
    </f:facet>
    <f:subview id="menu">
    <tiles:insert name="menu" flush="false"/>
    </f:subview>
    <f:subview id="content">
    <tiles:insert name="content" flush="false"/>
    </f:subview>
    </h:panelGrid>
    My faces-config.xml:
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <managed-bean-name>backing_Welcome</managed-bean-name>
    <managed-bean-class>state.mn.mdh.mrc.login.Welcome;/managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1Welcome.jspx-->
    </managed-bean>
    <application>
    <view-handler>
    org.apache.shale.tiles.TilesViewHandler
    </view-handler>
    </application>
    <navigation-rule>
    <from-view-id>/systemLogon.jsp;/from-view-id>
    <navigation-case>
    <from-outcome>ChangePassword</from-outcome>
    <to-view-id>/systemChangePwd</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>LoginSuccess</from-outcome>
    <to-view-id>/systemMain</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>Others</from-outcome>
    <to-view-id>/systemCancel</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case>
    <from-outcome>Failure</from-outcome>
    <to-view-id>/systemFailue</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    My systemLogon.jsp:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
    <html>
    <f:view>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>System Logon</title>
    </head>
    <body>
    <f:subview id="content">
    <h:form>
    <tiles:insert name="content" flush="false">
    </tiles:insert>
    </h:form>
    </f:subview>
    </body>
    </f:view>
    </html>
    The url I am trying is http://10.21.31.170:8988/Test-ViewController-context-root/faces/systemLogon.jsp
    Please assist in what I am missing.
    Thanks,
    Ambika

    Hi
    I do not see any error messages on the application server log except the server initialized message( I have included that at the end)
    But when I run the application in Firefox browser it gives me this error,
    Error instantiating web-application
    Error loading listener 'org.apache.tiles.listener.TilesListener', class not found
    When I removed the <listener> entry from web.xml and get the error,
    Error instantiating web-application
    Error instantiate servlet classes
    The message in Jdeveloper is:
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config>
    C:\jdevstudio10133\jdk\bin\javaw.exe -client -classpath C:\jdevstudio10133\j2ee\home\oc4j.jar;C:\jdevstudio10133\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    Could not canonicalize '"C:\Program Files\Sybase\Adaptive Server Anywhere 6.0\win32"' (The filename, directory name, or volume label syntax is incorrect). From system property java.library.path.
    Jun 13, 2008 10:18:21 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { location = system-jazn-data.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:21 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { provider.type = XML }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { provider.type = XML }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { location = TestWithShaleTiles-jazn-data.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { location = system-jazn-data.xml, deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-application.xml]
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig fileExists
    FINE: JAAS: Verify file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig getDefaultJAZNConfigFilePath
    FINE: JAAS: Configuration file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig getJAZNProperties
    FINE: JAAS: Configuration file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml]
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLJAZNProvider getJAZNDataXMLDoc
    FINE: JAAS-XML: url=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-jazn-data.xml fname=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/system-jazn-data.xml file=C:\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\system-jazn-data.xml
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLRealmUser init
    FINE: JAZN-XML: XMLRealmUser.init: user(anonymous) is deactivated.
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLJACCRepository init
    FINE: JACC: jaccRepo.init - JACCRepository already initialized. repo=[XMLJACCRepository isValid=true
         jaznConfig=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/jazn.xml]
         jaccPolicyMap.keySet=[]
         jaccPolicyMap.values=[]] node=oracle.xml.parser.v2.XMLElement@170984c
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.spi.xml.XMLUserManager getAdminUser
    FINE: JAZN-XML: UserManager.getAdminUser: admin.user=oc4jadmin
    Jun 13, 2008 10:18:22 AM oracle.security.jazn.oc4j.RealmUserManager getAdminUser
    FINE: JAZN-OC4J: RealmUserManager.getAdminUser()=RealmUser: oc4jadmin
    Jun 13, 2008 10:18:23 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
    Jun 13, 2008 10:18:23 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
    Jun 13, 2008 10:18:23 AM oracle.oc4j.security.SSLMessages logGetSecureSocket
    FINE: getSecureSocket(address=/0.0.0.0, port=24043, backlog=30)
    Jun 13, 2008 10:18:23 AM oracle.oc4j.security.SSLMessages logGetSecureSocket
    FINE: getSecureSocket(address=/0.0.0.0, port=24043, backlog=30)
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml, provider.type = XML }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/application.xml]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { deployment.url = file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/, provider.type = XML }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/application-deployments/datatags/]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { location = TestWithShaleTiles-jazn-data.xml, deployment.url = file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml, provider.type = XML, realm.default = jazn.com }
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-oc4j-app.xml]
    Jun 13, 2008 10:18:25 AM oracle.security.jazn.spi.xml.XMLJAZNProvider getJAZNDataXMLDoc
    FINE: JAAS-XML: url=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-jazn-data.xml fname=file:/C:/jdevstudio10133/jdev/mywork/Test_Tiles/Test_with_shale_tiles/TestWithShaleTiles-jazn-data.xml file=C:\jdevstudio10133\jdev\mywork\Test_Tiles\Test_with_shale_tiles\TestWithShaleTiles-jazn-data.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc findOracleHome
    FINE: JAAS: ORACLE_HOME=C:\jdevstudio10133
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc fileExists
    FINE: JAAS: Verify file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc getJ2eeHomeJAZNConfigFilePath
    FINE: JAAS: Bootstrap jazn.xml @C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig <init>
    FINE: JAAS: Configuration file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig getJAZNProperties
    FINE: JAAS: Configuration file=C:\jdevstudio10133\j2ee\home\config\jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig parseJAZNConfig
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: Configuration properties: { idm.token.type = HTTP_COOKIE, custom.sso.key.alias = ssoSymmetricKey, idm.token.asserter.class = oracle.security.jazn.sso.SSOCookieTokenAsserter, realm.default = jazn.com, deployment.url = file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml, custom.sso.url.login = /jsso/SSOLogin, provider.type = XML, custom.sso.url.logout = /jsso/SSOLogout, idm.token.collector.class = oracle.security.jazn.sso.SSOCookieTokenCollector, location = ./system-jazn-data.xml, idm.authentication.name = JavaSSO, idm.token.collector.cookie.1 = ORA_OC4J_SSO }
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): deployment URL=file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): classpath=null
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.JAZNConfig init
    FINE: JAAS: JAZNConfig.init(): this=[JAZNConfig file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml]
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc initJ2eeHomeJAZNConfig
    FINE: JAAS: default jazn.xml @ C:\jdevstudio10133\j2ee\home\config\jazn.xml : [JAZNConfig file:/C:/jdevstudio10133/j2ee/home/config/jazn.xml]
    Jun 13, 2008 10:18:26 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Jun 13, 2008 10:18:27 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 9375 ms.
    Target URL -- http://10.21.31.170:8988/Test-ViewController-context-root/faces/systemLogon.jsp
    08/06/13 10:18:28 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    Jun 13, 2008 10:18:29 AM oracle.security.jazn.util.Misc getIASPropertiesFilePath
    FINE: JAAS: XML Provider
    Thanks for your help,
    Ambika

  • JSF and JSTL integration

    Can anyone tell me how to access JSF objects from JSTL tags?
    I want to set a requestScope flag in my changeListener
    ... context.getExternalContext().getRequestMap().put("xxx","ok"); ... and render output depending on existance of this flag:
    ...<c:if test="${requestScope.xxx!=null}" > .... .
    This examplecode doesn't work, JSTL tags cannot access this var! How can I do that?
    What I realy want is to reload another frame when user changed a specific input field.
    Above code should add a JavaScript to reload the frame if this is true .
    I can't do this on submit because the other framepage uses the stored/modified data.
    Maybe there's a better approach for this anyway?
    Thanks for your help!

    Thanks for your help - I found it was my own mistake why it didn't work. Now it does, as you said.
    But in the meentime I ran into another Problem mixing JSTL und JSF:
    I want to build a SelectOneMenu and populate it with data from a database, but with selectItemValue
    other than selectItemLabel (value should be numeric DB-ID, label a readable name).
    Since "selectItems" allows only one dimensional Arrays (?) as parameter, I must use "selectItem" for
    each row. So I wrote following code:
    <h:selectOneMenu id="m1" value="#{worktime.employee}">
       <sql:query var="employees" dataSource="jdbc/WebOfficeDB">
           select oid,displayname from employees order by displayname asc
        </sql:query>
        <c:forEach var="row" items="${employees.rows}" >
           <f:selectItem itemValue="#{row.oid}" itemLabel="#{row.displayname}" />
        </c:forEach>
    </h:selectOneMenu>This doesn't work, I get NullPointer Exceptions from selectItem.setValue().
    I think because JSF "#" references another context than JSTL "$" - is this correct?
    So I tried to set a JSTL variable inside the forEach loop to access the datarow
    <c:set var="data" value="${row}" scope="request"/>
    <f:selectItem itemValue="#{requestScope.data.oid}" itemLabel="#{requestScope.data.displayname}" />
    ...The effect is that all lines of the selectOneMenu have the same content (from the last datarecord)!?
    Since this is my first project in JSTL and JSF and should stay a small one I don't want to go into building
    CustomComponents and so on for such a simple Task.
    I would be very very happy for some tips and hints, since I think this mixing of JSTL and JSF Context
    will be a very common problem within my project.
    Thanks

  • Build EJB3 application

    Hi,
    I tried doing a sample ejb3 application by following a step by step process. JSF-EJB3-Glassfish-Netbeans
    It ran fine.
    But when i tried to import & build the same application in another computer, the BUILD failed:
    pre-init:
    init-private:
    init-userdir:
    init-user:
    init-project:
    do-init:
    post-init:
    init-check:
    init:
    deps-jar:
    deps-j2ee-archive:
    C:\Workspace\sample1\nbproject\build-impl.xml:105: The following error occurred while executing this line:
    Target "dist-ear" does not exist in the project "sample1".
    BUILD FAILED (total time: 0 seconds)
    The build.xml (a snippet) goes as below:
    <target depends="init" name="deps-jar" unless="no.deps"/>
    <target depends="init" name="deps-j2ee-archive" unless="no.deps">
    <ant antfile="${project.sample1-ejb}/build.xml" inheritall="false" target="dist-ear">
    <property location="${build.dir}" name="dist.ear.dir"/>
    </ant>
    <ant antfile="${project.sample1-war}/build.xml" inheritall="false" target="dist-ear">
    <property location="${build.dir}" name="dist.ear.dir"/>
    </ant>
    </target>
    The error is at line "<ant antfile="${project.sample1-ejb}/build.xml" inheritall="false" target="dist-ear">"
    Has anyone come across this eror? PLease suggest a solution.
    Thanks

    [The Humble Warriors|http://3-date.desentes.cn/giern.html]
    [Philadelphia Fever|http://3-date.desentes.cn/rreedd.html]
    BudoSeek
    [Burton Joyce Football Club|http://3-date.desentes.cn/hmbryiatht.html]
    [Fred McGriff|http://3-date.desentes.cn/ngusthed.html]
    [Conestoga College Men's Hockey|http://3-date.desentes.cn/cthiter.html]
    [Triple Crown Custom|http://3-date.desentes.cn/indnd.html]
    [Daventry Rugby Football Club|http://3-date.desentes.cn/knsighonth.html]
    [Southend United VitalFootball|http://3-date.desentes.cn/quinoristh.html]
    [CFGAA Girls' Basketball and Softball|http://3-date.desentes.cn/verore.html]
    [Droitwich RFC|http://3-date.desentes.cn/ventheneane.html]
    [Abbey National Karting Club|http://3-date.desentes.cn/xingh.html]
    [Matt Lottich Life Skills Camp|http://3-date.desentes.cn/ontaswatte.html]
    [Colchester and East Essex Football League|http://3-date.desentes.cn/xioesovisisu.html]
    [Billings Outlaws|http://3-date.desentes.cn/dangla.html]
    [Green Mountain Division|http://3-date.desentes.cn/orowngre.html]
    [Hickmans Kickboxing Karate Academy|http://3-date.desentes.cn/yeericounon.html]
    [Raceland Go Kart Track|http://3-date.desentes.cn/xichusndd.html]
    [Mississippi Dirt Forum|http://3-date.desentes.cn/thedendo.html]
    [Athy Golf Club|http://3-date.desentes.cn/erosted.html]
    WindsMpeg
    [Hooptown Basketball|http://3-date.desentes.cn/dresmit.html]
    [FC Bayern M??nchen|http://3-date.desentes.cn/ceyovaiskhec.html]
    [Cabarete Kiteboarding|http://3-date.desentes.cn/xissptorsth.html]
    [Sioux City Bandits|http://3-date.desentes.cn/garsudescki.html]
    [Perthshire Mountain Bikes|http://3-date.desentes.cn/ldorsth.html]
    [Clifton Park Soccer Club|http://3-date.desentes.cn/jadllithacte.html]
    [NVA British Veterans Fencing|http://3-date.desentes.cn/ithanthi.html]
    [Athletic Club|http://3-date.desentes.cn/rathasofo.html]
    [When skys are blue|http://3-date.desentes.cn/anderea.html]
    [Do It Downhill|http://3-date.desentes.cn/jeyom.html]
    [Headless Horseman Endurance Ride and Drive|http://3-date.desentes.cn/reteleriof.html]
    [Renwaku Bujutsu Association|http://3-date.desentes.cn/rendli.html]
    [Vital Football Premiership|http://3-date.desentes.cn/oremasheryo.html]
    [Kennet Andersson|http://3-date.desentes.cn/nerectt.html]
    [The Grange Golf Club|http://3-date.desentes.cn/qusedoush.html]
    [Irish Football Online|http://3-date.desentes.cn/icuperlt.html]
    Sportexe
    [Hunley Hall Golf Club and Hotel|http://3-date.desentes.cn/tyevelanoma.html]
    [Northern Kentucky Mavericks|http://3-date.desentes.cn/kikimactr.html]
    [FANS against JEFF GORDON|http://3-date.desentes.cn/vedape.html]
    [APS Bowling|http://3-date.desentes.cn/vacomat.html]
    [Cambridge Fencing Clubs|http://3-date.desentes.cn/ethinksuene.html]
    [Skateboarding Place|http://3-date.desentes.cn/venod.html]
    [Samuel Saidel-Goley|http://3-date.desentes.cn/brite.html]
    [Marlborough Badminton Club|http://3-date.desentes.cn/rrere.html]
    [Chen Family Taijiquan|http://3-date.desentes.cn/icheplezdefr.html]
    [Williams Lake Ski Center|http://3-date.desentes.cn/lothocatrta.html]
    [Hakkoryu So Hombu Dojo|http://3-date.desentes.cn/itinyone.html]
    [The American Cuemakers Association|http://3-date.desentes.cn/zdionfookis.html]
    [Capital Area Water Ski Club|http://3-date.desentes.cn/zilysupot.html]
    [Kelawar Cricket Club Malaysia|http://3-date.desentes.cn/pavimanue.html]
    [New London Country Club|http://3-date.desentes.cn/ureiofow.html]
    [Joints in Motion|http://3-date.desentes.cn/refoutyoren.html]
    [USA Today - Miami Hurricanes|http://3-date.desentes.cn/satirlyorsne.html]
    [Yorkshire Squash Rackets Association|http://3-date.desentes.cn/jedingofore.html]
    [The Autocross Forum|http://3-date.desentes.cn/whithelr.html]
    [University of Texas at Austin|http://3-date.desentes.cn/ulytito.html]
    [Top 20 Volleyball|http://3-date.desentes.cn/zdnindoesigl.html]
    [Swords Manor Football Club|http://3-date.desentes.cn/dedinip.html]
    [North Pole Arctic Marathon|http://3-date.desentes.cn/pericevexa.html]
    [Epic Org|http://3-date.desentes.cn/zdadenl.html]

  • EJB3 CORRUPTED when using more than one PersistenceUnit

    Hi,
    I am using JSF, EJB3 on Glassfish. CMP and JTA.
    This is the scenario:
    A user logs into application choosing one Persistence Unit (like in JavaSE). This is only at the beginig as I want to use Glassfish CMP and JTA.
        public EntityManagerFactory getEmf() throws Exception {
            configOverrides = new HashMap<String,Object>();
            configOverrides.put(TARGET_DATABASE,TargetDatabase.SQLServer);
            configOverrides.put(TARGET_SERVER,TargetServer.SunAS9);
            configOverrides.put(JTA_DATASOURCE,"jdbc/"+puName);
            configOverrides.put(SESSION_NAME,puName+"_session");
            emf = Persistence.createEntityManagerFactory(puName,configOverrides);
            return emf;
        }I then put the corresponding PersistenceUnit name in http Session scope to be used later on.
    I created a CommonEjbImpl to further inject via Jndi (and therefore use CMP and JTA) an EntityManger in each EJB3 as follows:
    @PersistenceContexts({
       @PersistenceContext(name="pu/SOCIETE1", unitName="SOCIETE1"),
       @PersistenceContext(name="pu/SOCIETE2", unitName="SOCIETE2"),
       @PersistenceContext(name="pu/SOCIETE3", unitName="SOCIETE3"),
       @PersistenceContext(name="pu/SOCIETE4", unitName="SOCIETE4"),
       @PersistenceContext(name="pu/SOCIETE5", unitName="SOCIETE5"),
       @PersistenceContext(name="pu/GENESYS_EXEMPLE", unitName="GENESYS_EXEMPLE")
    public class CommonEjbImpl {
        public EntityManager initEm() {
            LogUtil.log(this.getClass(),(String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("database"));
            return initEm((String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("database"));   
        public EntityManager initEm(String puName) {
            EntityManager em = null;
            try {
                em = (EntityManager) new InitialContext().lookup("java:comp/env/pu/"+puName);
            } catch (NamingException ex) {
                LogUtil.error(this.getClass(),ex);
            return em;   
        public void cleanup(EntityManager em) {
            //LogUtil.log(this.getClass(), "CLEANING EJB..with em: "+em);
            if (em != null && em.isOpen()) {
                em.close();
        } And in each EJB3, I use this CommonEjBImpl to get the Entity Manager like this:
    @Stateless
    public class TreeEJB extends CommonEjbImpl implements TreeEJBLocal {
        public TreeEJB() {
        private EntityManager em;
        @PostConstruct
        public void init() {
            em = super.initEm();
        @PreDestroy
        public void cleanup() {
            super.cleanup(em);
    }I have also a JSF backing bean (in SESSION SCOPE) "TreeBean" in which i Inject an EJB3 like this:
        <managed-bean>
            <managed-bean-name>TreeBean</managed-bean-name>
            <managed-bean-class>com.mfpsoft.bean.tree.TreeBean</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>and:
    public class TreeBean extends BeanLoader {
        public TreeBean() {
        @EJB
        private TreeEJBLocal treeEJB;
        @PostConstruct
        public void init() {
            treeEJB.init();
    }SO, imagine what is happening:
    USER1 logs (a persistence unit)
    USER2 logs (a different persistence unit)
    USER1 refresh tree for example
    USER2 rehresh tree also
    ==> USER2 GETS data from USER1 persitence unit
    My questions:
    EJB3 refrence seems to in application scope. Is thereonly one EJB3 refrence per appication?
    If so, how can I use same EJB with different persistence COntexts at the same time.
    Would this be a workaround ?? get entityManager at each business method of the EJB like this
        public  Object Method(Object object) throws Exception {
            EntityManager em = super.initEm();
            try {
                ...//em operations
            } catch (Exception ex) {
            } finally {
               em.close();
        }Would the data be corrupted if simultaneous access to same method by diffrent users?
    This issue is quite URGENT
    I would really appreciate a quick help on this
    Many thanks in advance
    Nicog

    Hi Zsom,
    Thanks for your answer
    Let me explain more clearly.
    My architecture is as follows: using JSF, Glassfish and ...SQL Server!! (! i know but this is mandatory requirement as our application is full web version of an existing ERP application already sold and installed by more than 1000 of our customers...
    I am using
    JSF-->JSF Managed Bean (Session for some and Request for almost all when logged )-->EJB Interface-->EJB Impl-->Entity-->Database
    Our application is ERP that our customers uses to managed several companies simultanously .
    This product ,mainly for intranets, is delivered with glassfish, the web application and SQL server containing by default 5 databases SOCIETE1,...SOCIETE5...but more can be created by our consultants for this customer....
    All databases have the same schema but not the same data.
    Sincerely, if I had done the desgin of the database, for sure I would have put all SOCIETEn in one DB but this is historical and I cant do anything against it.
    You have to see in our case, a database as a company of our customer (a joint venture for instance), each of which  with particular configuration, customers, orders, invoices, contacts....
    I have a persistence Unit (using JTA and CMP) per database , each using a connection pool managed by Glassfish.
    At the login of my application, the user (a user of our cutomer that bought this product), choose a database (a company actually lets say SOCIETE1), ...enter logging info and connect.
    The user must also be able to launch another browser window and connect lets say to SOCIETE2, and then work on SOCIETE1 AND SOCIETE2 simultanously.
    Also, I need Session Scope as there is configuration data that I need to keep over all pages. This configuration data is depending on the database connected to and the user.
    A session is therefore linked to the pair USER+DATABASE
    When selecting the database (company) for combo in logging form, the only way I found is fisrt to check if database(company) exists and can be connect to using at first begining Persistence.CreateEntityMangerFactory.. (i know that this is not J2EE and CMP but merly used in Java SE environments..).
    This step is only used for checking database.
    Then, if creation did not generate a Persistence Exception , I can use CMP and an EnityManger in EJB by JNDI lookup (as DI is not possible because you need constant in unitName);
    Doing so, the EJB (which only handles actions on Entities) manage the entities of the corresponding company SOCIETE1 or SOCIETE2, or.....
    I know that I might use antipatterns here, but actually this is the only solution I found
    Would an extra Layer between JSF bean and EJB do the trick....if yes how to inject the good persistence unit in my EJB is still in question.
    More if one Persistence unit is injected (assuming EJB being stateless) and another user working on another persistence unit is using the same EJB, then I go back in my first message on this topic
    As the number of databases for a customer is unknown, I can not create an EJB par database (lets says EJB_SOCIETE1, EJB_SOCIETE2,...). I agree that in this case they would be stateless....
    Do you have any suggestion to repect patterns in this situation.
    This would be greatly appreciated
    Thanks again
    Nicolas

  • Struts and JSF

    I have an Action from Struts. This controls the data in the code behind bean.
    After I call submit, how do I go Back to the Struts actions? the JSF navagation does not allow navigating to a servlet.

    Hey Shay,
    We have quite a large application based entirely on Struts. There is a keen interest in migrating to JSF, but in an incremental fashion. I did a fair amount of googling and almost everything i came up with , was purely theory oriented, are there any resources online , which clearly give examples/tutorials for doing a step by step migration to JSF from Struts. Couple of other questions that i dont seem to find an answer to with regards to the Integration of struts and JSF
    1) I understand BC4J, struts and JSF can be integrated together, does the same hold for ADF ? there was a similar forum post back in 2005 , where they said this is yet to be done, do we have this integration with Jdev 10.1.3 ?
    2) If i were to use only the jsf UI component tags as a first step in my struts application , what is the equivalent for the page definition file of JSF in struts, as in how would i achieve the binding ?

  • JSF debug output

    we are using JSF on tomcat, integrated in JBOSS.
    debugging is really horrible here - do you know, where i set debug levels or i can retrieve fine debug error message, also for JSF errors?
    thanks in advance,
    stefan

    thanks a lot - with one of those links i could really find a good way to get detailed debug messages. i will explain it here again to help maybe other users that have the same problem:
    1) search for file "log4j.xml" (e.g. jboss: server/default/conf)
    2) add there two sections:
       <!-- ============================== -->
       <!-- Append messages to the console -->
       <!-- ============================== -->
       <appender name="FACES" class="org.jboss.logging.appender.RollingFileAppender">
         <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
         <param name="File" value="${jboss.server.home.dir}/log/faces.log"/>
         <param name="Append" value="false"/>
         <param name="MaxFileSize" value="500KB"/>
         <param name="MaxBackupIndex" value="1"/>
         <param name="Threshold" value="DEBUG"/>
          <layout class="org.apache.log4j.PatternLayout">
             <!-- The default pattern: Date Priority [Category] Message\n -->
             <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
          </layout>
       </appender>and some lines below:
       <!-- ================ -->
       <!-- Limit categories -->
       <!-- ================ -->
        <category name="com.sun.faces" additivity="false">
            <priority value="ALL"/>
            <appender-ref ref="FACES"/>
        </category>  
      3) restart jboss / tomcat
    the output will be in jboss' log directory, e.g. "server/default/log". feel free to change this to any location you want.

  • JSF tags + target

    I am developing a web application using JSF ,Spring and Hibernate.
    I have designed a page which has an update button,on click of that a new window will open with fields that are to be updated.
    In this child window there will be one more Update, on clicking this i want this child window to be closed and updated values to be reflected on the parent window.
    Is there a tag in JSF which can take care of this ??
    I would like to know how to go about this.
    Thanking in anticipation
    Ashvini

    Hi Asvin
    Could you please share your JSF Spring Hibernate Integration prototype code as i am sailing in the same boat and have problems integrating this technologies
    Here is the info
    Hi All
    I am using JSF 1.1_01, Spring 1.2.6, Tomcat 5.0.28.
    I am getting following error
    javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.el.EvaluationException: Expression Error: Named Object: 'springBean' not found.
    The root cause for the error is "<managed-property>" under <managed-bean> from JSF which references Spring Bean. It is not able to evaluate JSF Expression Language. Then i tried following permutations and combinations
    -> instead of using JSF EL, i hardcoded the property value and it worked
    Any pointers/suggestions will be highly appreciate. I am working on this for more than a week
    Regards
    Bansi

  • Selecting multiple rows from jsf datatable

    Hi
    i am working on jsf,ejb3.0 .my requirement is to select the multiple rows usng checkboxes from jsf datatable. i am workng on this for last two days. early response is appreciated.please hel me.
    Thanks
    KRamu

    Hi!
    You could enhance your collection item with a boolean. On your interface you then insert a checkbox column that you bind to the boolean property. on any given action you can go thru your collection and check which item has been selected. In case of doubt go to [http://balusc.blogspot.com/] -i'm sure you'll find some samples/tuts there.

  • Flash in JSF

    im looking to put a flash chart (specifically ofc ) into my jBoss AS/jsf/ejb3 site. my only exposer to flash is the little internet games i play sometimes when im bored. Is there any resource that can help me out start to finish with this? I have searched the forums for help and ive found other people doing this but they all just seem to have a problem in the middle some place. i need help to get there.
    thanks and good day

    For what it's worth, I'm currently working on a JSF UIComponent wrapper for the YUI charts widget (http://developer.yahoo.com/yui/charts/) in my Scales component library. You can see a working example here: http://jsftemplating.org/mojarra-scales-demo-facelets/chart.jsf
    I've not settled completely yet on how the API should look, but the component is usable in it's current state if you don't mind a bit of rework as things change during the push to 1.0. :)
    You can find more about Scales at https://scales.dev.java.net. You can also find me on ##jsf on irc.freenode.net as jdlee if you wanna chat about it. :)

  • Plz help  jsf - phpintegration

    Hi ALL,
    I need help for jsf and php integration ie, when click on command button or href , from jst page its go to php page.how can i stat to work. any sample code avillable. request is so need ful.
    thq,

    I have declared my Bean in my JSP page not in the
    faces-config.xml. Does this make any problem ? Also I
    have tried the way you told me as well, but still the
    returned attribute is null.
    P.S. My bean is declared in my JSP page this way:
    <jsp:useBean id="newSurveyVar" class="SurveyModel"
    scope="request" />
    This declaration causes the SurveyModel instance to be created in request scope when the page is rendered, but that doesn't help you when the form is submitted -- that is going to happen on the next request (so the request attribute created here goes away). Basically, <jsp:useBean> is not typically going to be useful for request scope attributes (it's ok for session or application scope, though).
    and further I have this jsf code:
    <h:command_button label="Create" commandName="create"
    action="create" >
    <f:action_listener
    r type="CreateNewSurveyActionListener"/>
    </h:command_button>
    and this is my
    CreateNewSurveyActionListener.processAction(ActionEvent
    e) {
    if (actionCommand.equals("create_the_survey")) {
    FacesContext context =
    t = FacesContext.getCurrentInstance();
    SurveyModel survey =
    y =
    (SurveyModel)(Util.getValueBinding("newSurveyVar")).get
    alue(context);
    if (survey==null) // returns true :(((
    And since I've declared my beans here there is nothing
    special declared in my faces-config.xml
    For me again it is really strange why it is not
    working !!!
    Any idea ? Because the event listener is fired in a separate request, so the one you created in the page is gone.
    This is why the managed bean creation facility was created. If your component contains a valueRef that points at the bean name (or you evaluate a ValueBinding as illustrated earlier in the responses to your question), then the bean will get instantiated during the processing of the form submit.
    Craig McClanahan

Maybe you are looking for

  • File-2-Proxy: Get file name in the inbound proxy?

    Hi, I need to know the file name in the inbound proxy. After a search I found that's possible mapping the file name to the target structure as it's explained in that link: [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1731350750DB

  • Display in Black after a bunch of update

    Hi, I just did a bunch of update (10.6.8 combo V1.1...Pro stuffs and so on...). Update successfully but when restart, it just a black display on my cinema display! No matter how I Force Shut Down and re-boot, but still the same! Hard disk is working

  • Drawing an image in excel sheet using HSSF API

    Hi All, Can any one please help me. I am facing an issue with excel sheet while drawing image using HSSF API. I am doing autofit for all the cells i have added. But the image is stretching along with the expanded cells. I want the autofit option to w

  • A Stolen Mac Pro

    I wasn't sure where to post this, so I chose this place. We recently had a brand new Mac Pro stolen from our Art Department. We have filed a police report, hired a private investigator and questioned a few employees. *My question: is there any way to

  • Regexp_replace not able to convert

    Hi Team, I am using once query using regexp_replace plz find below query. Data for Address_1_v is 1@81, and Address_2_v is @@PO BOX ST289 SOUTHERTON SELECT ACCOUNT_LINK_CODE_N,     XMLELEMENT("ADDRESS_DTLS",XMLATTRIBUTES(     NVL(regexp_replace(ADDRE