我正在从早期版本的weblogic(JDK 1.6)移植应用程序。开发人员通过扩展weblogic.servlet.proxy.GenericProxyServlet创建了反向代理。这在WLS 12.1a中不起作用。它可以编译,但在运行时失败,并显示以下错误:
weblogic.application.ModuleException: java.lang.IllegalAccessError: class weblogic.servlet.proxy.MailProxyServlet cannot access its superclass weblogic.servlet.proxy.GenericProxyServlet
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:175)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:170)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80)
at weblogic.work.ContextWrap.run(ContextWrap.java:40)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused By: java.lang.IllegalAccessError: class weblogic.servlet.proxy.MailProxyServlet cannot access its superclass weblogic.servlet.proxy.GenericProxyServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:412)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:366)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:80)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:50)
at weblogic.servlet.internal.AnnotationProcessingManager.processServlets(AnnotationProcessingManager.java:213)
at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotationsInWebXml(AnnotationProcessingManager.java:200)
at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotations(AnnotationProcessingManager.java:104)
at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotations(AnnotationProcessingManager.java:79)
at weblogic.servlet.internal.WebAppModule.processAnnotations(WebAppModule.java:1804)
我认为我已经看过文献,不能再以这种方式创建通用代理。其他人看到了吗?我发现有文献提出了另一种方法:https://docs.oracle.com/cd/E24329_01/web.1211/e21049/progservlet.htm#WBAPP282