Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet is not available

 
sarita rane
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends

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
Bartender
Posts: 2848
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If parameters is defined as Map<String, String>, then so should repparams.
 
sarita rane
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


Is this version issue? what version POI I should user for jdk1.5 in linux machine
 
Sumit Patil
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Moores
Bartender
Posts: 2848
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic