[ 
https://issues.apache.org/jira/browse/TOMEE-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved TOMEE-1988.
------------------------------------
    Resolution: Auto Closed

Hi there!

We wanted to reach out and let you know that we're currently working on 
cleaning up open issues in Jira that specifically impact unsupported versions, 
including 1.7.x, 7.0.x, and 7.1.x.

If you had previously reported this issue on one of these unsupported versions, 
we kindly ask you to check if the problem still persists and can be reproduced 
on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed 
reproducible on a supported version, you're more than welcome to re-open this 
issue.

Thanks!


> LinkageError: attempted  duplicate class definition for name
> ------------------------------------------------------------
>
>                 Key: TOMEE-1988
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1988
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 7.0.2
>            Reporter: Jin Kwon
>            Priority: Major
>
> I'm trying to test my EJBs.
> with following dependency,
> {code}
> <dependency>
>   <groupId>org.apache.tomee</groupId>
>   <artifactId>openejb-core</artifactId>
>   <version>7.0.2</version>
>   <scope>test</scope>
> </dependency>
> {code}
> I configured like this.
> {code}
> final Properties properties = new Properties();
> properties.put(Context.INITIAL_CONTEXT_FACTORY,
>                "org.apache.openejb.client.LocalInitialContextFactory");
> properties.put("somePU.javax.persistence.jdbc.driver", 
> "org.apache.derby.jdbc.EmbeddedDriver");
> properties.put("somePU.javax.persistence.jdbc.url", 
> "jdbc:derby:memory:testDB;create=true");
> properties.put("somePU.javax.persistence.schema-generation.database.action", 
> "create");
> //final Context context = new InitialContext(properties);
> ejbContainer = EJBContainer.createEJBContainer(properties);
> {code}
> When I run a single test, it works.
> When I run the whole tests I got.
> {code}
> org.apache.maven.surefire.util.SurefireReflectionException: 
> java.lang.reflect.InvocationTargetException; nested exception is 
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>       at 
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>       at 
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.LinkageError: loader (instance of  
> sun/misc/Launcher$AppClassLoader): attempted  duplicate class definition for 
> name: "org/testng/TestRunner$PriorityWeight"
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>       at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
>       at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at org.testng.TestRunner.createDynamicGraph(TestRunner.java:1082)
>       at org.testng.TestRunner.privateRun(TestRunner.java:723)
>       at org.testng.TestRunner.run(TestRunner.java:610)
>       at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
>       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
>       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
>       at org.testng.SuiteRunner.run(SuiteRunner.java:289)
>       at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
>       at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
>       at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
>       at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
>       at org.testng.TestNG.runSuites(TestNG.java:1133)
>       at org.testng.TestNG.run(TestNG.java:1104)
>       at 
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
>       at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
>       at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
>       at 
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
>       ... 9 more
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to