Hi Petar,

Thanks for the response.
Been trying to complete all the steps you outlined since you emailed it.

Step 1: Completed
Step 2: Completed. Note: when I hit step 2 I was getting errors, so I had to 
replace the existing ivy xml files from the repository 
(http://red5.googlecode.com/svn/java/server/trunk/). After this it worked.
Step 3: Completed
Step 4:  Completed
Step 5: Alas! No it did not run. My log:

test:
     [echo] Please take a deep breath while Cargo gets JBoss for running the 
sample ejb3 tests...

BUILD FAILED
org.codehaus.cargo.container.ContainerException: Cannot create configuration. 
There's no registered configuration for the parameters (container [id = 
[jboss42x], type = [installed]], configuration type [standalone]). Actually 
there are no valid types registered for this configuration. Maybe you've made a 
mistake spelling it?
        at 
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:143)
        at 
org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
        at 
org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.createConfiguration(DefaultConfigurationFactory.java:205)
        at 
org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.createConfiguration(DefaultConfigurationFactory.java:192)
        at 
org.codehaus.cargo.ant.ConfigurationElement.createConfiguration(ConfigurationElement.java:177)
        at org.codehaus.cargo.ant.CargoTask.makeContainer(CargoTask.java:708)
        at 
org.apache.cactus.integration.ant.CargoElement.getCargoContainer(CargoElement.java:49)
        at 
org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:166)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

I looked at the pom.xml file in the ejb3 folder. Tried to add some parameters 
like type, home (mind you I've never worked with pom files before but none the 
matter).
Then I worked out that the container id value was being read from 
build.properties.
I thought maybe adding some parameters there would fix this problem but can't 
find anywhere if this is the case and/or what the parameters should be.
Any ideas?

I also added ejb3-persistence.jar, ejb-3_0-api.jar and ivy-2.0.0-rc2.jar to get 
some of the targets working btw.

(I need to go home early today but am sure this will be waiting for me Monday 
morning ... unless I find some time on the weekend to look at it again.)

I'm determined to get this fixed!!!

Cheers,
Nicole


From: Petar Tahchiev [mailto:paranoia...@gmail.com]
Sent: Friday, 9 January 2009 8:29 AM
To: Cactus Users List
Subject: Re: How to set user principal in setUp()

Here is a detailed instruction on how to run the tests:

1) checkout cactus from source:
svn co http://svn.apache.org/repos/asf/jakarta/cactus/trunk/ cactus

2) build it
cd cactus
mvn clean install

3) go to folder sample/ejb3 and apply the patch I have attached to this letter.
This will create two .java files - MyEJB3ServiceBean.java and 
IMyEJB3ServiceBean.java.
It will also patch the build.xml and the cactus-web.xml files.

4)
Create users.properties and roles. properties in JBOSS_HOME/server/default/conf/
In these files fill in the following:
=========users.properties==========
testuser=testpassword

=========roles.properties==========
testuser=test

I have a jboss4.2 installation in folder 
cactus/sample/ejb3/install/jboss-4.2.2.GA<http://jboss-4.2.2.GA>
but you can change the home of your JBoss installation by changing the home 
property
of the cargo element in the cactus task in the build.xml

5) start the tests with ant.
Go to the ejb3 folder and type in:
ant

6) Voila. Tests should be working.

Please let me know how this works and also for homework write an email
describing why didn't your tests work before and did I change so that they are
(probably) working now. This way you will be sure that you understand how 
cactus is
working :-).


________________________________
The contents of this email are confidential and may be subject to legal or 
professional privilege and copyright. No representation is made that this email 
is free of viruses or other defects. If you have received this communication in 
error, you may not copy or distribute any part of it or otherwise disclose its 
contents to anyone. Please advise the sender of your incorrect receipt of this 
correspondence.

Reply via email to