11 Replies Latest reply: May 2, 2013 7:40 AM by 1000844 RSS

    Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1

    1000844
      Hello.

      I have a problem in OEPE (oepe-juno-distro-win32.zip), where the Data tab in Palette shows no Managed Beans,
      even if I created them in the ManagedBeans in faces-config.xml using the Faces Config Editor.

      I have created a Dynamic Web Project with these Facets:
      Dynamic Web Module 3.0
      Java 1.7 (JDK 1.7_21)
      Java Annotation Processing Support 5.0
      JavaScript 1.0
      JavaServer Faces 2.1
      JSTL 1.2
      Oracle WebLogic Web App Extensions 12.1.1

      I am using Oracle WebLogic Server 12c 12.1.1 zip distribution for hosting the application.

      For example, I have a UserBean Managed Bean of Session scope, that has 3 String fields
      and the respective getters and setters.
      I create a "test.jspx" file, and from the Palette -> Tags tab -> JSF HTML I drag a Form into
      the new file so I can connect it to UserBean and generate a form to enter its details.
      I select the "Generate a form tag and content from data" and in the Choose Bean dialog
      there is none of my Beans.

      What could be the problem?

      Thanks in advance.

      Edited by: 997841 on Apr 30, 2013 6:09 PM
      I forgot to mention the Oracle WebLogic Web App Extensions version 12.1.1 and that also
      for JSF 2.1 the "sub-directory" Faces Configuration below the project in Project Explorer is not
      existent, as in projects created with earlier versions of JSF.
        • 1. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
          user739461
          Could you attach your test.jspx and faces-config.xml file?

          Also, what specific version of OEPE/Juno are you using? (Help/About Eclipse Platform..., click on the OEPE button, include version of the Oracle Web Tier Tools)

          Thanks.
          • 2. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
            Cameron Bateman-Oracle
            There could be a number of things.

            First, could you right-click on the Project and go Properties->AppXRay. Check to make sure "Disable AppXRay" is not checked. Then check the list of technologies in the table. Based on the facets you listed, you should have an entry for "WebApp 3.0", "JSF 2.1", "JSP 2.1" or "JSP 2.2". Make sure that both check boxes (for Discovery and Collection) are checked in each of these rows.

            Next, just to be on the safe side, open the faces-config.xml where your Managed Beans are declared and "touch" the file (i.e. make a trivial change and click save). This shouldn't be required, but this may expose a refresh bug if there is one.

            Finally, open the test.jspx file and "touch" it as well.

            With all that done, click on the main menu for Project->Clean.. and do a clean build of at least the project you are working on.

            Now retry your scenario. If it still doesn't work, try closing and re-opening the project.

            Note: these are general workarounds and normally should not be necessary unless there is a bug in OEPE or an unsupported condition in your project.

            If you can send a copy of your project to OTN support, we may be able to get it and try and debug the problem.


            Thanks,

            Cameron
            • 3. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
              1000844
              I forgot to mention the Oracle WebLogic Web App Extensions version 12.1.1 Facet was also
              included in the project and that also for JSF 2.1 the "sub-directory" Faces Configuration below
              the project in Project Explorer is not existent, but for earlier versions of JSF (<2.1) it is.

              Anyway, I did what you told me with no result.
              In the Properties->AppXRay of the Project I only have WebApp 3.0, JSTL 1.2 and JSP 2.2 all
              checked and AppXray not disabled but there is no entry for JSF 2.1.
              In the Preferences->AppXray all the entries are checked and it is enabled and also there exists
              an entry for JSF 2.1.

              Here are the versions for the OEPE:
              Oracle Enterprise Pack for Eclipse     2.2.1.201303081427     oracle.eclipse.tools.juno.oepe.product.feature.group     Oracle
              Eclipse Platform     3.8.1.v20130118-180812-9jF7oIBFG8eU2pim-VbIlTuQjY0RWWK3x-bv4I     org.eclipse.platform.feature.group     Eclipse.org
              Java EE 5 Documentation     1.0.0.201201241920     oracle.eclipse.tools.juno.doc.javaee5.feature.group     Oracle
              Java EE 6 Documentation     1.0.0.201201241920     oracle.eclipse.tools.juno.doc.javaee6.feature.group     Oracle
              Oracle ADF Documentation (11.1.1.4.0)     2.2.1.201303081427     oracle.eclipse.tools.juno.adf.doc.v11114.feature.group     Oracle
              Oracle ADF Documentation (11.1.1.5.0)     2.2.1.201303081427     oracle.eclipse.tools.juno.adf.doc.v11115.feature.group     Oracle
              Oracle ADF Documentation (11.1.1.6.0)     2.2.1.201303081427     oracle.eclipse.tools.juno.adf.doc.v11116.feature.group     Oracle
              Oracle ADF Documentation (11.1.1.7.0)     2.2.1.201303081427     oracle.eclipse.tools.juno.adf.doc.v11117.feature.group     Oracle
              Oracle ADF Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.adf.feature.group     Oracle
              Oracle Cloud Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.cloud.feature.group     Oracle
              Oracle Coherence Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.coherence.feature.group     Oracle
              Oracle Common Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.common.feature.group     Oracle
              Oracle Database Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.database.feature.group     Oracle
              Oracle GlassFish Server Tools     2.0.1.201201241920     oracle.eclipse.tools.juno.glassfish.feature.group     Oracle
              Oracle Patches     2.2.1.201303081427     oracle.eclipse.tools.juno.patches.feature.group     Oracle
              Oracle Spring Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.spring.feature.group     Oracle
              Oracle Web Tier Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.webtier.feature.group     Oracle
              Oracle WebLogic Scripting Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.weblogic.scripting.feature.group     Oracle
              Oracle WebLogic Server Tools     2.2.1.201303081427     oracle.eclipse.tools.juno.weblogic.feature.group     Oracle

              Here is the link to my project exported as an archive file:
              [http://speedy.sh/6fPUn/JSF-Intro.zip]
              • 4. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                Cameron Bateman-Oracle
                Thanks for the repro case.

                It looks like the JSF libraries required for your project may not be configured. If you right-click on the project go to Properties->Project Facets and expand the tree you should see a node called "Java Server Faces". If you click on it there will be a drop down box for "Type". What is this set to? It should be selected to the WebLogic Shared Library if that's the one you want to use. Let me know what you see there.

                If you are not able to correct the problem, try this workaround: in the dropdown, select "User Library". When you do this a list box should appear below the dropdown. It has two action buttons to the right of the dialog. Click on the one that looks like a floppy disk with an arrow on it (the tooltip reads "Download Library..."). You will have the option to select either Apache or Mojarra (either should work but Mojarra is a good choice if you don't have a preference since this is the "official" Oracle implementation). Then follow the dialogs to download the libraries. This will store a separate copy of just the JSF libraries on your disk and make them available to the classpath. With that done, try closing and reopening the project to be completely sure everything is refreshed.


                Thanks,

                Cameron
                • 5. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                  1000844
                  In the Properties->Project Facets->Java Server Faces, the Type is set to
                  "WebLogic System Libraary (JSF2.x)" and down in the box there is "glassfish.jsf 1.0.0.0_2-1-5".

                  I tried what you said with both the User Libraries and none worked, the problem still persists.
                  • 6. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                    Cameron Bateman-Oracle
                    After you set the library (either shared or the user one), could you look at Project Properties->Build Path and under the Libraries tab check that both JSF and JSTL libraries are listed? If not, you can try to add them manually using the "Add Library..." button. If you have configured to use the JSF User Library, it should appear in if you select "User Library" in the dialog.

                    With the JSF User Library configured, could you post the .classpath file from the project? It is hidden by default but will appear in the root of your project if you go to the Filters... dialog from the Navigator view menu (the little upside down triangle along the top of the Navigator or Package Explorer view) and select Filters... and uncheck the box for ".* resources"
                    • 7. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                      1000844
                      Yes, they are both listed under the WebLogic System Libraries.

                      This is the content of .classpath file when using WebLogic System Library:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <classpath>
                           <classpathentry kind="src" path="src"/>
                           <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Oracle WebLogic Server 12c (12.1.1) JRE">
                                <attributes>
                                     <attribute name="owner.project.facets" value="java"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="src" path=".apt_src">
                                <attributes>
                                     <attribute name="optional" value="true"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.system">
                                <attributes>
                                     <attribute name="owner.project.facets" value="jst.web"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
                           <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
                           <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.shared/jstl/exact/1.2"/>
                           <classpathentry kind="output" path="build/classes"/>
                      </classpath>


                      And this is the content when using User Library with Mojarra:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <classpath>
                           <classpathentry kind="src" path="src"/>
                           <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Oracle WebLogic Server 12c (12.1.1) JRE">
                                <attributes>
                                     <attribute name="owner.project.facets" value="java"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="src" path=".apt_src">
                                <attributes>
                                     <attribute name="optional" value="true"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.system">
                                <attributes>
                                     <attribute name="owner.project.facets" value="jst.web"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
                           <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
                           <classpathentry kind="con" path="oracle.eclipse.tools.weblogic.lib.shared/jstl/exact/1.2"/>
                           <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JSF 2.1 (Mojarra 2.1.6-FCS)">
                                <attributes>
                                     <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
                                     <attribute name="owner.project.facets" value="jst.jsf"/>
                                </attributes>
                           </classpathentry>
                           <classpathentry kind="output" path="build/classes"/>
                      </classpath>
                      • 8. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                        Cameron Bateman-Oracle
                        Hmm... when I use the same .classpath as you have for User Library, it works locally.

                        Let's dig a bit deeper. Everything seems to point to the fact that the technology extension is not being enabled for JSF 2.1 on your project.

                        What is showing up in the palette? Do you see tags? When you open the Page Variables drawer in the Data tab, do you see the "msg" variable?

                        Could you also check the Error Log (Ctrl-3 (Win/Linux) or Command-3 (Mac), then type "Error Log") to see if there any errors that look related?


                        Thanks,

                        Cameron
                        • 9. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                          Cameron Bateman-Oracle
                          Could you try using JDK 1.6 instead of JDK 1.7? One of the other OEPE engineers had some success in reproducing a similar problem with JDK 1.7 but not with JDK 1.6.

                          Edited by: 683478 on May 1, 2013 4:33 PM
                          • 10. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                            Cameron Bateman-Oracle
                            Ok. We took another look at it and I think we've found the root problem. There is a problem with our support for JSF 2.1 in OEPE 12.1.1. This will be corrected with the version of OEPE that ships in tandem with the next version of WLS (12.1.2) that we support.

                            In the mean time, if you use the JSF 2.0 facet instead of JSF 2.1 it should resolve your issue. The issue with Java 1.7 looks like it may have been a red herring.

                            Unfortunately, there is no way to downgrade the project version to 2.0 so you will need to recreate the project. Sorry for the inconvenience. You should still be able to use the 2.1 libraries (if you want) even when the 2.0 facet is active since there isn't much difference between those versions from the tool's perspective.

                            Thanks for taking the time to follow up with us and help us track down this issue.


                            Thanks,

                            Cameron
                            • 11. Re: Data Palette not showing Managed Beans for Dynamic Web Project, JSF 2.1
                              1000844
                              Yes the Tags and Page Variables all show up. The problem is the same I think even for JDK 1.6.

                              Anyway I thank you for your time and help and I'm glad the issue was brought to attention.

                              Elton