JSF,Tiles, Sun App Server and NetBeans 5.5

hi all,
here is my environment :
1.Server - Sun Application Server (Running On Suse Linux OS)
2.IDE - NetBeans 5.5
3.Project - JSF with Tiles
here i found topic about tiles and jsf :
http://forum.java.sun.com/thread.jspa?threadID=643536&messageID=3792238 but i think that Tiles is best alternative for JSF Layout Manager (It's my mind).
is there anybody help me how to integrate tiles with jsf ?
here is my example :
1.web.xml :
    <servlet>
        <servlet-name>Tiles Servlet</servlet-name>
        <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
        <init-param>
            <param-name>definitions-config</param-name>
            <param-value>/WEB-INF/tiles-def.xml</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>2. tiles-def.xml :
<tiles-definitions>
         <!--****************************************************************-->
     <!--                     Global Layout                       -->
     <!--****************************************************************-->
     <definition name="global.layout" path="/pages/Mylayout/layout.jsp">
          <put name="title" value="Magti Billing System" type="string"></put>
                <put name="subtitle" value="Magti Billing System" type="string"></put>
                <put name="header" value="/pages/Mylayout/header.jsp"></put>
          <put name="subheader" value="/pages/Mylayout/sub_header.jsp"></put>          
          <put name="footer" value="/pages/Mylayout/footer.jsp"></put>
                <put name="body" value="/pages/Mylayout/body.jsp"></put>
                <put name="left_menu" value="/pages/Mylayout/left_menu.jsp"></put>
     </definition>   
</tiles-definitions>3.and then i have 5 blank jsp pages : body.jps, footer.jsp, header.jsp, layout.jsp, left_menu.jsp, sub_header.jsp.
4. here is my layout.jsp code :
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:jsp="http://java.sun.com/JSP/Page"
          xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
          xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
>
    <tiles:importAttribute scope="request"></tiles:importAttribute>
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page binding="#{pages$Mylayout$layout.page1}" id="page1">
            <webuijsf:html binding="#{pages$Mylayout$layout.html1}" id="html1">
                <webuijsf:head binding="#{pages$Mylayout$layout.head1}" id="head1">
                    <webuijsf:link binding="#{pages$Mylayout$layout.link1}" id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body binding="#{pages$Mylayout$layout.body1}" id="body1" style="-rave-layout: grid">
                    <webuijsf:form binding="#{pages$Mylayout$layout.form1}" id="form1">
                        <h:panelGrid columns="2" cellspacing="0" cellpadding="0"
                                     border="0" styleClass="maingrid" columnClasses="maingrid">
                            <f:facet name="header">
                                <f:subview id="header">
                                    <h:panelGrid columns="1" cellpadding="0" cellspacing="0">
                                        <tiles:insert attribute="header" flush="false" />
                                        <tiles:insert attribute="subheader" flush="false" />
                                    </h:panelGrid>
                                </f:subview>
                            </f:facet>
                            <f:subview id="left_menu">
                                <tiles:insert attribute="left_menu" flush="false" />
                            </f:subview>
                            <f:subview id="body">
                                <tiles:insert attribute="body" flush="false" />
                            </f:subview>
                            <!--
                            <f:facet name="footer">
                                <f:subview id="footer">
                                    <tiles:insert attribute="footer" flush="false" />
                                </f:subview>
                            </f:facet>
                            -->
                        </h:panelGrid>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>5. and at last i have index.jsp:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
>
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page binding="#{pages$main$index.page1}" id="page1">
            <webuijsf:html binding="#{pages$main$index.html1}" id="html1">
                <webuijsf:head binding="#{pages$main$index.head1}" id="head1">
                    <webuijsf:link binding="#{pages$main$index.link1}" id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body binding="#{pages$main$index.body1}" id="body1" style="-rave-layout: grid">
                    <webuijsf:form binding="#{pages$main$index.form1}" id="form1">
                        <tiles:insert definition="global.layout" flush="false"/>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>but i get an error like this :
Can't leverage base class
java.lang.IllegalStateException
        at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:259)
        at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)
        at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:458)
        at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:643)
        at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1070)
        at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
        at org.apache.jsp.pages.Mylayout.layout_jsp._jspx_meth_f_view_0(layout_jsp.java:140)
        at org.apache.jsp.pages.Mylayout.layout_jsp._jspService(layout_jsp.java:99)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)Any Ideas Is Usefull. Thanks.
Paata.

Hi,
I'm trying to use Tiles with NetBeans 6.0. I used a similar set up as the other writer did, except for the JSP:root part:
<jsp:root version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
It complies and deploys OK, except it renders a blank page. The source code of the page is below. It seems that the "tiles:insertDefinition" was not expanded. Would you share some lights on how you get it to work. By the way I did not use shale-tiles, do I need it?
Thanks in advance.
<!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:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:waistate="http://www.w3.org/2005/07/aaa">
<head>
<meta content="no-cache" http-equiv="Pragma" />
<meta content="no-cache" http-equiv="Cache-Control" />
<meta content="no-store" http-equiv="Cache-Control" />
<meta content="max-age=0" http-equiv="Cache-Control" />
<meta content="1" http-equiv="Expires" />
<title></title>
<link rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/css/css_master.css" />
<script type="text/javascript">
var djConfig = {
    "isDebug": false,
    "parseWidgets": false,
    "debugAtAllCosts": false
</script>
<script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/dojo/dojo.js"></script>
<script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/json/json.js"></script>
<script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/prototype/prototype.js"></script>
<script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/com_sun_faces_ajax.js"></script>
<script type="text/javascript">
dojo.hostenv.setModulePrefix("webui.suntheme", "/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/javascript");
dojo.require('webui.suntheme.*');
dojo.require('webui.suntheme.widget.*');
dojo.require('webui.suntheme.widget.jsfx.*');
</script>
<link id="link1" rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/resources/stylesheet.css" />
</head>
<body id="body1" style="-rave-layout: grid" onload="" onunload="">
<form id="form1" class="form" method="post" action="/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp" enctype="application/x-www-form-urlencoded">
<tiles:insertDefinition flush="false" name="global.layout" />
<input id="form1_hidden" name="form1_hidden" value="form1_hidden" type="hidden" />
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAKVWTWwbRRR+Xmexm4LSOCgEiZRIFESFsk7bCyIUSFInsfBPZZsU2kM6Xk/sDevdYXbWXreiag+ABBcQIIEUBBIcemhP3HoAqh4QSEUiEhdOFReEBBwQEj8HYGZs79qOZZNkZD2vd957M98333vja7+A6lKYOJfaRDWkmcgqa9niJtbZ/JvfPP/hIeeoqQB4BAAiDoUTul3VHNfSNpCOHQ0RYho6YoZtaXmGGE4jC5UxTVaJeaRAMc7YJfz7xo3Prs+tfH63yFM/A2KsdOfBHsOWw7PwlDXEENX4PLEtbDFHO40oM5BZoKiGqYPMNQPXc7bNxCIQ3Vw3Svxz3HNegkug1Gdl/pl2/jouuoa26WwEGXnCMgaVcHusMyo0OGqVVU1QK9x2RSlDojAq8Shuu6LCg6NShvUiqCa3u1lr0S41QC1y2xWlDo5atmkV1A1uj3muiBJD8Z+iwRM//3GpEpcZpraKnEoaETXy/c1bk+e/DYOyDKOmjUrLSGc2TcIBVqHYqdhmySNPPyNT3FWPikSCAAZHRC6vpQC+My4mbem5XC6RKayvJRNn1nPZbEEsPsbg0TYCIQLhrHEcPKCIHKwt5RILhcQpGeTvUSp50bZNjKzbM/Tyd1t//6pA6CyoNWS62CMhBjP9dpBNn85mxB6Sp/I820SAeIFS1EgZDvOubE+//yX6IAyhJIw4xgUsCyRUHxHSY21teYSwQKACSUweyziIidHVQjq1vriQTy4xOBhfIHYZY342hC96KFg0ZevIxJf+HD+/NffXzwqMJCFa4dTrvLJSENFt12K0wSAmCzguYMfzjBpWeT4FUfHT5ZsRyz7A3WuIGshi8qdH/uWDATBQsCVeHe5mL2kxzIs59sNHn/xx5bXHFYG2xV57i9Iv41aLmL567d3pg+/ceaPdLkKEEF87oT7KUjuUJZ7u2SGSkHg9ISfv7eK3WYWdcu1pYS0Grm+v/fjT9MUVf08MIkXDKvG5YGsc9COdQghKQ7a0VS5gTPOi+bzw9acn3966nVZAScEB3USOk0HVNrmjDvcpyRgGk83jMOx4HnPKTeMCKpp4nkuCL3e4rWZsamuCz4RHeKmIBiiaWvjG1eKDD3/1nmiYFKaae9vpWh+9fO7OF/+8pUi3Cd8t8Pj4ldfzv53dflLCr5+AsYcutmQmBfry8DZJiCfQTfomJswUx7czUvrL6R4zUAXh3apACVQguiprd7ze5vVYO3S246jFU5zIr+NdhEhFDSFE3AAtQo76ZgAhTX/SB3TwNLb3ImheD/uELSgcBpv7tGCf9M0g2MI/OH1CAv9u0+/d/1BMJKCsl9vdgZcEDgEvbuIW+Gd9MwB805+IBn9/nJeh7VLeU+IOa5j8LsSYabrjBNuGPvju27skmrf4/iQhq2kIK+KfRouVp3wzgJWmf8/gd9asuM5nTdSwXfbETJkapZ4GEhsuh6m90yWu5rl90iUpH0KX+IvVokv3zQC6pH9nBe0YfUoF/gMrokC8ywsAAA==" />
</form>
<script type="text/javascript">
webui.suntheme.common.body = new webui.suntheme.body('/Apogee.jsp', '/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp',null,null,'com_sun_webui_util_FocusManager_focusElementId');</script>
</body>
</html>

Similar Messages

  • Exceptions trying to run JSF on Sun App Server

    Hi!
    I have downloaded the Sun App Server and am trying to run the JSF Sample on it. The first page comes up fine, and when I enter data, it processes but does not come back with the response. I get the following errors:
    java.lang.ClassNotFoundException: com.sun.faces.application.StateManagerImpl$TreeNode
    java.lang.ClassNotFoundException: com.sun.faces.application.WebappLifecycleListener
    java.lang.IllegalStateException: No FacesContext is available to process this request.
    Not sure if this is the right forum..
    Thanks

    Make sure you started the default server. Try
    http://localhost:8080. This will allow you to see if the appserver is running. The first page is a jsp an will run regardless of if the server is running. To start the defaul server look at you windows menu under Sun Microsystems.

  • Unable to Register Sun App Server 9 in Netbeans 5.5

    Hi,
    I used to work on netbeans 5.5 and bundled sun app server 9. Everything was going fine. Today in the middle of a deployment in app server through netbeans, my system got hanged. So I killed the java.exe process.
    Now when I again attempted to open netbeans it showed me an error that some modules in sun app server could not be found and so sun app server could not be loaded. I tried registering sun app server again in netbeans but the server name was not even coming in the drop down list of app servers.
    Impatiently I uninstalled the bundled app server + netbeans through the uninstaller, and again installed the server and netbeans in a different directory. But again the same problem is coming and it is not showing the sun app server. Netbeans is opening and Sun App Server 9 is also working in isolated mode but I cant seem to find the sun app server still in the server list of netbeans.
    Kindly help. I am just too frustrated.

    Hi,
    I have installed J2EE 5 SDK on windows XP. When I installed NetBeans 5.5.1 and tried to register it with Application Server, it got registered automatically. I had to uninstall both due to some reasons, now when I installed both j2ee and netbeans again, i see D:/Sun/AppServer folder empty and not able to register NetBeans 5.5.1 with application server. I tried again and again by reintalling but AppServer folder remains empty and not able to register. Any help for this issue??????????

  • Sun app server problem using asadmin tool

    I have installed sun app server and trying to do the simplemessage tutorial. When I run the
    ant create-cfcommand I get the following
    [exec] Invalid user or password
    [exec] CLI137 Command create-jms-resource failed.I have put an echo line in app-server-ant.xml to see what the command is and it is.
    [echo] c:/Sun2/SDK/bin/asadmin.bat create-jms-resource --user admin  --passwordfile C:/Sun2/SDK/javaee-5-doc-tutorial-1.0_03/javaeetutorial5/examples/common/admin-password.txt --host localhost --port 4850 --restype javax.jms.ConnectionFactory --enabled=true jms/ConnectionFactoryI have checked the password file and it is
    AS_ADMIN_PASSWORD=adminadminAny ideas?
    I have checked around about using parameter password but when running this I get an error saying this is not valid and that I should use passwordfile
    Kelvin

    You haven;t specified the exceptions you r getting ........while starting your default server.
    if u r getting exception about InetClass then connect your system with LAN/Internet then your problem will be solved becoz i m using same location address as you specified, space doesn't matter at all - i think so, it is running fine........

  • Sun app server 8.1 vs 8.2 for jsf 1.1

    Currently we have download sun studio creator 2 which comes with sun app server 8.1 as its default server. We want to make our default server in studio creator 2 as app server 8.2, since our production environment is running on 8.2.
    Any help will be appreciated.

    I experienced this error on an application (not jsf), but it was something silly in the end. There may be a bug with JSF in 8.1 but I would just check the obvious before you start delving into the depths of the code.
    Are you calling the app with http://localhost/AppA and the posting to http://svr03/AppA ?
    Set the web.xml file to point to an HTTP file (leave everything else as is) what happens?
    Simon

  • Sun App Server 8.1 and 8.2 could not start

    Hi friends, thank for various suggestions. pls i'm having problem with Sun App Server 8.1 and 8.2. I installed Portal 7 on Red Hat Enterprise Linux 3 and also Sun Portal 6 on Suse Linux 9. The problem is that App server keep giving Login exception after using them for a while. The details is given below:
    after typing ./asadmin start-domain --user admin domain1. Instead of it to give me the password prompt, it threw the following exception:
    INFO: SEC5046: Audit: Authentication refused for [admin]
    Login Failed javax.security. auth.login.LoginException: Failed file for login admin
    CL1156 could not start the domain domain1.
    I always login to the O/S as root.
    Any suggestion will be highly appreciated. Thanks

    Thanks very much kedar.mhaswade for your suggestions.
    I do not have a regular access to the Internet, I
    would have gotten back earlier than this, so i'm
    sorry. Anyway, i checked the content of
    ~/.asadminprefs and the password is not the same with
    the one i'm using. I found the default password
    supplied by Sun but I don't think this could be the
    problem. I'm actually using the App server that is
    bundled with Sun Portal 6 and 7 and so i supplied my
    own password during installation and i've logged in
    several times after installation. It just failed in
    one of those logins and had stopped working since. I
    always encountered the same problem either when using
    Sun Portal 7 or 6 on Red Hat ES 3 and Suse 9
    respectively.
    I'm posting the content of admin-keyfile as you
    requested:
    admin;{SSHA}Qf/m4KEBDPojsP1mkjywE5XZA6SPh7i8WQmV/A==;a
    sadmin
    # Domain User and Password - Do Not Delete Entry
    Above
    So i will so much appreciate your help and i wouldn't
    mind if you could send me your phone number. Thanks.Hi tolulike,
    Even if you supplied your own password, we have this developer friendly
    feature that has side effects that are at times hard to diagnose. Can you
    please
    - rename the .asadminprefs file and make sure that there is no .asadminprefs file in your home directory?
    - attempt to start the domain.
    You should be prompted for the password.
    The idea is that when you've got that file and that entry AS_ADMIN_PASSWORD in your home directory, asadmin will read it
    from there and you land in this (unfortunate) situation.
    Obviously doing this might have some side effects with other domains. This
    is because for all domains, asadmin reads this file as a last resort. So,
    it might so happen that this file is actually required for functioning of your
    other domains.
    But now you know when this file is used, so there is no mystery (hopefully).
    Let me know if this works.
    Thank you.
    Kedar

  • Different behavior using JSC and Sun App server 8.2 - why?

    I have developed a JSF application using Java Studio Creator 2.
    JSC2 uses Sun App Server 8.2 as the development application server.
    I also have Sun App Server 8.2 on a server that is used for deployment.
    When I run an application within the IDE, I get a set of behavior that I expect to see, but not when deployewd to the server.
    In particular, in one case, a grid created within a session bean is redrawn when running in the IDE but not when deployed.
    In another case, I attempt to read the value of the grid text field.
    In the IDE, I get a properly set 'submittedValue' property, but in the deployed environment, it is null.
    Why am I seeing differences in behavior between the two environments?
    How can I get the deployed version to work tge same as in the development enviroment.

    I am sorry but I don't understand. Which path specifically do you mean?
    dear mr/mises
    you have to change your path with net beans with8.2
    you will be solving your problems

  • Running Sun App Server 7 and 8 on the same box

    Hello,
    Are there any known issues with running Sun App Server 7 and 8 in the same host box ? Currently I am encountering some class not found exceptions with Sun App Server 8 . Sun App Server 7 runs just fine.
    Thanks,
    Aswin.

    It's not advisable to run separate installations of
    ColdFusion 7 and ColdFusion 8 single server on the same machine the
    re are several services that will try to use the same ports.
    However, you can install ColdFusion Enterprise using the
    multi-server configuration and then deploy the J2EE versions of
    ColdFusion to JRun. You can change the JVM that each instance uses
    (we recommend the latest 1.4 for CF7 and the latest 1.6 for CF8),
    and everything should run fine.
    ColdFusion itself is essentially just a J2EE application, the
    J2EE server itself is JRun 4. So the specific answer to your
    question is "don't install 2 copies of JRun 4 to the same machine".
    But yes, it's 100% possible, I'm running this configuration in my
    own development environment.

  • Can JSC support Sun App Server 9?

    Does anyone know if JSC can support sun app server 9?
    Last I heard was that 8.2 is the max version.
    Along the same line, is there any word of another update to JSC
    that will work with app server 9 and jdk 6???

    Hi!
    Actually You can deploy your application to Sun App Server 9.0, but probably not all features will work. But now You can download NetBeans 5.5 and Visual Web Pack for it (it's a next step of Creator's evolution) and this IDE supports GlassFish (opensourced Sun App Server 9.0).
    Thanks,
    Roman.

  • "Message Driven Bean" doesn't work with Sun App Server

    Hello all,
    i have a little bit problems, running a simple "Message Driven Bean" under the Sun App Server. The deployment of it works fine, but after starting the SUN App Server i get the following error message:
    An error occurred during the message-driven beancontainer initialization at runtime. The most common cause for this is that the physical resource(e.g. Queue) from which the message-driven bean is consuming either does not exist or has been configured incorrectly. Another common error is that the message-driven bean implementation class does not correctly implement the required javax.ejb.MessageBean or MessageListener interfaces.
    Has anybody a workaround for this problem?
    The queue seems to be correctly installed. A simple client programm from the Sun Tutorial (Consumer & Producer) works fine without any Errors or Exceptions.
    I am a little bit confused, because the queue seems to work with the client programms but not with a MDB running on the SUN App Server.
    Thanks for you help!
    Greetings
    Manuel

    Hello Mr Manuel!
    could you plz help me with the steps for creating a message driven bean using netbeans ver 5.0(with Sun Java� System Application Server Platform Edition 8.2 )
    I just know how to work with Session beans & Entity Bean, and am try to learn to work on Message Driven Beans too. there are no proper tutorials where i can find steps for creating these..
    I need the steps from the scratch.,like creating QueueConnection Factory & Destination etc..
    It will be gr8 if you can help me with this at the earliest .
    Thank you
    Bye

  • Problem : App works with Sun App server 8.0 but fails with 8.1

    Hi All
         I am experiencing some strange problem with executing my JSF application with Sun App Server.
         I have an EAR deployed on Sun Application Server 8.0 and 8.1.
         Strangely it works quite fine with 8.0 but fails with 8.1.
         In my JSP page ..I have a dummy component whose getter method is used as a "FormLoad" event of the page.
         <h:form id="imageForm" enctype="multipart/form-data">
         <h:messages showDetail="true" />
         <table width="980" border="1" cellpadding="0" cellspacing="0" bordercolor="#A9B8C2">
              <tr>
    <td>     
                   <h:inputHidden value="#{Screen1.initializeService}"/>
              <h:selectOneListbox styleClass="style2" id="cmbMiddleArea" immediate="true" value="#{Screen1.selectedMiddleArea}">
              <f:selectItems value="#{Screen1.middleAreaList}" />
         </h:selectOneListbox>
         In my backing bean i have ..
         public String getInitializeService() {
              ..... Retrieve all the data from DB to initialize all the components on the JSP page
              .......setMiddleAreaList......
              .......setSelectedMiddleArea.....
              ........set the values of the individal component...
         I am retrieving all the data from DB in this getter method and intializing the components on the JSP page.
         I have also checked the code generated for JSP by both the servers.I am posting the code here for reference although
         i did not find any significant difference between the two...
         For Server 8.0
         private boolean jspxmeth_h_inputHidden_0(javax.servlet.jsp.tagext.JspTag jspxth_h_form_0, PageContext jspxpage_context)
         throws Throwable {
         JspWriter out = jspxpage_context.getOut();
         // h:inputHidden
         com.sun.faces.taglib.html_basic.InputHiddenTag jspxth_h_inputHidden_0 = (com.sun.faces.taglib.html_basic.InputHiddenTag) jspxtagPool_h_inputHidden_value.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
         jspxth_h_inputHidden_0.setPageContext(_jspx_page_context);
         jspxth_h_inputHidden_0.setParent((javax.servlet.jsp.tagext.Tag) jspxth_h_form_0);
         jspxth_h_inputHidden_0.setValue("#{searchBean.initializeService}");
         int jspxeval_h_inputHidden_0 = jspxth_h_inputHidden_0.doStartTag();
         if (_jspx_th_h_inputHidden_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
         return true;
         jspxtagPool_h_inputHidden_value.reuse(_jspx_th_h_inputHidden_0);
         return false;
         For Server 8.1
         private boolean jspxmeth_h_inputHidden_0(javax.servlet.jsp.tagext.JspTag jspxth_h_form_0, PageContext jspxpage_context)
         throws Throwable {
         PageContext pageContext = jspxpage_context;
         JspWriter out = jspxpage_context.getOut();
         // h:inputHidden
         com.sun.faces.taglib.html_basic.InputHiddenTag jspxth_h_inputHidden_0 = (com.sun.faces.taglib.html_basic.InputHiddenTag) jspxtagPool_h_inputHidden_value_nobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
         jspxth_h_inputHidden_0.setPageContext(_jspx_page_context);
         jspxth_h_inputHidden_0.setParent((javax.servlet.jsp.tagext.Tag) jspxth_h_form_0);
         jspxth_h_inputHidden_0.setValue("#{searchBean.initializeService}");
         int jspxeval_h_inputHidden_0 = jspxth_h_inputHidden_0.doStartTag();
         if (_jspx_th_h_inputHidden_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
         return true;
         jspxtagPool_h_inputHidden_value_nobody.reuse(_jspx_th_h_inputHidden_0);
         return false;
         Now the actual problem is "getInitializeService" method never gets called when i deploy and run the application on Sun App Server8.1
         However with Sun App Server 8.0 it woeks perfectly fine.
         Can anybody help me in resolving these issues ?
         

    Actually generated JSP code can be referred as ...
    For Server 8.0
         private boolean jspxmeth_h_inputHidden_0(javax.servlet.jsp.tagext.JspTag jspxth_h_form_0, PageContext jspxpage_context)
         throws Throwable {
         JspWriter out = jspxpage_context.getOut();
         // h:inputHidden
         com.sun.faces.taglib.html_basic.InputHiddenTag jspxth_h_inputHidden_0 = (com.sun.faces.taglib.html_basic.InputHiddenTag) jspxtagPool_h_inputHidden_value.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
         jspxth_h_inputHidden_0.setPageContext(_jspx_page_context);
         jspxth_h_inputHidden_0.setParent((javax.servlet.jsp.tagext.Tag) jspxth_h_form_0);
         jspxth_h_inputHidden_0.setValue("#{Screen1.initializeService}");
         int jspxeval_h_inputHidden_0 = jspxth_h_inputHidden_0.doStartTag();
         if (_jspx_th_h_inputHidden_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
         return true;
         jspxtagPool_h_inputHidden_value.reuse(_jspx_th_h_inputHidden_0);
         return false;
         For Server 8.1
         private boolean jspxmeth_h_inputHidden_0(javax.servlet.jsp.tagext.JspTag jspxth_h_form_0, PageContext jspxpage_context)
         throws Throwable {
         PageContext pageContext = jspxpage_context;
         JspWriter out = jspxpage_context.getOut();
         // h:inputHidden
         com.sun.faces.taglib.html_basic.InputHiddenTag jspxth_h_inputHidden_0 = (com.sun.faces.taglib.html_basic.InputHiddenTag) jspxtagPool_h_inputHidden_value_nobody.get(com.sun.faces.taglib.html_basic.InputHiddenTag.class);
         jspxth_h_inputHidden_0.setPageContext(_jspx_page_context);
         jspxth_h_inputHidden_0.setParent((javax.servlet.jsp.tagext.Tag) jspxth_h_form_0);
         jspxth_h_inputHidden_0.setValue("#{Screen1.initializeService}");
         int jspxeval_h_inputHidden_0 = jspxth_h_inputHidden_0.doStartTag();
         if (_jspx_th_h_inputHidden_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
         return true;
         jspxtagPool_h_inputHidden_value_nobody.reuse(_jspx_th_h_inputHidden_0);
         return false;
         }

  • Sun App Server 9.0_01 (build b14) Deployment (undeploy) problems

    Hi all,
    I apologize for this long post but I want to provide as much info as possible. Also, I am not sure this is the right place for this posting. I will appreciate it if anyone could direct me to a better place.
    I have this ongoing problem deploying my application. The app server is unable to completely delete the previously deployed files. It goes into a series of timeout loops saying it is running the gc to try and free up resources. The files that can't be deleted are all in the web application's lib folder. I tried deleting them manually while waiting for the app server timeout loop and indeed each one is busy and can't be deleted. None of the files here are my code. The files are all in the folder:
    domain1\applications\j2ee-apps\TS5529\U04A1_war\WEB-INF\lib
    and the files are: appbase.jar, commons-fileupload.jar, dataprovider.jar, errorhandler.jar, jsfcl.jar, json2.jar, rowset.jar, sqlx.jar, webui-jsf.jar, webui-jsf-suntheme.jar
    I have made sure destroy() method in my SessionBean nulls out any resources used, even variables containing injected EJBs but the problem remains.
    The application is a NetBeans Enterprise application with a couple of Session Beans, Entity classes and Entity Facades. The presentation is JSF with Visual Web Pack and consists of two simple pages. The SessionBean holds a reference to a Stateful Bean and 4 variables each containing a custom ListDataProvider for JSF tables data binding. The SessionBean destroy method sets all of these variables to null.
    The first page backing bean does most of the work. It accesses the SFSB and DataProviders through the SessionBean. This page includes four EJB injections like this:
    @EJB AuthorFacadeLocal af;
    @EJB PublisherFacadeLocal pf;
    @EJB SearchDBLocal sDB;
    @EJB TitleFacadeLocal tf;
    and a variable holding an empty, unmanaged Entity object. I tried setting all of these to null in the page's destroy() method, which I don;t think I need to do.
    Is there a problem with these injections in the page's backing bean?? I've been at this for about a week, trying various ways to make sure resources are freed but the problem still there. The only solution is to stop the app server and then deploy. Needless to say, it is a pain having to stop the app server every time I need to deploy.
    Hope someone has seen this and can help, thanks in advance.

    Hi all,
    I apologize for this long post but I want to provide as much info as possible. Also, I am not sure this is the right place for this posting. I will appreciate it if anyone could direct me to a better place.
    I have this ongoing problem deploying my application. The app server is unable to completely delete the previously deployed files. It goes into a series of timeout loops saying it is running the gc to try and free up resources. The files that can't be deleted are all in the web application's lib folder. I tried deleting them manually while waiting for the app server timeout loop and indeed each one is busy and can't be deleted. None of the files here are my code. The files are all in the folder:
    domain1\applications\j2ee-apps\TS5529\U04A1_war\WEB-INF\lib
    and the files are: appbase.jar, commons-fileupload.jar, dataprovider.jar, errorhandler.jar, jsfcl.jar, json2.jar, rowset.jar, sqlx.jar, webui-jsf.jar, webui-jsf-suntheme.jar
    I have made sure destroy() method in my SessionBean nulls out any resources used, even variables containing injected EJBs but the problem remains.
    The application is a NetBeans Enterprise application with a couple of Session Beans, Entity classes and Entity Facades. The presentation is JSF with Visual Web Pack and consists of two simple pages. The SessionBean holds a reference to a Stateful Bean and 4 variables each containing a custom ListDataProvider for JSF tables data binding. The SessionBean destroy method sets all of these variables to null.
    The first page backing bean does most of the work. It accesses the SFSB and DataProviders through the SessionBean. This page includes four EJB injections like this:
    @EJB AuthorFacadeLocal af;
    @EJB PublisherFacadeLocal pf;
    @EJB SearchDBLocal sDB;
    @EJB TitleFacadeLocal tf;
    and a variable holding an empty, unmanaged Entity object. I tried setting all of these to null in the page's destroy() method, which I don;t think I need to do.
    Is there a problem with these injections in the page's backing bean?? I've been at this for about a week, trying various ways to make sure resources are freed but the problem still there. The only solution is to stop the app server and then deploy. Needless to say, it is a pain having to stop the app server every time I need to deploy.
    Hope someone has seen this and can help, thanks in advance.

  • Deploying a WAR file to Sun App Server 8.1 PE

    So I thought that if I downloaded Sun App Server PE 8.1 and put it on my soon-to-be production machine, it should be pretty easy right?
    Nope. So I have JSC update 6 (which includes Sun Application Server 8.0) (God how I wish there was a catchy name like Tomcat or something)
    And I have a machine running a good copy, installed and everything, of Sun Application Server 8.1 Platform Edition (another catchy name) up on the production target.
    I create a WAR file in JSC, scp it up.
    Then try to deploy it - so I get bit by the no DB connection thing.
    Ok, but when I copy each of my connection's attributes (the driver (which I did copy up to the lib directory) is MySQL's Connector/J)
    I copy the username, password, URL and DriverClass attributes to the connection pool.
    I still get a
    "Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Class name is wrong or classpath is not set for : com.sun.sql.datasource.DriverAdapter"
    when I try to Ping the ConnectionPool
    I have javax.sql.DataSource as the resource type... (same as 8.0 uses)
    what JAR file is DriverAdapter in? anyone know?
    cheers,
    Kris

    Okay. mysql folks - this works......
    here's what happened, on the production server, different from the dev machine....
    mysql 4.1.9
    sun application server platform edition PE 8.1
    connector/j - latest
    and on the dev machine: JSC Update 6 and the app works fine on the dev machine.
    first, there is a JAR file in ~whatever/Create/SunAppServer/lib/ named
    driveradaptor.jar
    and it it comtains
    com.sun.sql.datasource.DriverAdapter
    which 8.1 ain't got
    and should be copied up to
    /installdir/SunAppServer/domains/domain1/lib/ext/driveradapter.jar
    (domain1 is your app svr domain that runs your app.)
    your Connector/J JAR needs to go here too. I used:
    mysql-connector-java-3.2.0-alpha-bin.jar
    downloaded from mysql.com.
    and then there is the whole thing about Added Properties in the Connection Pool page inside the 8.1 Admin Console (which is nice work guys). Gawd, I added a bunch of properties and am, frankly, not sure which ones actually work (for the Ping, for the initial connection creation and the eventual successful connection all seem to use different combinations...)
    and I found this in the domain's domain.xml once all the admin console page filling was done - but you'll need to add each one as a Property in the connection pool:
    <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="com.sun.sql.datasource.DriverAdapter" fail-all-connections="false" [blah...]
    <property name="Username" value="root"/>
    <property name="Password" value="secret"/>
    <property name="ValidationQuery" value="SELECT 1"/>
    <property name="DriverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="LoginTimeout" value="0"/>
    <property name="Url" value="jdbc:mysql://localhost/databasename?autoReconnect=true"/>
    <property name="User" value="root"/>
    <property name="password" value="secret"/>
    <property name="PasswordCredential" value="secret"/>
    </jdbc-connection-pool>
    (and you see how User and Username and username are all the same thing? well, different parts of 8.1 seem to use different attributes...)
    Just keep Adding Properties in the connection pool until you get them all....
    Oh and, the two key class references for the pool are:
    datasource class: com.sun.sql.datasource.DriverAdapter
    resource type: javax.sql.ConnectionPoolDataSource
    Finally: in the /installdir/SunAppServer/domains/domain1/applications/j2ee-modules/YourAppName/WEB-INF/
    your 'sun-web.xml' (don't delete it, like some have advocated, I think that wrong) needs to look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
    <sun-web-app xmlns="http://java.sun.com/xml/ns/j2ee">
    <context-root>/yourcontext</context-root>
    <resource-ref>
    <res-ref-name>jdbc/Yourname</res-ref-name>
    <jndi-name>jdbc/Yourname</jndi-name>
    <default-resource-principal>
    <name>root</name>
    <password>secret</password>
    </default-resource-principal>
    </resource-ref>
    </sun-web-app>
    and I think that's all of it. the only Bug I would I would say is that the sun-web.xml should have the right res-ref-name, but then I think the Creator Team knows this and will fix it sometime soon.
    cheers,
    and Roger Federer lost in the Aussie Open. (I think he lost tomorrow too, that whole time zone thing being so damn Einsteinian...)
    -Kristofer

  • How to install j2ee sun app server 8.0 in debain linux

    hi guys
    i am new to linux and i have downloaded the j2ee sun app server 8.0(linuxversion) from sun.java
    in sun.java documentation says first we have to change the mode to excecutable
    then he is saying to do this
    1. To run the installation program that uses a graphical interface, at the command prompt type the name of the bundle file at the command prompt.
    2.To run the installation program that uses the command-line interface, at the command prompt type the name of the bundle file followed by the -console option.
    after chmod + x <bundle name >
    the next step i am not able to do it
    what to do next
    any suggestions
    regards
    sandeep

    Hi rlubke
    Thanks for the suggestion
    1.Change the permission of the bundle file so that you have execute access:
    chmod +x <bundle-file-name>
    2. To run the installation program that uses a graphical interface, at the command prompt type the name of the bundle file at the command prompt.
    3.To run the installation program that uses the command-line interface, at the command prompt type the name of the bundle file followed by the -console option.
    Step 1. After chmod + x <bundle name >
    Step 2. sun/appserver/# <bundle name>
    bash: <bundle name>: command not found
    Step 3. sun/appserver# <bundle name>
    bash: <bundle name#>: command not found
    any suggestions
    i have done what u have said now
    Step 1. After chmod + x <bundle name >
    Step 2. sun/appserver/#./ <bundle name>
    Checking available disk space....
    Checking Java(TM) 2 Runtime Environment...
    Extracting Java(TM) 2 Runtime Environment files...
    Extracting installation files...
    Launching Java(TM) 2 Runtime Environment....
    Error: There are no files requiring installation.
    Deleting Temporary files...
    Step 3. sun/appserver# <bundle name>
    Checking available disk space....
    Checking Java(TM) 2 Runtime Environment...
    Extracting Java(TM) 2 Runtime Environment files...
    Extracting installation files...
    Launching Java(TM) 2 Runtime Environment....
    Error: There are no files requiring installation.
    Deleting Temporary files...
    this is what happening excatly

  • Weblogic 8.1 App Server and IBM MQ Series 5.2 Issue

    Hi All,
              I am trying to create a bridge between Weblogic 8.1 App Server and IBM MQ Series 5.2 and i am facing issues.
              Bridge works fine if i use QualityOfService="Atmost-once" and i am getting following error when i use
              QualityOfService="Duplicate-okay".
              Error:
              <Oct 16, 2003 6:03:35 PM PDT> <Error> <MessagingBridge> <BEA-200015> <An error occurred in bridge "MQSeries WebLogic Bridge" during the transfer of messages (java.lang.Exception: weblogic.jms.adapter.JMSConnectionHandle.acknowledge(Ljavax/jms/MessageV).>
              <Oct 16, 2003 6:03:35 PM PDT> <Warning> <MessagingBridge> <BEA-200026> <Bridge "MQSeries WebLogic Bridge" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was weblogic.jms.bridge.internal.MessagingBridgeException.)>
              Any suggestions or comments will be really appreciated.
              Thanks
              Suresh
              

    It is weird that nothing shows up in the log after you turned on the debug.
              Actually I knew somebody has run into the same problem once.
              The problem disappeared after he did something on the MQSeries side (like
              restart the system and something else). I did not know exactly what he did.
              I am not sure if that will help you but worth trying.
              If that does work either, I'd suggest that you contact the BEA Customer Support
              and somebody will look at it for you in depth.
              Thanks,
              Dongbo
              Suresh wrote:
              > Thanks for following up on this.
              >
              > This bridge works with 6.1 app server and we are trying to use the same stuff
              > for 8.1 app server too. No, we are not using XAConnectionFactory.
              >
              > Suresh
              >
              > Dongbo Xiao <[email protected]> wrote:
              > >Is there any chance that the JMS connection factory on the MQSeries
              > >side is a XAConnectionFactory?
              > >
              > >Suresh wrote:
              > >
              > >> I am using the debug options (-Dweblogic.Debug.DebugMessagingBridgeStartup="true"
              > >> -Dweblogic.Debug.DebugMessagingBridgeRuntime="true") in my stratip
              > >script,
              > >> but, thats the maximum stack trace I can get. I am using jms-notran-adp.rar
              > >for
              > >> both QOS. Bridge is working fine when I use Exactly-once and repeatedly
              > >getting
              > >> the same message when I use Duplicate_okay. My destination queue is
              > >not able to
              > >> ackowledge the messge to the sender.
              > >>
              > >> Here I am giving nodes from my config.xml
              > >>
              > >> <MessagingBridge AsyncEnabled="false" BatchInterval="40000"
              > >> Name="MQSeries WebLogic Bridge"
              > >> QualityOfService="Duplicate-okay"
              > >> SourceDestination="MQSeries Inbound Destination" Started="true"
              > >> TargetDestination="WebLogic Inbound Destination" Targets="myserver"/>
              > >> <JMSBridgeDestination
              > >> AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDINoTX"
              > >> ConnectionFactoryJNDIName="jms.InboundMessageConnectionFactory"
              > >> ConnectionURL="t3://myserver:7001"
              > >> DestinationJNDIName="jms.InboundMessageQueue"
              > >> DestinationType="Queue"
              > >> InitialContextFactory="weblogic.jndi.WLInitialContextFactory"
              > >> Name="WebLogic Inbound Destination" UserName="username" UserPassword="pwd"/>
              > >> <JMSBridgeDestination
              > >> AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDINoTX"
              > >> ConnectionFactoryJNDIName="cn=MQ_BROKER_1,ou=inboundConnectionFactories,ou=mqseries,ou=jms,ou=Systems"
              > >> ConnectionURL="ldap://ldapServer:389/o=myroot"
              > >> DestinationJNDIName="cn=queue2,ou=queue,ou=mqseries,ou=jms,ou=Systems"
              > >> InitialContextFactory="com.sun.jndi.ldap.LdapCtxFactory"
              > >> Name="MQSeries Inbound Destination"
              > >> UserName="cn=admin,o=myroot" UserPassword="pwd"/>
              > >> <Application Name="jms-notran-adp"
              > >> Path="C:\bea\weblogic81\server\lib" StagingMode="nostage" TwoPhase="true">
              > >> <ConnectorComponent Name="jms-notran-adp"
              > >> Targets="rdoddapaneni3" URI="jms-notran-adp.rar"/>
              > >> </Application>
              > >>
              > >> Thanks
              > >>
              > >> Tom Barnes <[email protected]> wrote:
              > >> >By the way, if you are looking to improve performance, transactional
              > >> >mode may actually be the fastest. See the JMS Performance
              > >> >Guide white-paper on dev2dev for details.
              > >> >
              > >> >Suresh wrote:
              > >> >
              > >> >> Hi All,
              > >> >>
              > >> >> I am trying to create a bridge between Weblogic 8.1 App Server and
              > >> >IBM MQ Series 5.2 and i am facing issues.
              > >> >>
              > >> >> Bridge works fine if i use QualityOfService="Atmost-once" and i
              > >am
              > >> >getting following error when i use
              > >> >> QualityOfService="Duplicate-okay".
              > >> >>
              > >> >> Error:
              > >> >>
              > >> >> <Oct 16, 2003 6:03:35 PM PDT> <Error> <MessagingBridge> <BEA-200015>
              > >> ><An error occurred in bridge "MQSeries WebLogic Bridge" during the
              > >transfer
              > >> >of messages (java.lang.Exception: weblogic.jms.adapter.JMSConnectionHandle.acknowledge(Ljavax/jms/MessageV).>
              > >> >
              > >> >> <Oct 16, 2003 6:03:35 PM PDT> <Warning> <MessagingBridge> <BEA-200026>
              > >> ><Bridge "MQSeries WebLogic Bridge" encountered some problems in one
              > >> >of its adapters or underlying systems. It stopped transferring messages
              > >> >and will try to reconnect to the adapters shortly. (The exception
              > >caught
              > >> >was weblogic.jms.bridge.internal.MessagingBridgeException.)>
              > >> >>
              > >> >> Any suggestions or comments will be really appreciated.
              > >> >>
              > >> >> Thanks
              > >> >> Suresh
              > >> >
              > >
              

Maybe you are looking for