Solaris 10 SPARC WebLogic JSP编译错误解决

http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=37385

Solaris 10 SPARC WebLogic 8.1.5下
Spring 1.2.8
Hibernate 3.1.3

出现JSP编译错误

同样在Windows下面没有问题,不解中。。。

0821 18:46:19:250XmlWebApplicationContext:215]- Publishing event in context [WebApplicationContext for namespace 'dispatcherServlet-servlet']: Request
HandledEvent: url=[/cms/Login.do]; time=[67ms]; client=[198.24.9.248]; method=[GET]; servlet=[dispatcherServlet]; session=[null]; user=[null]; status=
[failed: java.lang.ClassCastException]
0821 18:47:54:472DispatcherServlet:849]- Testing handler map [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping@1b11524] in DispatcherSe
rvlet with name 'dispatcherServlet'
0821 18:47:54:478SimpleUrlHandlerMapping:134]- Looking up handler for [/Login.do]
0821 18:47:54:482DispatcherServlet:888]- Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@e31969]
0821 18:47:54:485DispatcherServlet:795]- Last-Modified value for [/cms/Login.do] is [-1]
0821 18:47:54:489DispatcherServlet:638]- DispatcherServlet with name 'dispatcherServlet' received request for [/cms/Login.do]
0821 18:47:54:493DispatcherServlet:888]- Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@e31969]
0821 18:47:54:497SSOController:321]- Displaying new form
0821 18:47:54:501SSOController:329]- Creating new command of class [com.ericsson.ctsn.cms.web.formbean.LoginForm]
0821 18:47:54:506CachedIntrospectionResults:101]- Using cached introspection results for class [com.ericsson.ctsn.cms.web.formbean.LoginForm]
0821 18:47:54:513DispatcherServlet:963]- Rendering view [org.springframework.web.servlet.view.InternalResourceView: name 'Login'; URL [/WEB-INF/jsp/Lo
gin.jsp]] in DispatcherServlet with name 'dispatcherServlet'
0821 18:47:54:517InternalResourceView:234]- Rendering view with name 'Login' with model {command=com.ericsson.ctsn.cms.web.formbean.LoginForm@ad5867,
org.springframework.validation.BindException.command=org.springframework.validation.BindException: BindException: 0 errors} and static attributes {}
0821 18:47:54:521InternalResourceView:141]- Added model object 'org.springframework.validation.BindException.command' of type [org.springframework.val
idation.BindException] to request in InternalResourceView 'Login'
0821 18:47:54:531InternalResourceView:141]- Added model object 'command' of type [com.ericsson.ctsn.cms.web.formbean.LoginForm] to request in Internal
ResourceView 'Login'
0821 18:47:54:550DispatcherServlet:411]- Could not complete request
java.lang.ClassCastException
        at antlr.CharScanner.makeToken(CharScanner.java:173)
        at weblogic.servlet.jsp.JspLexer.mWORD(JspLexer.java:4723)
        at weblogic.servlet.jsp.JspLexer.mPAGE_DIRECTIVE_ATTRIBUTES(JspLexer.java:5286)
        at weblogic.servlet.jsp.JspLexer.mPAGE_DIRECTIVE_BODY(JspLexer.java:5122)
        at weblogic.servlet.jsp.JspLexer.mPAGE_DIRECTIVE(JspLexer.java:4934)
        at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4756)
        at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2161)
        at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1947)
        at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1820)
        at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
        at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
        at weblogic.servlet.jsp.JspParser.parse(JspParser.java:234)
        at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
        at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
        at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:396)
        at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:246)
        at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:196)
        at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:598)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:406)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
        at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:328)
        at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:111)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:965)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:744)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:348)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
0821 18:47:54:558XmlWebApplicationContext:215]- Publishing event in context [WebApplicationContext for namespace 'dispatcherServlet-servlet']: Request
HandledEvent: url=[/cms/Login.do]; time=[69ms]; client=[198.24.9.248]; method=[GET]; servlet=[dispatcherServlet]; session=[null]; user=[null]; status=
[failed: java.lang.ClassCastException]

拿直原始的武器来解决原始的问题:)

一、找这个类antlr.CommonToken
F:\>java -cp . JarClassFind D:\BEA\WebLogic81 antlr.CommonToken
Find class [antlr.CommonToken] in Path [D:\BEA\WebLogic81] Results:
No.1
Jar Package:D:\BEA\WebLogic81\server\lib\weblogic.jar
antlr/CommonToken.class
Find Process Ended! Total Results:1

2、分析配置文件
由于我在weblogic.xml里设置前加载
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

而且我的WEB-INF\lib\下有antlr-2.7.6rc1.jar的包,于是冲突了!导致ClassCastException

三、解决方法:
1、去掉前加载的配置;
2、去掉应用WEB-INF\lib\下的包含antlr.CommonToken类的antlr-2.7.6rc1.jar的包

发布了131 篇原创文章 · 获赞 14 · 访问量 60万+
展开阅读全文

Tomcat启动有时报错有是正常

05-23

应用部署好以后启动tomcat,有时会报错,有时能正常启动。 (期间没有对程序做任何修改) 报如下错: Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:637) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1290) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1257) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:262) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1162) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333) at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113) 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览