[weld-dev] Any plans for a weld-user ist?

Dan Allen dan.j.allen at gmail.com
Sat Dec 26 16:10:10 EST 2009


Johan,

You also need to have JBoss AS running when using the jboss-remote-60
profile. I can confirm that JBoss AS 6.0.0.M1 works, but you have to first
apply this metadata fix:

http://community.jboss.org/thread/69486

So here are your steps to getting the arquillian demos working.

1) Download and extra JBoss AS 6.0.0.M1: http://jboss.org/jbossas/downloads
2) Apply the bean validation metadata fix described here:
http://community.jboss.org/thread/69486?tstart=0
3) Start JBoss AS 6.0.0.M1 (using the typical ./bin/run.sh or via an IDE)
4) Run the Arquillian build (either from root of the project or either the
demo or demo-testng folder)
$MAVEN22_HOME/bin/mvn clean install -Pjboss-remote-60

As Aslak mentioned, the embedded jboss container is not working at the
moment. The Arquillian project also has plans for supporting non-JBoss
containers such as GlassFish V3, it just isn't done yet (so don't be mislead
that this will always be JBoss AS-specific).

-Dan

p.s. Aslak, where are we with GlassFish V3 support? Is there somewhere you
can point developers who are interested in helping getting that working?
p.p.s. Aslak, do you mind if I add the steps above to the Arquillian page
for now?

On Sat, Dec 26, 2009 at 3:50 PM, Aslak Knutsen <aslak at conduct.no> wrote:

> The embedded container does not work atm due to classloader isolation
> problems.
>
> The error your getting tho, is due to missing environment variable
> JBOSS_HOME, so it assumes current directory as JBOSS_HOME and can't find the
> lib folder.
>
> -aslak-
>
> 2009/12/26 Johan Eltes <johan.eltes at callistaenterprise.se>
>
>> Missed the profiles. Thanks. Also, the emedded-container-project was
>> commented in the multi-modue pom. Removed the comments, mvn install and then
>> tried the demo project with the embedded profile. The test failed to execute
>> (there is no demo/lib project):
>>
>> <testcase time="0.002" classname="com.acme.weld.InjectionTestCase"
>> name="initializationError">
>>     <error message="Could not start container"
>> type="org.jboss.arquillian.spi.LifecycleException">org.jboss.arquillian.spi.LifecycleException:
>> Could not start container
>>  at
>> org.jboss.arquillian.jboss.JbossEmbeddedContainer.start(JbossEmbeddedContainer.java:55)
>> at
>> org.jboss.arquillian.impl.container.ContainerController.start(ContainerController.java:40)
>>  at
>> org.jboss.arquillian.junit.Arquillian.&lt;init&gt;(Arquillian.java:55)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>  at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at
>> org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
>>  at
>> org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
>> at
>> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
>>  at
>> org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
>> at
>> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
>>  at
>> org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
>> at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.&lt;init&gt;(JUnit4TestSet.java:45)
>>  at
>> org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
>> at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
>>  at
>> org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
>> at org.apache.maven.surefire.Surefire.run(Surefire.java:90)
>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>  at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>>  at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>> at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>> Caused by: org.jboss.bootstrap.api.config.InvalidConfigurationException:
>> Could not get a connection to the jboss.lib.url:
>> file:/Users/johan/Documents/Development/Projects/arquillian/trunk/demo/lib
>> at
>> org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator.require(JBossASBasedConfigurationValidator.java:193)
>>  at
>> org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator.require(JBossASBasedConfigurationValidator.java:163)
>> at
>> org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator.validate(JBossASBasedConfigurationValidator.java:84)
>>  at
>> org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator.validate(JBossASBasedConfigurationValidator.java:43)
>> at
>> org.jboss.bootstrap.impl.base.server.AbstractServer.validate(AbstractServer.java:1045)
>>  at
>> org.jboss.bootstrap.impl.base.server.AbstractServer.doInitialize(AbstractServer.java:599)
>> at
>> org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.doInitialize(AbstractMCServerBase.java:224)
>>  at
>> org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase.doInitialize(AbstractJBossASServerBase.java:274)
>> at
>> org.jboss.embedded.core.server.JBossASEmbeddedServerImpl.doInitialize(JBossASEmbeddedServerImpl.java:420)
>>  at
>> org.jboss.bootstrap.impl.base.server.AbstractServer.initialize(AbstractServer.java:548)
>> at
>> org.jboss.bootstrap.impl.base.server.AbstractServer.start(AbstractServer.java:353)
>>  at
>> org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.start(AbstractMCServerBase.java:250)
>> at
>> org.jboss.arquillian.jboss.JbossEmbeddedContainer.start(JbossEmbeddedContainer.java:51)
>>  ... 23 more
>> Caused by: java.io.FileNotFoundException:
>> /Users/johan/Documents/Development/Projects/arquillian/trunk/demo/lib (No
>> such file or directory)
>> at java.io.FileInputStream.open(Native Method)
>>  at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:106)
>> at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:66)
>>  at
>> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
>> at
>> org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator.require(JBossASBasedConfigurationValidator.java:189)
>>  ... 35 more
>>
>>
>>
>> On 26 dec 2009 v52, at 21.15, Aslak Knutsen wrote:
>>
>> The error message says it can't find a Container.
>>
>> If your testing the demo project, it is setup to run against multiple
>> containers controlled via maven profile. see the arquillian demo wiki.
>>
>> ie:
>> mvn test -P jboss-remote-60
>>
>> -aslak-
>>
>> 2009/12/26 Johan Eltes <johan.eltes at callistaenterprise.se>
>>
>>> Excellent, Arquillian seems perfect for my needs.
>>> The snapshot build fails, though (the demo project). All tests fails with
>>> the same problem report:
>>>
>>>   <testcase time="0.004" classname="com.acme.ejb.InjectionTestCase"
>>> name="initializationError">
>>>     <error message="No containers found"
>>> type="java.lang.RuntimeException">java.lang.RuntimeException: No containers
>>> found
>>>  at
>>> org.jboss.arquillian.spi.util.DeployableContainers.load(DeployableContainers.java:37)
>>> at
>>> org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:56)
>>>  at
>>> org.jboss.arquillian.junit.Arquillian.&lt;init&gt;(Arquillian.java:52)
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>  at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>> at
>>> org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
>>>  at
>>> org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
>>> at
>>> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
>>>  at
>>> org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
>>> at
>>> org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
>>>  at
>>> org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
>>> at
>>> org.apache.maven.surefire.junit4.JUnit4TestSet.&lt;init&gt;(JUnit4TestSet.java:45)
>>>  at
>>> org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
>>> at
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
>>>  at
>>> org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
>>> at org.apache.maven.surefire.Surefire.run(Surefire.java:90)
>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>  at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>  at
>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>>> at
>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>>> </error>
>>>   </testcase>
>>>
>>> Any hints that helps me forwards would be much appreciated.
>>>
>>> /Johan
>>>
>>> On 26 dec 2009 v52, at 11.19, Aslak Knutsen wrote:
>>>
>>> There is always the Weld User Forum:
>>> http://seamframework.org/Community/WeldUsers
>>>
>>> Weld Test does exist:
>>> http://anonsvn.jboss.org/repos/weld/test/trunk/
>>> but will be 'converted' to a Arquillian container:
>>>
>>> Arquillian is a allover 'in container' test framework. Have a look at:
>>> http://community.jboss.org/docs/DOC-14376?uniqueTitle=false
>>> http://community.jboss.org/wiki/Arquillian-Demo
>>>
>>> Junit demo code:
>>> http://anonsvn.jboss.org/repos/common/arquillian/trunk/demo/
>>>
>>> TestNG demo code:
>>> http://anonsvn.jboss.org/repos/common/arquillian/trunk/demo-testng/
>>>
>>> Arquillian does not have any direct/standalone Weld support yet, but this
>>> is in the works and will be out soon. As for now, Weld can be used via the
>>> Jboss 6.0 Remote Container.
>>>
>>> Example of Weld + JUnit + Arquillian:
>>>
>>> http://anonsvn.jboss.org/repos/common/arquillian/trunk/demo/src/test/java/com/acme/weld/InjectionTestCase.java
>>>
>>>
>>> This is the basis of upcoming Seam 3 Test.
>>>
>>> --
>>> --
>>> Aslak Knutsen; +47 952 38 791; fax +47 22 33 60 24
>>> Kongens gate 14; Boks 805 Sentrum, 0104 Oslo;
>>> http://www.conduct.no; mailto:aslak at conduct.no
>>>
>>> Conduct AS - Professional Open Source Services
>>> - Red Hat/JBoss Premier System Integrator
>>> - Pentaho Preferred Integration Partner
>>> - Atlassian Technology Partner
>>>
>>> 2009/12/26 Johan Eltes <johan.eltes at callistaenterprise.se>
>>>
>>>> It would be great me and other users to get a weld-user list!
>>>> My major pain is to wrap my head around how to implement junit tests for
>>>> cdi beans.
>>>> Having a place where users could get together to sort out essential
>>>> issues for projects trying to use Weld, would be great. If anyone has a
>>>> sample of a unit test that does not depend on anything else than weld 1.0.0
>>>> would be really great:
>>>>
>>>> - How to have the test target object injected into the test case ?
>>>> ... or...
>>>> - How to obtain an injected test target object from within the test
>>>> case?
>>>>
>>>> /Johan
>>>> _______________________________________________
>>>> weld-dev mailing list
>>>> weld-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/weld-dev
>>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Aslak Knutsen; +47 952 38 791; fax +47 22 33 60 24
>> Kongens gate 14; Boks 805 Sentrum, 0104 Oslo;
>> http://www.conduct.no; mailto:aslak at conduct.no
>>
>> Conduct AS - Professional Open Source Services
>> - Red Hat/JBoss Premier System Integrator
>> - Pentaho Preferred Integration Partner
>> - Atlassian Technology Partner
>>
>>
>>
>
>
> --
> --
> Aslak Knutsen; +47 952 38 791; fax +47 22 33 60 24
> Kongens gate 14; Boks 805 Sentrum, 0104 Oslo;
> http://www.conduct.no; mailto:aslak at conduct.no
>
> Conduct AS - Professional Open Source Services
> - Red Hat/JBoss Premier System Integrator
> - Pentaho Preferred Integration Partner
> - Atlassian Technology Partner
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>



-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20091226/238adb89/attachment-0001.html 


More information about the weld-dev mailing list