开发者

Generating *.WAR (64bits x 32bits)

Is there any difference generating a *.war file using a 64bits VM rather than 32bits?

I'm facing an issue after deploy an application using a new laptop I’ve bought recently - Windows 7 and AMD 64bits processor. I didn’t touch in any application source code, but when generating the *.war through the Eclipse/Galileo and then deploy it into the server I’ve got an “Permgen Space” exception in runtime whenever I’m trying to show any report - built in Jasper Report - on the server side, locally all of them and also the old *.war file generated through my old computer (32bits)1 are working fine.

Following some details regarding the boxes:

Locally:

  • Java 1.6.0_18 (64 bits)
  • Apache Tomcat/6.0.20

Server side:

  • Java 1.6.0_07 (32 bits)
  • Apache Tomcat/6.0.20

Here you can see the exception logged:

javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:295)
org.apache.struts.actions.DispatchA开发者_Go百科ction.execute(DispatchAction.java:170)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
br.com.innosoft.jzytho.framework.struts.action.AcessoAction.processActionPerform(AcessoAction.java:166)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

Let me know if you need any further detail.

Thanks in advance.


Generally: No.

I use the exact same scripts to build wars for our applications in dev through production. All production server are now 64bit but have been in the past 32bit. Some dev boxes are 64bit, some 32bit but all use the same mechanism for packaging wars.

Permgen space is a memory issue related to available memory and class metadata which is affected by processor/os architecture.

here's a discussion of this: Explaining java.lang.OutOfMemoryError: PermGen space

Short answer is add a jvm startup parameter -XX:PermSize=64m or --XX:PermSize=128m when starting up the jvm on the 32bit platform.


There is no difference if you generate the WAR file using a 64bits VM or a 32bits. The WAR is basically a ZIP file format. The file format does not change with the VM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜