• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Unable to compile classes for jsps

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing errors in compiling JSP on server startup -tomcat 7.0.9 and jdk1.8.0
Error is below  Any help is appreciated .
un 13, 2019 9:12:40 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /communication-framework threw load() exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [1] in the generated java file: [D:\workspace\exceed_CIC11jun\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\work\Catalina\localhost\communication-framework\org\apache\jsp\jsp\IAPMon_jsp.java]
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:138)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Jun 13, 2019 9:12:40 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jun 13, 2019 9:12:40 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8016"]
Jun 13, 2019 9:12:40 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 78524 ms

thanks
 
Saloon Keeper
Posts: 5581
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the JSP importing java.util.Map?
 
jenny jackson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it is importing java.util.map in jsp
 
Saloon Keeper
Posts: 2619
329
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:Is the JSP importing java.util.Map?

jenny jackson wrote:yes it is importing java.util.map in jsp


Case matters - java.util.map is not the same java.util.Map
 
jenny jackson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok
it is importing java.util.Map not java.util.map sorry
 
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us the jsp page causing the issue (IAPMon)?

I will say that you shouldn't have any Java code in your JSP page.
That would solve this issue quite quickly.
 
Tim Moores
Saloon Keeper
Posts: 5581
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files


Looking more closely, I don't think I remember ever seeing the part about "indirectly referenced"; I'm not sure what that means.
 
Dave Tolls
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only ever seen that with third party things where a jar file is missing or of the wrong version.
 
Marshal
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:I've only ever seen that with third party things where a jar file is missing or of the wrong version.



I've seen it in Eclipse when its link to the JDK is broken for some reason. It may be that the poster's version of Tomcat doesn't have a JDK, or Tomcat doesn't know where it is... sorry, I don't have that sort of experience so I'm just speculating.
 
jenny jackson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only ever seen that with third party things where a jar file is missing or of the wrong version.

i added jasper.jar the errors are not there now
 
Dave Tolls
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have no idea why the lack of Jasper would result in that error, but at least it seems to compile now!
 
Bartender
Posts: 20842
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:Well, I have no idea why the lack of Jasper would result in that error, but at least it seems to compile now!



JaSPer is the Tomcat JSP compiler and is a core component of Tomcat. If it's missing, then Tomcat must have been seriously corrupted and at that point all bets are off.
 
Dave Tolls
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahhh!
Sorry.
Yes.
That makes sense now.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!