testng-eclipse icon indicating copy to clipboard operation
testng-eclipse copied to clipboard

Error reading configuration file

Open juherr opened this issue 9 years ago • 16 comments

Exception in thread "main" java.util.ServiceConfigurationError: org.testng.remote.support.RemoteTestNGFactory: Error reading configuration file
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.parse(Unknown Source)
at java.util.ServiceLoader.access$200(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
at java.util.ServiceLoader$1.hasNext(Unknown Source)
at org.testng.remote.support.ServiceLoaderHelper.getFirst(ServiceLoaderHelper.java:16)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:43)
Caused by: java.io.FileNotFoundException: C:\Users\MyUsername(Das System kann die angegebene Datei nicht finden)
//Translation: Can't find the requested file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
... 7 more

From http://stackoverflow.com/q/38780227/4234729

juherr avatar Aug 05 '16 07:08 juherr

looks like it's encoding issue of the file path: http://stackoverflow.com/questions/38780227/cant-launch-simple-test-with-testng-error-reading-configuration-file#comment64943932_38780227

missedone avatar Sep 28 '16 14:09 missedone

even i am getting the same errror:

[RemoteTestNG] detected TestNG version 6.14.3 java.util.ServiceConfigurationError: org.testng.xml.ISuiteParser: Error reading configuration file at java.util.ServiceLoader.fail(Unknown Source) at java.util.ServiceLoader.parse(Unknown Source) at java.util.ServiceLoader.access$200(Unknown Source) at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source) at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source) at java.util.ServiceLoader$1.hasNext(Unknown Source) at org.testng.xml.Parser.(Parser.java:38) at org.testng.TestNG.parseSuite(TestNG.java:295) at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:348) at org.testng.TestNG.initializeEverything(TestNG.java:995) at org.testng.remote.support.RemoteTestNG6_12.initialize(RemoteTestNG6_12.java:22) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(Unknown Source) at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source) at java.util.zip.InflaterInputStream.read(Unknown Source) at java.io.FilterInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.util.ServiceLoader.parseLine(Unknown Source) ... 13 more

RahulMTechnocredits avatar May 18 '19 13:05 RahulMTechnocredits

where did you get the testng 6.14.3 jar? could you have the integrity check on that jar file to make sure the file is not corruption duration downloading.

missedone avatar May 18 '19 19:05 missedone

[RemoteTestNG] detected TestNG version 7.8.0 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. java.util.ServiceConfigurationError: org.testng.xml.ISuiteParser: Error accessing configuration file at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1180) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1213) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) at org.testng.xml.internal.Parser.(Parser.java:47) at org.testng.TestNG.parseSuite(TestNG.java:330) at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:394) at org.testng.TestNG.initializeEverything(TestNG.java:1062) at org.testng.remote.support.RemoteTestNG7_8.initialize(RemoteTestNG7_8.java:23) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:98) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused by: java.nio.file.NoSuchFileException: C:\Users\Hey at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:199) at java.base/java.nio.file.Files.readAttributes(Files.java:1851) at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264) at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:709) at java.base/java.util.zip.ZipFile.(ZipFile.java:243) at java.base/java.util.zip.ZipFile.(ZipFile.java:172) at java.base/java.util.jar.JarFile.(JarFile.java:347) at java.base/sun.net.www.protocol.jar.URLJarFile.(URLJarFile.java:103) at java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72) at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:191) at java.base/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:91) at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:132) at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:175) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1172) ... 13 more i got this Error, when i try to run in testNG

ranga1989 avatar Nov 22 '23 08:11 ranga1989

@ranga1989

Caused by: java.nio.file.NoSuchFileException: C:\Users\Hey

Does this tell you anything on your file system?

krmahadevan avatar Nov 22 '23 09:11 krmahadevan

No

ranga1989 avatar Nov 22 '23 11:11 ranga1989

Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format : this error only show while running maven project with TestNG framework. Can you help me out to resolve this issue.

Thanks,

Ranganathan.G

ranga1989 avatar Nov 22 '23 11:11 ranga1989

@ranga1989 - I am not sure what you are asking for. If you run mvn clean test that should run your tests. This seems to be something that is specific to your laptop and so you should look at what might be causing the problem

krmahadevan avatar Nov 22 '23 12:11 krmahadevan

Hi,

Can you send your number to explain the problem

Thanks, Ranganathan.G

On Wed, 22 Nov 2023, 5:41 pm Krishnan Mahadevan, @.***> wrote:

@ranga1989 https://github.com/ranga1989 - I am not sure what you are asking for. If you run mvn clean test that should run your tests. This seems to be something that is specific to your laptop and so you should look at what might be causing the problem

— Reply to this email directly, view it on GitHub https://github.com/testng-team/testng-eclipse/issues/271#issuecomment-1822655571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJGQVYUQIHJPDCJ4TETNXTYFXTVVAVCNFSM4CLVVS22U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBSGI3DKNJVG4YQ . You are receiving this because you were mentioned.Message ID: @.***>

ranga1989 avatar Nov 22 '23 12:11 ranga1989

@ranga1989 - Please take time to collect the details required and share the details here which explains the problem. Phone conversations are unfortunately not an option.

krmahadevan avatar Nov 22 '23 12:11 krmahadevan

Hi,

Step1: I have install Eclipse 2023-06 and java 1.8 Step2: Create Maven project and add testNG Step3: Create a sample program Step4: Run in TestNG

[image: image.png]

On Wed, Nov 22, 2023 at 6:02 PM Krishnan Mahadevan @.***> wrote:

@ranga1989 https://github.com/ranga1989 - Please take time to collect the details required and share the details here which explains the problem. Phone conversations are unfortunately not an option.

— Reply to this email directly, view it on GitHub https://github.com/testng-team/testng-eclipse/issues/271#issuecomment-1822686872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZJGQV6K6XSVFGV4UKYUUXTYFXWE5AVCNFSM4CLVVS22U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBSGI3DQNRYG4ZA . You are receiving this because you were mentioned.Message ID: @.***>

ranga1989 avatar Nov 22 '23 17:11 ranga1989

@ranga1989 - That does not help at all. You haven't told us what verison of TestNG eclipse plugin you used. You haven't told us what version of TestNG are you using. And because you are replying back to comments via email, I believe your screenshot got stripped off as well.

krmahadevan avatar Nov 22 '23 17:11 krmahadevan

Eclipse version is : Version: 2023-06 (4.28.0)

Maven POM.xml is showing Error. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

  1. No implementation for MavenResourcesFiltering was bound. while locating ResourcesMojo at ClassRealm[plugin>org.apache.maven.plugins:maven-resources-plugin:3.3.0, parent: EquinoxClassLoader@2bb41f5c[org.eclipse.m2e.maven.runtime:3.9.100.20230519-1558(id=291)]] _ installed by: WireModule -> PlexusBindingModule while locating Mojo annotated with @Named("org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources")

1 error.

  • Failed to execute mojo org.apache.maven.plugins:maven-resources-plugin:3.3.0:testResources {execution: default-testResources} (org.apache.maven.plugins:maven-resources-plugin:3.3.0:testResources:default-testResources:process-test-resources)

Console Error After run the Program: Error_Screenshot_1

ranga1989 avatar Nov 22 '23 17:11 ranga1989

I am asking about the TestNG eclipse plugin version and NOT the eclipse version.

krmahadevan avatar Nov 22 '23 17:11 krmahadevan

org.testng testng 7.8.0 test

Screenshot updated in previous comment

ranga1989 avatar Nov 22 '23 17:11 ranga1989

The error in your screenshot is NOT related to TestNG or the eclipse plugin. You would need to fix that issue so that we can proceed further with finding out what is causing your issue. Please comment once you have made progress with getting past the maven error in your eclipse installation. Since we don't have access to your eclipse installation, there's not much we can do to fix that error. You might have to google up for possible fixes

krmahadevan avatar Nov 22 '23 17:11 krmahadevan