JSF 1.2 lifecycle details

Hi all, I would like to ask 2 questions on JSF 1.2 lifecycle:
All the requests for jsf resources are managed by the FacesServlet whose service method starts the lifecycle for the requested resource. So, for each request:
the web container creates a new thread to serve the request
the thread calls the service method of the FacesServlet which starts jsf lifecycle
the whole lifecylce takes place into the thread
Is this correct?
JSF pages are translated into servlet at a certain point of the lifecycle or not? Talking about the Render Response Phase, the JavaEE 5 tutorial says: "During this phase, the JavaServer Faces implementation delegates authority for rendering the page to the JSP container if the application is using JSP pages ..... the components will render themselves as the JSP container traverses the tags in the page."
Does it mean that the response is constructed one tag at a time while the jsp container traverses the whole view without the need to translate the page into a servlet and call the resulting jsp_service method (as for standard jsp pages)?
Thanks a lot for your help,
Nico

>
Yes, the server will likely have a thread per request although it is not strictly necessary when it uses NIO under the hood. The only thing you have to worry about is that a request is handled isolated from all others. That is not JSF specific in any way.
JSF pages are translated into servlet at a certain point of the lifecycle or not? Talking about the Render Response Phase, the JavaEE 5 tutorial says: "During this phase, the JavaServer Faces implementation delegates authority for rendering the page to the JSP container if the application is using JSP pages ..... the components will render themselves as the JSP container traverses the tags in the page."JSP pages are translated into servlets; again not related to JSF. You may use JSPs as the view technology for JSF but I would recommend using Facelets in stead.
Does it mean that the response is constructed one tag at a time while the jsp container traverses the whole view without the need to translate the page into a servlet and call the resulting jsp_service method (as for standard jsp pages)?No, that's not what it says at all. Basically all it says is that the JSP renderer will trigger the JSF components to render and not JSF itself.

Similar Messages

  • I use js change the sequence of options, JSF go through lifecycle, why?

    Hi,All
    When I use javascript change the sequence of options,
    JSF go through Restore View, Apply Request Value,
    Process Validations, Render Response four lifecycle. why?
    <f:view>
    <head>
    <script>
    function moveDown()
         var selObj = document.getElementById("org_rank:childOrgs");
         var index = selObj.selectedIndex;
         if (index == -1 || index >= selObj.options.length - 1)
         return;
         var selectedText = selObj.options[index].text;
         var selectedValue = selObj.options[index].value;
         selObj.options[index].text = selObj.options[index + 1].text;
         selObj.options[index].value = selObj.options[index + 1].value;
         selObj.options[index + 1].text = selectedText;
         selObj.options[index + 1].value = selectedValue;
         //selObj.options[index + 1].selected = true;
    </script>
    </head>
    <body>
    <h:form id="org_rank">
    <table align="center" border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td align="middle" heigth="100" width="160">
    <h:selectOneListbox id="childOrgs" value="#{orgDelegate.curId}" style="height:100px;width:150px" >
    <f:selectItems id="orgNames" value="#{orgDelegate.orgNames}" />
    </h:selectOneListbox>
    </td>
    <td align="middle" width="80">
    <h:commandButton value="down" onclick="moveDown()" /><br><br>
    </td>
    </tr>
    </table>
    <h:messages styleClass="errorMessage" layout="table" showDetail="true" showSummary="false" />
    </h:form>
    </body>
    </f:view>

    When you say the text shrinks when you change the size of the window, do you mean in terms of making the window smaller / zooming out from the page so that for instance you can see more of the "page" that you're working on?
    If so then that's by design and is how it's always been. The view you see in Word is designed to represent what would appear on the page if you printed it, so relative to the page the text remains the same size. If you change the page so that you can see
    more of it, eg effectively zooming out, then the size of the text must shrink. It's no different to holding a physical document in front of you, if you move the paper further away from you so the page looks smaller, the text will as well.
    On the other hand if you mean when you make the window smaller, eg displaying less of the grey space on either side, that the page and text shrink then I don't know what you mean. Which version of Word are you using? I've tried with Word documents in Word
    2010 and Word 2013, and in both cases simply changing the size of the document window does nothing to the view of the document (other than make it impossible to read all the test on a line without scrolling if I go too far.

  • JSF multi row editable detail form -- moving backwards or forward

    Innocently trying to create an intuitive editable master detail JSF form. Similar to what you would want in any application and something that can be done in less than a minute in Oracle Forms
    The master form is a just a simple editable single master form based on the dept table. and the detail is the emp table. I have create the model using the wizard and made sure a link view is created.
    The details form is a multirow form with all the editable columns
    I added two button for the details form (create, remove)
    I entered the master record (no commit yet)
    then i moved the cursor to the details form and created a few records, i found an error in the second row in the detail form, therefore, innocently, i selected that row and pushed the Remove button. shocked to find out that the first row in the details form is deleted regardless of which row is selected. Additionally, when a row is created using the create button, the row is created above the first row of the details form (as if the first row in the details form is always current).
    Such requirement should be easily satisified by a Framework?
    Ammar Sajdi
    Oracle
    Amman

    thank you frank for your response
    Actually, my DETAILS form DOES include the Select Option, and i was really expecting (and accepting) the fact that i need to point to the row i need to delete. Actually, 20 years back i was 8080 assembly language programmer, and used to handle thing at very very low level. However, i do select a row, and i can see the Radio activated for that row, unfortunately though, the seemingly selected item in the DETAILS form is not the one that is removed, it is instead, the first row that is actually removed. It seems as if the form rows are not synchronized with the ROW selector you mentioned,, The first row is somehow internally selected (always)
    This is the interesting part.
    I created another project with a single multi row editable table (without master details) only a master, and guess what, it is working beautifully! exactly as you descirbed. Select a row, press delete and there you go, the record no longer exists
    Ammar Sajdi
    visit me
    www.e-ammar.com/Oracle.htm
    regards

  • Doubts about JSF 2.0 lifecycle

    1)Is FacesContext stored in request scope at the beginning of the lifecycle?
    2)Is the component tree populated with components mainly in render response phase? when a page is requested for the first time, the restore view phase creates a empty UIViewRoot and in the render response phase the tree is populated with components. Also in the render response phase, the navigation handler determines whether to display current view or a completely new view. If a new view is to be displayed, the component tree is populated with components in the render response phase. So component tree seems to be populated mainly in render response phase, isn't it so?
    3)The render response state caches the 'current' state of the component tree in the render response phase. What exactly does 'current' mean? If we have a tree having input components with some user entered values, are the values also stored or they are removed before the tree is cached?
    4)In what scope does render response cache the component tree?
    5)Once a user request a page, a component tree is cached. Is the created tree available for all users or for a particular user for whom the tree was initially created?

    N.B. I haven't studied JSF 2.0 too deeply, but I do not think any of the answers below are different for 2.0 vs 1.2.
    nash_era wrote:
    1)Is FacesContext stored in request scope at the beginning of the lifecycle?The FacesContext is stored in a thread local static variable. This is how the static FacesContext.getInstance() method can work while your application server services multiple clients.
    >
    2)Is the component tree populated with components mainly in render response phase? when a page is requested for the first time, the restore view phase creates a empty UIViewRoot and in the render response phase the tree is populated with components. Also in the render response phase, the navigation handler determines whether to display current view or a completely new view. If a new view is to be displayed, the component tree is populated with components in the render response phase. So component tree seems to be populated mainly in render response phase, isn't it so?Once case you haven't mentioned is the post back of a previously rendered page. In this case the component tree is restored during the Restore View phase. It is this restored tree that is in effect for the remaining phases up to Execute Application. Then the navigation handler determines the next view and it is created if necessary.
    >
    3)The render response state caches the 'current' state of the component tree in the render response phase. What exactly does 'current' mean? If we have a tree having input components with some user entered values, are the values also stored or they are removed before the tree is cached? If the same view that was restored is to be rendered, then the values entered by the user may be re-used. (I say may because they might get cleared if the Update Model phase is successful. It that case the value expression is re-evaluated to get the value rendered.)
    >
    4)In what scope does render response cache the component tree?The cached view roots are in the session.
    >
    5)Once a user request a page, a component tree is cached. Is the created tree available for all users or for a particular user for whom the tree was initially created?Only for the particular user. Also, if the outcome of the action method is non-null, you will get a new instance of the tree even if it is the same view id as the last one.

  • Why should i use JSF rather than Struts?

    What makes JSF useful than Struts? In my project I am using like
    <h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
    In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
    From what i understand is Presentation Layer should be shielded from whatever is going on in the backend. So, this doesn't do good right?
    Please suggest.
    How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..

    srikanthradix wrote:
    What makes JSF useful than Struts? In my project I am using like
    <h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
    In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
    From what i understand is Presentation Layer should be shielded from whatever is going on in the backend.You can use "binding" and define everything in Java code if you want. You can rename your method to reflect what you want to see in the front end if you want. You can use JSFTemplating to use handlers which can be mapped to any name you want to see and do not have to match the method name of the java class (although I suspect this is the opposite direction from what you are suggesting you want).
    EL in jsf (i.e. #{bean.login}) is meant to do the mapping in JSF pages rather than externalize this in a separate file and force the page developer to edit multiple files for simple tasks. Although in some cases navigation is broken out into a separate file (i.e. faces-config.xml file using the default NavigationHandler navigation rules), this can also be done inline. It's a different way of doing development and has its pros and cons (easier, but mixes up presentation and controller somewhat). That said... JSF is very flexible, it CAN externalize any of this information, it just requires you to provide a different ViewHandler information that allows you to enter the data the way you like to see it (imo, you won't realize any benefit from the separation, though -- I used to think it was worth doing but have changed my opinion).
    So, this doesn't do good right?Perhaps in theory... but in practice, I don't think it really has a drawback. One caveat, I like how I implemented event handling in JSFTemplating as opposed to action/actionListener attributes which are not configurable and are more opaque than I prefer. My parameterized handlers allow for better code-reuse, but arguably mix up presentation and controller code even more (depending on how they're used).
    Please suggest.
    How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..The idea of a component helps tremendously as someone else can create a component for you and you can benefit from it. There are many great component sets available on the market (for free and for purchase). For example: Woodstock (which has drag/drop support inside NetBeans), RichFaces, IceFaces, Tomahawk, Scales, etc.
    Renderers allow you to cleanly separate the presentation of a component with the data of the component. You can then switch out the presentation to support multiple markups (i.e. client devices). In addition, JSF's rich lifecycle provide logical places for certain types of operations to occur, the renderers participate in this so that they are performing their tasks at a well defined time. And finally, many different components may re-use the same renderer, or a single component may use one of several renderers. The separation of data and display (model and view) makes this very clean.
    JSF is not Struts. If you expect it to be struts, you may be disappointed (or if you expect struts to be JSF, you'll be disappointed). JSF has a lot to offer (as does struts), you have to decide what is important to you and your organization. Some things to consider wrt to JSF: very strong vendor support; many large set of components to choose from; multiple standards-based tools to choose from; very flexible (most parts of the framework are pluggable); active growing development community; component-based model which encapsulates complexity for things like Ajax, pagination, and other things (often complicated in a non-component architecture); good integration with other frameworks.
    I don't know if this makes your decision any easier, but hopefully it helps clarify how you should be viewing JSF & Struts.
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Detail Table Not Changing When Master Table Selection Changes

    Using JDev 11.1.1.6.
    I am working through some Oracle tutorials (Storefront Demos).
    I am accessing the Fusion Order Demo (FOD) schema.
    I have created VOs based on BCs for Categories, Subcategories and Products.
    I have added all to my data model and tested functionality using the AppModule.  This works as expected.
    When I drag the Subcategories onto my jsf page as Master-Detail (Table-Table), the initial list is based on the first index of the BrowseCategory data control.
    When I click on another row in the master table, the detail table refreshes but the same data appears.
    I confirmed that the selection changes on the master table.
    I added a button on the page and checked the BrowseCategoryIterator using some backing bean code and the iterator remains on the first record.
    I checked the SelectionListener on the table and it is set correctly as   "#{bindings.BrowseCategory1.collectionModel.makecurrent}"
    Does anyone have any idea why the detail table is not getting updated based on a relationship to the master table?
    Thanks,
    Raymond

    Hi,
    From what you are saying:
         1. it's working in application module tester
         2. you verified the current row of the iterator and you found that it is stuck on the first row
    The problem is then that the selection in the table is not setting the current row in the iterator.
    Try to add a custom selection listener where you just execute the "#{bindings.BrowseCategory1.collectionModel.makecurrent}" expression. this is just to make sure that the listener is being called.
    Also, the problem might be that the current row is correctly set by the table selection, but later in the life cycle it is being reset. so maybe you can also overwite the methods that set the current row in your VOimpl (again by jsut calling the supper) to check if and when these methods are called.
    Regards,
    Elias.

  • How to use a CSS file  in a jspx page..

    I'm using JDev 10.1.3.4.
    I would like to know how can i use a CSS file in a JSPX page..
    there is this file: public_html\WEB-INF\temp\adf\styles\cache\oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css
    How do I make use of this is my jspx page?
    Also how do i use the style class in property inspector?
    What should be the path of "oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css"?
    Also please tell me what changes I have to make in all the other files like web.xml or adf-faces-config.xml.
    Im using web application template using (EJB,Toplink and JSF)
    Please suggest the detailed steps as I'm new to JSF.
    Thanks ,
    Shri

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • Why Custom EL Functions are not supported in ADF Faces??

    Im using jdev 10.1.3
    1.- I declare a java class, with a static function for concatenation purposes.
    2.- I create my tld.
    3.- I call the function in my jsp.
    a) If I use the $ prefix, works PERFECT.
    b) If I try to call this in an outputText (i.e)
    - If I use the $ prefix, not compile.
    - If I use the #, I just tell me that no function is maped to my call.
    Is there a REALLY GOOD reason to disable this awesome functionality??
    Frank? Steve? somebody? :(

    Hi Alopez,
    I'll take a stab at this one:
    1) In JSF, you need to expose your managed bean by use of the faces-config.xml file, instead of using a TLD (Tag Library Descriptor). Here's an example of an entry in the faces-config.xml...
    <manged-bean>
      <managed-bean-name>someBean</managed-bean-name>
      <managed-bean-class>com.company.yourmangedbeanhere</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>Then your EL would be: #{someBean.yourresult}
    2) the ${} is a JSP based expression language call, which is evaluated at page compile time, and is referred to as "Immediate Evaluation". This is good for JSP because your JSP tags are evaluated immediately. In JSF, this expression method is found mainly in the xxPageDef.xml file.
    3) the #{} is a JSF based expression language call, which is evaluated at runtime, and is referred to as "Deferred Evaluation". This is necesarry for JSF because of the way the JSF request processing lifecycle works. It allows the expression to show the value and be the target.
    If I take a guess, you may be mixing JSP concepts with JSF based development.
    Chapter 4 in "The Complete Reference: JavaServer Faces" by Chris Schalk and Ed Burns explains this concept really well.
    Hope this helps!
    Kenton

  • Java Persistence API + mySQL and East Europe characters

    Hi,
    I use Sun Application Server 9.0 and mySQL 4.1.20 on Linux. When I put data (with jsf form) into my database table everything is displayed correctly until I restart application server (or redeploy my web app). After restarting server non-ascii characters look strange. I suppose that there is a problem with character coding (between apps server and database) but I can't find any solution. I use UTF-8 character coding both in database fields and for displaying jsf pages.
    There are't any problems when I use Derby database for starage data.
    Thanks

    Can you give some more information ?
    Are you using netbeans 5.5 or doing this program standalone and interfacing
    directly with appserver ?
    Can you send a pointer to a gif of the incorrect looking characters ?
    Can you elaborate about putting data using jsf form and some details
    or extract from the code that writes or reads the data ?
    Do the names of your table or columns have the european characters
    in them or is it just the data ?
    Thanks for your help.
    >
    Thanks
    Hi,
    I use Sun Application Server 9.0 and mySQL 4.1.20 on
    Linux. When I put data (with jsf form) into my
    database table everything is displayed correctly
    until I restart application server (or redeploy my
    web app). After restarting server non-ascii
    characters look strange. I suppose that there is a
    problem with character coding (between apps server
    and database) but I can't find any solution. I use
    UTF-8 character coding both in database fields and
    for displaying jsf pages.
    There are't any problems when I use Derby database
    for starage data.
    Thanks

  • Create Form from previous form output?

    Hi all,
    I have problem when I try to do this since I am pretty new with Jdev and ADF.
    If anyone has any suggestion or guide will be appreciated.
    I have two forms on a page.
    Form 1 take in user input (integer) and return an array of String.
    Form 2 take in user selection (from the array of String) and return a String.
    These two forms work fine individually but I want to link them together so that if
    a user enter a number in the input field a selection list will be generated from the array of String
    and the result will be printed out depends on the user's selection.

    Hi there:
    When you talking about Form, you mean table form, not page right? Because I quote your words: 'All actions should be on one page'.
    If Form A and Form B you were talking about is on one page, here is the suggestions:
    Supposing you have 2 database tables: department and employee.
    1) In your ADF workspace (your.jws) model project, create 2 Entites say: Department and Employee based on your database tables. If you don't want your final page editable, you don't need to create association between Department and Employee;
    2) In your model project, create 2 Views say: DepartmentView and EmployeeView. Actually when you create Department and Employee Entity in step 1), you have option to create default ADF view for each of them;
    3) Create ViewLink between DepartmentView and EmployeeView which reflect the foreign key reference between backend database tables. Here you need to specify reference type and I believe its 1 to * (many) between DepartmentView and EmployeeView on DepartmentID;
    4) Create a new Application Module if you don't already have;
    5) Add DepartmentView into your Application Module and select DepartmentView in your Application Module and add EmployeeView so that EmployeeView appear directly under DepartmentView, this tells ADF that DepartmentView is the master and EmployeeView is the detail;
    6) On your JSF page, drag EmployeeView data control from your Application Module and drop it onto your JSF and choose "Master-Detail" -> "ADF Master Table, ADF Detail Table".
    By doing so, you should be able to achieve your functional requirement which in this case Department is the master table, when you choose a department, the detail Employee table will display employee
    information correspondingly.
    If you feel my reply helpful, please mark it as helpful.
    Thanks,
    Alex

  • Exception handling within a value-binding expression

    Hi all,
    Forgive me if this question seems odd, but I am a long-time Struts developer, new to JSF.
    In Struts, exception handling was easy because all requests were funnelled through some subclass of Action. Exception handling could effectively be consolidated into one spot by applying the template-method pattern.
    Of course, with JSF, this is not possible because method names in value-binding and action-binding expressions can be chosen arbitrarily. For this reason, I am exploring aspect-oriented (and other) techniques for consolidation JSF exception handling into one spot, but rather than focus too intently on that, it's clear that I first need the ability to forward to an error page when an exception is encountered in a value-binding or action-binding expression.
    For action-binding expressions, ExternalContext.dispatch("<view id>"); seems to work quite well, but I am unable to make the same work when in the context of a value-binding expression. This is probably attributed to the fact that at that point, I am in an entirely different phase of the JSF request processing lifecycle.
    What I'm looking to know is if anyone has a reliable means of forwarding to an error page within the context of a value-binding expression. Better yet, does anyone know a reliable way of forwarding to another view regardless of what phase you are in?
    If it makes a difference (and I think it does) the error page uses JSF as well, and uses the same layout (provided via custom tags courtesy of JSP 2.0 tag files), so some view components would have the same name as the page which encountered the error. This seems to get in the way of me simply defining the error page for a 500 in my web deployment descriptor.
    Thanks in advance to anyone with a working suggestion.
    -Kent

    Let me pose a purely hypothetical use case to demonstrate the problem:
    Imagine a page in an HR app, employeeDetails.jsp, that displays an always-up-to-date combo box which lists employee names and IDs. onChange triggers a form submit with the intention of simply posting back to this page, with various text boxes, etc. below updated to show all information for the selected employee.
    Obviously, with the requirement that the combo box always be up to date, it's clear that the getter invoked by the value-binding expression must access the database (not directly of course, but via a facade, application, then data-access layer). Any unexpected and unchecked exception in this chain would propagate back up to the getter method on the backing bean. I need to, at that point, log the exception (trivial) and forward to a user-friendly error page.
    I suppose I could put some contraint on myself that data access is only performed within ActionEvent handlers, but I'm not sure that's consistent with the JSF model in general, in fact it almost seems Struts-like in that I'd have to invoke some action before loading this form to build the up-to-date list for the combo box, shove it in request scope, where it's then available to the page indicated by the navigation rules. Submission of the form on the page in question would also need to result in rebuilding the up-to-date list. Now we're looking at firther propagation of code. I want to avoid this, so I am looking for a better way.

  • Error trying to run a sample master-detail JSF form in Jdev 10.1.3

    I've tried JDeveloper 10.1.3 folowing a tutorial , master-detail one , involving Adf Faces which I found it here http://www.oracle.com/technology/products/jdev/101/tutorials/e2ebcfaces/buildmaster-detailpagewithjdevandadfbc.htm.
    1. I dowloaded JDeveloper 10.1.3
    2. I made -in Jdeveloper- a connection to OE8 schema
    2. I created an application with web application template ; in my new workspace i had 2 projects Model and ViewController
    3. In model i choose Business Tier - ADF Bussiness Components - Business Components from Tables and I followed instructions in tutorial
    4. In ViewController I created Web Tier - JSF - JSF JSP , with the JSF-JSP wizard a jsp page browseCustomerOrders.jsp. For building a master detail form i folowed instructions in tutorial
    However ...
    5. When I tried to run i received ....
    " [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    D:\jdevstudio1013\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config>
    D:\jdevstudio1013\jdk\bin\javaw.exe -ojvm -classpath D:\jdevstudio1013\j2ee\home\oc4j.jar;D:\jdevstudio1013\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -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 D:\jdevstudio1013\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    05/11/30 12:04:16 Exception in thread "OC4J Launcher" oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.core.ojdl.logging.LoggingConfiguration
         Dependent class: com.evermind.server.XMLApplicationServerConfig
         Loader: oc4j:10.1.3
         Code-Source: /D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar
    The missing class is not available from any code-source or loader in the server.
    05/11/30 12:04:16      at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2073) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1681) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1633) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1618) [D:/jdevstudio1013/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@7]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap]
         at com.evermind.server.XMLApplicationServerConfig.initJ2eeLogging (XMLApplicationServerConfig.java:243) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.XMLApplicationServerConfig.postInit (XMLApplicationServerConfig.java:255) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.xml.XMLConfig.init (XMLConfig.java:200) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.xml.XMLConfig.init (XMLConfig.java:117) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.ApplicationServerLauncher.run (ApplicationServerLauncher.java:74) [D:/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar (from <code-source> in boot.xml in D:\jdevstudio1013\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap]
    05/11/30 12:04:16 Fatal error: server exiting
    Process exited with exit code 1. "
    Where do you think i am wrong?
    Many thanks

    Hi,
    the problem seems not to be within your application but in missing files on your embedded OC4J. Just try and unzip the JDeveloper 10.1.3 install again.
    Frank

  • High cpu usage during JSF lifecycle phase execution

    In our performance test we encountered a high cpu usage (100%) and the thread dumps indicated that most of the times the threads are either executing restore view or render response phase of the JSF lifecycle or they are blocked while accessing the jar files which containing the xhtml pages.
    One of the thread dump of a runnable thread is
    java.lang.Thread.State: RUNNABLE
    at java.util.HashMap.get(HashMap.java:317)
    at javax.faces.component.ComponentStateHelper.get(ComponentStateHelper.java:174)
    at javax.faces.component.ComponentStateHelper.add(ComponentStateHelper.java:216)
    at javax.faces.component.UIComponent.setValueExpression(UIComponent.java:436)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler$CompositeComponentRule$CompositeExpressionMetadata.applyMetadata(CompositeComponentTagHandler.java:631)
    at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)
    at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:129)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:102)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.setAttributes(CompositeComponentTagHandler.java:246)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:184)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
    at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
    at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)while a thread trace for a blocked thread is
    java.lang.Thread.State: BLOCKED (on object monitor)
    at java.util.zip.ZipFile.getEntry(ZipFile.java:302)
    - waiting to lock <0x00000000c0f678f8> (a java.util.jar.JarFile)
    at java.util.jar.JarFile.getEntry(JarFile.java:225)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:208)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:817)
    at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:795)
    at sun.misc.URLClassPath.findResource(URLClassPath.java:172)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:551)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:549)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(URLClassLoader.java:548)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1138)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1133)
    at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1156)
    at org.glassfish.web.loader.WebappClassLoader.getResourceFromJars(WebappClassLoader.java:1111)
    at org.apache.catalina.core.StandardContext.getMetaInfResource(StandardContext.java:7586)
    at org.apache.catalina.core.StandardContext.getResource(StandardContext.java:6979)
    at org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:382)
    at org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:260)
    at com.sun.faces.context.ExternalContextImpl.getResource(ExternalContextImpl.java:502)
    at com.sun.faces.application.resource.WebappResourceHelper.getURL(WebappResourceHelper.java:119)
    at com.sun.faces.application.resource.ResourceImpl.getURL(ResourceImpl.java:190)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyCompositeComponent(CompositeComponentTagHandler.java:366)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:191)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
    at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
    at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
    at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223)
    at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:188)
    at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:453)
    at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)We use glassfish 3.1.1 as our application and the project_stage property is set to System_test. I would like to get suggestions on how should I investigate this further. Is this a normal behavior? Does glassfish provide an alternative for resolving blocked threads like some caching mechanism for resources etc?
    Thanks in advance

    Nik wrote:
    Even if it is legal, have you tried moving them out of there (just to pinpoint a possible bug since the stacktrace indicates a wait on a jar file)?Indeed. If that clears up the issue it is good information to put in a JSF bug report (which may even cascade to the Glassfish level).
    Putting resources in a jar file is only really useful when you want to share those resources among different web applications, which should be a rare case. Even when it happens I would probably still choose to simply copy the resources so they are individually managed and you don't get unnecessary dependencies between applications. Just because something is technically possible doesn't make it a good idea.

  • JSF Lifecycle

    Hello all,
    I am experiencing the following problem:
    Imagine that there is a managed bean with scope = "request", called "bean". There is a page X that has a couple of properties bound to this bean:
    * commnandButton id="myButton" rendered="#{bean.buttonRendered}"
    * inputText value="#{bean.textValue}"
    And so on. When we navigate TO page X, we create the request scoped bean and fill the required properties in (e.g. bean.setTextValue("This is a test"); ).
    Now let the isButtonRendered method behave like this:
    if (getTextValue().equals("This is a test"))
    return true;
    return false;
    The problem is, that when we click the "myButton" button, the isButtonRendered() method of the bean is called before the request values are applied to the bean. So, textValue is still null and thus, a NullPointerException occurs in the isButtonRendered method.
    Could you please tell me why the isButtonRendered() method is called? Why does the JSF framework need this value before the values are applied, and how is this very frequently occurring problem worked around in practice?
    Best Regards,
    Slavi

    And there is something significantly more important:
    Imagine you have the following binding:
    #{bean.someObject.someField}
    and you click the button. Then you immediately get a NullPointerException in the Validation Phase, because the bean.someObject is null!!!!
    Please help - I am trying to get something extremely fundamental - a master-detail relationship between pages. In the master page, you have a datatable and when you click on some item, you are sent to a detail page that allows editing of the selected item. The bean behind the detail page is with request scope. Thus, I keep the ID of the selected item in a inputHidden field. However, when you click "Save" on the detail page, a NullPointerException occurs in the validation phase, because when validation occurs, the setter method of the hidden fields has not yet been called and someObject is null.
    Do you have any idea how to solve this task?
    Any help will be greatly appreciated. Thank you all in advance!
    Best Regards,
    Slavi

  • Jsf: Detail data keep stale

    Hello!
    I'm developing a master-detail page using JSF (JDeveloper 10.1.3.).
    I want to get version as "Master table, Detail table". When I have just moved only necessary table components on the page, it worked nice.
    However, then I tried to add a command button on the Selection facet of the Master table and create method binding for this command button's action. To be more exact, I added a code, which stores the key of the master current row for using on other pages.
    After that, I faced with situation when clicking on the "Select one" checkboxes in the master part on page doesn't affect on the content of detail part of page.
    Could anybody help me?
    Thanks.

    Sorry, I have found my mistake.
    I changed the id of Master table, but have forgotten to make the appropriate changes in the Partial triggers parameter of the Detail table.

Maybe you are looking for

  • Errors downloading apps....HELP

    I am trying to download the new rotate me application, but everytime i try there is an error, (online certificate error, contact application supplier) i tried putting the date back to an earlier stage i tried turning online certificate check off i tr

  • Please help, why if fade on images so sloow

    Hi all, I'm sorry for crossposting but javafx is too slow for simplest fade in effect, and no one is here to help me :( :( :( the original post is here: http://forums.sun.com/thread.jspa?threadID=5365155 it even has points if anyone is willing to hel

  • Audio wont capture

    hi i am trying to digitise some footage off a hi 8 camera through a canopus device and it has stopped capturing the audio for some reason, it did do with and earlier batch, but for some reason it has stopped? Is there any settings i could look at? ch

  • Cancel Duplicate MIRA(Credit Memo)

    Dear All We are following LIV process. My case is as follows: I have done 101Movement type for GR,done MIRA and then MIR6 to post Incoming Invoice. Later ,rejected few quantity through line rejection by doing 122 Movement type(GR created).Then again

  • Encountering problems after updating to Yosemite

    Hi! I updated my iMac (Refurb 2011 27" iMac, i5, 2TB HD, 8GB RAM, 1GB VRAM), Yosemite from Mountain Lion, after getting a new iPhone 5s last week. I had to update iTunes, and to update iTunes, I had to update my OS. Problems after downloading: - USB