HomeDocumentation > Debugging and Troubleshooting > Development issues
{scrollbar}

Troubleshooting Eclipse

Finding errors in Eclipse error log view

If any errors is reported by Eclipse, you can see details about the error in Error Log 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:

  1. Click Window, and then Show View-> Other.
  2. Expand General and click Error Log.
  3. Click OK. The Error Log view displays.

Troubleshooting Java EE asset deployment

Coexistence of <sec:security> and <dep:gbean> results in error in application deployment plan on Eclipse 3.5

If you use both <sec:security> and <dep:gbean> elements in this deployment plan geronimo-application.xml 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 Eclipse bug for more information about this problem.
To prevent Eclipse from reporting this type of errors, follow these steps:

  1. Click Window->Preferences.
  2. Expand XML and then XML Files.
  3. Select Validation. Deselect Honour all XML schema locations.
  4. Click Apply.
  5. Close the deployment plan and reopen it. Eclipse won't report this type of errors again.

Managed beans not found exceptions when using annotation

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.

xmlfaces-config.xml <faces-config version="2.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-facesconfig_2.0.xsd"> </faces-config>

Troubleshooting Container problems

Enable JSP&Servlet reloading for Tomcat

By default, JPS&Servlet reloading is disabled for performance reasons. Refer to the following steps to enable JSP&Servlet reloading for Tomcat web container:

  1. Stop the server if it is running;
  2. Open <Geronimo_Home>/var/catalina/conf/web.xml in edit mode;
  3. Locate <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> in the web.xml file;
  4. Change the value of development from false to true. The changed parameter will be like web.xml <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>development</param-name> <param-value>true</param-value> </init-param>
  5. You can add the following code snippet into the web.xml under the above mentioned servlet class. web.xml <init-param> <param-name>modificationTestInterval</param-name> <param-value>10</param-value> </init-param> where modificationTestInterval 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.

Use OpenEJB startup options in Geronimo

OpenEJB has lots of startup options as documented here. In Geronimo, you can use system variable GERONIMO_OPTS to pass through these options. For example, to configure local.copy option in Geronimo, you can use the following command before the server is started.

On a Windows system: set GERONIMO_OPTS=-Dopenejb.localcopy=false
On a Unix-like system: export GERONIMO_OPTS=-Dopenejb.localcopy=false

configuring defaultJspServlet parameters to enable development mode

You can override xml attributes in config.xml by configuring defaultJspServlet parameters to enable development mode for JSP and servelets as followed in Tomcat assembly. You need to replicate the same Jasper configuration for jetty8-deployer if you are using Jetty assembly.

xmlconfig.xml ... <module name="org.apache.geronimo.configs/jasper-deployer/3.0-SNAPSHOT/car"> <gbean name="JspModuleBuilderExtension"> <attribute name="defaultJspServlet" propertyEditor="org.apache.geronimo.web25.deployment.utils.WebAppXmlAttributeBuilder"> <web-app:web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web-app="http://java.sun.com/xml/ns/javaee"> <servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>development</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>trimSpaces</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>logVerbosityLevel</param-name> <param-value>DEBUG</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>engineOptionsClass</param-name> <param-value>org.apache.geronimo.jasper.JspServletOptions</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> <url-pattern>*.jspf</url-pattern> <url-pattern>*.jspx</url-pattern> <url-pattern>*.xsp</url-pattern> </servlet-mapping> </web-app:web-app> </attribute> </gbean> </module> <module name="org.apache.geronimo.configs/tomcat7-deployer/3.0-SNAPSHOT/car"> <gbean name="TomcatWebBuilder"> <attribute name="jspServlet" propertyEditor="org.apache.geronimo.web25.deployment.utils.WebAppXmlAttributeBuilder"> <web-app:web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web-app="http://java.sun.com/xml/ns/javaee"> <servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>development</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>trimSpaces</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>logVerbosityLevel</param-name> <param-value>DEBUG</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>engineOptionsClass</param-name> <param-value>org.apache.geronimo.jasper.JspServletOptions</param-value> </init-param> </servlet> </web-app:web-app> </attribute> </gbean> </module> ...