This Question is Answered

1 "helpful" answer available (2 pts)
4 Replies Last post: Mar 23, 2014 11:14 AM by Ahiel G  
Ahiel G Newbie 2 posts since
Mar 20, 2014
Currently Being Moderated

Mar 20, 2014 4:51 PM

"Error: Could not find or load main class Files" when Running tests on 13.1

Hello,

Since last version (13.1) I can't run tests on my project

I'm getting this error:

Error: Could not find or load main class Files

 

Didn't change anything in my project, and did tried to reimport the project from clean sources...

 

 

My run command:

"C:\Program Files\Java\jdk1.7.0_09\bin\java" -ea -Xms512m -Xmx1024m -Dlogback.configurationFile=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1\bin/myproj/myproj-deployment/myproj-puppet/src/test/resources/logback-maven.xml -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1\bin" -Dfile.encoding=windows-1255 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_09\jre\lib\ext\zipfs.jar;D:\hcdevsvn\t2\myproj\myproj-main\myproj-cep\target\test-classes;D:\hcdevsvn\t2\myproj\myproj-main\myproj-cep\target\classes;C:\Users\myuser\.m2\repository\org\apache\tomcat\tomcat-servlet-api\7.0.23\tomcat-servlet-api-7.0.23.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-beans\3.2.2.RELEASE\spring-beans-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-core\3.2.2.RELEASE\spring-core-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-context\3.2.2.RELEASE\spring-context-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-aop\3.2.2.RELEASE\spring-aop-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-expression\3.2.2.RELEASE\spring-expression-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-test\3.2.2.RELEASE\spring-test-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\jersey-json\1.13\jersey-json-1.13.jar;C:\Users\myuser\.m2\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;C:\Users\myuser\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\myuser\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;C:\Users\myuser\.m2\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;C:\Users\myuser\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\myuser\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\myuser\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.2\jackson-core-asl-1.9.2.jar;C:\Users\myuser\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;C:\Users\myuser\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.9.2\jackson-jaxrs-1.9.2.jar;C:\Users\myuser\.m2\repository\org\codehaus\jackson\jackson-xc\1.9.2\jackson-xc-1.9.2.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\jersey-core\1.13\jersey-core-1.13.jar;C:\Users\myuser\.m2\repository\junit\junit\4.11\junit-4.11.jar;C:\Users\myuser\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\hcdevsvn\t2\almog\almog-core\almog-datamodel-util\target\classes;C:\Users\myuser\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\myuser\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.5\log4j-over-slf4j-1.7.5.jar;C:\Users\myuser\.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\myuser\.m2\repository\com\lp\data-model\myproj-base-data-model\4.1.2\myproj-base-data-model-4.1.2.jar;D:\hcdevsvn\t2\almog\almog-common\almog-util-common\target\classes;C:\Users\myuser\.m2\repository\com\lp\logger\ContextLogger-over-slf4j\1.0.2\ContextLogger-over-slf4j-1.0.2.jar;C:\Users\myuser\.m2\repository\org\reflections\reflections\0.9.8\reflections-0.9.8.jar;C:\Users\myuser\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\myuser\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\myuser\.m2\repository\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;C:\Users\myuser\.m2\repository\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;C:\Users\myuser\.m2\repository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;C:\Users\myuser\.m2\repository\net\sourceforge\findbugs\jsr305\1.3.7\jsr305-1.3.7.jar;C:\Users\myuser\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\jersey-server\1.13\jersey-server-1.13.jar;C:\Users\myuser\.m2\repository\asm\asm\3.1\asm-3.1.jar;D:\hcdevsvn\t2\myproj\myproj-main\myproj-myprojlet-api\target\classes;C:\Users\myuser\.m2\repository\org\springframework\spring-tx\3.2.2.RELEASE\spring-tx-3.2.2.RELEASE.jar;D:\hcdevsvn\t2\almog\almog-common\almog-monitoring-common\target\classes;D:\hcdevsvn\t2\almog\almog-common\almog-snmp-common\target\classes;D:\hcdevsvn\t2\almog\almog-common\almog-spring-common\target\classes;C:\Users\myuser\.m2\repository\org\springframework\spring-web\3.2.2.RELEASE\spring-web-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-context-support\3.2.2.RELEASE\spring-context-support-3.2.2.RELEASE.jar;C:\Users\myuser\.m2\repository\com\lp\SnmpMonitoring\4.0.0.1\SnmpMonitoring-4.0.0.1.jar;C:\Users\myuser\.m2\repository\com\lp\SnmpMonitoring-api\4.0.0.1\SnmpMonitoring-api-4.0.0.1.jar;C:\Users\myuser\.m2\repository\org\apache\xmlbeans\xmlbeans\2.4.0\xmlbeans-2.4.0.jar;C:\Users\myuser\.m2\repository\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;C:\Users\myuser\.m2\repository\com\lp\grf\grf\1.1.3\grf-1.1.3.jar;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-client-api\1.2.2.1\ac-client-api-1.2.2.1.jar;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-rest-base-resource\1.2.2.1\ac-rest-base-resource-1.2.2.1.jar;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-logger\1.2.2.1\ac-logger-1.2.2.1.jar;C:\Users\myuser\.m2\repository\com\lp\RestApiCommon\1.0.2-6\RestApiCommon-1.0.2-6.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\jersey-client\1.13\jersey-client-1.13.jar;C:\Program Files\Java\jdk1.7.0_09\lib\tools.jar;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-common\1.2.2.1\ac-common-1.2.2.1.jar;C:\Users\myuser\.m2\repository\com\lp\lecommon\app-proxy-client\2.0.0.3\app-proxy-client-2.0.0.3.jar;C:\Users\myuser\.m2\repository\com\lp\gateKeeper\gate-keeper-api\3.0.0.5\gate-keeper-api-3.0.0.5.jar;C:\Users\myuser\.m2\repository\com\lp\KeyRepository\2.0.0\KeyRepository-2.0.0.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\contribs\jersey-oauth\oauth-signature\1.9.1\oauth-signature-1.9.1.jar;C:\Users\myuser\.m2\repository\com\sun\jersey\contribs\jersey-oauth\oauth-client\1.9.1\oauth-client-1.9.1.jar;C:\Users\myuser\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\Users\myuser\.m2\repository\net\sf\ehcache\ehcache-core\2.6.6\ehcache-core-2.6.6.jar;C:\Users\myuser\.m2\repository\com\lp\metrics\lp-metrics-all\1.0.0.8\lp-metrics-all-1.0.0.8.jar;C:\Users\myuser\.m2\repository\com\lp\metrics\lp-metrics-core\1.0.0.8\lp-metrics-core-1.0.0.8.jar;C:\Users\myuser\.m2\repository\com\codahale\metrics\metrics-core\3.0.1\metrics-core-3.0.1.jar;C:\Users\myuser\.m2\repository\com\codahale\metrics\metrics-ganglia\3.0.1\metrics-ganglia-3.0.1.jar;C:\Users\myuser\.m2\repository\info\ganglia\gmetric4j\gmetric4j\1.0.3\gmetric4j-1.0.3.jar;C:\Users\myuser\.m2\repository\org\acplt\oncrpc\1.0.7\oncrpc-1.0.7.jar;C:\Users\myuser\.m2\repository\com\codahale\metrics\metrics-graphite\3.0.1\metrics-graphite-3.0.1.jar;C:\Users\myuser\.m2\repository\com\lp\metrics\lp-metrics-commons\1.0.0.8\lp-metrics-commons-1.0.0.8.jar;C:\Users\myuser\.m2\repository\com\lp\metrics\lp-metrics-jvm\1.0.0.8\lp-metrics-jvm-1.0.0.8.jar;C:\Users\myuser\.m2\repository\com\codahale\metrics\metrics-jvm\3.0.1\metrics-jvm-3.0.1.jar;D:\hcdevsvn\t2\myproj\myproj-common\target\classes;D:\hcdevsvn\t2\almog\almog-common\almog-esapi-common\target\classes;C:\Users\myuser\.m2\repository\com\lp\security\esapi-service\1.0.0.48\esapi-service-1.0.0.48.jar;C:\Users\myuser\.m2\repository\org\owasp\esapi\esapi\2.1.0\esapi-2.1.0.jar;C:\Users\myuser\.m2\repository\commons-configuration\commons-configuration\1.5\commons-configuration-1.5.jar;C:\Users\myuser\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\myuser\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\myuser\.m2\repository\commons-fileupload\commons-fileupload\1.2\commons-fileupload-1.2.jar;C:\Users\myuser\.m2\repository\xom\xom\1.2.5\xom-1.2.5.jar;C:\Users\myuser\.m2\repository\xerces\xercesImpl\2.8.0\xercesImpl-2.8.0.jar;C:\Users\myuser\.m2\repository\xalan\xalan\2.7.0\xalan-2.7.0.jar;C:\Users\myuser\.m2\repository\org\beanshell\bsh-core\2.0b4\bsh-core-2.0b4.jar;C:\Users\myuser\.m2\repository\org\owasp\antisamy\antisamy\1.4.3\antisamy-1.4.3.jar;C:\Users\myuser\.m2\repository\org\apache\xmlgraphics\batik-css\1.7\batik-css-1.7.jar;C:\Users\myuser\.m2\repository\org\apache\xmlgraphics\batik-ext\1.7\batik-ext-1.7.jar;C:\Users\myuser\.m2\repository\org\apache\xmlgraphics\batik-util\1.7\batik-util-1.7.jar;C:\Users\myuser\.m2\repository\xml-apis\xml-apis-ext\1.3.04\xml-apis-ext-1.3.04.jar;C:\Users\myuser\.m2\repository\net\sourceforge\nekohtml\nekohtml\1.9.12\nekohtml-1.9.12.jar;C:\Users\myuser\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;C:\Users\myuser\.m2\repository\commons-codec\commons-codec\1.6\commons-codec-1.6.jar;C:\Users\myuser\.m2\repository\com\lp\webComponent\2.0.1-126\webComponent-2.0.1-126.jar;C:\Users\myuser\.m2\repository\org\springframework\spring-jdbc\2.5.6\spring-jdbc-2.5.6.jar;C:\Users\myuser\.m2\repository\org\springframework\ldap\spring-ldap\1.3.0.RELEASE\spring-ldap-1.3.0.RELEASE-all.jar;C:\Users\myuser\.m2\repository\org\springframework\ldap\spring-ldap-core\1.3.0.RELEASE\spring-ldap-core-1.3.0.RELEASE.jar;C:\Users\myuser\.m2\repository\org\springframework\ldap\spring-ldap-core-tiger\1.3.0.RELEASE\spring-ldap-core-tiger-1.3.0.RELEASE.jar;C:\Users\myuser\.m2\repository\commons-pool\commons-pool\1.3\commons-pool-1.3.jar;C:\Users\myuser\.m2\repository\com\lp\ServiceStatus\2.0.0\ServiceStatus-2.0.0.jar;C:\Users\myuser\.m2\repository\com\lp\ldapComm\3.0.0\ldapComm-3.0.0.jar;C:\Users\myuser\.m2\repository\jboss\jboss-j2se\200504122039\jboss-j2se-200504122039.jar;C:\Users\myuser\.m2\repository\com\lp\ServiceDirectory\3.0.0.11\ServiceDirectory-3.0.0.11.jar;C:\Users\myuser\.m2\repository\com\lp\ServiceDirectory-api\3.0.0.11\ServiceDirectory-api-3.0.0.11.jar;C:\Users\myuser\.m2\repository\commons-io\commons-io\2.3\commons-io-2.3.jar;C:\Users\myuser\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;D:\hcdevsvn\t2\almog\almog-common\almog-keyvalue-store\target\classes;C:\Users\myuser\.m2\repository\org\mockito\mockito-all\1.9.5\mockito-all-1.9.5.jar;D:\hcdevsvn\t2\myproj\myproj-main\myproj-myprojlet-internal\myproj-myprojlet-core\target\classes;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-db-access\1.2.2.1\ac-db-access-1.2.2.1.jar;C:\Users\myuser\.m2\repository\org\hibernate\hibernate-entitymanager\4.1.4.Final\hibernate-entitymanager-4.1.4.Final.jar;C:\Users\myuser\.m2\repository\org\jboss\logging\jboss-logging\3.1.0.GA\jboss-logging-3.1.0.GA.jar;C:\Users\myuser\.m2\repository\org\hibernate\hibernate-core\4.1.4.Final\hibernate-core-4.1.4.Final.jar;C:\Users\myuser\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\myuser\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.1_spec\1.0.0.Final\jboss-transaction-api_1.1_spec-1.0.0.Final.jar;C:\Users\myuser\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.0-api\1.0.1.Final\hibernate-jpa-2.0-api-1.0.1.Final.jar;C:\Users\myuser\.m2\repository\org\hibernate\common\hibernate-commons-annotations\4.0.1.Final\hibernate-commons-annotations-4.0.1.Final.jar;C:\Users\myuser\.m2\repository\mysql\mysql-connector-java\5.1.18\mysql-connector-java-5.1.18.jar;C:\Users\myuser\.m2\repository\com\lp\lecommon\DBAccessUtil-core\1.0.2.2\DBAccessUtil-core-1.0.2.2.jar;C:\Users\myuser\.m2\repository\com\lp\3rdparty\oracle\runtime12\10.2.0.0.0\runtime12-10.2.0.0.0.jar;C:\Users\myuser\.m2\repository\com\lp\le-platform\le-platform-auth-dal\3.0.0.2\le-platform-auth-dal-3.0.0.2.jar;C:\Users\myuser\.m2\repository\com\lp\account-config\ac-client\1.2.2.1\ac-client-1.2.2.1.jar;C:\Users\myuser\.m2\repository\org\codehaus\groovy\groovy-all\2.1.3\groovy-all-2.1.3.jar;D:\hcdevsvn\t2\myproj\myproj-main\myproj-cep" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.lp.t.myproj.cep.context.VisitorSessionContextManagerTest
Error: Could not find or load main class Files

Process finished with exit code 1

 

 

 

Thanks ahaed
Jakub Wach Newbie 1 posts since
Mar 20, 2014
Currently Being Moderated
Mar 20, 2014 5:33 PM in response to: Ahiel G
Re: "Error: Could not find or load main class Files" when Running tests on 13.1

Hi

 

I had similar problem since yesterday.

After upgrade to 13.1 JUnit run configurations stopped to work with similar error message.

I investigateed why the class cannot be found. In my case missing class was :     ${unitArgLine}

 

I searched my project for that exact string, and the only place it is present is "pom.xml" :

configuration for maven-surefire-plugin:

 

<argLine>-Xms256m -Xmx1024m -XX:PermSize=48m -XX:MaxPermSize=128m ${unitArgLine}</argLine>

 

After playing with that line in pom.xml I can confirm that indeed JUnit plugin in IDEA takes those arguments into account and places them after VM parameters when starting JVM for JUnit tests.

I thing it is a bug, since I don't see any option to enable or dissable this argument inclussion from pom.xml (and it conflicts with whatever I put in VM args in run configuration).

 

I changed pom.xml temporarly.

 

Best regards.

Daniel Josefsson Newbie 1 posts since
Mar 20, 2014
Currently Being Moderated
Mar 20, 2014 6:04 PM in response to: Jakub Wach
Re: "Error: Could not find or load main class Files" when Running tests on 13.1

I have the same issue. I see:

 

Error: Could not find or load main class ${argLine}

Alexander Chernikov JetBrains 1,103 posts since
Jan 11, 2007
Currently Being Moderated
Mar 21, 2014 3:17 AM in response to: Ahiel G
Re: "Error: Could not find or load main class Files" when Running tests on 13.1

Please follow http://youtrack.jetbrains.com/issue/IDEA-122284 and related.

 

Regards,

Alexander.

More Like This

  • Retrieving data ...