1 2 Previous Next 28 Replies Latest reply on Jun 10, 2008 8:33 AM by adrian.brock Go to original post
      • 15. Re: Annotation Tests in deployers-vfs

        Ok, but if you do use the class, then you need to make sure it is removed
        at undeploy in the scanning deployer otherwise you'll cause a classloader leak.

        • 16. Re: Annotation Tests in deployers-vfs
          alesj

           

          "adrian@jboss.org" wrote:
          Ok, but if you do use the class, then you need to make sure it is removed
          at undeploy in the scanning deployer otherwise you'll cause a classloader leak.

          I have a SoftRef on it.
          public class DefaultElement<A extends Annotation, M extends AccessibleObject> extends WeakClassLoaderHolder implements Element<A, M>
          {
           protected String className;
           protected Signature signature;
           protected Class<A> annClass;
           protected Class<M> aoClass;
          
           private SoftReference<Class<?>> classRef;
          


          And WeakRef on the ClassLoader.
          abstract class WeakClassLoaderHolder
          {
           private WeakReference<ClassLoader> clRef;
          
           ...
          
          public class DefaultAnnotationEnvironment extends WeakClassLoaderHolder implements AnnotationEnvironment
          


          Is that OK?
          Or should I explicitly go and nullify it?

          • 17. Re: Annotation Tests in deployers-vfs
            alesj

            OK, I think I now see what you mean.

            But this still leaves we wondering how we do merging.
            Since currently we don't care about the duplicates.
            e.g.
            I have a BeanMetaData_mybean in unit X.
            And I also have KernelDeployment in unit X which also contains BeanMetaData_mybean.

            And I don't see how you can handle this properly and undeply w/o any additional information,
            e.g. who was there first --> should do the component removal, ...

            • 18. Re: Annotation Tests in deployers-vfs

              Don't you know which components came from metadata at undeploy using the same mechanism as was used at deploy? It's then just a case of making sure non-duplicates
              from the annotations get removed as well.

              • 19. Re: Annotation Tests in deployers-vfs
                alesj

                 

                "adrian@jboss.org" wrote:
                Don't you know which components came from metadata at undeploy using the same mechanism as was used at deploy? It's then just a case of making sure non-duplicates
                from the annotations get removed as well.

                Sure you know.
                But how do you know which are duplicates? ;-)

                In deploy direction it's easy --> component by that name already exists.
                How do you determine that on undeploy w/o any additional info?
                Attaching additional flag into attachments for that component name?

                • 20. Re: Annotation Tests in deployers-vfs

                   

                  "alesj" wrote:

                  In deploy direction it's easy --> component by that name already exists.
                  How do you determine that on undeploy w/o any additional info?
                  Attaching additional flag into attachments for that component name?


                  Simple Set theory :-)

                  Created Annotation components = All Possible Annotation Components - Components created via metadata

                  You can't use "does it already exist" in a symmetrical way on the undeploy,
                  but you can use "does it still exist if I remove the metadata components first".

                  In fact for the component deployers all you're really interested in is coming up
                  with a single set of component names to remove.

                  So you could in principle change (optimize) the component deployers undeploy protocol
                  to just be something like:

                  Set names = new HashSet();
                  names.addAll(metadataNames);
                  names.addAll(annotationNames);
                  removeComponents(names);
                  


                  But that's a bit restrictive in the unlikely case that the component deployer/visitor
                  wants to do something else besides removing the component. ;-)

                  • 21. Re: Annotation Tests in deployers-vfs
                    alesj

                     

                    "adrian@jboss.org" wrote:

                    You can't use "does it already exist" in a symmetrical way on the undeploy,
                    but you can use "does it still exist if I remove the metadata components first".

                    But should I even care if I try to remove a component that is already removed?

                    • 22. Re: Annotation Tests in deployers-vfs
                      alesj

                       

                      "alesj" wrote:

                      But this still leaves we wondering how we do merging.
                      Since currently we don't care about the duplicates.
                      e.g.
                      I have a BeanMetaData_mybean in unit X.
                      And I also have KernelDeployment in unit X which also contains BeanMetaData_mybean.

                      Should I go ahead and try to solve this merging in general?


                      • 23. Re: Annotation Tests in deployers-vfs
                        alesj

                        I've simplified things a bit.

                        "adrian@jboss.org" wrote:

                        i.e. one deployer knows how to scan for bean annotations

                        That's already GenericAnnotationDeployer.
                        It creates lazy metadata about classes and its annotations.

                        "adrian@jboss.org" wrote:

                        one knows how to create components from a set of such annotations
                        (mod those that already have metadata).

                        I'm creating metadata from annotations directly, leaving component creation to existing component deployers.

                         public void deploy(DeploymentUnit unit, AnnotationEnvironment deployment) throws DeploymentException
                         {
                         for (AnnotationProcessor processor : processors)
                         {
                         String attachmentName = processor.getAnnotation().getName();
                         Object annotationAttachment = unit.getAttachment(attachmentName);
                         Object metadata = processor.createMetaData(annotationAttachment);
                         if (metadata != null)
                         unit.addAttachment(attachmentName, metadata);
                        
                         Set<Class<?>> classes = deployment.classIsAnnotatedWith(processor.getAnnotation());
                         for (Class<?> clazz : classes)
                         {
                         metadata = processor.createMetaDataFromClass(clazz);
                         if (metadata != null)
                         unit.addAttachment(attachmentName + "#" + clazz.getName(), metadata);
                         }
                         }
                         }
                        


                        And in case you want to stick your deployer in between (the one that modifies all metadata created from annotations), you can easily iterate over attachments picking only those which name starts with your annotation name.

                        To handle (merging wise) just metadata that comes from annotations doesn't make sense.
                        Since duplicate metadata can pop-up from anywhere - via getAllMetaData(getOutput()) - so it's should be component deployers that know how to handle it.
                        And this must be addressed in general or not addressed at all - leading to failure on duplicate name.


                        • 24. Re: Annotation Tests in deployers-vfs
                          alesj

                           

                          "adrian@jboss.org" wrote:
                          The annotation tests in deployers-vfs are failing for me under eclipse.

                          Do you still get failing tests under eclipse?

                          • 25. Re: Annotation Tests in deployers-vfs

                             

                            "alesj" wrote:
                            "adrian@jboss.org" wrote:
                            The annotation tests in deployers-vfs are failing for me under eclipse.

                            Do you still get failing tests under eclipse?


                            Yep. One of them is fixed but the other still fails:

                            junit.framework.AssertionFailedError: Expected [appc.jar, ejbs.jar, web.jar, services.jar] got [] expected:<4> but was:<0>
                             at junit.framework.Assert.fail(Assert.java:47)
                             at junit.framework.Assert.failNotEquals(Assert.java:277)
                             at junit.framework.Assert.assertEquals(Assert.java:64)
                             at junit.framework.Assert.assertEquals(Assert.java:195)
                             at org.jboss.test.deployers.vfs.structure.AbstractStructureTest.assertChildContexts(AbstractStructureTest.java:79)
                             at org.jboss.test.deployers.vfs.structure.ear.test.EARStructureUnitTestCase.testEARAnnotationScanning(EARStructureUnitTestCase.java:143)
                             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 junit.framework.TestCase.runTest(TestCase.java:168)
                             at junit.framework.TestCase.runBare(TestCase.java:134)
                             at junit.framework.TestResult$1.protect(TestResult.java:110)
                             at junit.framework.TestResult.runProtected(TestResult.java:128)
                             at junit.framework.TestResult.run(TestResult.java:113)
                             at junit.framework.TestCase.run(TestCase.java:124)
                             at junit.framework.TestSuite.runTest(TestSuite.java:232)
                             at junit.framework.TestSuite.run(TestSuite.java:227)
                             at junit.framework.TestSuite.runTest(TestSuite.java:232)
                             at junit.framework.TestSuite.run(TestSuite.java:227)
                             at junit.framework.TestSuite.runTest(TestSuite.java:232)
                             at junit.framework.TestSuite.run(TestSuite.java:227)
                             at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
                             at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
                             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
                             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
                             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
                            
                            


                            I don't see it adding any of the subdeployments when I enable TRACE logging
                            0 DEBUG [EARStructureUnitTestCase] ==== Starting testEARAnnotationScanning ====
                            36 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.file.FileSystemContextFactory@192b996 for protocol: file
                            36 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.file.FileSystemContextFactory@192b996 for protocol: vfsfile
                            38 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.jar.JarContextFactory@8f4fb3 for protocol: jar
                            38 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.jar.JarContextFactory@8f4fb3 for protocol: vfsjar
                            40 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.memory.MemoryContextFactory@ba6c83 for protocol: vfsmemory
                            43 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.zip.ZipEntryContextFactory@29428e for protocol: zip
                            43 TRACE [VFSContextFactoryLocator] Registered org.jboss.virtual.plugins.context.zip.ZipEntryContextFactory@29428e for protocol: vfszip
                            179 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.file.FileStructure@47393f
                            179 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.war.WARStructure@1ff7a1e
                            179 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@1aa57fb
                            179 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@
                            763f5d
                            186 TRACE [VFSStructuralDeployersImpl] Determining structure for scanning.ear deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARSt
                            ructure@1ff7a1e, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@763f5d, org.jboss.deployers.vfs.plugins.structu
                            re.jar.JARStructure@1aa57fb, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@47393f]
                            197 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                            198 TRACE [WARStructure] Not recognised: scanning.ear
                            202 TRACE [MockEarStructureDeployer] Added context ContextInfoImpl{path= metaData=[META-INF] classPath=null} from scanning.ear
                            227 TRACE [VFSUtils] Can't find manifest for scanning.ear
                            330 TRACE [MockEarStructureDeployer] Recognised: scanning.ear
                            330 TRACE [VFSStructuralDeployersImpl] scanning.ear recognised by org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeploye
                            r@763f5d
                            330 TRACE [VFSStructureBuilder] Populating deployment vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/s
                            canning.ear/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=null}]}
                            351 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning
                            .ear/ ContextInfoImpl{path= metaData=[META-INF] classPath=null}
                            354 TRACE [VFSUtils] Can't find manifest for scanning.ear
                            354 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scan
                            ning.ear/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=null}]}
                            355 DEBUG [EARStructureUnitTestCase] testEARAnnotationScanning took 355ms
                            355 DEBUG [EARStructureUnitTestCase] ==== Stopping testEARAnnotationScanning ====
                            


                            • 26. Re: Annotation Tests in deployers-vfs

                              This is the output I get when run under Maven

                              11742 DEBUG [EARStructureUnitTestCase] ==== Starting testEARAnnotationScanning ====
                              11744 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1
                              11744 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7
                              11744 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a
                              11744 DEBUG [VFSStructuralDeployersImpl] Added structure deployer org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d
                              11744 TRACE [VFSStructuralDeployersImpl] Determining structure for scanning.ear deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11745 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11745 TRACE [WARStructure] Not recognised: scanning.ear
                              11746 TRACE [MockEarStructureDeployer] Added context ContextInfoImpl{path= metaData=[META-INF] classPath=null} from scanning.ear
                              11747 TRACE [VFSUtils] Can't find manifest for scanning.ear
                              11755 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@ced1a8[changed public class org.jboss.test.deployers.vfs.structure.ear.support.TestServlet fields= constructors=javassist.CtConstructor@9764bd[public TestServlet ()V], methods=] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/web.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestServlet.class
                              11757 TRACE [DefaultAnnotationEnvironment] Adding annotation @Servlet for org.jboss.test.deployers.vfs.structure.ear.support.TestServlet at type TYPE, signature: null
                              11757 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@8c2d23[public class java.lang.Object fields= constructors=javassist.CtConstructor@e776f7[public Object ()V], javassist.CtConstructor@335297[static <clinit> ()V], methods=javassist.CtMethod@191491da[private static native registerNatives ()V], javassist.CtMethod@70ae6c43[public final native getClass ()Ljava/lang/Class;], javassist.CtMethod@c13165c[public native hashCode ()I], javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z], javassist.CtMethod@33a3ff1e[protected native clone ()Ljava/lang/Object;], javassist.CtMethod@69cb6c6d[public toString ()Ljava/lang/String;], javassist.CtMethod@5e7eee0a[public final native notify ()V], javassist.CtMethod@96773899[public final native notifyAll ()V], javassist.CtMethod@42889db2[public final native wait (J)V], javassist.CtMethod@e8b1c97[public final wait (JI)V], javassist.CtMethod@d0990d36[public final wait ()V], javassist.CtMethod@919e519f[protected finalize ()V], ] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/web.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestServlet.class
                              11765 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@9a41d2[changed public class org.jboss.test.deployers.vfs.structure.ear.support.TestEJB fields= constructors=javassist.CtConstructor@1574b88[public TestEJB ()V], methods=] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ejbs.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestEJB.class
                              11767 TRACE [DefaultAnnotationEnvironment] Adding annotation @Stateless for org.jboss.test.deployers.vfs.structure.ear.support.TestEJB at type TYPE, signature: null
                              11767 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@8c2d23[public class java.lang.Object fields= constructors=javassist.CtConstructor@e776f7[public Object ()V], javassist.CtConstructor@335297[static <clinit> ()V], methods=javassist.CtMethod@191491da[private static native registerNatives ()V], javassist.CtMethod@70ae6c43[public final native getClass ()Ljava/lang/Class;], javassist.CtMethod@c13165c[public native hashCode ()I], javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z], javassist.CtMethod@33a3ff1e[protected native clone ()Ljava/lang/Object;], javassist.CtMethod@69cb6c6d[public toString ()Ljava/lang/String;], javassist.CtMethod@5e7eee0a[public final native notify ()V], javassist.CtMethod@96773899[public final native notifyAll ()V], javassist.CtMethod@42889db2[public final native wait (J)V], javassist.CtMethod@e8b1c97[public final wait (JI)V], javassist.CtMethod@d0990d36[public final wait ()V], javassist.CtMethod@919e519f[protected finalize ()V], ] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ejbs.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestEJB.class
                              11773 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@7db754[changed public class org.jboss.test.deployers.vfs.structure.ear.support.TestAppC fields= constructors=javassist.CtConstructor@18efd7c[public TestAppC ()V], methods=] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/appc.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestAppC.class
                              11775 TRACE [DefaultAnnotationEnvironment] Adding annotation @AppClient for org.jboss.test.deployers.vfs.structure.ear.support.TestAppC at type TYPE, signature: null
                              11776 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@8c2d23[public class java.lang.Object fields= constructors=javassist.CtConstructor@e776f7[public Object ()V], javassist.CtConstructor@335297[static <clinit> ()V], methods=javassist.CtMethod@191491da[private static native registerNatives ()V], javassist.CtMethod@70ae6c43[public final native getClass ()Ljava/lang/Class;], javassist.CtMethod@c13165c[public native hashCode ()I], javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z], javassist.CtMethod@33a3ff1e[protected native clone ()Ljava/lang/Object;], javassist.CtMethod@69cb6c6d[public toString ()Ljava/lang/String;], javassist.CtMethod@5e7eee0a[public final native notify ()V], javassist.CtMethod@96773899[public final native notifyAll ()V], javassist.CtMethod@42889db2[public final native wait (J)V], javassist.CtMethod@e8b1c97[public final wait (JI)V], javassist.CtMethod@d0990d36[public final wait ()V], javassist.CtMethod@919e519f[protected finalize ()V], ] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/appc.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestAppC.class
                              11783 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@1da1a93[changed public class org.jboss.test.deployers.vfs.structure.ear.support.TestService fields= constructors=javassist.CtConstructor@6aade[public TestService ()V], methods=] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/services.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestService.class
                              11785 TRACE [DefaultAnnotationEnvironment] Adding annotation @Service for org.jboss.test.deployers.vfs.structure.ear.support.TestService at type TYPE, signature: null
                              11785 TRACE [GenericAnnotationResourceVisitor] Scanning class javassist.CtClassType@8c2d23[public class java.lang.Object fields= constructors=javassist.CtConstructor@e776f7[public Object ()V], javassist.CtConstructor@335297[static <clinit> ()V], methods=javassist.CtMethod@191491da[private static native registerNatives ()V], javassist.CtMethod@70ae6c43[public final native getClass ()Ljava/lang/Class;], javassist.CtMethod@c13165c[public native hashCode ()I], javassist.CtMethod@87a44f24[public equals (Ljava/lang/Object;)Z], javassist.CtMethod@33a3ff1e[protected native clone ()Ljava/lang/Object;], javassist.CtMethod@69cb6c6d[public toString ()Ljava/lang/String;], javassist.CtMethod@5e7eee0a[public final native notify ()V], javassist.CtMethod@96773899[public final native notifyAll ()V], javassist.CtMethod@42889db2[public final native wait (J)V], javassist.CtMethod@e8b1c97[public final wait (JI)V], javassist.CtMethod@d0990d36[public final wait ()V], javassist.CtMethod@919e519f[protected finalize ()V], ] for annotations, resource url: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/services.jar/org/jboss/test/deployers/vfs/structure/ear/support/TestService.class
                              11786 TRACE [VFSStructuralDeployersImpl] Determining structure for web.jar deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11786 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11786 TRACE [WARStructure] Not recognised: web.jar
                              11786 TRACE [MockEarStructureDeployer] Not recognised: web.jar
                              11787 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=[] classPath=null} from web.jar
                              11787 TRACE [VFSUtils] Can't find manifest for scanning.ear/web.jar
                              11787 TRACE [JARStructure] Added classpath entry web.jar for web.jar from FileHandler@4657294[path=scanning.ear context=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear real=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/]
                              11787 TRACE [VFSStructuralDeployersImpl] Determining structure for org deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11788 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11788 TRACE [WARStructure] Not recognised: org
                              11788 TRACE [MockEarStructureDeployer] Not recognised: org
                              11788 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11788 TRACE [JARStructure] Not recognised: org
                              11788 TRACE [FileStructure] ... no - not a file.
                              11788 TRACE [FileStructure] Not recognised: org
                              11788 TRACE [VFSStructuralDeployersImpl] org not recognised
                              11789 TRACE [JARStructure] Recognised: web.jar
                              11789 TRACE [VFSStructuralDeployersImpl] web.jar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a
                              11789 TRACE [VFSStructuralDeployersImpl] Determining structure for ejbs.jar deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11789 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11789 TRACE [WARStructure] Not recognised: ejbs.jar
                              11789 TRACE [MockEarStructureDeployer] Not recognised: ejbs.jar
                              11789 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=[META-INF] classPath=null} from ejbs.jar
                              11790 TRACE [VFSUtils] Manifest has no Class-Path for scanning.ear/ejbs.jar
                              11790 TRACE [JARStructure] Added classpath entry ejbs.jar for ejbs.jar from FileHandler@4657294[path=scanning.ear context=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear real=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/]
                              11790 TRACE [VFSStructuralDeployersImpl] Determining structure for META-INF deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11790 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11790 TRACE [WARStructure] Not recognised: META-INF
                              11791 TRACE [MockEarStructureDeployer] Not recognised: META-INF
                              11791 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11791 TRACE [JARStructure] Not recognised: META-INF
                              11791 TRACE [FileStructure] ... no - not a file.
                              11791 TRACE [FileStructure] Not recognised: META-INF
                              11791 TRACE [VFSStructuralDeployersImpl] META-INF not recognised
                              11791 TRACE [VFSStructuralDeployersImpl] Determining structure for org deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11791 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11791 TRACE [WARStructure] Not recognised: org
                              11792 TRACE [MockEarStructureDeployer] Not recognised: org
                              11792 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11792 TRACE [JARStructure] Not recognised: org
                              11792 TRACE [FileStructure] ... no - not a file.
                              11792 TRACE [FileStructure] Not recognised: org
                              11792 TRACE [VFSStructuralDeployersImpl] org not recognised
                              11792 TRACE [JARStructure] Recognised: ejbs.jar
                              11792 TRACE [VFSStructuralDeployersImpl] ejbs.jar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a
                              11792 TRACE [VFSStructuralDeployersImpl] Determining structure for appc.jar deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11793 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11793 TRACE [WARStructure] Not recognised: appc.jar
                              11793 TRACE [MockEarStructureDeployer] Not recognised: appc.jar
                              11793 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=[] classPath=null} from appc.jar
                              11793 TRACE [VFSUtils] Can't find manifest for scanning.ear/appc.jar
                              11793 TRACE [JARStructure] Added classpath entry appc.jar for appc.jar from FileHandler@4657294[path=scanning.ear context=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear real=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/]
                              11794 TRACE [VFSStructuralDeployersImpl] Determining structure for org deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11794 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11794 TRACE [WARStructure] Not recognised: org
                              11794 TRACE [MockEarStructureDeployer] Not recognised: org
                              11794 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11794 TRACE [JARStructure] Not recognised: org
                              11794 TRACE [FileStructure] ... no - not a file.
                              11794 TRACE [FileStructure] Not recognised: org
                              11794 TRACE [VFSStructuralDeployersImpl] org not recognised
                              11795 TRACE [JARStructure] Recognised: appc.jar
                              11795 TRACE [VFSStructuralDeployersImpl] appc.jar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a
                              11795 TRACE [VFSStructuralDeployersImpl] Determining structure for services.jar deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11795 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11795 TRACE [WARStructure] Not recognised: services.jar
                              11795 TRACE [MockEarStructureDeployer] Not recognised: services.jar
                              11795 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=[META-INF] classPath=null} from services.jar
                              11796 TRACE [VFSUtils] Manifest has no Class-Path for scanning.ear/services.jar
                              11796 TRACE [JARStructure] Added classpath entry services.jar for services.jar from FileHandler@4657294[path=scanning.ear context=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear real=file:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/]
                              11796 TRACE [VFSStructuralDeployersImpl] Determining structure for META-INF deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11796 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11796 TRACE [WARStructure] Not recognised: META-INF
                              11796 TRACE [MockEarStructureDeployer] Not recognised: META-INF
                              11797 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11797 TRACE [JARStructure] Not recognised: META-INF
                              11797 TRACE [FileStructure] ... no - not a file.
                              11797 TRACE [FileStructure] Not recognised: META-INF
                              11797 TRACE [VFSStructuralDeployersImpl] META-INF not recognised
                              11797 TRACE [VFSStructuralDeployersImpl] Determining structure for org deployers=[org.jboss.deployers.vfs.plugins.structure.war.WARStructure@4b62a7, org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d, org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a, org.jboss.deployers.vfs.plugins.structure.file.FileStructure@b3a5d1]
                              11797 TRACE [WARStructure] ... no - doesn't look like a war and no WEB-INF subdirectory.
                              11797 TRACE [WARStructure] Not recognised: org
                              11797 TRACE [MockEarStructureDeployer] Not recognised: org
                              11798 TRACE [JARStructure] ... no - doesn't look like a jar and no META-INF subdirectory.
                              11798 TRACE [JARStructure] Not recognised: org
                              11798 TRACE [FileStructure] ... no - not a file.
                              11798 TRACE [FileStructure] Not recognised: org
                              11798 TRACE [VFSStructuralDeployersImpl] org not recognised
                              11798 TRACE [JARStructure] Recognised: services.jar
                              11798 TRACE [VFSStructuralDeployersImpl] services.jar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@139ef3a
                              11798 TRACE [MockEarStructureDeployer] Recognised: scanning.ear
                              11798 TRACE [VFSStructuralDeployersImpl] scanning.ear recognised by org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer@88e83d
                              11798 TRACE [VFSStructureBuilder] Populating deployment vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=null}, ContextInfoImpl{path=web.jar metaData=[] classPath=[ClassPathEntryImpl{path=web.jar}]}, ContextInfoImpl{path=ejbs.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=ejbs.jar}]}, ContextInfoImpl{path=appc.jar metaData=[] classPath=[ClassPathEntryImpl{path=appc.jar}]}, ContextInfoImpl{path=services.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=services.jar}]}]}
                              11798 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ ContextInfoImpl{path= metaData=[META-INF] classPath=null}
                              11799 TRACE [VFSUtils] Can't find manifest for scanning.ear
                              11799 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=null}, ContextInfoImpl{path=web.jar metaData=[] classPath=[ClassPathEntryImpl{path=web.jar}]}, ContextInfoImpl{path=ejbs.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=ejbs.jar}]}, ContextInfoImpl{path=appc.jar metaData=[] classPath=[ClassPathEntryImpl{path=appc.jar}]}, ContextInfoImpl{path=services.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=services.jar}]}]}
                              11799 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/web.jar/ ContextInfoImpl{path=web.jar metaData=[] classPath=[ClassPathEntryImpl{path=web.jar}]}
                              11799 TRACE [VFSStructureBuilder] Resolving classpath entry ClassPathEntryImpl{path=web.jar} for vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/web.jar/
                              11800 TRACE [VFSUtils] Can't find manifest for scanning.ear/web.jar
                              11800 TRACE [AbstractVFSDeploymentContext] ClassPath for scanning.ear/web.jar is scanning.ear/web.jar
                              11800 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/web.jar/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[] classPath=[ClassPathEntryImpl{path=web.jar}]}]}
                              11800 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ejbs.jar/ ContextInfoImpl{path=ejbs.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=ejbs.jar}]}
                              11800 TRACE [VFSStructureBuilder] Resolving classpath entry ClassPathEntryImpl{path=ejbs.jar} for vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ejbs.jar/
                              11800 TRACE [VFSUtils] Manifest has no Class-Path for scanning.ear/ejbs.jar
                              11800 TRACE [AbstractVFSDeploymentContext] ClassPath for scanning.ear/ejbs.jar is scanning.ear/ejbs.jar
                              11800 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/ejbs.jar/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=[ClassPathEntryImpl{path=ejbs.jar}]}]}
                              11801 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/appc.jar/ ContextInfoImpl{path=appc.jar metaData=[] classPath=[ClassPathEntryImpl{path=appc.jar}]}
                              11801 TRACE [VFSStructureBuilder] Resolving classpath entry ClassPathEntryImpl{path=appc.jar} for vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/appc.jar/
                              11801 TRACE [VFSUtils] Can't find manifest for scanning.ear/appc.jar
                              11801 TRACE [AbstractVFSDeploymentContext] ClassPath for scanning.ear/appc.jar is scanning.ear/appc.jar
                              11801 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/appc.jar/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[] classPath=[ClassPathEntryImpl{path=appc.jar}]}]}
                              11801 TRACE [VFSStructureBuilder] Apply context: vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/services.jar/ ContextInfoImpl{path=services.jar metaData=[META-INF] classPath=[ClassPathEntryImpl{path=services.jar}]}
                              11802 TRACE [VFSStructureBuilder] Resolving classpath entry ClassPathEntryImpl{path=services.jar} for vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/services.jar/
                              11802 TRACE [VFSUtils] Manifest has no Class-Path for scanning.ear/services.jar
                              11802 TRACE [AbstractVFSDeploymentContext] ClassPath for scanning.ear/services.jar is scanning.ear/services.jar
                              11802 TRACE [VFSStructureBuilder] Populating Context vfsfile:/home/ejort/jboss-deployers/deployers-vfs/target/tests-classes/structure/ear/scanning.ear/services.jar/ metaData=StructureMetaDataImpl{contexts=[ContextInfoImpl{path= metaData=[META-INF] classPath=[ClassPathEntryImpl{path=services.jar}]}]}
                              11802 DEBUG [EARStructureUnitTestCase] testEARAnnotationScanning took 59ms
                              11802 DEBUG [EARStructureUnitTestCase] ==== Stopping testEARAnnotationScanning ====
                              


                              • 27. Re: Annotation Tests in deployers-vfs
                                alesj

                                 

                                "adrian@jboss.org" wrote:
                                "alesj" wrote:
                                "adrian@jboss.org" wrote:
                                The annotation tests in deployers-vfs are failing for me under eclipse.

                                Do you still get failing tests under eclipse?


                                Yep. One of them is fixed but the other still fails:

                                junit.framework.AssertionFailedError: Expected [appc.jar, ejbs.jar, web.jar, services.jar] got [] expected:<4> but was:<0>
                                 at junit.framework.Assert.fail(Assert.java:47)
                                 at junit.framework.Assert.failNotEquals(Assert.java:277)
                                 at junit.framework.Assert.assertEquals(Assert.java:64)
                                 at junit.framework.Assert.assertEquals(Assert.java:195)
                                 at org.jboss.test.deployers.vfs.structure.AbstractStructureTest.assertChildContexts(AbstractStructureTest.java:79)
                                 at org.jboss.test.deployers.vfs.structure.ear.test.EARStructureUnitTestCase.testEARAnnotationScanning(EARStructureUnitTestCase.java:143)
                                

                                What about now?
                                I've changed to use string as annotation classname, which means it will be loaded via unit's classloader - which should then definitely match annotation on the test class.

                                • 28. Re: Annotation Tests in deployers-vfs

                                  Green. ;-)

                                  1 2 Previous Next