You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Damian Golda (JIRA)" <ji...@codehaus.org> on 2006/12/14 16:56:40 UTC
[jira] Created: (SUREFIRE-58) Not compatible with TestNG 5.4:
InstantiationException:
org.testng.internal.annotations.JDK15AnnotationFinder
Not compatible with TestNG 5.4: InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
-------------------------------------------------------------------------------------------------------------
Key: SUREFIRE-58
URL: http://jira.codehaus.org/browse/SUREFIRE-58
Project: surefire
Issue Type: Bug
Affects Versions: 2.2
Environment: JDK 1.5.0_09
mvn 2.0.4
surefire-api:jar:2.0
surefire-testng:jar:2.0
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.2</version>
</plugin>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.4</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
Reporter: Damian Golda
Priority: Minor
While running test using mvn and TestNG 5.4 there surefire reports exception:
org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.internal.annotations.JDK15AnnotationFinder; nes
ed exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder; nested excepti
n is org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; n
sted exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; nested
exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
at java.lang.Class.newInstance0(Class.java:335)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(TestNGDirectoryTestSuite.java:86)
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:494)
at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:216)
at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:243)
at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:145)
at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
I suppose that the reason is that in TestNG 5.4 (and 5.3) constructor for JDK15AnnotationFinder has an argument:
public JDK15AnnotationFinder(IAnnotationTransformer transformer)
and there is no default constructor.
I found that there is only one implementation of IAnnotationTransformer - DefaultAnnotationTransformer which fortunatly has default constructor.
So I it can be changed from
new JDK15AnnotationFinder()
to
new JDK15AnnotationFinder(new DefaultAnnotationTransformer())
So instead of class.newInstance should be used:
Constructor c = Class.getConstructor(IAnnotationTransformer.class);
DefaultAnnotationTransformer daf = new DefaultAnnotationTransformer()
c.newInstance(daf);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-58) Not compatible with TestNG 5.4:
InstantiationException:
org.testng.internal.annotations.JDK15AnnotationFinder
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-58:
---------------------------------
Fix Version/s: 2.3
> Not compatible with TestNG 5.4: InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> -------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-58
> URL: http://jira.codehaus.org/browse/SUREFIRE-58
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.4
> Environment: JDK 1.5.0_09
> mvn 2.0.4
> surefire-api:jar:2.0
> surefire-testng:jar:2.0
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.2</version>
> </plugin>
> <dependency>
> <groupId>org.testng</groupId>
> <artifactId>testng</artifactId>
> <version>5.4</version>
> <classifier>jdk15</classifier>
> <scope>test</scope>
> </dependency>
> Reporter: Damian Golda
> Priority: Minor
> Fix For: 2.3
>
>
> While running test using mvn and TestNG 5.4 there surefire reports exception:
> org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.internal.annotations.JDK15AnnotationFinder; nes
> ed exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder; nested excepti
> n is org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; n
> sted exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; nested
> exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> at java.lang.Class.newInstance0(Class.java:335)
> at java.lang.Class.newInstance(Class.java:303)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(TestNGDirectoryTestSuite.java:86)
> 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:494)
> at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:216)
> at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:243)
> at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:145)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
> I suppose that the reason is that in TestNG 5.4 (and 5.3) constructor for JDK15AnnotationFinder has an argument:
> public JDK15AnnotationFinder(IAnnotationTransformer transformer)
> and there is no default constructor.
> I found that there is only one implementation of IAnnotationTransformer - DefaultAnnotationTransformer which fortunatly has default constructor.
> So I it can be changed from
> new JDK15AnnotationFinder()
> to
> new JDK15AnnotationFinder(new DefaultAnnotationTransformer())
> So instead of class.newInstance should be used:
> Constructor c = Class.getConstructor(IAnnotationTransformer.class);
> DefaultAnnotationTransformer daf = new DefaultAnnotationTransformer()
> c.newInstance(daf);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (SUREFIRE-58) Not compatible with TestNG 5.4:
InstantiationException:
org.testng.internal.annotations.JDK15AnnotationFinder
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-58:
---------------------------------
Fix Version/s: (was: 2.3)
2.4
> Not compatible with TestNG 5.4: InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> -------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-58
> URL: http://jira.codehaus.org/browse/SUREFIRE-58
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.5
> Environment: JDK 1.5.0_09
> mvn 2.0.4
> surefire-api:jar:2.0
> surefire-testng:jar:2.0
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.2</version>
> </plugin>
> <dependency>
> <groupId>org.testng</groupId>
> <artifactId>testng</artifactId>
> <version>5.4</version>
> <classifier>jdk15</classifier>
> <scope>test</scope>
> </dependency>
> Reporter: Damian Golda
> Priority: Minor
> Fix For: 2.4
>
>
> While running test using mvn and TestNG 5.4 there surefire reports exception:
> org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.internal.annotations.JDK15AnnotationFinder; nes
> ed exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder; nested excepti
> n is org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; n
> sted exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; nested
> exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> at java.lang.Class.newInstance0(Class.java:335)
> at java.lang.Class.newInstance(Class.java:303)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(TestNGDirectoryTestSuite.java:86)
> 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:494)
> at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:216)
> at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:243)
> at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:145)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
> I suppose that the reason is that in TestNG 5.4 (and 5.3) constructor for JDK15AnnotationFinder has an argument:
> public JDK15AnnotationFinder(IAnnotationTransformer transformer)
> and there is no default constructor.
> I found that there is only one implementation of IAnnotationTransformer - DefaultAnnotationTransformer which fortunatly has default constructor.
> So I it can be changed from
> new JDK15AnnotationFinder()
> to
> new JDK15AnnotationFinder(new DefaultAnnotationTransformer())
> So instead of class.newInstance should be used:
> Constructor c = Class.getConstructor(IAnnotationTransformer.class);
> DefaultAnnotationTransformer daf = new DefaultAnnotationTransformer()
> c.newInstance(daf);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (SUREFIRE-58) Not compatible with TestNG 5.4:
InstantiationException:
org.testng.internal.annotations.JDK15AnnotationFinder
Posted by "Dan Fabulich (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Fabulich closed SUREFIRE-58.
--------------------------------
Resolution: Cannot Reproduce
The current latest 2.4-SNAPSHOT trunk works for me with TestNG 5.1, 5.2, 5.3, 5.4, 5.5, 5.6 and 5.7.
> Not compatible with TestNG 5.4: InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> -------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-58
> URL: http://jira.codehaus.org/browse/SUREFIRE-58
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.x
> Environment: JDK 1.5.0_09
> mvn 2.0.4
> surefire-api:jar:2.0
> surefire-testng:jar:2.0
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.2</version>
> </plugin>
> <dependency>
> <groupId>org.testng</groupId>
> <artifactId>testng</artifactId>
> <version>5.4</version>
> <classifier>jdk15</classifier>
> <scope>test</scope>
> </dependency>
> Reporter: Damian Golda
> Priority: Minor
> Fix For: 2.4
>
>
> While running test using mvn and TestNG 5.4 there surefire reports exception:
> org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.internal.annotations.JDK15AnnotationFinder; nes
> ed exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder; nested excepti
> n is org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; n
> sted exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; nested
> exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> at java.lang.Class.newInstance0(Class.java:335)
> at java.lang.Class.newInstance(Class.java:303)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(TestNGDirectoryTestSuite.java:86)
> 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:494)
> at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:216)
> at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:243)
> at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:145)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
> I suppose that the reason is that in TestNG 5.4 (and 5.3) constructor for JDK15AnnotationFinder has an argument:
> public JDK15AnnotationFinder(IAnnotationTransformer transformer)
> and there is no default constructor.
> I found that there is only one implementation of IAnnotationTransformer - DefaultAnnotationTransformer which fortunatly has default constructor.
> So I it can be changed from
> new JDK15AnnotationFinder()
> to
> new JDK15AnnotationFinder(new DefaultAnnotationTransformer())
> So instead of class.newInstance should be used:
> Constructor c = Class.getConstructor(IAnnotationTransformer.class);
> DefaultAnnotationTransformer daf = new DefaultAnnotationTransformer()
> c.newInstance(daf);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SUREFIRE-58) Not compatible with TestNG 5.4:
InstantiationException:
org.testng.internal.annotations.JDK15AnnotationFinder
Posted by "Jesse Kuhnert (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/SUREFIRE-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92902 ]
Jesse Kuhnert commented on SUREFIRE-58:
---------------------------------------
I'd resolve this if I had the right perms but the new 2.4-SNAPSHOT version of surefire is compatible up to version 5.5 of TestNG.
> Not compatible with TestNG 5.4: InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> -------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-58
> URL: http://jira.codehaus.org/browse/SUREFIRE-58
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.5
> Environment: JDK 1.5.0_09
> mvn 2.0.4
> surefire-api:jar:2.0
> surefire-testng:jar:2.0
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.2</version>
> </plugin>
> <dependency>
> <groupId>org.testng</groupId>
> <artifactId>testng</artifactId>
> <version>5.4</version>
> <classifier>jdk15</classifier>
> <scope>test</scope>
> </dependency>
> Reporter: Damian Golda
> Priority: Minor
> Fix For: 2.4
>
>
> While running test using mvn and TestNG 5.4 there surefire reports exception:
> org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.internal.annotations.JDK15AnnotationFinder; nes
> ed exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder; nested excepti
> n is org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; n
> sted exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> org.apache.maven.surefire.testset.TestSetFailedException: org.testng.internal.annotations.JDK15AnnotationFinder; nested
> exception is java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> java.lang.InstantiationException: org.testng.internal.annotations.JDK15AnnotationFinder
> at java.lang.Class.newInstance0(Class.java:335)
> at java.lang.Class.newInstance(Class.java:303)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(TestNGDirectoryTestSuite.java:86)
> 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:494)
> at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:216)
> at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:243)
> at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:145)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
> I suppose that the reason is that in TestNG 5.4 (and 5.3) constructor for JDK15AnnotationFinder has an argument:
> public JDK15AnnotationFinder(IAnnotationTransformer transformer)
> and there is no default constructor.
> I found that there is only one implementation of IAnnotationTransformer - DefaultAnnotationTransformer which fortunatly has default constructor.
> So I it can be changed from
> new JDK15AnnotationFinder()
> to
> new JDK15AnnotationFinder(new DefaultAnnotationTransformer())
> So instead of class.newInstance should be used:
> Constructor c = Class.getConstructor(IAnnotationTransformer.class);
> DefaultAnnotationTransformer daf = new DefaultAnnotationTransformer()
> c.newInstance(daf);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira