[seam-dev] Seam XML breaking tests with Arquillian

Lincoln Baxter, III lincolnbaxter at gmail.com
Tue May 25 10:42:55 EDT 2010


Verified and committing updated versions for international module now. It's
all working.

On Mon, May 24, 2010 at 6:09 PM, Dan Allen <dan.j.allen at gmail.com> wrote:

> Actually, the problem is explained here:
>
> http://community.jboss.org/message/544577#544577
>
> ...and it's cleared up now.
>
> On Mon, May 24, 2010 at 4:09 PM, Lincoln Baxter, III <
> lincolnbaxter at gmail.com> wrote:
>
>> See the included Test Case for an example: (Below)
>>
>> The Latest SNAPSHOT of Seam XML and the Alpha2 of Arquillian (or
>> SNAPSHOT), exceptions occur when attempting to run any test suite. Any
>> thoughts?
>>
>>         <dependency>
>>             <groupId>org.jboss.seam.xml</groupId>
>>             <artifactId>seam-xml-bean-config</artifactId>
>>             <version>3.0.0-SNAPSHOT</version>
>>             <scope>test</scope>
>>         </dependency>
>>
>>
>>         <dependency>
>>             <groupId>org.jboss.arquillian</groupId>
>>             <artifactId>arquillian-junit</artifactId>
>>             <version>1.0.0.Alpha2</version>
>>             <scope>test</scope>
>>         </dependency>
>> ... etc
>>
>> Exception:
>>
>> org.jboss.arquillian.impl.event.FiredEventException:
>> java.lang.RuntimeException: Could not get Deployment
>>     at
>> org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
>>     at
>> org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
>>     at
>> org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:78)
>>     at
>> org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:151)
>>     at
>> org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:170)
>>     at
>> org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:272)
>>     at
>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:166)
>>     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>     at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:118)
>>     at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>>     at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>> Caused by: java.lang.RuntimeException: Could not get Deployment
>>     at
>> org.jboss.arquillian.impl.DeploymentAnnotationArchiveGenerator.generateApplicationArchive(DeploymentAnnotationArchiveGenerator.java:78)
>>     at
>> org.jboss.arquillian.impl.ClientDeploymentGenerator.generate(ClientDeploymentGenerator.java:57)
>>     at
>> org.jboss.arquillian.impl.handler.ArchiveGenerator.callback(ArchiveGenerator.java:52)
>>     at
>> org.jboss.arquillian.impl.handler.ArchiveGenerator.callback(ArchiveGenerator.java:42)
>>     at
>> org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
>>     ... 14 more
>> Caused by: java.lang.reflect.InvocationTargetException
>>     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.jboss.arquillian.impl.DeploymentAnnotationArchiveGenerator.generateApplicationArchive(DeploymentAnnotationArchiveGenerator.java:55)
>>     ... 18 more
>> Caused by: java.lang.IllegalArgumentException:
>> org/jboss/seam/international/test/timezone/override.xml not found in
>> classloader sun.misc.Launcher$AppClassLoader at 77cde100
>>     at org.jboss.shrinkwrap.impl.base.Validate.notNull(Validate.java:44)
>>     at
>> org.jboss.shrinkwrap.impl.base.asset.ClassLoaderAsset.<init>(ClassLoaderAsset.java:64)
>>     at
>> org.jboss.shrinkwrap.impl.base.asset.ClassLoaderAsset.<init>(ClassLoaderAsset.java:48)
>>     at
>> org.jboss.shrinkwrap.impl.base.container.ContainerBase.addManifestResource(ContainerBase.java:464)
>>     at
>> org.jboss.seam.international.test.timezone.DefaultTimeZoneOverrideTest.createTestArchive(DefaultTimeZoneOverrideTest.java:45)
>>     ... 23 more
>>
>> org.jboss.arquillian.impl.event.FiredEventException:
>> java.lang.IllegalStateException: No org.jboss.shrinkwrap.api.Archive found
>> in context
>>     at
>> org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
>>     at
>> org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
>>     at
>> org.jboss.arquillian.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:86)
>>     at
>> org.jboss.arquillian.junit.Arquillian$3$2.evaluate(Arquillian.java:174)
>>     at
>> org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:272)
>>     at
>> org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:166)
>>     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>     at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:118)
>>     at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>>     at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>     at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>> Caused by: java.lang.IllegalStateException: No
>> org.jboss.shrinkwrap.api.Archive found in context
>>     at org.jboss.arquillian.impl.Validate.stateNotNull(Validate.java:75)
>>     at
>> org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:58)
>>     at
>> org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:47)
>>     at
>> org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
>>     ... 13 more
>>
>>
>>
>> /*
>>  * JBoss, Home of Professional Open Source
>>  * Copyright 2010, Red Hat, Inc., and individual contributors
>>  * by the @authors tag. See the copyright.txt in the distribution for a
>>  * full listing of individual contributors.
>>  *
>>  * This is free software; you can redistribute it and/or modify it
>>  * under the terms of the GNU Lesser General Public License as
>>  * published by the Free Software Foundation; either version 2.1 of
>>  * the License, or (at your option) any later version.
>>  *
>>  * This software is distributed in the hope that it will be useful,
>>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>>  * Lesser General Public License for more details.
>>  *
>>  * You should have received a copy of the GNU Lesser General Public
>>  * License along with this software; if not, write to the Free
>>  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
>>  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
>>  */
>> package org.jboss.seam.international.test.timezone;
>>
>> import javax.inject.Inject;
>>
>> import org.jboss.arquillian.api.Deployment;
>> import org.jboss.arquillian.junit.Arquillian;
>> import org.jboss.seam.international.test.MockLogger;
>> import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
>> import org.jboss.shrinkwrap.api.ArchivePaths;
>> import org.jboss.shrinkwrap.api.ShrinkWrap;
>> import org.jboss.shrinkwrap.api.spec.JavaArchive;
>> import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
>> import org.joda.time.DateTimeZone;
>> import org.junit.Assert;
>> import org.junit.Test;
>> import org.junit.runner.RunWith;
>>
>> @RunWith(Arquillian.class)
>> public class DefaultTimeZoneOverrideTest
>> {
>>    @Deployment
>>    public static JavaArchive createTestArchive()
>>    {
>>       return ShrinkWrap.create("test.jar",
>> JavaArchive.class).addClasses(MockLogger.class,
>> DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new
>> byte[0]),
>> ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/override.xml",
>> ArchivePaths.create("seam-beans.xml"));
>>    }
>>
>>    @Inject
>>    DateTimeZone timeZone;
>>
>>    @Test
>>    public void testDefaultTimeZoneProducerDirect()
>>    {
>>       Assert.assertNotNull(timeZone);
>>       Assert.assertEquals("America/Tijuana", timeZone.getID());
>>    }
>> }
>>
>>
>>
>>
>> --
>> Lincoln Baxter, III
>> http://ocpsoft.com
>> http://scrumshark.com
>> "Keep it Simple"
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-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
>



-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100525/a6cd92f8/attachment-0001.html 


More information about the seam-dev mailing list