You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Volker Krebs <vo...@abas.de> on 2004/06/24 11:03:48 UTC

j_security_check not configurable

Hello again,

I'm trying to use FormAuthentication in cactus.
According to the webpage "Using Authentication" I set up everything and 
it worked fine.
But I have one problem.
In our webaplication the login URL is not "j_security_chek", and 
therefore I'm running into errors. I found no property in cactus where I 
could configre the login URL, and looking at FormAuthentication.java I 
think there is no such property.

It would be nice if the login URL could be configured or (even better) 
would be directly read from the web.xml.

thanks,

Volker

and btw. keep on the good work with cactus. It's great.




RE: Cactus + weblogic 81

Posted by Bret Kumler <bk...@bitfone.com>.
Vincent,

I noticed when I ran ant -debug test
When the server was starting it was trying to connect to the correct url,
but as soon as it went to the target to execute the tests, the url changed.

The only difference is machine-name was beach-breaker, now its localhost.

For some reason it cannot connect to localhost..

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Friday, June 25, 2004 12:53 AM
To: 'Cactus Users List'
Subject: RE: Cactus + weblogic 81

Hi Bret,

> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@bitfone.com]
> Sent: 25 June 2004 01:51
> To: 'Cactus Users List'
> Subject: Cactus + weblogic 81
> 
> I'm having a problem with the tests not executing.

[snip]

> BUILD FAILED
> file:C:/misc/builds/cactus/build.xml:604: Failed to start the
container
> after mo
> re than [180000] ms. Trying to connect to the
> [http://localhost:7001/prismconsol
> e/ServletRedirector?Cactus_Service=RUN_TEST] test URL yielded a [-1]
error
> code.
>  Please run in debug mode for more details about the error.

Can you please turn on Cactus logging and check the server log file? If
you look hard you'll see the exact error returned by the container. That
will give you the reason of the error. You may also want to check the
weblogic log file itself (located in your target dir).

[snip]

Thanks
-Vincent


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



RE: Cactus + weblogic 81

Posted by Bret Kumler <bk...@bitfone.com>.
I have a question about the client-side & server side logging.

I've read
http://jakarta.apache.org/cactus/integration/howto_config.html#logging


But I'm a bit confused.

Is the client-side considered to be in the following:

		<cactus
warfile="${execution.dir}/prismconsole-tests/testwar/console.war" fork="yes"
failureproperty="tests.failed" haltonerror="true">
			<classpath>
				<path refid="project.classpath"/>
				<pathelement
location="${execution.dir}/console-tests/lib/console-test.jar"/>
				<pathelement
location="${execution.dir}/conf/test/client-properties"/>
			</classpath>
			<containerset>
				<generic name="Weblogic 8.1.2.0"
port="${test.port}"/>
			</containerset>
			<formatter type="brief" usefile="false"/>
			<formatter type="xml"/>
			<batchtest>
				<fileset dir="${ test.classes}">
					<include name="**/*.class"/>
				</fileset>
			</batchtest>
		</cactus>


And the server side:

<java classname="weblogic.Server" fork="yes"
dir="${target.weblogic81.dir}/testdomain">
			<classpath>
				<pathelement
location="${weblogic.home.81}/weblogic81/server/lib/weblogic.jar"/>
				<pathelement location="${tools.jar}"/>
				<pathelement location="${oracle.driver}"/>
				<pathelement location="${mysql.driver}"/>
				<pathelement location="${junit-jar}"/>
				<pathelement location="${log4j.jar}"/>
				<pathelement
location="${execution.dir}/conf/test/server-properties"/>
			</classpath>
			<jvmarg value="-hotspot"/>
			<jvmarg value="-ms256m"/>
			<jvmarg value="-mx256m"/>
			<jvmarg
value="-Djava.library.path=${java.library.path};${weblogic.home.81}/weblogic
81/server/bin"/>
			<jvmarg value="-Dweblogic.Name=testserver"/>
			<jvmarg value="-Dbea.home=${weblogic.home.81}"/>
			<jvmarg
value="-Dweblogic.management.username=${weblogic.username}"/>
			<jvmarg
value="-Dweblogic.management.password=${weblogic.password}"/>
			<jvmarg
value="-Djava.security.policy==./server/lib/weblogic.policy"/>
		</java>



If I do it, this what I get:


[java] log4j:ERROR Attempted to append to closed appender named [cactus].




-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Friday, June 25, 2004 12:53 AM
To: 'Cactus Users List'
Subject: RE: Cactus + weblogic 81

Hi Bret,

> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@bitfone.com]
> Sent: 25 June 2004 01:51
> To: 'Cactus Users List'
> Subject: Cactus + weblogic 81
> 
> I'm having a problem with the tests not executing.

[snip]

> BUILD FAILED
> file:C:/misc/builds/cactus/build.xml:604: Failed to start the
container
> after mo
> re than [180000] ms. Trying to connect to the
> [http://localhost:7001/prismconsol
> e/ServletRedirector?Cactus_Service=RUN_TEST] test URL yielded a [-1]
error
> code.
>  Please run in debug mode for more details about the error.

Can you please turn on Cactus logging and check the server log file? If
you look hard you'll see the exact error returned by the container. That
will give you the reason of the error. You may also want to check the
weblogic log file itself (located in your target dir).

[snip]

Thanks
-Vincent


---------------------------------------------------------------------
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



RE: Cactus + weblogic 81

Posted by Bret Kumler <bk...@bitfone.com>.
I have a question about the client-side & server side logging.

I've read
http://jakarta.apache.org/cactus/integration/howto_config.html#logging


But I'm a bit confused.

Is the client-side considered to be in the following:

		<cactus
warfile="${execution.dir}/prismconsole-tests/testwar/console.war" fork="yes"
failureproperty="tests.failed" haltonerror="true">
			<classpath>
				<path refid="project.classpath"/>
				<pathelement
location="${execution.dir}/console-tests/lib/console-test.jar"/>
				<pathelement
location="${execution.dir}/conf/test/client-properties"/>
			</classpath>
			<containerset>
				<generic name="Weblogic 8.1.2.0"
port="${test.port}"/>
			</containerset>
			<formatter type="brief" usefile="false"/>
			<formatter type="xml"/>
			<batchtest>
				<fileset dir="${ test.classes}">
					<include name="**/*.class"/>
				</fileset>
			</batchtest>
		</cactus>


And the server side:

<java classname="weblogic.Server" fork="yes"
dir="${target.weblogic81.dir}/testdomain">
			<classpath>
				<pathelement
location="${weblogic.home.81}/weblogic81/server/lib/weblogic.jar"/>
				<pathelement location="${tools.jar}"/>
				<pathelement location="${oracle.driver}"/>
				<pathelement location="${mysql.driver}"/>
				<pathelement location="${junit-jar}"/>
				<pathelement location="${log4j.jar}"/>
				<pathelement
location="${execution.dir}/conf/test/server-properties"/>
			</classpath>
			<jvmarg value="-hotspot"/>
			<jvmarg value="-ms256m"/>
			<jvmarg value="-mx256m"/>
			<jvmarg
value="-Djava.library.path=${java.library.path};${weblogic.home.81}/weblogic
81/server/bin"/>
			<jvmarg value="-Dweblogic.Name=testserver"/>
			<jvmarg value="-Dbea.home=${weblogic.home.81}"/>
			<jvmarg
value="-Dweblogic.management.username=${weblogic.username}"/>
			<jvmarg
value="-Dweblogic.management.password=${weblogic.password}"/>
			<jvmarg
value="-Djava.security.policy==./server/lib/weblogic.policy"/>
		</java>



If I do it this was I get


[java] log4j:ERROR Attempted to append to closed appender named [cactus].




-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Friday, June 25, 2004 12:53 AM
To: 'Cactus Users List'
Subject: RE: Cactus + weblogic 81

Hi Bret,

> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@bitfone.com]
> Sent: 25 June 2004 01:51
> To: 'Cactus Users List'
> Subject: Cactus + weblogic 81
> 
> I'm having a problem with the tests not executing.

[snip]

> BUILD FAILED
> file:C:/misc/builds/cactus/build.xml:604: Failed to start the
container
> after mo
> re than [180000] ms. Trying to connect to the
> [http://localhost:7001/prismconsol
> e/ServletRedirector?Cactus_Service=RUN_TEST] test URL yielded a [-1]
error
> code.
>  Please run in debug mode for more details about the error.

Can you please turn on Cactus logging and check the server log file? If
you look hard you'll see the exact error returned by the container. That
will give you the reason of the error. You may also want to check the
weblogic log file itself (located in your target dir).

[snip]

Thanks
-Vincent


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



RE: Cactus + weblogic 81

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Bret,

> -----Original Message-----
> From: Bret Kumler [mailto:bkumler@bitfone.com]
> Sent: 25 June 2004 01:51
> To: 'Cactus Users List'
> Subject: Cactus + weblogic 81
> 
> I'm having a problem with the tests not executing.

[snip]

> BUILD FAILED
> file:C:/misc/builds/cactus/build.xml:604: Failed to start the
container
> after mo
> re than [180000] ms. Trying to connect to the
> [http://localhost:7001/prismconsol
> e/ServletRedirector?Cactus_Service=RUN_TEST] test URL yielded a [-1]
error
> code.
>  Please run in debug mode for more details about the error.

Can you please turn on Cactus logging and check the server log file? If
you look hard you'll see the exact error returned by the container. That
will give you the reason of the error. You may also want to check the
weblogic log file itself (located in your target dir).

[snip]

Thanks
-Vincent


Cactus + weblogic 81

Posted by Bret Kumler <bk...@bitfone.com>.
I'm having a problem with the tests not executing.

It starts the server and I see following

cactus.tests:
   [cactus] Adding Cactus client system property
[cactus.filterRedirectorName] w
ith value [FilterRedirector]
   [cactus] No mapping of the JSP redirector found
   [cactus] Adding Cactus client system property
[cactus.servletRedirectorName]
with value [ServletRedirector]
   [cactus] Adding Cactus server system property [cactus.contextURL] with
value
[null]
   [cactus]
-----------------------------------------------------------------
   [cactus] Running tests against Weblogic 8.1.2.0
   [cactus]
-----------------------------------------------------------------
   [cactus] Starting up container


IT HANGS SO I DID A THREAD DUMP, SEE BELOW.

THEN AFTER A WHILE THE BUILD FAILS

I EVEN ADDED THE -Dcactus.config=${conf.dir}/cactus.properties TO THE
WEBLOGIC TARGET CLASSPATH

THE ONE THING IS IT SHOULDN'T BE LOCALHOST, SHOULD BE MY MACHINE NAME.


I RAN IT IN VERBOSE & DEBUG MODES


BUILD FAILED
file:C:/misc/builds/cactus/build.xml:604: Failed to start the container
after mo
re than [180000] ms. Trying to connect to the
[http://localhost:7001/prismconsol
e/ServletRedirector?Cactus_Service=RUN_TEST] test URL yielded a [-1] error
code.
 Please run in debug mode for more details about the error.
        at
org.apache.cactus.integration.ant.container.ContainerRunner.startUpCo
ntainer(ContainerRunner.java:153)
        at
org.apache.cactus.integration.ant.CactusTask.executeInContainer(Cactu
sTask.java:461)
        at
org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:
224)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)

        at
org.apache.cactus.integration.ant.container.GenericContainer$Hook.exe
cute(GenericContainer.java:110)
        at
org.apache.cactus.integration.ant.RunServerTestsTask.execute(RunServe
rTestsTask.java:141)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)





Full thread dump Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode):

"Thread-6" daemon prio=5 tid=0x02d24370 nid=0x390 runnable
[336f000..336fd8c]
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:177)
        at
org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:105)

        at java.lang.Thread.run(Thread.java:534)

"Thread-5" daemon prio=5 tid=0x02d23d08 nid=0x298 runnable
[332f000..332fd8c]
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:194)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
        - locked <0x105ffcc0> (a java.io.BufferedInputStream)
        at java.io.FilterInputStream.read(FilterInputStream.java:90)
        at
org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:105)

        at java.lang.Thread.run(Thread.java:534)

"Thread-4" prio=5 tid=0x02e5b028 nid=0xf80 runnable [32ef000..32efd8c]
        at java.lang.Win32Process.waitFor(Native Method)
        at org.apache.tools.ant.taskdefs.Execute.waitFor(Execute.java:466)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:448)
        at org.apache.tools.ant.taskdefs.Java.run(Java.java:488)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:160)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)

        at
org.apache.cactus.integration.ant.container.GenericContainer$Hook.exe
cute(GenericContainer.java:110)
        at
org.apache.cactus.integration.ant.container.GenericContainer.startUp(
GenericContainer.java:285)
        at
org.apache.cactus.integration.ant.container.ContainerRunner$1.run(Con
tainerRunner.java:140)
        at java.lang.Thread.run(Thread.java:534)

"Signal Dispatcher" daemon prio=10 tid=0x0003dbf8 nid=0x98c waiting on
condition
 [0..0]

"Finalizer" daemon prio=9 tid=0x009c0b28 nid=0x948 in Object.wait()
[2b5f000..2b
5fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x104fdcc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <0x104fdcc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x009bf6f8 nid=0x740 in Object.wait()
[2b
1f000..2b1fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x104fdd28> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:429)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
        - locked <0x104fdd28> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=0x00035758 nid=0x18c runnable [7f000..7fc3c]
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        - locked <0x100ec520> (a java.net.PlainSocketImpl)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
        - locked <0x100ec410> (a sun.net.www.http.HttpClient)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:320)
        at sun.net.www.http.HttpClient.New(HttpClient.java:315)
        at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:512)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:489)
        at
org.apache.cactus.integration.ant.container.ContainerRunner.testConne
ctivity(ContainerRunner.java:300)
        at
org.apache.cactus.integration.ant.container.ContainerRunner.startUpCo
ntainer(ContainerRunner.java:161)
        at
org.apache.cactus.integration.ant.CactusTask.executeInContainer(Cactu
sTask.java:461)
        at
org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:
224)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)

        at
org.apache.cactus.integration.ant.container.GenericContainer$Hook.exe
cute(GenericContainer.java:110)
        at
org.apache.cactus.integration.ant.RunServerTestsTask.execute(RunServe
rTestsTask.java:141)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

"VM Thread" prio=5 tid=0x009fb6f8 nid=0x370 runnable

"VM Periodic Task Thread" prio=10 tid=0x009fc408 nid=0xf0c waiting on
condition

"Suspend Checker Thread" prio=10 tid=0x0003d2b0 nid=0x66c runnable






Re: j_security_check not configurable

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Volker,

In article <40...@abas.de>,
Thu, 24 Jun 2004 11:03:48 +0200,
Volker Krebs <vo...@abas.de> wrote: 
volker> In our webaplication the login URL is not "j_security_chek", and 
volker> therefore I'm running into errors. I found no property in cactus where I 
volker> could configre the login URL, and looking at FormAuthentication.java I 
volker> think there is no such property.

If you are using Cactus-1.6.1, FormAuthentication#setSecurityCheckURL(URL)
method may helps you.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp