facebook

facelets xhtml are not compiled

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #290253 Reply

    lkrenzien
    Member

    Hello,

    I’m using MyEclipse 7 (complete edition, not the Blue on) and the wizard to create a JSF web project with facelets support. After deploying it in Tomcat 6.0.18 the generated JSP file works correctly, but when I try to create a xhtml page like the examples at the facelets homepage https://facelets.dev.java.net/nonav/docs/dev/docbook.html#gettingstarted-view the page will not be rendered in the browser. When I look at the html source in the browser I always see the xhtml source code with all the tags (h:inputText …) in it. So no html code will be generated.
    The web.xml and faces-config.xml look fine to me.

    web.xml

    
      <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
      </context-param>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
    

    faces-config.xml

    
        <application>
            <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
        </application></faces-config>
    

    Also there’s no error at the MyEclipse console. So what I’m doing wrong ?

    Lothar

    #290259 Reply

    Loyal Water
    Member

    Lothar,
    Did you go through the MyEclipse Facelet tutorial. Were you able to run though it without issues?
    http://www.myeclipseide.com/documentation/quickstarts/facelets/

    #290687 Reply

    amir55
    Participant

    I followed the full tutorial of MyBlogFacelets but I used JBoss which shows error in running because of conflicting jars from the program and JBoss.

    anyway how to run the example on jboss? The errror is

    09:55:59,343 ERROR [STDERR] Nov 6, 2008 9:55:59 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun’s JavaServer Faces implementation (1.2_04-b16-p02) for context ‘/MyBlogFacelets’
    09:56:38,921 ERROR [STDERR] Nov 6, 2008 9:56:38 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
    INFO: Added Library from: jar:file:/D:/Jboss_Group/jboss-4.2.2.GA/server/default/deploy/MyBlogFacelets.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
    09:56:38,921 ERROR [STDERR] Nov 6, 2008 9:56:38 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
    INFO: Added Library from: jar:file:/D:/Jboss_Group/jboss-4.2.2.GA/server/default/deploy/MyBlogFacelets.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
    09:56:38,984 ERROR [STDERR] Nov 6, 2008 9:56:38 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
    INFO: Added Library from: jar:file:/D:/Jboss_Group/jboss-4.2.2.GA/server/default/deploy/MyBlogFacelets.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
    09:56:39,031 ERROR [STDERR] Nov 6, 2008 9:56:39 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
    INFO: Added Library from: jar:file:/D:/Jboss_Group/jboss-4.2.2.GA/server/default/deploy/MyBlogFacelets.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
    09:56:39,046 ERROR [STDERR] Nov 6, 2008 9:56:39 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
    INFO: Added Library from: jar:file:/D:/Jboss_Group/jboss-4.2.2.GA/server/default/deploy/MyBlogFacelets.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
    09:56:39,171 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
    java.lang.LinkageError: loader constraint violation: when resolving method “javax.faces.context.FacesContext.getELContext()Ljavax/el/ELContext;” the class loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) of the current class, com/sun/facelets/el/ELAdaptor, and the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, javax/faces/context/FacesContext, have different Class objects for the type
    javax/el/ELContext used in the signature
    at com.sun.facelets.el.ELAdaptor.getELContext(ELAdaptor.java:45)

    so many thanks

    Amir

    #290748 Reply

    Loyal Water
    Member

    Amir,
    This is a known issue that has been filed for the dev team. Im sorry you ran into it.

    #292950 Reply

    This message has not been recovered.

    #292980 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #313873 Reply

    amir55
    Participant

    Hi all

    I am now uisng MyEclipse for spring version 8.6 and I followed the tutorial in myeclipse help that runs on Derby server.

    I try to run on JBoss and MySql but once I type the url http://localhost:8080/MyBlogFacelets/ and the click on a link I get the pop message of to save or open the file !!

    so in a simpler question how to develop a helloworld facelet to run on Jboss 4 ?

    Is there any program or tutorial ?

    I do need to get the links of extension .faces to work with out getting the save or open question.

    very many thanks to all who read or reply

    Amir

    #313880 Reply

    support-swapna
    Moderator

    amir55,

    Can you try an example for me ?

    Here are the steps :

    1. Open the MyEclipse IDE.
    2. From the menu open MyEclipse > Examples On-Demand.
    3. There is a project ‘ SimpleFaceletsExample ‘. Click on ‘Install Project’ to install it to the workspace.
    4. Try running this example on JBoss 4.

    Let us know how this works for you.

    #314245 Reply

    amir55
    Participant

    hi dear repliers

    I did install the example SimpleFaceletsExample from on demand and it deploys fine and screen is shown but when clicking on Click here I got this error on JBoss 4.2

    java.lang.LinkageError: loader constraint violation: when resolving method “javax.faces.context.FacesContext.getELContext()Ljavax/el/ELContext;” the class loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) of the current class, com/sun/facelets/el/ELAdaptor, and the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, javax/faces/context/FacesContext, have different Class objects for the type javax/el/ELContext used in the signature

    so which jar to remove or add

    many thanks

    Amir

    #314257 Reply

    amir55
    Participant

    hi dear Swapna

    *** Date:
    Sunday, February 6, 2011 10:44:39 PM GST

    ** System properties:
    OS=WindowsXP
    1 – My Configuration

    OS version=5.1.0
    Java version=1.6.0_13

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.6.1
    Build id: 8.6.1-20101117

    *** Eclipse details:
    MyEclipse for Spring Version: 8.6

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    D:\MyEclipse_Group\Genuitec\MyEclipse for Spring 8.6\myeclipseforspring.exe
    -name
    Myeclipseforspring
    –launcher.library
    D:\MyEclipse_Group\Genuitec\MyEclipse for Spring 8.6\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
    -startup
    D:\MyEclipse_Group\Genuitec\MyEclipse for Spring 8.6\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -install
    D:/MyEclipse_Group/Genuitec/MyEclipse for Spring 8.6
    -configuration
    configuration
    -vm
    D:/MyEclipse_Group/Genuitec/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client/jvm.dll

    2 – The example
    SimpleFaceletsExample from MyEclipse – Examples On demand

    3 – I use JBoss 4.2.2

    many thanks

    #318072 Reply

    amir55
    Participant

    hi all dear love staff and colleagues

    I am surprised why no one can answer a simple question of how to configure the example on demand MyBlogFacelets on JBoss.

    I have been calling for a support for ages.

    take care with best of thanks in anitcipation

    Amir

    #318256 Reply

    support-joy
    Member

    Amir,

    My apologies for the late reply. Could you run the SimpleFaceletsExample on MyEclipse Tomcat? I have verified it works fine on MyEclipse Tomcat. I believe you are running on JBoss. I have escalated this to our dev team members. For the time being please use Tomcat to run the EOD.

    Best.

    #318296 Reply

    support-tony
    Keymaster

    Amir,

    Unfortunately, the SimpleFaceletsExample does not execute on JBoss due to a conflict with the el-api.jar file. JBoss already has this jar file in its set of server jars. Since it is deployed with the project (in the WEB-INF\lib folder), it ends up being loaded by two class loaders, which causes the problem.

    I have raised a bug report for this.

    There are a couple of workarounds. One is to remove the el-api.jar file from the deployed app (from WEB-INF\lib). The other is to remove the Facelets 1.1 libraries from the build path of the project and, instead, add two variables that point to the two jar files from the facelets library that are needed. To do this, configure the java build path for the project, click on the Libraries tab then click the Add Variable button, select MYECLIPSE_FACELETS_DATA_HOME then click the Extend button, then go to the facelets\lib folder and select both the el-ri.jar and the jsf-facelets.jar files (use the Ctrl key for multiple selections), then click the OK button. Don’t forget to remove the Facelets 1.1. libraries, if you haven’t already done so. Finish by clicking OK on the build path window. Remove the deployment then deploy again.

    An alternative to using the variables is to create a user library, containing the two jar files, and use that instead.

    #318298 Reply

    amir55
    Participant

    so many thanks Tony

    I have run the exmaple simply by adding jsf-faclelets.jar to library and it is ready to send to you if you like.

    again so many thanks

    Amir

    #318317 Reply

    support-tony
    Keymaster

    Amir,

    I’m glad that solved the problem for you. Don’t worry about sending us your project as we can reproduce the problem here already.

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: facelets xhtml are not compiled

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in