jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bret Kumler" <bkum...@firstam.com>
Subject RE: Weblogic 8 problem
Date Wed, 03 Sep 2003 16:03:05 GMT
"In order to help you I would
need to know what you started the cactus test"

I'm using the browser
http://server:port/mywebapp/ServletTestRunner?suite=mytestcase

"whether you put any jar
in the system classpath or somewhere else, etc."

Here's what my ear file contains.

WEB-INF\lib\aspectjrt.jar
WEB-INF\lib\cactus.jar
WEB-INF\lib\cactus-ant.jar
WEB-INF\lib\common.jar                    -->Our code
WEB-INF\lib\commons-httpclient.jar
WEB-INF\lib\commons-lang-1.0.1.jar
WEB-INF\lib\commons-logging.jar
WEB-INF\lib\entitlement.jar			-->Our code
WEB-INF\lib\httpunit.jar
WEB-INF\lib\junit.jar
WEB-INF\lib\log4j.jar
WEB-INF\lib\nekohtml.jar
WEB-INF\lib\pm.jar
WEB-INF\lib\qa-test.jar				-->Our test code
WEB-INF\lib\security.jar			-->Our code
WEB-INF\lib\servletapi.jar
WEB-INF\lib\xalan2.5.jar
WEB-INF\lib\xercesImpl.jar

My system classpath is empty, I set all classpaths in shell or batch files.

Here's my startWeblogic.cmd contents.


ECHO OFF

@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this
configuration.

SETLOCAL

@REM
*************************************************************************
@REM This script is used to start WebLogic Server for this domain.
@REM
@REM To create your own start script for your domain, you can initialize the
@REM environment by calling C:\bea811\weblogic81\common\bin\commEnv.cmd.
@REM
@REM commEnv.cmd initializes following variables:
@REM
@REM BEA_HOME       - The BEA home directory of your WebLogic installation.
@REM JAVA_HOME      - Location of the version of Java used to start WebLogic
@REM                  Server.
@REM JAVA_VENDOR    - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
@REM PATH           - JDK and WebLogic directories are added to system path.
@REM WEBLOGIC_CLASSPATH
@REM                - Classpath needed to start WebLogic Server.
@REM JAVA_VM        - The java arg specifying the VM to run.  (i.e.
@REM                  -server, -hotspot, etc.)
@REM MEM_ARGS       - The variable to override the standard memory arguments
@REM                  passed to java.
@REM POINTBASE_HOME - Point Base home directory.
@REM POINTBASE_CLASSPATH
@REM                - Classpath needed to start PointBase.
@REM
@REM Other variables used in this script include:
@REM SERVER_NAME    - Name of the weblogic server.
@REM STARTMODE      - Set to true for production mode servers, false for
@REM                  development mode.
@REM JAVA_OPTIONS   - Java command-line options for running the server.
(These
@REM                  will be tagged on to the end of the JAVA_VM and
@REM                  MEM_ARGS)
@REM
@REM For additional information, refer to the WebLogic Server Administration
@REM Console Online
Help(http:\\e-docs.bea.com\wls\docs81\ConsoleHelp\startstop.html).
@REM
*************************************************************************

set WL_HOME=C:\bea\weblogic81
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set JAVA_VENDOR=Sun

set JAVA_HOME=C:\bea\jdk141_03
for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsi

set SAMPLES_HOME=%WL_HOME%\samples

set DOMAIN_HOME=C:\bea\user_projects\domains\wldomain
for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi

if "%DEBUG_PORT%"=="" (
	set DEBUG_PORT=8453
)

if "%SERVER_NAME%"=="" (
	set SERVER_NAME=myserver
)

set DB_DB=workshop

set debugFlag=true
set specialFlag=false
set WLS_PRODUCTION_MODE=
set testConsoleFlag=true
set iterativeDevFlag=true
set logErrorsToConsoleFlag=true
set pointbaseFlag=true
set profileFlag=false
set doExitFlag=true
set verboseLoggingFlag=false
set memmax=-Xmx256m
for %%p in (%*) do call :SET_PARAM %%p
GOTO :CMD_LINE_DONE
	:SET_PARAM
	if /i "%1" == "nodebug" (
		set debugFlag=false
		GOTO :EOF
	)
	if /i "%1" == "special" (
		set specialFlag=true
		GOTO :EOF
	)
	if /i "%1" == "production" (
		set WLS_PRODUCTION_MODE=true
		GOTO :EOF
	)
	if /i "%1" == "notestconsole" (
		set testConsoleFlag=false
		GOTO :EOF
	)
	if /i "%1" == "noiterativedev" (
		set iterativeDevFlag=false
		GOTO :EOF
	)
	if /i "%1" == "noLogErrorsToConsole" (
		set logErrorsToConsoleFlag=false
		GOTO :EOF
	)
	if /i "%1" == "nopointbase" (
		set pointbaseFlag=false
		GOTO :EOF
	)
	if /i "%1" == "profile" (
		set profileFlag=true
		GOTO :EOF
	)
	if /i "%1" == "noExit" (
		set doExitFlag=false
		GOTO :EOF
	)
	if /i "%1" == "verbose" (
		set verboseLoggingFlag=true
		GOTO :EOF
	)
	if /i "%1" == "memmax" (
		set memmax=-Xmx512m
		GOTO :EOF
	)
	GOTO :EOF
:CMD_LINE_DONE


set MEM_DEV_ARGS=

if "true"=="true" (
	set WLS_PRODUCTION_MODE=true
	set debugFlag=false
	set testConsoleFlag=false
	set iterativeDevFlag=false
)

set PRODUCTION_MODE=%WLS_PRODUCTION_MODE%

@REM Call commEnv here, AFTER setting the java_vendor AND PRODUCTION_MODE
flags, to get common environmental settings.

call "%WL_HOME%\common\bin\commEnv.cmd"

set WLS_HOME=%WL_HOME%\server

set WLI_HOME=%WL_HOME%\integration

set MEM_ARGS=-Xms256m %memmax%

if "%JAVA_VENDOR%"=="Sun" (
	if "%WLS_PRODUCTION_MODE%"=="" (
		set MEM_DEV_ARGS=-XX:CompileThreshold=8000 -XX:PermSize=32m
	)
)

@REM Had to have a separate test here BECAUSE of immediate variable
expansion on windows

if "%JAVA_VENDOR%"=="Sun" (
	set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% -XX:MaxPermSize=128m
)

if "%JAVA_VENDOR%"=="HP" (
	set MEM_ARGS=%MEM_ARGS% -XX:MaxPermSize=128m
)

echo Using java memory arguments: %MEM_ARGS%

set
JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dwli.home=%
WLI_HOME%

set POINTBASEDIR=%WL_HOME%\common

set MSSQLDIR=

set ARDIR=%WL_HOME%\server\lib

set JAVELIN_DIR=%WL_HOME%\javelin\lib

set INTEGRATIONDIR=%WL_HOME%\integration\lib

set WORKSHOPDIR=%WL_HOME%\workshop

pushd %DOMAIN_HOME%

@REM Clustering support (edit for your cluster!)

if "%ADMIN_URL%"=="" (
	set CLUSTER_PROPERTIES=-Dweblogic.management.discover=true
) else (
	set
CLUSTER_PROPERTIES=-Dweblogic.management.discover=false -Dweblogic.managemen
t.server=%ADMIN_URL%
)

set LOG4J_CONFIG_FILE=C:\bea\user_projects\domains\wldomain/log4j.properties

if "%verboseLoggingFlag%"=="true" (
	set
LOG4J_CONFIG_FILE=C:\bea\user_projects\domains\wldomain/log4j.properties
)

set
JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_F
ILE% %CLUSTER_PROPERTIES%

set JAVA_DEBUG=

if "%debugFlag%"=="true" (
	set
JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PO
RT%,server=y,suspend=n -Djava.compiler=NONE
	set
JAVA_OPTIONS=%JAVA_OPTIONS% -ea -da:com.bea... -da:javelin... -da:weblogic..
.
	if "%specialFlag%"=="true" (
		set
JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PO
RT%,server=y,suspend=n
	)
) else (
	set JAVA_OPTIONS=%JAVA_OPTIONS% -da
)

if NOT exist config.xml (
	echo This script must be run from the %DOMAIN_HOME% directory. 1>&2
	popd
	pause
	GOTO :EOF
)

if NOT exist %JAVA_HOME%\lib (
	echo The JRE wasn't found in directory %JAVA_HOME%. ^(JAVA_HOME^)
	echo Please edit your environment and set the JAVA_HOME
	echo variable to point to the root directory of your Java installation.
	popd
	pause
	GOTO :EOF
)

set view.dir=C:/src
set PM_PROPS=C:/temp/properties
set CLASSPATH=%ARDIR%/ant/ant.jar;%JAVA_HOME%/jre/lib/rt.jar
set CLASSPATH=%CLASSPATH%;%PM_PROPS%
set CLASSPATH=%CLASSPATH%;C:/bea/user_projects/domains/wldomain
set CLASSPATH=%CLASSPATH%;%view.dir%/lib/commons-lang-1.0.1.jar
set CLASSPATH=%CLASSPATH%;%view.dir%/lib/xalan2.5.jar
set CLASSPATH=%CLASSPATH%;%view.dir%/lib/xercesImpl.jar


set
PRE_CLASSPATH=%ARDIR%\weblogic_knex_patch.jar;%WL_HOME%\common\lib\log4j.jar
;%ARDIR%\debugging.jar;%ARDIR%\knex.jar;%JAVELIN_DIR%\javelin.jar;%ARDIR%\wl
w-lang.jar

if "%MSSQLDIR%"=="" (
	set MSSQL_CLASSPATH=
) else (
	set
MSSQL_CLASSPATH=%MSSQLDIR%\sqlserver.jar;%MSSQLDIR%\base.jar;%MSSQLDIR%\util
.jar
)

set
POST_CLASSPATH=%POINTBASE_CLASSPATH%;%MSSQL_CLASSPATH%;%ARDIR%\webservicecli
ent.jar;%ARDIR%\webserviceclient+ssl.jar;%ARDIR%\xbean.jar;%ARDIR%\xmarshal.
jar;%ARDIR%\xqrl.jar;%ARDIR%\netui\netui-compiler.jar;%ARDIR%\wli.jar;%ARDIR
%\wlxtrt.jar;%ARDIR%\fop.jar;%WL_HOME%\integration\lib\wlai-server.jar;%WL_H
OME%\integration\adapters\sample\lib\sample-eis.jar

@REM PROFILING SUPPORT

set JAVA_PROFILE=

set SERVER_CLASS=weblogic.Server

if "%profileFlag%"=="true" (
	if NOT exist %OPTIT_HOME%\lib\optit.jar (
		echo Cannot find the Optimizeit library optit.jar under the directory
%OPTIT_HOME%
		echo Make sure OPTIT_HOME is set correctly!
		pause
		popd
		GOTO :EOF
	)
	set GCOPSIZE=10
	set JAVA_PROPERTIES=%JAVA_PROPERTIES% -DGCOPSIZE=%GCOPSIZE%
	set PRE_CLASSPATH=%OPTIT_HOME%\lib\optit.jar;%PRE_CLASSPATH%
	set SERVER_CLASS=intuitive.audit.GenericAudit %SERVER_CLASS%
	set JAVA_PROFILE=-Xrunoii -Xbootclasspath/a:%OPTIT_HOME%\lib\oibcp.jar
)

echo WLS Production Mode=%WLS_PRODUCTION_MODE%

set DBG_JAVA_OPTIONS=

@REM -- Setup properties so that we can save stdout and stderr to files

if NOT "%WLW_DBG_STDOUT_LOG%"=="" (
	echo Logging Debug Proxy stdout to %WLW_DBG_STDOUT_LOG%.
	set
DBG_JAVA_OPTIONS=%DBG_JAVA_OPTIONS% -Dworkshop.Stdout=%WLW_DBG_STDOUT_LOG%
)

if NOT "%WLW_DBG_STDERR_LOG%"=="" (
	echo Logging Debug Proxy stderr to %WLW_DBG_STDERR_LOG%.
	set
DBG_JAVA_OPTIONS=%DBG_JAVA_OPTIONS% -Dworkshop.Stderr=%WLW_DBG_STDERR_LOG%
)

@REM START THE DEBUGGER

set
DEBUG_CLASSPATH=%PRE_CLASSPATH%;%WL_HOME%\server\lib\weblogic.jar;%JAVA_HOME
%\lib\tools.jar;%ARDIR%\xqrl.jar;%ARDIR%\xbean.jar

if "%specialFlag%"=="false" (
	if "%debugFlag%"=="true" (
		start "WebLogic Workshop Debugger..." /MIN  cmd /c
%JAVA_HOME%\bin\java -classpath %DEBUG_CLASSPATH% %DBG_JAVA_OPTIONS%
weblogic.debugging.engine.DbgMain
	)
)

@REM Start PointBase

if "%pointbaseFlag%"=="true" (
	start "Pointbase" /MIN  cmd /c call
"%WL_HOME%\common\bin\startPointBase.cmd" -debug=0 -background=true -ini=%DO
MAIN_HOME%\pointbase.ini  2>&1 >"%DOMAIN_HOME%\pointbase.log"
)

set PATH=%WL_HOME%\server\bin;%PATH%

@REM STUFF DONE ONLY BY US

set JAVA_OPTIONS=%JAVA_OPTIONS%
%JAVA_PROPERTIES% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.security.SSL.igno
reHostnameVerify=false -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConso
le=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag%

@REM -- Setup properties so that we can save stdout and stderr to files

if NOT "%WLS_STDOUT_LOG%"=="" (
	echo Logging WLS stdout to %WLS_STDOUT_LOG%
	set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stdout=%WLS_STDOUT_LOG%
)

if NOT "%WLS_STDERR_LOG%"=="" (
	echo Logging WLS stderr to %WLS_STDERR_LOG%
	set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stderr=%WLS_STDERR_LOG%
)

set JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%

@REM ADD EXTENSIONS TO CLASSPATHS

if NOT "%EXT_PRE_CLASSPATH%"=="" (
	set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%;%PRE_CLASSPATH%
)

if NOT "%EXT_POST_CLASSPATH%"=="" (
	set POST_CLASSPATH=%POST_CLASSPATH%;%EXT_POST_CLASSPATH%
)

@REM SET THE CLASSPATH

set
CLASSPATH=%PRE_CLASSPATH%;%WLP_PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%CLASSPAT
H%;%POST_CLASSPATH%;%WLP_POST_CLASSPATH%

set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%

echo .

echo .

echo CLASSPATH=%CLASSPATH%

echo .

echo PATH=%PATH%

echo .

echo ***************************************************

echo *  To start WebLogic Server, use a username and   *

echo *  password assigned to an admin-level user.  For *

echo *  server administration, use the WebLogic Server *

echo *  console at http:\\hostname:port\console        *

echo ***************************************************

@REM START WEBLOGIC

echo starting weblogic with Java version:

%JAVA_HOME%\bin\java -version

if "%WLS_REDIRECT_LOG%"=="" (
	echo Starting WLS with line:
	echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS%
%JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnable
d=%WLS_PRODUCTION_MODE% -Djava.security.policy=%WL_HOME%\server\lib\weblogic
.policy %SERVER_CLASS%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS%
%JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnable
d=%WLS_PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogi
c.policy" %SERVER_CLASS%
) else (
	echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS%
%JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnable
d=%WLS_PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogi
c.policy" %SERVER_CLASS%  1>&2 >"%WLS_REDIRECT_LOG%"
)

@REM STOP DEBUGGER (only if we started it)

if "%specialFlag%"=="false" (
	if "%debugFlag%"=="true" (
		%JAVA_HOME%\bin\java -classpath %DEBUG_CLASSPATH% %DBG_JAVA_OPTIONS%
weblogic.debugging.engine.DbgMain -shutdown
	)
)

@REM STOP POINTBASE (only if we started it)

if "%pointbaseFlag%"=="true" (
	call "%WL_HOME%\common\bin\stopPointBase.cmd" -name=%DB_DB%  2>&1
>"%DOMAIN_HOME%\pointbaseShutdown.log"
)

popd

@REM Exit this script only if we haven't been asked not to
@REM (might be getting called from another script)

if "%doExitFlag%"=="true" (
	exit
)



ENDLOCAL

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com]
Sent: Tuesday, September 02, 2003 9:52 PM
To: 'Cactus Users List'; bkumler@firstam.com
Subject: RE: Weblogic 8 problem


Hi Bret,

Are you using the <cactus> task and the <weblogic7x> container tag? Or
are you using the <generic> tag? The weblogic7x is for wl7 and has not
been tested with WL 8.x.

It seems it is indeed a classloader issue. In order to help you I would
need to know what you started the cactus test, whether you put any jar
in the system classpath or somewhere else, etc.

Thanks
-Vincent

> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@firstam.com]
> Sent: 03 September 2003 01:23
> To: 'Cactus Users List'
> Subject: Weblogic 8 problem
>
> I'm very new to cactus, I'm trying to get cactus running in Weblogic
8.
>
> I managed to get the samples working fine with Weblogic 8.
>
> When I try to add the cactus jars & web.xml entries to our existing
> application(ear) & start weblogic, I get the following error (see
below).
>
> Is this a classloading conflict?
> I remove all the cactus related stuff & the ear deploys fine.
>
> The WebLogic Server did not start up properly.
> java.lang.ExceptionInInitializerError
>         at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
cc
> es
> sorImpl.java:39)
>         at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tr
> uc
> torAccessorImpl.java:27)
>         at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at java.lang.Class.newInstance0(Class.java:306)
>         at java.lang.Class.newInstance(Class.java:259)
>         at
>
weblogic.servlet.internal.WebAppServletContext.registerFilter(WebAppServ
le
> tC
> ontext.java:2879)
>         at
>
weblogic.servlet.internal.WebAppServletContext.initFilters(WebAppServlet
Co
> nt
> ext.java:2855)
>         at
>
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppSe
rv
> le
> tContext.java:3157)
>         at
>
weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:65
4)
>         at
>
weblogic.servlet.internal.WebService.preloadResources(WebService.java:48
3)
>         at
>
weblogic.servlet.internal.ServletInitService.resume(ServletInitService.j
av
> a:
> 30)
>         at
> weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
>         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
>         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
>         at weblogic.Server.main(Server.java:32)
> Caused by: org.apache.commons.logging.LogConfigurationException:
> java.lang.ClassNotFoundException:
> com.bea.wlw.netui.util.logging.StrutsLogFactory
>         at
> org.apache.commons.logging.LogFactory$2.run(LogFactory.java:609)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:561)
>         at
> org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:352)
>         at
> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
>         at
>
org.apache.cactus.server.FilterTestRedirector.<clinit>(FilterTestRedirec
to
> r.
> java;org/apache/cactus/util/log/LogAspect.aj[1k]:87)
>         ... 16 more
> Caused by: java.lang.ClassNotFoundException:
> com.bea.wlw.netui.util.logging.StrutsLogFactory
>         at
>
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
de
> r.
> java:198)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>         at
>
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoa
de
> r.
> java:223)
>         at
> org.apache.commons.logging.LogFactory$2.run(LogFactory.java:571)
>         ... 21 more
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




Mime
View raw message