Facelets template (J2EE6 Netbeans 6.8 glassfish v3) ui:composition issue

Hello every body,
First please excuse my bad english maybe...
I'm ready to start a new project with Java EE 6 using netbeans 6.8 and glassfish v3.
For the Web Tiers, I want to use facelets and JSf 2, but I encounter an issue when I want to create and use a facelets template
Here are the steps to reproduce my problem (very simple..). Theses steps must be reproduced using Netbeans 6.8 :
A. Project creation
1. File > New Project > Java EE > Enterprise Application
2. Project Name : (no matter) : SampleEE (do not check Use dedicated folder....)
3. Server : Glassfish v3 Domain (provided with netbeans) / JavaEE Version : java EE 6.
4. Check Create EJB Module and Create Web Application Module (and do not change default names)
5. Do not check Create Application Client Module. Then Click Finish.
B. Add JSF 2 Framework to the Web project
1. In the project tab, right-clic the web project and clic Properties
2. Select Frameworks and clic the "add" button and Add Java Server Faces (do not change the default configuration. Make sure to use Facelets (not jsp) as prefered page language in the configuration tab)
3. Clic OK to confirm and close the window
C. Create a facelet template
1. In the web project node, right clic and select New > Other > JavaServer Faces > Facelets Template
2. File Name : template (and do not change anything else : use CSS and use the first and easiest template. Do Not specify folder). Click Finish
We get this template at the root of "Web Pages" (css is automatically generated in "resources/css"
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>Facelets Template</title>
    </h:head>
    <h:body>
        <div id="top" class="top">
            <ui:insert name="top">Top</ui:insert>
        </div>
        <div id="content" class="center_content">
            <ui:insert name="content">Content</ui:insert>
        </div>
    </h:body>
</html>D. Create a template client
1. On the project node, right-clic and select New > Other > JavaServer Faces > Facelets Template Client
2. File Name : client (do not specify any folder)
3. Clic "browse" button to select a template, and select the template nammed "template"
4. Check <ui:composition>" for "generated root tag" value (note the problem occurs even if we check "html")
We get this file :
{code}<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
template="./template.xhtml">
<ui:define name="top">
top
</ui:define>
<ui:define name="content">
content
</ui:define>
</ui:composition>
{code}
E. Execute
Now just clean and build and Run the project.
1. Right Clic the project node and select Clean And Build
2. Right clic the project node and select Run
3. Wait for the web browser to open and go to the template url : http://localhost:8080/SampleEE-war/template.xhtml (we can see the template displays correctly, with the good CSS style automatically generated)
4. Now go to the client URL (http://localhost:8080/SampleEE-war/client.xhtml
There is a problem : tags are not interpreted and client.xhtml just returns a standard xml and no page is displayed. (if you check 'html' instead of <ui:composition> in the steps before, you can see the page, but it's not the correct page, display the page source and you will see all the facelets tags "<ui:composition..."> <ui:define> and so on...
I don't know what to do to solve this.
Please help me, i've been searching for so long hours now...
Note that the project as no faces-config.xml, since it's now optional... I would prefer not to use it.
Thank you in advance for your help.
Edited by: Hitsugaya-kun on Jan 16, 2010 5:14 AM

Kyuubi,
Thanks for posting anyway. I too was overlooking /faces/* Servlet mapping in web.xml that NetBeans creates.
Maybe this belongs in an separate thread, but when is <html> a good option to select (versus <ui:composition>) for the Generated Root Tag?
Roberto
Edited by: onebeartoe on Aug 11, 2010 6:54 AM

Similar Messages

  • JSF - Why getting wrong path Handling URLs in Facelets Templates

    Hi, I am trying to do a web application using JSF, Facelets in Netbeans 6.7. but I am having a problem:
    Why I am getting wrong path ?
    It is very simple, straight forward web application.
    When run, it shows the template-client.xhtml perfectly . The navigation menu is shows ok, but they don't work. However, if I enter in the browser address http://localhost:8080/test3/portal/products.jsf it goes perfect to the right page and the navigation between About, Products and Home works perfect. But once I click on Home, the menu start to give me errors. Looks like the path is wrong again.
    folders structure:
    test3My code:
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
        <application>
            <view-handler>
                com.sun.facelets.FaceletViewHandler
            </view-handler>   
        </application>
    </faces-config>web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.DEVELOPMENT</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.SKIP_COMMENTS</param-name>
            <param-value>true</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forward.jsp</welcome-file>
            </welcome-file-list>
        </web-app>forward.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <jsp:forward page="template-client.jsf"/>template-client.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html">
        <body>
            This text above will not be displayed.
            <ui:composition template="/template.xhtml">
                This text will not be displayed.
                <ui:define name="title">
                    Facelets
                </ui:define>
                This text will also not be displayed.
                <ui:define name="body">
                    Hello from the Facelets client template!
                </ui:define>
                This text will not be displayed.
            </ui:composition>
            This text below will also not be displayed.
        </body>
    </html>template.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:ice="http://www.icesoft.com/icefaces/component">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Facelets - Template Example</title>
            <link href="#{facesContext.externalContext.requestContextPath}/css/default.css" rel="stylesheet" type="text/css" />
        </head>
        <body>
            <div id="menu">
                <ui:insert name="linemenu">
                    <ul>
                        <li><a href="../forward.jsp">Home</a></li>
                        <li><a href="about.jsf">About Us</a></li>
                        <li><a href="products.jsf">Products</a></li>
                    </ul>
                </ui:insert>
            </div>
            <div>
            <h1>
                <ui:insert name="title">Default Title</ui:insert>
            </h1>
            <p>
                <ui:insert name="body">Default Body</ui:insert>
            </p>
            </div>
        </body>
    </html>about.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title ABOUT
                </ui:define>
                <ui:define name="body">
                    body ABOUT
                </ui:define>
            </ui:composition>
        </body>
    </html>products.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title PRODUCTS
                </ui:define>
                <ui:define name="body">
                    body PRODUCTS
                </ui:define>
            </ui:composition>
        </body>
    </html>

    My folders:
    Test3
         Web Pages
              /WEB-INF
              /css
                  -default.css
              /layouts
              /portal
                  -about.xhtml
                  -products.xhtml
              -forward.jsp
              -template.xhtml
              -template-client.xhtmlPlease, I need help with this. It may is very easy to find out, I maybe skiping something
    Thank for your help anyone!!!

  • Facelets template best practices

    Hi,
    As I gain more experience in JSF, I am doing things a bit differently. When I first started I was binding all components to a backing bean and using the component binding in code for various things such as multi component validation. Later I used only value bindings, and had a lot of configuration in the template:
    <select id="country" jsfc="h:selectOneMenu" value="#{user.countryCode}" validator="#{someBackingBean.country_validate}" required="true" requiredMessage="#{theme_messages['field.country']} #{theme_messages['word.required']}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>I modified that example from real code, so it might make more sense to use a converter than a validator for a country code... But anyway, there is a lot of per component configuration in my templates. When I create multiple themes/skins, this stuff has to be duplicated. When I make changes to the application, all themes have to be updated.
    I think Wicket encourages you to bind all components to the "backing bean" and do your configuration in code. Your equivalent template would look something like this:
    <select id="country" jsfc="h:selectOneMenu" binding="#{someBackingBean.countryDropDown}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>You might even leave the f:selectItems out of the template. The only challenge I foresee with this is that using JSF APIs to resolve EL to add a validator, converter, action, or whatever else into the component from code is very verbose and difficult. I asked the JSF expert group to enhance the APIs to make it easier to do everything in code, but it did not make the JSF 2.0 spec. They will consider it in a future release: [JSF API Ticket 363|https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=363]
    Can anyone share their experiences with facelets template complexities and best practices they have learned? If you do most of your component configuration in code, how much of it do you allow in the template? Do you allow value bindings? The f:selectItems tag?
    Thanks,
    Ryan

    If you want full understand facelets , Install NetBeans6.1, install facelets plugin for it, here isa link
    http://armarz.ifolder.ru/9150024. if you want more about facelets read this book -
    http://armarz.ifolder.ru/8396066 .
    In net beans the first create web/facelets application, create facelets template, and client pages for it.
    here is a template example, it hase top, left and content, also in each part inserted one xhtml file for defaults views(logo, logout...)
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/css/tableLayout.css" rel="stylesheet" type="text/css" />
        <link href="/css/index.css" rel="stylesheet" type="text/css" />
        <title>My Template</title>
      </head>
      <body>
        <table cellpadding="0"  cellspacing="0" border="0" width="100%">
          <tr>
            <td id="top" valign="top" align="left" colspan="2" >
              <ui:insert name="top"></ui:insert>
              <ui:include src="top.xhtml"></ui:include>         
            </td>
          </tr>
          <tr>
            <h:panelGroup rendered ="#{,,;,;,;,;,;,;l}">                 
              <td id="left" valign="top" align="left" width="150px">
                <ui:insert name="left"></ui:insert>
                <ui:include src="left.xhtml"></ui:include>           
              </td>
            </h:panelGroup>
            <h:panelGroup rendered ="#{kjkjkjkjkjkkk}">                 
              <td>
                <table width="150px" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td>
                      <f:verbatim> </f:verbatim>
                    </td>
                  </tr>
                </table>
              </td>
            </h:panelGroup>
            <td id="content" valign="top" align="left">
              <ui:insert name="content"></ui:insert>
              <ui:include src="content.xhtml"></ui:include>
            </td>
          </tr>
        </table>
      </body>
    </html>And here is a client page.
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:c="http://java.sun.com/jsp/jstl/core"
                    template="/layout/main.xhtml">////refer to main.xhtml template
      <ui:define name="content">
        <f:view>
          <h:form id ="login">
            <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="left" colspan="2" class="red" style="padding:0 0 5px 0" >                                               
                  </td>
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.username}" />
                  </td>
                  <td>
                    <h:inputText styleClass="input_text" id="loginname" value="#{Login.username}" required ="true"
                                 requiredMessage="#{log.required}">                  
                    </h:inputText>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="error" for="loginname" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.pass}" />
                  </td>
                  <td >
                    <h:inputSecret styleClass="input_text" id="password" value="#{Login.password}" required ="true"
                                   requiredMessage="#{log.passlen}">                      
                    </h:inputSecret>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="fail" for="password" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td>
                    <f:verbatim> </f:verbatim>
                  </td>
                </tr>           
                <tr>
                  <td></td>
                  <td align="right">
                    <h:commandButton styleClass="submit" style="float:right;" value="#{bean.login}" action="#{Login.loggedIn}"  >
                    </h:commandButton>
                  </td>
                </tr>
              </h:panelGroup>
            </table>
          </h:form>
        </f:view>
      </ui:define>
    </ui:composition>is this useful?:)

  • Trying to make a facelets template containing a dataTable

    i'm trying to make a facelets template containing a dataTable. i have several problems, but first i'll show you how i wrote the template, simplified of course (the final template contains much more):
    <ui:composition>     
    <h:dataTable value="#{tableSource}" var="#{vaar}" binding="#{tableBinding}"  id="#{faceletId}">
    <ui:insert />
    <h:column>
        <h:commandButton action="#{modifyAction}" id="modifyButton" value="Modify" />
    </h:column>
    </h:dataTable>
    </ui:composition>ok, this was the template. now i'll show you how i'm "calling it" in my page:
    (simpleColumn is another template i made, which works -has no problems)
    <xyz:myDataTable tableSource="#{mainBean.jobsList}" tableBinding="#{mainBean.jobsTable}" vaar="job"
              faceletId="jobsListTable"   modifyAction="#{mainBean.actionTodo}">
    <xyz:simpleColumn headerTitle="Nume job" faceletId="jobName" fieldValue="#{job.name}" />
    </xyz:myDataTable>ok so here are my problems:
    1 - i write "#{job.name}" to add a column with that value, but i get an error that the property "name" does not exist in type java.lang.String.
    how do i fix this? i understand the problem ("job" is not defined as a variable, but as the simple string) but i don't know what to do
    2- i write "#{mainBean.actionTodo}", and the function actionTodo() certainly exists in that bean, but i get an error that the property "actionTodo" is could not be found in that bean (i guess it's looking for a property, not a function). but why, it's in the "action" property of a submit button, so it should not be this way. how can i fix this?

    seeing your answer, i don't think you've used facelets. the id's are not the issue here, they work fine. and besides, they're not variable.
    i'm asking about the other two issues. what's the part that you don't understand? there isn't any more code than this, other than the template for xyz:simpleColumn, which isn't important anyway, since it works ok.

  • How to set line break points in JSF Facelets files on NetBeans?

    I am running debugger on NetBeans. I can set line break points for jsp files but cannot for Facelets files with extension 'xhtml'. Dose anybody know how to set break points for Facelets xhtml files? Or is it possible to set break points for xhtml filles?
    Thank you very much.

    You can't. They aren't executable code, they are templates. The only executable code is the part inside #{}.

  • Netbeans 6.8 - GlassFish v3 startup error

    I've tried installing netBeans 6.8 twice now, but keep getting the following error when trying to startup glassfish (nothing deployed, nothing built, just installed netbeans & tried starting the service) HOWEVER, glassfish does seem to startup ok- but I keep getting this same error:
    Jan 5, 2010 1:17:41 PM com.sun.enterprise.glassfish.bootstrap.ASMain main
    INFO: Launching GlassFish on Felix platform
    Welcome to Felix
    ================
    Jan 5, 2010 1:19:51 PM com.sun.enterprise.glassfish.bootstrap.ASMain main
    INFO: Launching GlassFish on Felix platform
    Welcome to Felix
    ================
    java.io.FileNotFoundException: D:\Program Files\sges-v3\glassfish\domains\domain1\osgi-cache\felix\bundle221\version0.0\revision.location (The system cannot find the file specified)
    ERROR: Error creating archive. (java.io.FileNotFoundException: D:\Program Files\sges-v3\glassfish\domains\domain1\osgi-cache\felix\bundle221\version0.0\revision.location (The system cannot find the file specified))
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at org.apache.felix.framework.util.SecureAction.getFileInputStream(SecureAction.java:415)
    Edited by: MontanaWildRose on Jan 6, 2010 7:12 AM

    Kyuubi,
    Thanks for posting anyway. I too was overlooking /faces/* Servlet mapping in web.xml that NetBeans creates.
    Maybe this belongs in an separate thread, but when is <html> a good option to select (versus <ui:composition>) for the Generated Root Tag?
    Roberto
    Edited by: onebeartoe on Aug 11, 2010 6:54 AM

  • NetBeans 6.8 - Glassfish error out of the box

    Hi, I've just installed new NetBeans 6.8 and got problem running sample project PetShop. The error message I got is:
    Starting GlassFish v3 Domain
    GlassFish v3 Domain Server cannot start. Port is occupied.
    In-place deployment at C:\pk\programming\TESTPetCatalog\build\web
    Initializing...
    Connection reset
    C:\pk\programming\TESTPetCatalog\nbproject\build-impl.xml:570: The module has not been deployed.I know that other people ot the same error, so I wonder if there is any workaround to fix this?

    Try using Disk Utillity to repair permission first. I appears Time Machine is choking on the file "dv1679003_A.jpg". If it's just a permissions issue that will fix it. Otherwise, drag that file to the trash (without emptying it yet) and try backing up again.

  • Does Facelets template use xHTML or JSP or JSPX?

    hi all,
    i'm newbie in jsf, i try to use template but i confuse, if templace use xHtml or jsp or jspx format. I have read some book and some tutorial, in which xHtml format ist used.
    can some one answer which format should i use, and what is diff beweent xHtml and jspx, which advantage have xHtml and jspx?
    can i use in jsp file xHtml template ?
    thanks for ur help

    Yes, to the best of my knowledge you need to use a consistent extension for files that are facelets.

  • Netbeans 6.9 Glassfish server 3 EJB application client deployment error

    I have an example that I downloaded from the Netbeans docs and whenever I try to run it on my machine, the application client that is supposed to print out a hello message gives me the following error.
    post-dist:
    dist-directory-deploy:
    pre-run-deploy:
    Initial deploying EntAppClient to D:\SCT400\LIFESPRING EE\EntAppClient\dist\gfdeploy\EntAppClient
    Completed initial distribution of EntAppClient
    deploy?path=D:\SCT400\LIFESPRING EE\EntAppClient\dist\gfdeploy\EntAppClient&name=EntAppClient&force=true failed on GlassFish Server 3
    D:\SCT400\LIFESPRING EE\EntAppClient\nbproject\build-impl.xml:257: The module has not been deployed.
    BUILD FAILED (total time: 1 second)
    The full example of the project is found in the following url [Netbeans project|http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.htm]
    my JDK is 6 update 21 and I'm using Java EE6. Help me through this because my project is anchored on being distributed and I cannot proceed until I get this right.

    I got the same problem, the error log detail is below, I have checked the gf-client.jar, it is right in the folder.
    SEVERE: Exception while loading the app
    java.lang.RuntimeException: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:259)
    at org.glassfish.appclient.server.core.jws.JavaWebStartState.transition(JavaWebStartState.java:84)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.start(JavaWebStartInfo.java:253)
    at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:134)
    at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:126)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    at java.util.jar.JarFile.<init>(JarFile.java:133)
    at java.util.jar.JarFile.<init>(JarFile.java:97)
    at org.glassfish.appclient.server.core.jws.JWSAdapterManager.getGFClientModuleClassPath(JWSAdapterManager.java:612)
    at org.glassfish.appclient.server.core.jws.JWSAdapterManager.addStaticSystemContent(JWSAdapterManager.java:243)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.addSignedSystemContent(JavaWebStartInfo.java:497)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.initClientStaticContent(JavaWebStartInfo.java:478)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.addClientContentToHTTPAdapters(JavaWebStartInfo.java:420)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.startJWSServices(JavaWebStartInfo.java:312)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.access$100(JavaWebStartInfo.java:96)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:257)
    ... 35 more
    WARNING: Exception while cleaning module 'org.glassfish.internal.data.EngineRef@f185b0'java.lang.NullPointerException
    java.lang.NullPointerException
    at org.glassfish.appclient.server.core.AppClientDeployer.clean(AppClientDeployer.java:265)
    at org.glassfish.internal.data.EngineInfo.clean(EngineInfo.java:114)
    at org.glassfish.internal.data.EngineRef.clean(EngineRef.java:171)
    at com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicaPEa�POST /forums/post!post.jspa?forumID=972, I got the same problem, the error log detail is below, I have checked the gf-client.jar, it is right in the folder.
    SEVERE: Exception while loading the app
    java.lang.RuntimeException: java.io.FileNotFoundException: C:\Program%20Files\glassfish-3.0.1\glassfish\modules\gf-client.jar (The system cannot find the path specified)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:259)
    at org.glassfish.appclient.server.core.jws.JavaWebStartState.transition(JavaWebStartState.java:84)
    at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.start(JavaWebStartInfo.java:253)
    at org.glassfish.appclient.server.core.AppClientServerApplication.start(

  • Netbeans to SunJava Studio 8 migration migration issue

    I have a WS client and server created in netbeans. I am opening them in Studio 8, the server project opens fine but my client has a project name "???" and can't see the project file structure ( just a library folder is visible in that project ) though all the files created by netbeans seem to still exists ( can see them under file tab ) . The netbeans still seems to work fine for both client and server.
    Any idea ??
    Thanks

    Since JSE 8 is based upon NB 4.1 it is not possible to import projects from NB 5. The only way I know of converting a project is to manually edit the project.xml file so that it complies with 4.1 schema. In order to do this create a simiral project in JSE and compare project.xml's structure.
    HTH,
    Kirill

  • Netbeans 9 + Composite Component -- Not working

    Hello,
    I am trying to learn Java EE 6. I have the following code, and the editor I am using is netbeans 9 and glassfish server v3
    Composite component file : out.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:cc="http://java.sun.com/jsf/composite">
    <!-- INTERFACE -->
    <cc:interface>
    </cc:interface>
    <!-- IMPLEMENTATION -->
    <cc:implementation>
    <h1> HELLO </h1>
    </cc:implementation>
    </html>
    Using page : MyComponent.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ez="http://java.sun.com/jsf/composite/ezcomp">
    <h:head>
    <title>Use of component</title>
    </h:head>
    <h:body>
    <ez:out/>
    </h:body>
    </html>
    Its the most basic example I tried.. But it doesnt run. When I access the file MyComponent.xhtml, I dont get any error, but I dont get any output also..
    Please help me in finding out whats the problem here.

    The web.xml is already configured by the Netbeans. I didnt make any changes. Here it is.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
        <context-param>
            <param-name>javax.faces.PROJECT_STAGE</param-name>
            <param-value>Development</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>faces/index.xhtml</welcome-file>
        </welcome-file-list>
    </web-app>

  • Netbeans 6.1 + Facelets + Tomcat6

    Hi,
    I have set up my development environment. I have installed the facelets plugin on netbeans 6.1 and also icefaces plugin(to take advantage of code auto completion) with no problems. When I create any project with only facelets support and deploy it in glassfish it works fine. However when I create any project and select tomcat6 as the server I always have a problem like:
    HTTP Status 404
    description The requested resource (/MyWebApp/welcomeJSF.xhtml) is not available.
    This also happens when I create any project with both facelets and icefaces support and deploy on glassfish or tomcat.
    I will appreciate any help or pointers.
    alex

    The CrudFX code uses the old syntax.
    The JavaFX Script Preview version uses new one: [http://java.sun.com/javafx/reference|http://java.sun.com/javafx/reference]
    The exception means that a project contains empty file:
    =========================================================================
    Error in syntactic analysis in DataGrid.fx:
    java.lang.NullPointerException
    at com.sun.tools.javafx.antlr.v3Walker.module(v3Walker.java:294)
    =========================================================================

  • Woodstock, Facelets, Glassfish V2 - Do we have an EL problem here?

    We try to use Woodstock (4.1) with Facelets (1.1.12) on a Glassfish V2 (b40). We know that this is not supported, but maybe someone else had her hands on it already.
    For integration of Facelets and Woodstock we use
    http://blogs.steeplesoft.com/wp-content/uploads/2007/02/woodstock.taglib.xml
    During our test with the table tag we got into problems when we tried to do updates, deletes and adding of rows. We used the button and also the hyperlink tag (as alternative). Tests without Facelets were successful. But, with Facelets it was not possible to run corresponding methods of the backing bean. The JavaScript events are working, but the backing bean behind is ignored. It seems that we've trouble with the EL processing here.
    As we did some test with Tomahawk and Trinidad in combination with Facelet before that showed integration problems, based on missing Facelets functionality, we think that Facelets is the cause here, too.
    During our change to Glassfish we skipped the el-api.jar and el-ri.jar used by Facelets as these are part of Glassfish. Test with them being part of the war file again didn't help.
    Any hints?

    We solved it ourselves. Here's how:
    http://blog.rainer.eschen.name/2007/04/01/when-theres-bad-smell-in-your-jsf-tag-soup-due-to-facelets/

  • Glassfish SQLException: Error in allocating a connection in MySQL

    Hi All,
    I have just installed the Bundled Netbeans 6.5, Glassfish v2 and v3 Prelude (not including MySQL) that runs on top of MySQL 5.1 (separate installation) on server A, in order to mirror another similar working installation (Bundled Netbeans 6.1, Glassfish v2 including MySQL 5.0) on server B. Both Windows XP servers have got identical setups in their respective C:\Program Files\glassfish-v2ur2\domains\domain1\config\domain.xml files. However, the following error was encountered when trying to deploy the same EnterpriseApplication on server A which had no such problem on server B:
    Glassfish Server Log
    Server: unknown
    RAR5099 : Wrong class name or classpath for Datasource Object
    java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1498)
            at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:251)
            at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:106)
    RAR5038:Unexpected exception while creating resource for pool mysqlPool. Exception : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. Reason : Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource]
    Exception occured in J2EEC Phase
    com.sun.enterprise.deployment.backend.IASDeploymentException:
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    Error Code: 0
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
    EnterpriseApplication (EJB 3.0) Deployment output
    Deploying application in domain failed; Deployment Errorjava.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --
    Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    Error Code: 0
    C:\Documents and Settings\Jack\EnterpriseApplication\EnterpriseApplicationBean-ejb\nbproject\build-impl.xml:400: The module has not been deployed.Even manually re-creating the same project (as opposed to getting a copy of the Netbeans project folder from server B) did not make any difference. Likewise, the following jdbc connection pool definition was added possibly by Netbeans from Server Database JDBC Connection Resource setting:
          <property name="URL" value="jdbc:mysql://localhost:3306/employeeDB"/>
          <property name="driverClass" value="com.mysql.jdbc.Driver"/>
          <property name="Password" value="abcdef"/>
          <property name="portNumber" value="3306"/>
          <property name="databaseName" value="employeeDB"/>
          <property name="serverName" value="localhost"/>
          <property name="User" value="applicationuser"/>Can anyone see where the problem lies?
    Any assistance would be much appreciated.
    Thanks in advance,
    Jack

    I'm new to Java and GlassFish and I get the same error message when trying to ping my created data pool for MySQL. Inside the NetBeans IDE running Java Swing Applications + MySQL connection via JDBC, it works fine (Classpath settings ok). I set the same path to the JVM settings in Glassfish but every time I try to ping it the mentioned error occurs. Any suggestions?

  • Facelets support in ADF Rich Client

    I have tried to use ADF Rich Client with Facelets
    but it looks like the tag library schema is not recongined, and the ADF RC tag schema definition in html root tag and all ADF RC tags are copied into output.
    any comments or info from any one?

    hi,
    to add my 2 cents
    by the way do you know when will be a code drop of ADF RC available in Apache ?
    I assume this to happen some time after ADF Faces RC goes production
    1) legacy(!?) pages in one of projects we have hundreds of pages developed in facelets and it is a little hard to convert them all.
    We don't support JSF 1.1 content (and Trinidad content) to be on the same page as ADF Faces RC. So if you like to continue using your current stack then the option to go with in Trinidad in JDeveloper 11, not ADF Faces RC
    3) Templating
    ADF Rich Faces Templating mechanism is an strong one, but a little different with Facelets, for example in Facelets templates can be used inside each other but in ADF RC as far I I know they can not.
    The runtime does support template nesting, the designtime does. However, as Shay mentioned using daclarative components might be a nice addition to reuse.
    4) composition component
    in facelets it is easy make a new composite component by mixing existing components
    for example add an export to PDF and Excel button to a table.
    looks like the current ADF Templating mechanism can be used to solve this issue.
    Declarative components do.
    Frabj

Maybe you are looking for

  • How the heck do I install java for yosemite?

    I've tried following the links, but everytime I hit the download button nothing happens.  Not. A. Darned. Thing.  And I keep getting the message that I need to install Java for things to run properly. 

  • From iPad to android tablet

    Hi, I just finish  my first iPad only app ( after a few iPhone app). I intend to create an android version. Do I just change settings in flash an upload it to android market ? or do I have to make some change... (stage an so on ) If someone have some

  • ORA-17624 errors in alert log

    I keep getting messages like this in my OracleXE alter log: ORA-17624: Failed to delete directory C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2008_08_04 I get these for the backupset, autobackup, and archivelog directories. These are happ

  • Outlook 2010 is not opened via OLE2 ABAP program, error is raised

    I would like to start Outlook 2010 from an ABAP report, create an email and attach .pdf and .csv files to it. When I try to execute the following code I get a subrc = 2: CREATE OBJECT outlookapp 'Outlook.Application'. I have found 'SAP Knowledge Base

  • SF300 rack mount brackets

    Cisco RMAd an older switch for me and sent an SF300-24P as a warranty replacement. They did not include the brackets to mount it and can not seem to be able to get or find them for me. I have contacted Cisco both by email and phone only to be given t