It's all about the answers!

Ask a question

main ERROR Unable to create file urlUtility.log java.io.IOException: Access is denied - EtmurlUtility error


Sunil Lengare (3814) | asked May 02, 12:27 a.m.

Hello

I am using Jazz ETM 7.0.2 and and trying to read test script artifact using EtmurlUtility with following command:
java -jar C:\ETMUrlUtility\RQMUrlUtility.jar -command GET -user xxxx -password yyyy -filepath C:\temp\testScript.xml -url https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality Management/testscript/urn:com.ibm.rqm:testscript:81834
but
I am getting following error: Can you please help what is missing in my machine?
Picked up _JAVA_OPTIONS: -Xmx1024M
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
2024-05-02 09:11:21,643 main ERROR Unable to create file urlUtility.log java.io.IOException: Access is denied
        at java.base/java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.base/java.io.File.createNewFile(File.java:1035)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:733)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:716)
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
        at org.apache.logging.log4j.jcl.LogAdapter.getContext(LogAdapter.java:40)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
        at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:40)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:669)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.getLogger(RQMUrlLogUtilities.java:23)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.logInfo(RQMUrlLogUtilities.java:42)
        at com.ibm.rqm.url.UrlUtility.main(UrlUtility.java:90)

2024-05-02 09:11:21,653 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@33bc72d1] unable to create manager for [urlUtility.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@1a75e76a[pattern=urlUtility-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=10485760)]), strategy=DefaultRolloverStrategy(min=1, max=5, useMax=true), advertiseURI=null, layout=%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5p %-5c - %m%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@33bc72d1] unable to create manager for [urlUtility.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@1a75e76a[pattern=urlUtility-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=10485760)]), strategy=DefaultRolloverStrategy(min=1, max=5, useMax=true), advertiseURI=null, layout=%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5p %-5c - %m%n, filePermissions=null, fileOwner=null]]
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:116)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
        at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
        at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
        at org.apache.logging.log4j.jcl.LogAdapter.getContext(LogAdapter.java:40)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
        at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:40)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:669)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.getLogger(RQMUrlLogUtilities.java:23)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.logInfo(RQMUrlLogUtilities.java:42)
        at com.ibm.rqm.url.UrlUtility.main(UrlUtility.java:90)

2024-05-02 09:11:21,656 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:236)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
        at org.apache.logging.log4j.jcl.LogAdapter.getContext(LogAdapter.java:40)
        at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
        at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:40)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:669)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.getLogger(RQMUrlLogUtilities.java:23)
        at com.ibm.rqm.url.log.RQMUrlLogUtilities.logInfo(RQMUrlLogUtilities.java:42)
        at com.ibm.rqm.url.UrlUtility.main(UrlUtility.java:90)

2024-05-02 09:11:21,658 main ERROR Null object returned for RollingFile in Appenders.
2024-05-02 09:11:21,665 main ERROR Unable to locate appender "file" for logger config "root"
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 3
        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
        at java.base/java.lang.String.substring(String.java:1874)
        at com.ibm.rqm.url.UrlUtility.main(UrlUtility.java:194)


Comments
Ralph Schoon commented May 02, 3:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know how anyone could answer this question.

Since there is not information provided about the Java version, that could be a contributor. Run Java -version. Make sure the Java version is 1.8. which was, as far as I am aware the Java version supported with 7.0.2   

Accepted answer


permanent link
Sunil Lengare (3814) | answered May 06, 6:43 a.m.

Ok thank you Ralph, Yes I am using Java version1.8


But error is resolved now with following situation
instead of doing cd to java/bin
and then calling above command:
java -jar C:\ETMUrlUtility\RQMUrlUtility.jar -command GET -user xxxx -password yyyy -filepath C:\temp\testScript.xml -url
I should cd to RQMUrlUtility
so I did
cd C:\ETMUrlUtility\RQMUrlUtility.jar
java -jar RQMUrlUtility.jar -command GET -user xxxx -password yyyy -filepath C:\temp\testScript.xml -url
Then this worked

Ralph Schoon selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.