Naming of JSF Objects

In a scenario where you are creating a new JSF page that contains multiple inputText objects, how can you name each inputText to something meaningful? For example, if you are prompting the user to enter their first and last names, it would be best from a code maintenance perspective to name the inputText objects inputFirstName and inputLastName at all layers of the code, i.e. actual page and the backing bean.
I don't see a way to do this other than manually going through every instance where the object is referenced and renaming it. Is this the only way it is possible? If true, this is a major usability issue. The auto-generation of the backing bean code is great, but if you have to go through a lot of manual effort in order to maintain standard field naming conventions, it reduces the usefulness of the code generation.
If I'm off-base here, please let me know how you can go about object renaming.
Thanks

To modify the component naming
1. Select the Property Inspector.
2. Select the button in the Binding field.
3. In the Binding frame select the New button for the Property field.
4. In the Create Proprty frame specify a property name.
5. The binding of the JSF component gets modified in the JSP page and a binding for the JSF component gets added to the backing bean.

Similar Messages

  • Javax.naming.NameNotFoundException: No object bound to name java:comp/env/j

    Hi,
    I have developed this application and i rolled it out to the glassfish server. Once i have deployed the application i was able to use it without any problem. But when i restart the glassfish server and try the application, it chuck this exception. this exception only chuks at particular forms Not all form.
    Can some one tell me what causing this problem please
    Thank you
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@6fee93) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException java.sql.SQLException
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:470)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.RuntimeException: java.sql.SQLException
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:416)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:373)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:713)
            at com.sun.webui.jsf.component.TableRowGroupBase.getRowKeys(TableRowGroupBase.java:552)
            at com.sun.webui.jsf.component.TableRowGroupBase.getFilteredRowKeys(TableRowGroupBase.java:185)
            at com.sun.webui.jsf.component.TableRowGroupBase.getRowCount(TableRowGroupBase.java:495)
            at com.sun.webui.jsf.component.Table.getRowCount(Table.java:326)
            at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:416)
            at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:138)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1126)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            ... 39 more
    Caused by: java.sql.SQLException
            at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:381)
            at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:160)
            at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
            at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1351)
            at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:402)
            ... 58 more
    Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/carltoninstitute_MySQL
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:834)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.sql.rowset.internal.CachedRowSetXReader.connect(CachedRowSetXReader.java:366)
            ... 63 more

    Hi guys,
    I have tried everything I could, still I was unable to solve this problem.
    When i restart the glassfish server, some of the forms are not working. then when i restart again, the form that worked earlier doesn't work and the form that didn't work will work.
    If Anyone came across this error please let me know.
    Best Regards

  • Get JSF objects in a Filter Class

    Hi! I have a problem with my JSF application. As the most of the web applications I have a login at the begining and I place a Listener - Filter classes for catching the session timeout to returning the user to the login page. All this works OK. The problem it´s to validate that the user only has 1 session open at the time, when the user begin session I change a flag into it's database row, and when the user logout the flags change again to false (both actions (login and logout) was fired by the user clicking it's respective buttons), this works fine, but I want to change the data flag in the database row with the timeout Filter classes after pass 1 minute. My Filter class it's like this:
        public void doFilter(ServletRequest request,ServletResponse response, FilterChain filterChain) throws IOException,ServletException {
            if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) {
                HttpServletRequest httpServletRequest = (HttpServletRequest) request;
                HttpServletResponse httpServletResponse = (HttpServletResponse) response;                      
                if (!StringUtils.contains(httpServletRequest.getRequestURI(), "welcomeJSF.jsp")) {                                
                    if((httpServletRequest.getRequestedSessionId() != null) && !httpServletRequest.isRequestedSessionIdValid()){
                         /* 1 */               
                           FacesContext context = FacesContext.getCurrentInstance();
                             User user = (User) context.getExternalContext().getSessionMap().get("simpleUser");
                             UserDAO conn = new UserDAO();
                             List users = conn.findByNumber(new Long(user.getNumber()));
                             persistence.User userDB = (persistence.User) users.get(0);
                             userDB.setUse(false);
                             Transaction tx = conn.getSession().beginTransaction();
                             conn.save(userDB);
                             tx.commit();
                             conn.getSession().close();                                     
                             /* 2 */                     
                        String timeoutUrl = httpServletRequest.getContextPath()+ "/faces/" + "welcomeJSF.jsp";
                        System.out.println("Session is not invalid. Redirecting to login page. ");
                        httpServletResponse.sendRedirect(timeoutUrl);
                        return;
            filterChain.doFilter(request, response);
        }When I comment from 1 to 2 works fine, but if I want to get the context.getExternalContext().getSessionMap().get("simpleUser") i get this error:
    java.lang.NullPointerException
         at validadores.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:53)
         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:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)This is because I'm working in a diferent conexts? How can I get Jsf objects from ServletRequest? or to pass getExternalContext().getSessionMap() to the filter class? Any ideas to change the database when the session timeouts if I'm using hibernate?
    Thanks for your time and help!

    correction :
    MyObjectProxy extends ObjectProxy{
         override callProperty(
              // your dyna logic
    and expose new MyObjectProxy(dynaInstance)

  • Enhanced protected mode and global named shared memory object

    Good morning.
    I've written a bho that do data exchange with a system service. The service creates named shared memory objects in the Global namespace. Outside appcontainer IE 11 sandboxed everything works fine lowering objects integrity level. Inside the sandboxed environment
    OpenFileMappingW seems to return a valid handle but the calls to MapViewOfFile always gives access denied. What i'm missing? Thank you.
    Service code for security descriptor creation:
    if (InitializeSecurityDescriptor(pSA->lpSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
    if (ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:P(A;;GA;;;WD)(A;;GA;;;AC)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)//
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorDacl(pSecDesc, &fAclPresent, &pDacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorDacl(pSA->lpSecurityDescriptor, TRUE, pDacl, FALSE);
            if (bRetVal ==TRUE && ConvertStringSecurityDescriptorToSecurityDescriptorW(L"S:(ML;;NW;;;LW)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)
                BOOL fAclPresent = FALSE;
                BOOL fAclDefaulted = FALSE;
                if (GetSecurityDescriptorSacl(pSecDesc, &fAclPresent, &pSacl, &fAclDefaulted) == TRUE)
                    bRetval = SetSecurityDescriptorSacl(pSA->lpSecurityDescriptor, TRUE, pSacl, FALSE);
                    OutputDebugStringW(L"SACL ok.");
        return bRetval;
    BHO code
    LPMEMORYBUFFER OpenDataChannel(HANDLE *hQueue)
        LPMEMORYBUFFER lp = NULL;
        WCHAR data[512] = { 0 };
        for (int a = 0;; a++)
            if(iestatus==FALSE)StringCchPrintfW(data, 512,L"Global\\UrlfilterServiceIE.%d", a);//NOT in EPM
            else StringCchPrintfW(data, 512, L"%s\\Global\\UrlfilterServiceIE.%d",appcontainernamedobjectpath, a);//in EPM
            *hQueue = OpenFileMappingW(FILE_MAP_ALL_ACCESS, TRUE, data);//FILE_MAP_ALL_ACCESS
            if (*hQueue != NULL)
                //file mappato esistente
                lp = (LPMEMORYBUFFER)MapViewOfFile(*hQueue, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(MEMORYBUFFER));//FILE_MAP_ALL_ACCESS
                if (lp != NULL)

    Ciao Ritchie, thanks for coming here. ;-)
    I call (only) OpenFileMapping and MapViewOfFile inside my code and i get access denied at the first try. As i stated before this happens when IE11 is working inside EPM 32/64bit mode, outside EPM it works as it should. However i decided to take a different
    approach to do IPC, because, you want it or not, the service is up and running as SYSTEM... Still i'm really interested about two points:
    1) can i use global kernel objects in EPM mode?
    2) if one is "yes, you can": what's wrong with my code? The security descriptor? Something else?
    Thanks all.

  • Javax.naming.NameNotFoundException: No object bound for java:comp/env/...

    Help, help! I have a problem:
    javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
    at javax.naming.InitialContext.lookup(InitialContext.java:355)
    at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
    at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
    at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
    at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
    at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
    at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
    at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:595)
    code:
    initialContext = new InitialContext();
    LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
    in web.xml:
    <ejb-local-ref>
    <ejb-ref-name>StatelessREBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
    <local>com.re.stateless.ejb.LocalStatelessRE</local>
    <ejb-link>StatelessREBean</ejb-link>
    </ejb-local-ref>
    Any help will be appreciated! Thanks in advance.

    Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
    It worked for me when i used to get a similar exception.

  • URGENT - javax.naming.NameNotFoundException No object bound to name

    I'm working on a stateless EJB (JobDtlEJB) which calls another stateless EJB (FuncVSREJB). During runtime, the following message appear in application log:
    [20/Feb/2006:00:16:56] INFO ( 2088): CORE3282: stdout: EJBGetter:getFuncVSRHome-to lookup[java:comp/env/ejb/funcvsr]
    [20/Feb/2006:00:16:56] INFO ( 2088): CORE3282: stdout: [2006/02/21 00:16] {-VoiceSROut}
    [20/Feb/2006:00:16:56] INFO ( 2088): CORE3282: stdout: JobDtlEJB exception FuncVSR:javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/funcvsr
    Would appreciate if anyone kind help!!!
    Below is my portion of codes in JobDtlEJB:
    import com.util.EJBGetter;
    public class JobDtlEJB implements javax.ejb.SessionBean {
    private transient javax.ejb.SessionContext m_ctx = null;
    private FuncVSRHome myfuncvsrHome;
    private FuncVSR myfuncvsrRemote;
    public void ejbCreate() throws javax.ejb.CreateException {
    System.out.println("ejbCreate() on obj " + this);
    public String getConnect(String InjobID) {
    try
    myfuncvsrHome = EJBGetter.getFuncVSRHome("java:comp/env/ejb/funcvsr");
    myfuncvsrRemote = myfuncvsrHome.create();
    } catch(Exception ee) {
    cFunction.NonIMErrLog("-VoiceSROut", "JobDtlEJB exception FuncVSR:"+ee.toString(), true);
    ee.printStackTrace();
    Coding inside EJBGetter:
    package com.util;
    import javax.rmi.PortableRemoteObject;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import com.ejb.*;
    public final class EJBGetter {
    public static FuncVSRHome getFuncVSRHome(String jndiName) throws NamingException
    InitialContext initial = new InitialContext();
    System.out.println("EJBGetter:getFuncVSRHome-to lookup["+jndiName+"]");
    Object objref = initial.lookup( jndiName );
    System.out.println("EJBGetter:getFuncVSRHome-narrow["+jndiName+"]");
    FuncVSRHome ejb2Home = ( FuncVSRHome ) PortableRemoteObject.narrow( objref, FuncVSRHome.class );
    System.out.println("EJBGetter:getFuncVSRHome-returning EJB Home for ["+jndiName+"]");
    return ejb2Home;
    } // EJBGetter
    Below is my ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <display-name>TheFuncVSR</display-name>
    <ejb-name>TheFuncVSR</ejb-name>
    <home>com.ejb.FuncVSRHome</home>
    <remote>com.ejb.FuncVSR</remote>
    <ejb-class>com.ejb.FuncVSREJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    <session>
    <display-name>TheJobDtl</display-name>
    <ejb-name>TheJobDtl</ejb-name>
    <home>com.ejb.JobDtlHome</home>
    <remote>com.ejb.JobDtl</remote>
    <ejb-class>com.ejb.JobDtlEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    THe following is my sun-ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <!-- Copyright 2002 Sun Microsystems, Inc. All rights reserved. -->
    <sun-ejb-jar>
    <enterprise-beans>
    <unique-id>1</unique-id>
    <ejb>
    <ejb-name>TheJobDtl</ejb-name>
    <jndi-name>jobdtl</jndi-name>
    </ejb>
    <ejb>
    <ejb-name>TheFuncVSR</ejb-name>
    <jndi-name>funcvsr</jndi-name>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    The web.xml file content:
    <ejb-ref>
    <ejb-ref-name>ejb/jobdtl</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.ejb.JobDtlHome</home>
    <remote>com.ejb.JobDtl</remote>
    <ejb-link>TheJobDtl</ejb-link>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb/funcvsr</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.ejb.FuncVSRHome</home>
    <remote>com.ejb.FuncVSR</remote>
    <ejb-link>TheFuncVSR</ejb-link>
    </ejb-ref>
    </web-app>

    I've solved this issue in ejb-jar.xml. This is because of <ejb-ref-name> in ejb-jar.xml is unmatched with that in web.xml
    <ejb-ref-name>ejb/funcvsr</ejb-ref-name>
    Jsut sharing to you all. :)

  • Tiles:put with beanName and JSF object doesn't work

    I got some recent (good) advice for using tiles:put and in the inserted tile getting access to the string in a JSF tag, as long as it is a static string. For example, if I do this in the page including the tile:
    <tiles:insert page="includedPage.jsp">
    <tiles:put name="somevar" value="something" />
    </tiles:insert>
    Then in includedPage.jsp:
    <tiles:importAttribute name="somevar" scope="request"/>
    <h:outputText value="#{requestScope.somevar}"
    That works fine. But now I'm trying to use this:
    <tiles:insert page="includedPage.jsp">
    <tiles:put name="somevar" beanName="varFromDataTable" />
    </tiles:insert>
    I can't get it in the includedPage.jsp - I think because the tiles tag can't find the JSF variable (created using the var= attribute of dataTable).
    Does anyone know how I would do this? I need the whole object, not just a string from the object, since the includedPage.jsp will be using many attributes from the bean.

    Hi Greg,
    What kind of error/issue you are facing.
    Thanks,
    Rohit

  • JSF & object tag

    Hi I'm looking for input on this.
    I'm trying to figure out how to render a object tag in JSF with dynamic parameter values tied to the backing bean.
    The only way i can think of possibly doing it is by creating hidden fields and tying those hidden fields to the backing bean and then using the values of those hidden fields somehow as the value for my parameter tags
    The object i am trying to create is needed a for a third party piece of software. It looks like this:
      <object id="activeXPlugIn" style="width:100%; height:100%"
          codeBase="123456"
          classid="123456">
        <param name="VALUE1" value="/test/test.xml"/>
      </object>The problem i have is if i use the verbatim tag from what i understand then i can't use any JSF faces tags like the f:param inside it in order to tie the param values to the backing bean.
    Any thoughts or suggestion please? Thanks in advance.

    You can just use f:verbatim. It's a misunderstanding that f:param would be applicable on plain HTML elements.
    Do for example:<f:verbatim>
        <object id="foo">
            <param name="value1" value="</f:verbatim><h:outputText value="#{myBean.value1}" /><f:verbatim>">
        </object>
    </f:verbatim>

  • Dynamic Variable Naming for Sound Object

    Is it possible to dynamically name a variable? I'd like to
    create a new Sound Object on the fly, so that I can use the
    Sound.load() method multiple times. I would simply like to create
    and name the variable and add a number to the end of the name
    (i.e.; var "audio_1":Sound). I'm sure that this is possible.
    However, I can't seem to get it figured out.

    This code worked great! However, how can I set a global
    variable equal to the newly created Sound Object so that it is
    available globally via a reuseable reference?
    Here's an example of how I attempted to do this. Please note:
    audioObject is a global variable that I am trying to use to
    reference the new Sound Object in various places.
    audioObjectCount is a global variable that I am using to set
    or get the next number to use when dynamically creating the next
    new Sound Object

  • Naming of Business objects

    Also I would like to know how we name different objects in BI.

    Hi sudha;
    The following namespaces are generally available for BW objects:
    SAP-delivery (Business Content) namespace:
            Objects beginning with 0
            Generated objects in the DDIC beginning with /BI0/
    InfoCube 0SALES, fact table /BI0/FSALES
    Customer namespace:
            Objects beginning with A-Z
            Generated objects in the DDIC beginning with /BIC/
    InfoCube SALES, fact table /BIC/FSALES
    Partner-specific namespace and customer-specific namespace:
            Object begins with /XYZ/ (example)
    Special SAP namespaces for generated objects:
            The prefixes 1, 2, 3, 4, 6, 7, 8 are required in BW for DataSources and InfoSources in special SAP applications.
            The prefix 9A is required for the SAP APO application.
    Hope this helps
    BK

  • Retrieving array of objects using Named Query

    Can i retrieve an array of objects using a Named Query? The execute query method of Session returns only an Object but not an array. Please let me know if there is any possibility.
    Thanks in advance,

    Hi,
    You define a named ReadAllQuery query object, and after query execution, you can cast the returned Object as Vector, and further convert it to an array.
    King

  • BO Business Object Naming Convention

    Hi experts,
    we are about to implement SAP Business objects (previously using only using SAP BW). As part of the implementation we are creating a naming convention / standard for Webi and Universe. Is there anything published on SDN or the web regarding naming conventions / standards or is anyone willing to share some tips.
    BR
    Anders

    Hi Anders,
    In regards to naming your universe objects, please take a look at my blog post re Universe Best Practices (Link: [http://geek2live.net/posts/universe-design-best-practices/]).
    I would always recommend naming universe objects (classes, dimensions, measures etc) in business terminology and being explicit in the definition.  For instance, an object called 'Sales' could be interpreted many different ways.  Is it Sales Revenue, Count of Sales Orders, Count of Sales Order Lines, Average Sales Amount, etc etc?
    Your universes should also be named explicitly so users understand exactly what it contains.  Another example - a Finance universe could contain many things - is it General Ledger Actuals, General Ledger Budgets, Fixed Assets, Accounts Payable etc..
    The most important thing imho, is to define a standard that everyone who is designing universes uses, without exception.  Otherwise the standards don't mean anything to the end users.
    Good luck!
    Josh

  • @Singleton instanciated twice when from Struts2 and JSF (same webapp)

    Hello,
    in the process of migration from a struts2 application to JSF 2.0 I've annotated as @javax.ejb.Singleton a former stateless session bean. It works ok but if I get that EJB from JNDI (struts2 actions) I get a different object than when referencing the EJB from a JSF facelet (I have also annotated the Bean as @ManagedBean) It works but is a different object. is that the supposed behaviour?
    (I've also tried with Weld (cdi) using @Named and not @ManagerBean... it is even works. For some reason, @Named creates the object but gives it no EJB services (no @PersistenceContext injection for example)
    thanks for any directions,
    Ignacio

    Steve,
    I am using JSF2.0 and getting javax.el.ExpressionFactory NoClassDefFound issues.
    OEPE Helios
    Weblogic 10.3.3
    I have an EAR containing one WAR.
    WEB-INF/lib
    el-api-2.2jar
    el-imp-2.2.jar
    jsf-api.jar (2.1.1)
    jsf.impl.jar (2.1.1)
    jstl.jar (1.1.0-D13)
    web.xml has
         <context-param>
              <param-name>com.sun.faces.expressionFactory</param-name>
              <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
         </context-param>
    EAR has
    weblogic-application.xml with
    <wls:prefer-application-packages>
    <wls:package-name>org.eclipse.persistence.*</wls:package-name>
    <wls:package-name>javax.faces.*</wls:package-name>
    <wls:package-name>com.sun.faces.*</wls:package-name>
         <wls:package-name>com.sun.el.*</wls:package-name>
         <wls:package-name>javax.el.*</wls:package-name>
    </wls:prefer-application-packages>
    I see by your post that JSF2.0 support can be solved by either deploying a shared-library or using the weblogic.Deployer utility. Unfortunately, we don't have access to change the Weblogic instance in any way. I was hoping that using the prefer-application-packages would be sufficient to use alternative classes to Weblogic's but I have not been able to get it to work for the javax.el classes. I have tried not including javax.el and the app deploys but then accessing a page produces a javax.el.ELResolver no method found for invoke. Invoke being a newer method defined in el-api-2.2.jar. If I was able to convince them to add some shared libs, what are all the jars that would be required to make this work?
    Any suggestions would be greatly appreciated.
    Thanks
    John

  • SessionContext in JSF Controller class

    Hello,
    I want to access a EJB session bean from a JSF managed bean. I wrote this code for the JSF managed bean:
    public class MyController {
    @Resource
    private SessionContext sc;
    Unfortunately, the SessionContext is always null, when I deploy this to Glassfish. How should this be done?
    Many thanks in advance,
    Ulrich

    I know this thread is old, but I'm having the same problem. Actually, I get an error when the container attempts to inject the SessionContext. Is this possible? I need to do this because I have to include a class in the current JTA
    pService = sessionCTX.getBusinessObject(MyClass.class);Here is the error:
    JSF1001: Managedbean DPRAdminController could not be created.
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@75b962) threw exception
    javax.faces.FacesException: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1553)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:530)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:492)
            at com.sun.faces.renderkit.html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:177)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:519)
            at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
            at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
            at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
            at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
            at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
            at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
            at javax.faces.component.html.HtmlCommandButton.isDisabled(HtmlCommandButton.java:161)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
            ... 47 more
    Caused by: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:340)
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:509)
            ... 59 more
    Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
            at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
            at com.sun.enterprise.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
            at com.sun.faces.vendor.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:79)
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
            ... 60 more
    Caused by: javax.naming.NameNotFoundException: No object bound for java:comp/env/com.mypack.dpr.jsf.DPRAdminController/sessionCTX [Root exception is java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0]
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:337)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:287)
            ... 64 more
    Caused by: java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0
            at com.sun.ejb.containers.ContainerFactoryImpl.getEJBContextObject(ContainerFactoryImpl.java:836)
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:965)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            ... 67 more
    StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:519)
            at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
            at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
            at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
            at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
            at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
            at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
            at javax.faces.component.html.HtmlCommandButton.isDisabled(HtmlCommandButton.java:161)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:530)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:492)
            at com.sun.faces.renderkit.html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:177)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:340)
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:509)
            ... 59 more
    Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
            at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
            at com.sun.enterprise.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
            at com.sun.faces.vendor.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:79)
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
            ... 60 more
    Caused by: javax.naming.NameNotFoundException: No object bound for java:comp/env/com.mypack.dpr.jsf.DPRAdminController/sessionCTX [Root exception is java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0]
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:337)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:287)
            ... 64 more
    Caused by: java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0
            at com.sun.ejb.containers.ContainerFactoryImpl.getEJBContextObject(ContainerFactoryImpl.java:836)
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:965)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            ... 67 more

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

Maybe you are looking for