问题描述
servlet中遇到的错误不知道怎么解决?严重:AllocateexceptionforservletMyInfoForm1java.lang.IllegalAccessException:Classorg.apache.catalina.core.DefaultInstanceManagercannotaccessamemberofclasscom.hsp.servlet.MyInfoForm1withmodifiers""atsun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)atjava.lang.Class.newInstance0(Class.java:349)atjava.lang.Class.newInstance(Class.java:308)atorg.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:116)atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1148)atorg.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2462)atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2451)atjava.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)atorg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)atjava.lang.Thread.run(Thread.java:619)
解决方案
解决方案二:
可以先将代码贴出来,供大家查看...
解决方案三:
com.hsp.servlet.MyInfoForm1这个类贴出来看看
解决方案四:
cannotaccessamemberofclasscom.hsp.servlet.MyInfoForm1withmodifiers。sir,它的意思是,好像是的MyInfoForm1中没有modifiers这个成员啊。。。
解决方案五:
com.hsp.servlet.MyInfoForm1withmodifiers""