Re: Infinite Recursion when using suite method in cactus
Normal. It is a programmation error : return suite; instead of return suite(); will solve your problem tanmay_ambre [EMAIL PROTECTED] 19/11/2004 06:03 Veuillez répondre à Cactus Users List Pour : [EMAIL PROTECTED] cc : Objet : Infinite Recursion when using suite method in cactus Hi, I have written a TestSuite which has a public static Test suite() method in it. The method implementation is as follows: public static Test suite() { ServletTestSuite suite = new ServletTestSuite(); suite.addTest(new TestCactusDelegate(testGetCustInfo)); return suite(); } Whenever I try running this test case using Browser Integration or Ant integration, the program goes in an infinite recursive loop. For running the unittests I use the following jars in the classpath. I also use cactifywar to create a war file for unit testing. The app server is Weblogic 8.1 aspectjrt-1.1.1.jar cactus-1.6.1.jar cactus-ant-1.6.1.jar commons-httpclient-2.0.2.jar commons-logging-1.0.3.jar httpunit-1.5.4.jar junit-3.8.1.jar nekohtml-0.7.4.jar Following is the trace from a log file. This trace gets repeated infinitely. [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest Warm Regards, tanmay ambre, Infosys Technologies Ltd, Pune, India. (O) +91-20-22973681 (m) +91-9850414331 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Infinite Recursion when using suite method in cactus
Thanks Nicolas. How stupid of me :) Warm Regards, tanmay ambre, Infosys Technologies Ltd, Pune, India. (O) +91-20-22973681 (m) +91-9850414331 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 2:18 PM To: Cactus Users List Subject: Re: Infinite Recursion when using suite method in cactus Normal. It is a programmation error : return suite; instead of return suite(); will solve your problem tanmay_ambre [EMAIL PROTECTED] 19/11/2004 06:03 Veuillez répondre à Cactus Users List Pour : [EMAIL PROTECTED] cc : Objet : Infinite Recursion when using suite method in cactus Hi, I have written a TestSuite which has a public static Test suite() method in it. The method implementation is as follows: public static Test suite() { ServletTestSuite suite = new ServletTestSuite(); suite.addTest(new TestCactusDelegate(testGetCustInfo)); return suite(); } Whenever I try running this test case using Browser Integration or Ant integration, the program goes in an infinite recursive loop. For running the unittests I use the following jars in the classpath. I also use cactifywar to create a war file for unit testing. The app server is Weblogic 8.1 aspectjrt-1.1.1.jar cactus-1.6.1.jar cactus-ant-1.6.1.jar commons-httpclient-2.0.2.jar commons-logging-1.0.3.jar httpunit-1.5.4.jar junit-3.8.1.jar nekohtml-0.7.4.jar Following is the trace from a log file. This trace gets repeated infinitely. [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest([testGetCustInfo(be.telenet.unittest.testcactus.testwe bclient.testdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setDelegatedTest [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest([null]) [DEBUG][org.apache.cactus.internal.server.ServerTestCaseCaller]: setWrappedTest [DEBUG][org.apache.cactus.ServletTestSuite]: addTest([testGetCustInfo(be.telenet.unittest.testcactus.testwebclient.t estdelegate.TestCactusDelegate)]) [DEBUG][org.apache.cactus.ServletTestSuite]: addTest Warm Regards, tanmay ambre, Infosys Technologies Ltd, Pune, India. (O) +91-20-22973681 (m) +91-9850414331 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Réf. : RE: Clovering Cactus tests with Maven
I reread the message. In fact you want to have cactus report and clover report when you call maven site:generate. In that case, you just have to add a preGoal on cactus who does the clover:on and a postGoal on cactus who does the clover:report. In your project.xml add the cactus report but not the clover one. This solution is not very good because the clover report will be done for all your cactus test. So I thing the best method is to generate the clover report before calling the site:generate (no clean between this 2 step ;) ) and don't include the clover report in your pom (just add an link in your navigation.xml that point on it). Nicolas, Vincent Massol [EMAIL PROTECTED] 18/11/2004 18:59 Veuillez répondre à Cactus Users List Pour : 'Cactus Users List' [EMAIL PROTECTED] cc : Objet : RE: Réf. : RE: Clovering Cactus tests with Maven Yes, that's right. You need the clover:report part -Vincent -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] trelaze.com] Sent: jeudi 18 novembre 2004 16:31 To: Cactus Users List Subject: Réf. : RE: Clovering Cactus tests with Maven If my memory is good it was disgust before on the list. I think you have to do something like for generating the clover report: maven clover:on cactus clover:report Nicolas Darren Hartford [EMAIL PROTECTED] 18/11/2004 16:24 Veuillez répondre à Cactus Users List Pour : Cactus Users List [EMAIL PROTECTED] cc : Objet : RE: Clovering Cactus tests with Maven Hey all, Trying to get Clover reports on some Cactus tests. I caught the question about clover with test-ear, but I'm not that far (yet). In just trying to follow some previous directions (below), I'm running Maven-1.0.1 release (which has the Clover-1.6 plugin) and cactus-1.7dev. Following the directions, when I run maven clover:report, the clover plugin errors saying you need to run 'clover-setup' first. Well, that's a clover problem, but still a show-stopper for step-by-step execution. Moving foward, doing something like maven clover:on site to do it all at once with the clover-report-plugin in the maven POM goes through. The Cactus tests are run and I see the results, the cactus-report comes out fine, but a clover report is never created (I don't have any Junit tests, just Cactus). snip [cactus] Testcase: blah1 took 0.515 sec [cactus] Testcase: blah2 took 0.031 sec [cactus] Shutdown message has been posted to the server. [cactus] Server shutdown may take a while - check logfiles for completion . [echo] Generating the Clover... maven-clover-plugin:report: clover:test: [echo] No tests to run Clover on clover:init: Overriding previous definition of reference to clover.classpath clover:report: clover:html-report-internal: [clover-report] Clover Version 1.3_01, built on July 09 2004 [clover-report] loaded from: C:\Documents and Settings\dhartford\.maven\repo sitory\clover\jars\clover-ant-1.3_01.jar [clover-report] No coverage data found for 'C:\projects\cpams\cpamsserver3\e jb_session\target\clover\database\clover_coverage.db'. [clover-report] No coverage recordings found. No report will be generated. ===end snip My code is compiled/inspected with Clover, and I see all the classes in /target/clover/classes (minus the cactus-tests), so at least that part is working. Beyond that, I'm not sure what next to check. -D -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 7:18 AM To: 'Maven Users List' Cc: 'Cactus Users List' Subject: [Summary] Clovering Cactus tests with Maven Hi, Some of you asked how to run Clover on Cactus tests. I tried to do it and found that indeed there were some issues. I've now modified the Maven Clover plugin so that it is possible to Clover Cactus tests. You'll need to do the following: 1/ Use at least version 1.6 of the Maven Clover report. ATM, it is not yet released so you'll have to build it from the source (CVS HEAD on maven-plugins module). 2/ In the Maven project used to execute the Cactus tests, add a dependency to Clover: dependency groupIdclover/groupId artifactIdclover-ant/artifactId version1.3_01/version properties cactus.bundletrue/cactus.bundle /properties /dependency 3/ Then type maven clean clover:on cactus. This instruments both the project's source code + its Cactus tests 4/ Once it is finished, type maven clover:report to generate the HTML Clover report. It will be located in target/docs/clover/index.html -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cactus and weblogic8.1
Hi all I'm having problem deploying cactified apps to weblogic. I have seen the references to this problem on the list, but did not find an answer to it. The problem is that when I'm trying to deploy my cactified war I get the following error: Nov 19, 2004 2:30:34 PM EST Warning DRS BEA-002506 The current version 149 for DataIdentifier DataIdentifierID: 1 does not match with incoming version 157 for a one-phase update. Nov 19, 2004 2:30:34 PM EST Warning Deployer BEA-149004 Failures were detected while initiating Deploy task for application contactcapture-cactus. Nov 19, 2004 2:30:34 PM EST Error Deployer BEA-149201 Failed to complete the deployment task with ID 11 for the application contactcapture-cactus. weblogic.management.DeploymentException: Exception:weblogic.management.ApplicationException: start() failed. Module: contactcapture-cactus Error: java.lang.ExceptionInInitializerError at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDe ployer.java:2354) at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.jav a:2136) at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDep loyer.java:2235) at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.ja va:2130) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDep loyer.java:2315) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeplo yer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.ja va:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.j ava:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.ja va:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) --- nested within: -- weblogic.management.ManagementException: - with nested exception: [weblogic.management.DeploymentException: Exception:weblogic.management.ApplicationException: start() failed. Module: contactcapture-cactus Error: java.lang.ExceptionInInitializerError ] at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDep loyer.java:2327) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeplo yer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.ja va:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.j ava:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.ja va:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Now, if I create my war manually (as opposed via ant cactifywar task), and comment out the Filter Redirector sections (both filter and filter-mapping), everything works fine. Any thoughts? I'm using cactus 1.6.1, weblogic 8.1 sp3. Greg Kubaczkowski Senior Java Developer Enterprise DW Solutions, I.T. Loyalty Management Group
Re: FormAuthentication and Error Code 500
Hi Setanta, Could you post server log? We need more detail to understand what's going on. In article [EMAIL PROTECTED], Thu, 18 Nov 2004 13:25:02 -, Setanta Mathews [EMAIL PROTECTED] wrote: smathews The authentication must be working. Part of the test in question calls an smathews EJB that does the following check: smathews smathews principal = sessionContext.getCallerPrincipal(); smathews name = principal.getName(); smathews System.out.println(User Id: + name); smathews if (name.equals(anonymous) || name.equals(guest)) smathews throw new PrincipalException(Principal must be authenticated); smathews smathews Without the begin method in my test the principal name is guest and a smathews PrincipalException will be thrown. With the begin method the principal name smathews is 0 (so authentication must have happened) and no exception is thrown. If the purpose of the authentication is to get a principal name, and you think the FormAuthentication goes worng, you might try to use the BasicAuthentication for your unit-testing of EJBs. smathews I agree that setting the expected response code to 500 is dangerous smathews but I can't spend too much more time trying to get my tests running. I don't think that is a good idea. It may take long time to solve your problem with FormAuthentication, but it cannot be a reason to bypassing the problem by such unusual approach. I suggest you to use more simple authentication for your tests. Regards, Kazuhito SUGURI mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]