geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Development issues
Date Mon, 08 Aug 2011 03:09:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Development+issues">Development
issues</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua
Chi</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" ># Close the deployment plan and reopen
it. Eclipse won&#39;t report this type of errors again. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h2.
Managed beans not found exceptions when using annotation <br>This could happen if you
have used {{@ManagedBean}} annotation in your application, while according to JSF 2.0 specification,
only those jar files which contains a {{faces-config.xml}} in its {{/META-INF}} folder will
be scanned. You need to manually add a {{faces-config.xml}} file in the {{/META-INF}} of your
application if there are jar files under {{/WEB-INF/lib/}} directory which have @ManagedBean
annotation definition in jar files. <br>{code:xml|title=faces-config.xml} <br>&lt;faces-config
version=&quot;2.0&quot; <br>              xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;
<br>              xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
<br>              xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2.0.xsd&quot;&gt;
<br> <br>&lt;/faces-config&gt; <br>{code} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h1. Troubleshooting Container problems
<br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/Debugging+OSGi+problems"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/Debugging+OSGi+problems">Debugging
OSGi problems</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Debugging+and+Troubleshooting"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Debugging+and+Troubleshooting">Debugging and Troubleshooting</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/Runtime+issues">Runtime
issues</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Runtime+issues"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<div>
<ul>
    <li><a href='#Developmentissues-TroubleshootingEclipse'>Troubleshooting Eclipse</a></li>
<ul>
    <li><a href='#Developmentissues-FindingerrorsinEclipseerrorlogview'>Finding
errors in Eclipse error log view</a></li>
</ul>
    <li><a href='#Developmentissues-TroubleshootingJavaEEassetdeployment'>Troubleshooting
Java EE asset deployment</a></li>
<ul>
    <li><a href='#Developmentissues-Coexistenceof%3Csec%3Asecurity%3Eand%3Cdep%3Agbean%3EresultsinerrorinapplicationdeploymentplanonEclipse3.5'>Coexistence
of &lt;sec:security&gt; and &lt;dep:gbean&gt; results in error in application
deployment plan on Eclipse 3.5</a></li>
    <li><a href='#Developmentissues-Managedbeansnotfoundexceptionswhenusingannotation'>Managed
beans not found exceptions when using annotation</a></li>
</ul>
    <li><a href='#Developmentissues-TroubleshootingContainerproblems'>Troubleshooting
Container problems</a></li>
<ul>
    <li><a href='#Developmentissues-EnableJSP%26ServletreloadingforTomcat'>Enable
JSP&amp;Servlet reloading for Tomcat</a></li>
    <li><a href='#Developmentissues-UseOpenEJBstartupoptionsinGeronimo'>Use OpenEJB
startup options in Geronimo</a></li>
</ul>
</ul></div>

<h1><a name="Developmentissues-TroubleshootingEclipse"></a>Troubleshooting
Eclipse</h1>

<h2><a name="Developmentissues-FindingerrorsinEclipseerrorlogview"></a>Finding
errors in Eclipse error log view</h2>
<p>If any errors is reported by Eclipse, you can see details about the error in <b>Error
Log</b> view of Eclipse. When errors occur, only Eclipse Galileo will place this view
in front of other views. In Eclipse Europa or Ganymede, you have to take these steps to find
this view:</p>
<ol>
	<li>Click <b>Window</b>, and then <b>Show View-&gt; Other</b>.</li>
	<li>Expand <b>General</b> and click <b>Error Log</b>.</li>
	<li>Click <b>OK</b>. The Error Log view displays.</li>
</ol>



<h1><a name="Developmentissues-TroubleshootingJavaEEassetdeployment"></a>Troubleshooting
Java EE asset deployment </h1>

<h2><a name="Developmentissues-Coexistenceof%3Csec%3Asecurity%3Eand%3Cdep%3Agbean%3EresultsinerrorinapplicationdeploymentplanonEclipse3.5"></a>Coexistence
of &lt;sec:security&gt; and &lt;dep:gbean&gt; results in error in application
deployment plan on Eclipse 3.5</h2>
<p>If you use both &lt;sec:security&gt; and &lt;dep:gbean&gt; elements
in this deployment plan <tt>geronimo-application.xml</tt> for your EAR, Eclipse
3.5 reports an error. This is because the XML editor in Eclipse 3.5 cannot recognize multiple
aliases in the naming space. However, this application can be deployed on the server successfully
even though Eclipse 3.5 reports an error in the plan. See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284272"
class="external-link" rel="nofollow">Eclipse bug</a> for more information about this
problem.<br/>
To prevent Eclipse from reporting this type of errors, follow these steps:</p>
<ol>
	<li>Click <b>Window-&gt;Preferences</b>.</li>
	<li>Expand <b>XML</b> and then <b>XML Files</b>.</li>
	<li>Select <b>Validation</b>. Deselect <b>Honour all XML schema locations</b>.</li>
	<li>Click <b>Apply</b>.</li>
	<li>Close the deployment plan and reopen it. Eclipse won't report this type of errors
again.</li>
</ol>


<h2><a name="Developmentissues-Managedbeansnotfoundexceptionswhenusingannotation"></a>Managed
beans not found exceptions when using annotation</h2>
<p>This could happen if you have used <tt>@ManagedBean</tt> annotation in
your application, while according to JSF 2.0 specification, only those jar files which contains
a <tt>faces-config.xml</tt> in its <tt>/META-INF</tt> folder will
be scanned. You need to manually add a <tt>faces-config.xml</tt> file in the <tt>/META-INF</tt>
of your application if there are jar files under <tt>/WEB-INF/lib/</tt> directory
which have @ManagedBean annotation definition in jar files.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>faces-config.xml</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
&lt;faces-config version=<span class="code-quote">"2.0"</span>
              xmlns=<span class="code-quote">"http://java.sun.com/xml/ns/javaee"</span>
              <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
              xsi:schemaLocation=<span class="code-quote">"http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2.0.xsd"</span>&gt;

<span class="code-tag">&lt;/faces-config&gt;</span>
</pre>
</div></div>

<h1><a name="Developmentissues-TroubleshootingContainerproblems"></a>Troubleshooting
Container problems</h1>

<h2><a name="Developmentissues-EnableJSP%26ServletreloadingforTomcat"></a>Enable
JSP&amp;Servlet reloading for Tomcat</h2>
<p>By default, JPS&amp;Servlet reloading is disabled for performance reasons. Refer
to the following steps to enable JSP&amp;Servlet reloading for Tomcat web container:</p>
<ol>
	<li>Stop the server if it is running;</li>
	<li>Open &lt;Geronimo_Home&gt;/var/catalina/conf/web.xml in edit mode;</li>
	<li>Locate &lt;servlet-class&gt;org.apache.jasper.servlet.JspServlet&lt;/servlet-class&gt;
in the web.xml file;</li>
	<li>Change the value of <em>development</em> from false to true. The changed
parameter will be like
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>web.xml</b></div><div class="codeContent
panelContent">
<pre class="code-java">
    &lt;servlet-class&gt;org.apache.jasper.servlet.JspServlet&lt;/servlet-class&gt;
        &lt;init-param&gt;
            &lt;param-name&gt;development&lt;/param-name&gt;
            &lt;param-value&gt;<span class="code-keyword">true</span>&lt;/param-value&gt;
        &lt;/init-param&gt;
</pre>
</div></div></li>
	<li>You can add the following code snippet into the web.xml under the above mentioned
servlet class.
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>web.xml</b></div><div class="codeContent
panelContent">
<pre class="code-java">    
        &lt;init-param&gt;
            &lt;param-name&gt;modificationTestInterval&lt;/param-name&gt;
            &lt;param-value&gt;10&lt;/param-value&gt;
        &lt;/init-param&gt;
</pre>
</div></div>
<p>where <em>modificationTestInterval</em> is the time in seconds, which
configures the server for JSP reloading interval. In the above configuration, the changes
will be reloaded within 10 seconds.</p></li>
</ol>


<h2><a name="Developmentissues-UseOpenEJBstartupoptionsinGeronimo"></a>Use
OpenEJB startup options in Geronimo</h2>
<p>OpenEJB has lots of startup options as documented <a href="http://openejb.apache.org/3.0/startup.html"
title="OpenEJB startup Configuration" class="external-link" rel="nofollow">here</a>.
In Geronimo, you can use system variable GERONIMO_OPTS to pass through these options. For
example, to configure <tt>local.copy</tt> option in Geronimo, you can use the
following command before the server is started.</p>

<p> On a Windows system: <b>set GERONIMO_OPTS=-Dopenejb.localcopy=false</b><br/>
 On a Unix-like system: <b>export GERONIMO_OPTS=-Dopenejb.localcopy=false</b></p>



    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Development+issues">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645435&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Development+issues?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message