Nikolas cage

Greenhorn
+ Follow
since Jun 24, 2019
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 Nikolas cage

I have changed the names to make it easier for reader! The error says the problem happened in the first line of calling another class' method. Anyway thank you.
2 weeks ago
I did but it didn't change anything, because the error is from this line:
2 weeks ago
Actually I changed it as below


And I have also changed the methods of class AnotherClass to static. It prints 4, makes the file in folder “report”, and makes error like as:

<4-Jul-2019 9:33:11 o'clock AM EDT> <Error> <HTTP> <BEA-101017> <[ServletContext@15258489[app:excel1 module:excel1 path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@1dbe7a1[
GET /excel1/Main HTTP/1.1
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.3.6 (java 1.5)
Accept-Encoding: gzip,deflate

]] Root cause of ServletException.
java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook
at process.Main.doGet(Main.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:335)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Truncated. see log file for complete stacktrace
>

It seems it can’t run AnotherClass which provides information inside of excel sheet.
2 weeks ago
Dear Paul,
I am working on that in two ways, first make it from the base in the servlet, and change the main method to servlet and use of other classes. I am learning servlet and working on this everyday. I appreciate you for your attention but I prefer work on that by myself and ask from a person who helps without making me feel obligated.
2 weeks ago
It does not work.

I am trying to skip/remove Main class.



It's not working yet.
3 weeks ago

Paul Clapham wrote:Then it would help if you told us what the problem is.



I do not know how I should complete the code I already posted.
3 weeks ago
Hi, thank you Paul and Tim for replying,
I know in servlet we do not need main method. I have problem to change Main class and servlet to call method in the Main class. I am trying to revise the classes.



And for servlet:



I appreciate you for helping.
Meisam
3 weeks ago
Thank you Paul,
Actually I made a simple mistake in the code. I made it shorter and simpler.


I am not good in java yet, do you recommend to change the structure? How should I call it in servlet? If I put the main method in doGet method, then how should I handle the constructor?

Thanks,
Meisam
3 weeks ago
Hi everyone,

I have a full code in java which works well, it has 4 classes, in main class I have constructor which call another class. I want to run it in servlet application. I wrote all codes and the forms in servlet and I am looking for a way to call main method in servlet class, is it possible? and does it handle constructor method too? If not how should write the main method and constructor in servlet.



I really appreciate if anyone can helps me.
3 weeks ago