Environment setting up troubleshoot.

Intellij Part

1.
FAILURE: Could not determine which tasks to execute.

* What went wrong:
Task 'ûx' not found in root project 'xxxx'.

* Try:
Run gradlew tasks to get a list of available tasks.

BUILD FAILED

Total time: 44.695 secs
Collecting build statistics.. RESPONSE:OK

Solution: encounter this issue when execute gradlew build -x check, but gradlew clean build and gradle build is executed successfully. update development tools solve this issue.
Sometimes above solution is not work, you can try to change the character encoding for scm. for perforce: Selected the workspace you wanted to change, then Connection -> Choose Character Encoding -> Unicode(UTF-16) -> OK, then force update the related files/tools like buildtools to your workspace.

2. encounter below error while debugging:
Error running xxServiceTests:
Classpath/Commandline is too long. In order to reduce its length classpath file can be used. Would you like to enable classpath file mode for all run configuration of your projects?
Enable link

Solution: click Enable link solved the question.
  this is same with: Set:  dynamic.classpath from false to  true            (in XML: <pathtotrunk>/trunk.iws)

3. Encounter below issue when run integration tests:
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:157)
... ...
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [com/xxx/www/api/api-test.system.spring.xml]; nested exception is java.io.FileNotFoundException: class path resource [com/xxx/www/api/api-test.system.spring.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
... ...
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:148)
... 39 more
Caused by: java.io.FileNotFoundException: class path resource [com/xxx/www/api/api-test.system.spring.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 50 more
Solution: Build -> Rebuild project in Intellij.

4.encounter below issue when run unit tests:

java.lang.NullPointerException
at com.xxx.www.domain.services.thirdpartypackage.xxxServiceTests.priceAsExpected(xxxServiceTests.java:76)
at com.xxx.www.domain.services.thirdpartypackage.xxxServiceTests.testGroupResponse(xxxServiceTests.java:88)
... ...
at java.lang.reflect.Method.invoke(Method.java:597)at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121)
Solution: not found yet.

5. How to clear the IntelliJ project index?
IntelliJ indexing takes a long time, and the index file could be broken sometime, when you found your index is broken, you can just clear the IntelliJ project index like below:

File | Invalidate Caches, restart. Or manually delete the following folders:
Linux/Windows: USER_HOME/.IntelliJIdeaXX/system
Mac: ~/Library/Caches/IntelliJIDEAXX
(where XX is your IDEA version).
From: http://stackoverflow.com/questions/1727922/how-to-clear-the-intellij-project-index

MyEclipse

1. MyEclipse 8.5 Unable to update index for central|http://repo1.maven.org/maven2:

我使用的是Myeclipse 8.5,今天启动时遇到了这个问题,在网上也找了许久,解决办法如下:
1、 Window(窗口)-->Preferences (首选项)-->Myeclipse Enterprise Workbench--> Maven4Myeclipse-->在右侧窗口中勾选“Enable Maven4MyEclipse features”复选框,单击“确定”按钮。如果已经勾选进行下一步。
2、Window(窗口)-->Preferences (首选项)-->Myeclipse Enterprise Workbench-->Maven4Myeclipseà-> Maven-->

在右侧窗口中去掉“Offline”和“Download Artifact Sources”复选框前面的勾-->单击确定按钮-->重新启动MyEclipse

OK。就是这样。。。只有先进行了第一步,才会有第二步中的Maven选项,切记。

转载于:https://www.cnblogs.com/vanessabutterfly/p/3168930.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值