Intellij Idea Maven 'cannot reconnect' error - java

Maybe you can help me
I got a strange apache maven's problem, when opening my project at Intellij Idea 13.
When projects was open I have no libraries at External Libraries section. And at all pom.xml files from diff's modules I see error "Cannot reconnect".
I tried to Invalidate Cache/Restart Idea, try to use Maven Reimport but problem still take a place.
But if I do mvn clean install, and deploy my projects everything works fine.
I use Maven 3.2.3. and Java 1.8.
Maven settings:
Aded idea.log files:
2015-06-03 11:54:24,585 [ 441715] INFO - #org.jetbrains.idea.maven - Cannot reconnect.
java.lang.RuntimeException: Cannot reconnect.
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:98)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.resolveProject(MavenEmbedderWrapper.java:97)
at org.jetbrains.idea.maven.project.MavenProjectReader.resolveProject(MavenProjectReader.java:462)
at org.jetbrains.idea.maven.project.MavenProject.resolve(MavenProject.java:624)
at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1215)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:42)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:131)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$100(MavenProjectsProcessor.java:28)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
at org.jetbrains.idea.maven.utils.MavenUtil$6.run(MavenUtil.java:440)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:351)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/99407688.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy121.resolveProject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:106)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:167)
at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
at com.sun.proxy.$Proxy121.resolveProject(Unknown Source)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:100)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:97)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:89)
... 16 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at org.apache.maven.wagon.providers.file.FileWagon.resolveDestinationPath(FileWagon.java:206)
at org.apache.maven.wagon.providers.file.FileWagon.resourceExists(FileWagon.java:265)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:577)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2015-06-03 11:54:24,586 [ 441716] WARN - ution.rmi.RemoteProcessSupport - Exception in thread "pool-6-thread-1" java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
2015-06-03 11:54:24,586 [ 441716] WARN - ution.rmi.RemoteProcessSupport - at org.apache.maven.wagon.providers.file.FileWagon.resolveDestinationPath(FileWagon.java:206)

I was facing the same error and fixed it like that:
Open settings by pressing Ctrl+Alt+S and navigate to Build, Execution, Deployment | Build Tools | Maven | Importing
Check JDK for Importer and change the exact version of JDK (example : 1.8.0.250) installed on your machine from the drop-down.
After doing the same it prompts for verification and after that, the maven will be automatically updated and the project will run.
In my case, I did the same thing as the JDK which is used in the machine is different when the project is imported from a repository. These things happen when we uninstall the IDE and JDK and install the IDE and different version of JDK, the IDE automatically fetch the project which is available in the machine as before but it can not change the imported JDK.

I fixed this by changing my local Maven 3.3.9 to Idea Bundle Maven3.

Clicking on Reload All Maven Projects helped me in this scenario.

File -> Invalid Cache
might also be helpful in a scenario where IntelliJ seems to tangle up itself.

In case you are running InteliJ in WSL with X-Server (e.g. VcXsrv), a solution may be to
close InteliJ
restart the server
open Intelij
and it will be working.

I was getting this error and I fixed this error in IntelliJ by following steps:
1] close all running application(if any)
2] reimport/reload pom.xml (right-click on pom.xml -> select maven option->reimport/reload project)
3] then run your application(i.e. main file)
by following this I did not needed to delete the .m2 folder manually

I fixed this problem by removing .lastUpdated files coming from transfer error in ~/.m2
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;

In my case, I have maven runner and importer set to use Project JDK, but I managed to solve this problem by changing JDK from OpenJDK to Liberica JDK (same Java version) and it magically started working.
So for anyone with similar problem, try to change JDK to different implementation.

Related

Duplicate key org.jetbrains.jps.model.module.impl.JpsModuleImpl

my project always was working fine until i opened it today in intelIj and tried to run it i get this error
Error:maven-annotations-test:myapp: java.lang.IllegalStateException: Duplicate key org.jetbrains.jps.model.module.impl.JpsModuleImpl#50eac852
it's not a maven project so i don't get what's causing this
Click on Reimport All Maven Projects - First icon on the left in the image above.
Worked for me!
Related to https://youtrack.jetbrains.com/issue/IDEA-225394 - Internal error: (java.lang.IllegalStateException) Duplicate key
I managed to fix something like this only after closing Intellij and deleting the directory C:\Users\UserName\AppData\Local\JetBrains\IntelliJIdea2020.1
After selecting Run -> Run and running com.appointment.publishing in spring-boot-app the project works fine for the first time.
After modifying the test file on the project and trying to run it more times, it throws the following exception.
After throwing it, the only way to fix it, is going on Build -> Rebuild Project.
However, the problems start happening again if you try to run the project more than one time (after modifying the test file).
Error:Internal error: (java.lang.IllegalStateException) Duplicate key Validate JSPs in 'spring-boot-appointment-publishing:war exploded'
java.lang.IllegalStateException: Duplicate key Validate JSPs in 'spring-boot-appointment-publishing:war exploded'
at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
at java.util.HashMap.merge(HashMap.java:1253)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.jetbrains.jps.javaee.build.jspValidation.JspValidationTarget$Type.createLoader(JspValidationTarget.java:156)
at org.jetbrains.jps.incremental.storage.BuildTargetTypeState.load(BuildTargetTypeState.java:63)
at org.jetbrains.jps.incremental.storage.BuildTargetTypeState.<init>(BuildTargetTypeState.java:52)
at org.jetbrains.jps.incremental.storage.BuildTargetsState.getTypeState(BuildTargetsState.java:122)
at org.jetbrains.jps.incremental.storage.BuildTargetsState.getAverageBuildTime(BuildTargetsState.java:116)
at org.jetbrains.jps.incremental.IncProjectBuilder.checkRebuildRequired(IncProjectBuilder.java:285)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:167)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:297)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
IU-201.8538.31, JRE 11.0.7+10-b765.64x64 JetBrains s.r.o., OS Windows 10(amd64) v10.0 , screens 1920x1080
I noticed following error after invoking Build -> Build Project:
Error:Internal error: (java.lang.IllegalStateException) Duplicate key emdms-server (attempted merging values org.jetbrains.jps.model.module.impl.JpsModuleImpl#e8df99a and org.jetbrains.jps.model.module.impl.JpsModuleImpl#64b73e7a)
java.lang.IllegalStateException: Duplicate key emdms-server (attempted merging values org.jetbrains.jps.model.module.impl.JpsModuleImpl#e8df99a and org.jetbrains.jps.model.module.impl.JpsModuleImpl#64b73e7a)
at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.jetbrains.jps.maven.model.impl.MavenAnnotationProcessorTargetType.createLoader(MavenAnnotationProcessorTargetType.java:50)
at org.jetbrains.jps.incremental.storage.BuildTargetTypeState.load(BuildTargetTypeState.java:66)
at org.jetbrains.jps.incremental.storage.BuildTargetTypeState.(BuildTargetTypeState.java:55)
at org.jetbrains.jps.incremental.storage.BuildTargetsState.getTypeState(BuildTargetsState.java:110)
at org.jetbrains.jps.incremental.storage.BuildTargetsState.getAverageBuildTime(BuildTargetsState.java:104)
at org.jetbrains.jps.incremental.messages.BuildProgress.(BuildProgress.java:70)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:365)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:139)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:288)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:121)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
IU-192.6817.14, JRE 11.0.4 10-b304.69x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080
Update: The exception has disappeared after right click on parent pom.xml -> Maven -> Reimport.
Some times just deleing the IntelliJIdea2020.1 directory was not enough. I had to also delete my C:\Users\UserName\.m2 directory.
#Jet Brains Team: The problem is caused by duplicated artifact configuration files. In order to fix it, you need to delete application_name_war_exploded2.xml and application_name_war2.xml files from .idea/artifacts directory.
Not sure why these duplicating artifacts were produced though. Did you edit artifact configurations manually in File | Project Structure | Artifacts?
I had to right click, hover on Maven and click Download Sources and Documentation
Solved it for me
Deleting the ~/.m2/repository dir and system directory did it for me.
Edit
The issue kept coming up after clearing both the caches. Well, haha, it was so darn trivial to solve: Rebuild project

[Eclipse not starting]:An error has occured. See the log file null

I'm unable to get my Eclipse Luna running. It was working fine till now and suddenly crashed. Now when i try to start it, I get the error saying:
An error has occured. See the log file null
I tried launching eclipse from terminal and also tried to delete the metadata folder from my workspace but nothing helped me.
Here is the crash log:
org.osgi.framework.BundleException: Error initializing container.
at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:93)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.init(EquinoxBundle.java:209)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.init(EquinoxBundle.java:201)
at org.eclipse.osgi.launch.Equinox.init(Equinox.java:168)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:296)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
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:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.ExceptionInInitializerError
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.initWorker(EquinoxBundle.java:137)
at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:83)
... 12 more
Caused by: java.security.ProviderException: setSeed() failed
at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:458)
at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:329)
at sun.security.provider.NativePRNG.engineSetSeed(NativePRNG.java:212)
at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:209)
at java.security.SecureRandom.<init>(SecureRandom.java:190)
at org.eclipse.osgi.internal.framework.UniversalUniqueIdentifier.computeNodeAddress(UniversalUniqueIdentifier.java:127)
at org.eclipse.osgi.internal.framework.UniversalUniqueIdentifier.<clinit>(UniversalUniqueIdentifier.java:35)
... 14 more
Caused by: java.io.IOException: Operation not permitted
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:313)
at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:456)
... 20 more
It seems you're using Solaris? This OS has an alternative entropy source called EGD, which needs special protocol to write to, which Sun JDK does not implement...
Can you try adding -Djava.security.egd=/dev/random to the vmargs section of your eclipse.ini.
If you still see the same issue. Make sure your user can write to /dev/random.
I fixed it myself. Few files in my security folder /jre/lib/security had got messed up.
Downloaded latest Java Cryptography Extension (JCE) and put the jars (Download US_export_policy.jar and local_policy.jar) in the security folder. My eclipse works fine now.

Intellij Groovy Compiler throws error Grabbing Grapes (download failed)

I'm currently getting the following error when I try to compile my groovy project in Intellij IDEA 15.0.3 on Mac OSX 10.10.5. (This issue is not occurring for the same project on a Windows machine)
Information:Groovyc: java.lang.RuntimeException: Error grabbing Grapes -- [download failed:
com.google.code.gson#gson;2.2.4!gson.jar]
The JAR exists in repo.maven.org and in jcenter.bintray.com.
I can download and include it in my project explicitly using compile "com.google.code.gson:gson:2.2.4" - I still see this compiler issue.
I can't see any reason why the download would fail, I'm using the out-of-the-box ~/.gradle/grapeConfig.xml.
I've tried deleting my grapes cache directory and re-downloading dependencies - works for all my explicitly defined dependencies.
I'm on a home network - no proxy.
I want to enable advanced logging, so that I can see the exact reason why the Grapes download is failing. I've tried adding the groovy.grape.report.downloads=true system property to the terminal (and in ~/.bashrc), but to no avail. I couldn't find any way of setting these properties in the Intellij "Groovy Compiler" settings page. (If I could enable Grapes logging, I'm confident I'd be able to see the root cause)
The Intellij project is setup from gradle cleanIdea idea. When the project is built from the command line - gradle clean build (on Mac and Windows), the application compiles with no errors - only problem is in Intellij on a Mac.
This gson.jar isn't actually referenced in any #Grab/#Grape annotations, I haven't checked but I'm guessing it's a transitive dependency.
Any help would be greatly appreciated!
Full Stack Trace
Information:Using javac 1.8.0_60 to compile java sources
Information:Groovyc: Groovyc stub generation failed
Information:Groovyc: java.lang.RuntimeException: Error grabbing Grapes -- [download failed: com.google.code.gson#gson;2.2.4!gson.jar]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:421)
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:497)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:566)
at groovy.grape.GrapeIvy$resolve$1.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:190)
at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:535)
at groovy.grape.GrapeIvy$resolve$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:257)
at groovy.grape.Grape.grab(Grape.java:166)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:360)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62)
at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:115)
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:497)
at org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:134)
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:497)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:156)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.access$000(InProcessGroovyc.java:51)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc$1.call(InProcessGroovyc.java:85)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc$1.call(InProcessGroovyc.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Information:java: Errors occurred while compiling module 'server'
Information:12/02/2016 6:45 PM - Compilation completed with 3 errors and 0 warnings in 9s 266ms
/<myproject>/WebConfigurer.java
Error:(10, 37) java: cannot find symbol
symbol: class HtmlHttpMessageConverter
location: package mypackage.mediaType
Error:(113, 16) java: cannot find symbol
symbol: class HtmlHttpMessageConverter
location: class mypackage.WebConfigurer
/<myproject>/SirenConverters.java
Error:(14, 38) java: package mypackage.controller does not exist
Related(?)
Groovy - Grab - download failed
Update 14/02/16 - still no luck
Moved grapeConfig.xml to correct directory - ~/.groovy/grapeConfig.xml
Enabled debug logging in Intellij:
...
<root>
<priority value="DEBUG"/>
<appender-ref ref="DIALOG"/>
<appender-ref ref="CONSOLE-DEBUG"/>
<appender-ref ref="FILE"/>
</root>
...
No further details about exception found in ~/Library/Logs/IdeaIC15/idea.log
Added logging flag to /Applications/IntelliJ\ IDEA\ 15\ CE.app/Contents/bin/idea.vmoptions
-Dgroovy.grape.report.downloads=true
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
No observable change in the logs or console.
Added -Dgroovy.grape.report.downloads=true to Intellij Preferences > Compiler > Shared build process VM options:
No observable change in the logs or console.
I had the same problem and for me it was the maven cache that was the problem.
I found the solution on this page:
rm -rf ~/.m2/repository ~/.groovy/grapes
I had previously tried removing the ~/.groovy/grapes cache, but that didn't fix the problem. Removing the ~/.m2/repository is what actually did it for me.
I got this script working in IntelliJ without problem:
#Grab(group = 'com.google.code.gson', module = 'gson', version = '2.2.4')
import com.google.gson.Gson
println Gson
First thing I did was to write the #Grab declaration... right-click on it, select "Grab artifacts"...
EDIT: Actually, I think put the cursor on #Grab, then pushed Alt+Enter (which is what I usually do to get suggestions from IntelliJ).
IntelliJ failed and told me I need to add Ivy to the classpath... so I opened Project Structure, in Module dependencies added Ivy, tried again... it worked.
Running the script again, it printed the expected message.
Hope that helps somehow...

How to work with android studio for import and run project

I had download project from github and I want to import it into android studio. I tried several time but I cant run it. Any one give the step by step instruction to import the project because am new one for android studio.
Showing Error:
"C:\Program Files\Java\jdk1.8.0_25\bin\java" -ea -Didea.launcher.port=7532 -Didea.launcher.bin.path=D:\Users\SYS\AppData\Local\Android\android-studio\bin -Dfile.encoding=UTF-8 -classpath "D:\Users\SYS\AppData\Local\Android\android-studio\lib\idea_rt.jar;D:\Users\SYS\AppData\Local\Android\android-studio\plugins\junit\lib\junit-rt.jar;D:\Android By Timothy\Package tools\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platforms\android-21\android.jar;D:\Android By Timothy\Package tools\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platforms\android-21\data\res;D:\Android By Timothy\Package tools\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\support\annotations.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 #C:\Users\SYS\AppData\Local\Temp\idea_junit7097204602616052537.tmp #w#C:\Users\SYS\AppData\Local\Temp\idea_working_dirs_junit3836436993075423504.tmp -socket54727
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
Process finished with exit code 1
Now i got error:
11:51:25 UnsupportedMethodException
Failed to set up Android modules in project 'Telegram-master': Unsupported method: SourceProvider.getJniDirectories().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
I tried, and here is steps:
Git clone the project to you disk
Import project on your Android Studio.
There was one Error of gradle. Change the gradle version to latest 1.0.0, such that
"classpath 'com.android.tools.build:gradle:1.0.0'
Get your own api_id form here.
Follow the doc.
EDIT
For 'signingConfig.storeFile' does not exist problem:
1: Look if you have the debug.keystore in (~/.android or search your whole android folder). If you haven't got it. Look this (There is no debug.keystore in .android folder) for create a debug.keystore.
2: When you have the file. You have to copy the file('debug.keystore') on (Telegram/TMessagesProj/config).

NetBeans 8.0 Gradle Plug-in (for LibGDX)

I wanted to start using LibGDX but since they switcher to gradle recently I folowed their guides.
According to those,I installed the plugin Gradle support on NetBeans 8.0 and when I try to open a Gradle Project
I get the error:
Failed to load Gradle Project:test
and when i go to the stacktrace, i get this
Issue 1
Requested project: C:\Users\Halo\Downloads\test
Stack trace:
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:43)
at org.netbeans.gradle.model.GenericModelFetcher.getModels(GenericModelFetcher.java:166)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader$ProjectModelFetcher.getModels(NbGradle18ModelLoader.java:374)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader.loadModels(NbGradle18ModelLoader.java:79)
at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:496)
at org.netbeans.gradle.project.model.GradleModelLoader.access$600(GradleModelLoader.java:57)
at org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:364)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:24)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:14)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.run(GradleDaemonManager.java:105)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$3.run(GradleDaemonManager.java:130)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused by: org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.10/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:34)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:109)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:90)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:95)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:72)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:149)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:74)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:42)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:30)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:106)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:100)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:143)
at org.gradle.tooling.internal.consumer.connection.ActionAwareConsumerConnection.run(ActionAwareConsumerConnection.java:40)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:53)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:82)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
In the code it says that it's caused by Daemon, can someone explain to me how to fix it? it's really torturing my head and I'm about to give the finger to LibGDX and smash my pc into smitherings.
I'll add that I've tried to use the gradlew inside the folder of the project that LibGDX has built (using cmd) but i've got no clue to what to do and, apart for the Gradle support plug-in i've got nothing else about gradle on my pc
I had same problem, turned out to be a proxy problem. Gradle does not see your proxy setting and you have to add them manually to the gradle.properties file in the project.
It then donwloads all relevant jar files when you build the project.
Used this page setup : http://www.gradle.org/docs/current/userguide/build_environment.html

Categories