The moose likes Servlets and the fly likes servlet is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet is not available" Watch "servlet is not available" New topic

servlet is not available

sarita rane

Joined: May 26, 2011
Posts: 4

I wrote a servlet to convert jasper report to excel, code is as follows:

I also mapped servlet in web.xml

But now when I try to access servlet I got error 'servlet is not available'
In log i got following error

signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/util/Map;)V) Incompatible argument to function

I a trying to access servlet by code "/datanet/ExcelReportServlet"

Please help.
Tim Moores

Joined: Sep 21, 2011
Posts: 2413
If parameters is defined as Map<String, String>, then so should repparams.
sarita rane

Joined: May 26, 2011
Posts: 4
Thanks for reply

similar function is also use in another servlet , and that is working fine.
as follows:

One more thing program is running in linux machine with jdk 1.5

sarita rane

Joined: May 26, 2011
Posts: 4

I use POI lib. version is 2.5.

Log content are as follows:

SEVERE: Allocate exception for servlet ExcelReportServlet
java.lang.VerifyError: (class: ExcelReportServlet, method: IreportToExcelFile signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljava/util/Map;)V) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(
at java.lang.Class.getConstructor0(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
at org.apache.catalina.core.StandardWrapper.loadServlet(
at org.apache.catalina.core.StandardWrapper.allocate(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.authenticator.SingleSignOn.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$

Is this version issue? what version POI I should user for jdk1.5 in linux machine
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

You are using POI lib version 2.5, can you please check if the classpath is referring to this version or some other version of POI lib.
Try to compile your servlet in some other machine and then run it.

Check This

Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
Tim Moores

Joined: Sep 21, 2011
Posts: 2413
Regardless of what else is going on, run -don't walk- to upgrade POI to something much more recent, like version 3.8. 2.5 has been obsolete for a very, very long time.
I agree. Here's the link:
subject: servlet is not available
It's not a secret anymore!