Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Problem Implementing JSP's from WAR Files with WebLogic 5.1 - Error loading servlet: jsp_servlet._main

瀏覽次數:1 次
跳到第一則未讀訊息

John J. Feigal

未讀,
2000年8月21日 凌晨3:00:002000/8/21
收件者:
Through the weblogic.developer.interest.environment newsgroup last week, I
learned that the current release of WebLogic 5.1 does not support EAR files.
As a result we are modifying our approach to use a WAR file.

We successfully implemented the simple cookieWar.war example by placing the
cookieWar.war file in d:\weblogic\myserver and adding
weblogic.httpd.webApp.cookie=d:/weblogic/myserver/cookieWar.war to our
weblogic.properties file.

With this success under our belts, we are trying to move an existing web
application from another J2EE web application server environment to WebLogic
5.1 (for simplicity's sake, let's call the web application "edapt").
"edapt" is more complex than the cookieWar.war example in that the
application includes JSP files.

WebLogic 5.1 is installed on a Windows NT 4.0 system.

WebLogic 5.1 was purchased and received at the end of July and was installed
"out of the box". I assume this means that we don't have any service packs
installed.

Our questions are:
WebLogic was able to locate main.jsp in the WAR file and compile it. It
placed _main.class in d:\weblogic\myserver\_tmp_war\jsp_servlet. So my
questions are:
1. Why was the compiled class file named _main.class instead of main.class?
2. Why was _main.java deleted since the keepgenerated parameter was set to
true in the weblogic.properties file?
3. Did we correctly define the necessary classpath/CLASSPATH definitions?
If not, which definitions are incorrect and what should be the correct
definitions?
4. Is our problem addressed by any service pack which we do not have
installed?

Based upon other recent newsgroup postings, I understand that even if we get
this set up correctly we might encounter ClassCastException problems. I
still would like to resolve the current issue before we move ahead with
installing the web application without using a WAR file. We really wanted
to get a WAR file installation working to simplify the installation and
setup process.

Hopefully, this is not too confusing and someone will be able to help clear
this up for us.

Below is information documenting our WebLogic setup and runtime problem.

----------------------------------------------------------------------

We have placed edaptWar.war into d:\weblogic\myserver and added weblogic and
modifed the weblogic.properties file to include
weblogic.httpd.webApp.edapt=d:/weblogic/myserver/edaptWar.war. We have
also, changed weblogic.propeties to activate JSPServlet processing as
follows:
weblogic.httpd.register.*.jsp=\
weblogic.servlet.JSPServlet
weblogic.httpd.initArgs.*.jsp=\
pageCheckSeconds=1,\
compileCommand=D:/jdk1.2.2/bin/javac.exe,\
workingDir=D:/weblogic/myserver/_tmp_war/,\
keepgenerated=true,\
verbose=true

weblogic.httpd.servlet.classpath=\
/weblogic/myserver/servletclasses;/weblogic/myserver/_tmp_war

(We have included _tmp_war because WebLogic has created this directory
during the "expansion" of the WAR file. A high level question is "Should
_tmp_war be included in any of our definitions since it was created on the
fly by WebLogic?")

startWebLogic.cmd has been modified as follows for setting classpath and
WEBLOGIC_CLASSPATH:
:runWebLogicJava
set EDAPT_CLASSPATH=D:\Weblogic\myserver\_tmp_war
set
WEBLOGIC_CLASSPATH=.\license;.\classes;.\lib\weblogicaux.jar;.\myserver\serv
erclasses;%EDAPT_CLASSPATH%

if "%PRE_CLASSPATH%" NEQ "" set
WEBLOGIC_CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%

if "%POST_CLASSPATH%" NEQ "" set
WEBLOGIC_CLASSPATH=%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%

%JAVA_HOME%\bin\java -ms64m -mx64m -classpath
%JAVA_CLASSPATH%;%EDAPT_CLASSPATH% -Dweblogic.class.path=%WEBLOGIC_CLASSPATH
% -Dweblogic.home=. -Djava.security.manager -Djava.security.policy==.\weblog
ic.policy -Densodex.edapt.directory="D:\eDapt\zxip\runtime" weblogic.Server
goto finish


When we enter http://localhost:7001/edapt from the browser command line,
the initial screen is displayed successfully in the browser. When we click
on a link in the browser display to continue, the next screen to be
displayed should be the result of the execution of a JSP servlet. When we
click on the link, instead of the next application screen, we see "Error
500: Internal Server Error. The following error is generated to the
weblogic.log in d:\weblogic\myserver:

Mon Aug 21 11:55:59 CDT 2000:<I> <ServletContext-edapt> Generated java file:
D:\weblogic\myserver\_tmp_war\jsp_servlet\_main.java
Mon Aug 21 11:56:01 CDT 2000:<E> <ServletContext-edapt> Error loading
servlet: jsp_servlet._main
java.lang.ClassNotFoundException: jsp_servlet._main
at weblogic.boot.ServerClassLoader.findLocalClass(ServerClassLoader.java,
Compiled Code)
at weblogic.boot.ServerClassLoader.loadClass(ServerClassLoader.java,
Compiled Code)
at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
at
weblogic.utils.classloaders.GenericClassLoader.parentLoadClass(GenericClassL
oader.java:487)
at
weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(GenericClassL
oader.java, Compiled Code)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.
java:172)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.
java:146)
at weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:435)
at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:291)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:185)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:16
4)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:99)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:742)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:686)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

Mon Aug 21 11:56:01 CDT 2000:<E> <ServletContext-edapt> Servlet failed with
Exception
javax.servlet.ServletException: Servlet class: jsp_servlet._main could not
be loaded - the requested class wasn't found in the classpath
D:\weblogic\myserver\edaptWar.war;D:\weblogic\myserver\_tmp_war\xerces.jar
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:299)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:185)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:16
4)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:99)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:742)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:686)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

--
John J. Feigal Voice (651)766-8787 (main)
Sr. Technical Consultant (651)766-7249 (direct)
Ensodex, Inc. Fax (651)766-8792
4105 N. Lexington Ave., Suite 150 email jfe...@ensodex.com
Arden Hills, MN 55126 WebSite http://www.ensodex.com

0 則新訊息