Ganesh Sugumaran

Greenhorn
+ Follow
since Jul 08, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ganesh Sugumaran

Thanks for your reply.
My task is to open a large file in READ&WRITE mode and i need to search some portion of text in that file by searching starting and end point.
Then i need to write that searched area of text to a new file and delete that portion from the original file.

The above process i will do more times.
So I thought that for these process, it will be easy by loading the file into memory by CharBuffer and can search easily by MATCHER class.

Above is my task, then now suggest me some efficient ways.
Note that my file size will be more and using JAVA only i've to do these things.

Thanks in Advance...
14 years ago
Thanks for suggestion.

But I've to do in JAVA only.
14 years ago
Yes. I knew that minimum is not a big consideration.
The reason why im using CharBuffer is , using this im matching a particular string n no of times.
My code is follows

After Execution of above code i m getting a part of CharSequence from the above CharBuffer for another search(again Matching process).
So i thought that, for these process(file read and matching process) if i use CharBuffer then it will be faster as well.
So Guide me How to overcome HeapSpace Memory Problem.
Is there any other way to read and matching process in efficient way ??
i remember you that file size is more.
14 years ago
Hi
I want to read a file which has size of more than 300 MB.
While i m executing my code, i m getting

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space


Below is my code

Im getting the exception in the line 2.
Even though i increased the Heap space up to 900 Mb, i m getting this error.
(FYI)
I executed in command prompt like below,

java -Xms128m -Xmx1024m readLargeFile


Kindly give a solution for this. is there any other best way to read large text file ??
I m waiting for your reply..
Thanks in advance
14 years ago
Hi
I want to read a file which has size of more than 300 MB.
While i m executing my code, i m getting

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space


Below is my code

Im getting the exception in the line 2.
Even though i increased the Heap space up to 900 Mb, i m getting this error.
(FYI)
I executed in command prompt like below,

java -Xms128m -Xmx1024m readLargeFile


Kindly give a solution for this. is there any other best way to read large text file ??
I m waiting for your reply..
Thanks in advance
14 years ago
15 years ago
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.index_jsp._jspService(index_jsp.java:437)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
org.apache.jsp.index_jsp._jspx_meth_html_005fform_005f0(index_jsp.java:454)
org.apache.jsp.index_jsp._jspService(index_jsp.java:417)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the JBoss Web/2.1.1.CR3 logs.
15 years ago
Hi,

Im doing project Struts1.2 and App-Server: jboss-5.0.0.CR1

Im getting error when i give below URL
"http://localhost:8080/myprj/index.jsp"
Error:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection

If i give URL like:
"http://localhost:8080/myprj/index.do" -- actually its wrong
then its giving error on page
and Finally if enter Previous one i.e.,
"http://localhost:8080/myprj/index.jsp"

Then its working and its not throwing any exception.I dont know how now only its working !!!

In my Jsp i specified
<html:form action="/indexAction">
and in Struts-config.xml

<action
attribute="index"
name="index"
parameter="userOption"
path="/indexAction"
scope="request"
type="com.actions.indexAction">
<forward name="success" path="/main.jsp" />
<forward name="failure" path="/index.jsp" />
</action>

If i do the same in 'jboss-4.0.3' then its working in the first attempt.

I want to run in 'jboss-5.0.0.CR1'.

how can i solve this...and how can i run like 'jboss-4.0.3'

Thanks
15 years ago
Hi,

Im doing project Struts1.2 and App-Server: jboss-5.0.0.CR1

Im getting error when i give below URL
"http://localhost:8080/myprj/index.jsp"
Error:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection

If i give URL like:
"http://localhost:8080/myprj/index.do" -- actually its wrong
then its giving error on page
and Finally if enter Previous one i.e.,
"http://localhost:8080/myprj/index.jsp"

Then its working and its not throwing any exception.I dont know how now only its working !!!

In my Jsp i specified
<html:form action="/indexAction">
and in Struts-config.xml

<action
attribute="index"
name="index"
parameter="userOption"
path="/indexAction"
scope="request"
type="com.actions.indexAction">
<forward name="success" path="/main.jsp" />
<forward name="failure" path="/index.jsp" />
</action>

If i do the same in 'jboss-4.0.3' then its working in the first attempt.

I want to run in 'jboss-5.0.0.CR1'.

how can i solve this...and how can i run like 'jboss-4.0.3'

Thanks
15 years ago
Hi,

Im doing project Struts1.2 and App-Server: jboss-5.0.0.CR1

Im getting error when i give below URL
"http://localhost:8080/myprj/index.jsp"
Error:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection

If i give URL like:
"http://localhost:8080/myprj/index.do" -- actually its wrong
then its giving error on page
and Finally if enter Previous one i.e.,
"http://localhost:8080/myprj/index.jsp"

Then its working and its not throwing any exception.I dont know how now only its working !!!

In my Jsp i specified
<html:form action="/indexAction">
and in Struts-config.xml

<action
attribute="index"
name="index"
parameter="userOption"
path="/indexAction"
scope="request"
type="com.actions.indexAction">
<forward name="success" path="/main.jsp" />
<forward name="failure" path="/index.jsp" />
</action>

If i do the same in 'jboss-4.0.3' then its working in the first attempt.

I want to run in 'jboss-5.0.0.CR1'.

how can i solve this...and how can i run like 'jboss-4.0.3'

Thanks
15 years ago