RE: How to set user principal in setUp()
Nicole Luneburg <[email protected]> Fri, 9 Jan 2009 13:57:54 +1030
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <[email protected]> |
--_000_CB506E813C77E9498F043F1F951BB27680933309optimusmsa2endc_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
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 t=
o replace the existing ivy xml files from the repository (http://red5.googl=
ecode.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 th=
e sample ejb3 tests...
BUILD FAILED
org.codehaus.cargo.container.ContainerException: Cannot create configuratio=
n. There's no registered configuration for the parameters (container [id =
=3D [jboss42x], type =3D [installed]], configuration type [standalone]). Ac=
tually there are no valid types registered for this configuration. Maybe yo=
u've made a mistake spelling it?
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.create=
Implementation(AbstractGenericHintFactory.java:143)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintF=
actory.createImplementation(AbstractIntrospectionGenericHintFactory.java:86=
)
at org.codehaus.cargo.generic.configuration.DefaultConfigurationFac=
tory.createConfiguration(DefaultConfigurationFactory.java:205)
at org.codehaus.cargo.generic.configuration.DefaultConfigurationFac=
tory.createConfiguration(DefaultConfigurationFactory.java:192)
at org.codehaus.cargo.ant.ConfigurationElement.createConfiguration(=
ConfigurationElement.java:177)
at org.codehaus.cargo.ant.CargoTask.makeContainer(CargoTask.java:70=
8)
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(DelegatingMethod=
AccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtil=
s.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:1=
337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Defau=
ltExecutor.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 paramete=
rs like type, home (mind you I've never worked with pom files before but no=
ne the matter).
Then I worked out that the container id value was being read from build.pro=
perties.
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 Mond=
ay 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:[email protected]]
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 let=
ter.
This will create two .java files - MyEJB3ServiceBean.java and IMyEJB3Servic=
eBean.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:
=3D=3D=3D=3D=3D=3D=3D=3D=3Dusers.properties=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
testuser=3Dtestpassword
=3D=3D=3D=3D=3D=3D=3D=3D=3Droles.properties=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
testuser=3Dtest
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 c=
actus 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 e=
mail is free of viruses or other defects. If you have received this communi=
cation 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 incorrec=
t receipt of this correspondence.
--_000_CB506E813C77E9498F043F1F951BB27680933309optimusmsa2endc_--