• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issues with welcome file list in jsf

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi , I implemented a small jsf application however the issue i am facing is that all my xhtml webpages are inside a folder called vecmgui inside the webroot. following is my web.xml file. I have placed a index.jsp page as part of vecmgui folder which does a jsp forward to login.jsf page. IAD is the context root of the app. so when i hit http://<host>:<port>/IAD/vecmgui/login.jsf itworks fine . however the moment i hit http://<host>:<port>/IAD/vecmgui/

the application runs out of memory throwing the following error in console
<Feb 16, 2010 11:34:37 PM MST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@35ee49 - appName: 'IADServlet', name: 'IAD', context-path: '/IAD'] Root cause of ServletException.
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
Truncated. see log file for complete stacktrace


Following is my web.xml file . can anybody help on this? what i am doing wrong?

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>UtilsAndProperties</servlet-name>
<servlet-class>
com.qwest.ngs.servlet.iad.IADUtilServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>IADVoip</servlet-name>
<servlet-class>com.qwest.ngs.servlet.iad.IADVoipGateServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>IADFile</servlet-name>
<servlet-class>com.qwest.ngs.servlet.iad.IADFileServlet</servlet-class>
</servlet>

<!-- Faces Servlet -->
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- / -->

<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/voips/*</url-pattern>
<!--
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
-->
</web-resource-collection>
<auth-constraint>
<role-name>iadBvoipRole</role-name>
</auth-constraint>
</security-constraint>

<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>default</realm-name>
</login-config>

<security-role>
<role-name>iadBvoipRole</role-name>
</security-role>


<servlet-mapping>
<servlet-name>UtilsAndProperties</servlet-name>
<url-pattern>pingcheck</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IADVoip</servlet-name>
<url-pattern>/voip/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IADVoip</servlet-name>
<url-pattern>/voips/*</url-pattern>
</servlet-mapping>



<servlet-mapping>
<servlet-name>IADFile</servlet-name>
<url-pattern>/@file.servlet.context.path@/*</url-pattern>
</servlet-mapping>

<!-- Faces Servlet Mapping (*.jsf files) -->
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>


<!-- JSF-RI parameters (used during debug mode) -->
<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>
<!-- / -->

<!-- use .xhtml files to render views -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- / -->

<!-- special debugging output (used in dev mode) -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- / -->

<!-- skip contextual comments -->
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<!-- / -->

<!-- Applicable Session Parameters -->
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<!-- / -->

<!-- First Rendered Page (for bootstrapping) -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- / -->
</web-app>

I
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

babai biswas wrote:



What is your memory setting?
 
Greenhorn
Posts: 13
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
add
-XX:PermSize=64M
-XX:MaxPermSize=128m

in start up java parameters.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

yun hu wrote:add
-XX:PermSize=64M
-XX:MaxPermSize=128m

in start up java parameters.



How do you know the current memory setting? What if you suggest to decrease memory?
 
yun hu
Greenhorn
Posts: 13
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.lang.OutOfMemoryError: PermGen space

The detail message PermGen space indicates that the permanent generation is full. The permanent generation is the area of the heap where class and method objects are stored. If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.

Interned java.lang.String objects are also stored in the permanent generation. The java.lang.String class maintains a pool of strings. When the intern method is invoked, the method checks the pool to see if an equal string is already in the pool. If there is, then the intern method returns it; otherwise it adds the string to the pool. In more precise terms, the java.lang.String.intern method is used to obtain the canonical representation of the string; the result is a reference to the same class instance that would be returned if that string appeared as a literal. If an application interns a huge number of strings, the permanent generation might need to be increased from its default setting.

When this kind of error occurs, the text String.intern or ClassLoader.defineClass might appear near the top of the stack trace that is printed.

The jmap -permgen command prints statistics for the objects in the permanent generation, including information about internalized String instances. See 2.6.4 Getting Information on the Permanent Generation
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

yun hu wrote:java.lang.OutOfMemoryError: PermGen space

The detail message PermGen space indicates that the permanent generation is full. The permanent generation is the area of the heap where class and method objects are stored. If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.



Thanks you for reminding , but my point is that you suggest to set


-XX:PermSize=64M
-XX:MaxPermSize=128m



while the existing setting could be something


-XX:PermSize=256m
-XX:MaxPermSize=256m



We need to know the current memory setting, before suggesting anything.
 
babai biswas
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys for all your help..it worked
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic