I've been using IntelliJ with SBT successfully for a while, but lately I've been unable to import SBT projects.
I'll do the following:
Create new project > Empty project
Specify a new to-be-created folder
Add > Import module in the dialog, or New > Module from existing sources from the menu
Select the folder containing the SBT project
Select SBT
Finish
The project does not show up anywhere in IntelliJ. The status line says "Unable to save settings". If I try to import the project once again I get "This project is already registered".
Here is a snippet from idea.log that looks like it could be relevant:
Caused by: java.lang.Exception: Cannot get libraryTable component state
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:166)
... 38 more
Caused by: java.lang.NullPointerException
at org.jetbrains.plugins.scala.project.ScalaLibraryProperties.getState(ScalaLibraryProperties.scala:30)
at org.jetbrains.plugins.scala.project.ScalaLibraryProperties.getState(ScalaLibraryProperties.scala:14)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl.writeExternal(LibraryImpl.java:368)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.writeExternal(LibraryTableBase.java:363)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.getState(LibraryTableBase.java:63)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.getState(LibraryTableBase.java:45)
at com.intellij.configurationStore.ComponentStoreImpl.commitComponent(ComponentStoreImpl.kt:227)
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:159)
IntelliJ 2017.2.3, Scala plugin 2017.2.6.
Related
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.3.40-eap-40']
> Failed to apply plugin [id 'org.jetbrains.kotlin.jvm']
> Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
This error occurs in my build.gradle.kts file
Did you happen to see this error in a Kotlin Cocoapods project built from the samples provided on Kotlin/Native GitHub?
This error occurs because in the build.gradle.kts, there are conflicting plugin imports. Like seen below:
You can't have kotlin 'Jim' plugin and 'multi-platform plugin' together, so remove the kotlin("jvm") version "1.3.31" and build your gradle project.
Also, when you remove this will be accompanied by few more errors in the dependencies section. So comment out everything from dependencies and the two compile tasks below as well and build it. It should work!
I developed a plug-in project using elipse and it was working fine as expected. I then exported this project as an archive file and imported it to a new workspace. On executing the project is the new workspace I get the below null-pointer exception. There have been few posts on such kind of errors in eclipse forums, but I could not find anything concrete. Please let me know if you have faced such an issue before.
!ENTRY org.eclipse.oomph.setup.ui 2 0 2017-04-10 22:11:10.525
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:443)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$5(SetupUIPlugin.java:414)
at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:253)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Two potential fixes reported here: java.lang.NullPointerException when launching Eclipse would be to:
clean your .metadata folder and re-import the projects.
or
Right click on project > Select Run As > Run Configurations Click on Select Other link next to Using VisualVM Launcher Select Eclipse EDT launcher Click ok
Here is an attempt to open an sbt project in Intellij 2016.3 ultimate:
We are greeted with the following friendly notification:
Afa sbt details: I have installed sbt via homebrew and
That path truly does not exist. So I went to Preferences | Build Execution Deployment | SBT to fix the path:
$ll /usr/local/Cellar/sbt/0.13.13/libexec/sbt-launch.jar
-rwxr-xr-x 1 boescst USWIN\Domain Users 1210231 Oct 28 10:46 /usr/local/Cellar/sbt/0.13.13/libexec/sbt-launch.jar
Let' update the path:
However the same error message still occurs. Is there some other place in Intellij that needs to be updated?
The following happened when trying to import an sbt project:
The following dialog has a Show Logs link but clicking on it does nothing ..
Another update I opened the idea.log manually. It shows basically same information:
2017-01-04 18:07:21,280 [ 34384] WARN -
nal.AbstractExternalSystemTask - SBT launcher does not exist:
/usr/local/Cellar/sbt/0.13.9/libexec/sbt-launch.jar
com.intellij.openapi.externalSystem.model.ExternalSystemException: SBT
launcher does not exist:
/usr/local/Cellar/sbt/0.13.9/libexec/sbt-launch.jar at
org.jetbrains.sbt.project.SbtProjectResolver.resolveProjectInfo(SbtProjectResolver.scala:61)
at
org.jetbrains.sbt.project.SbtProjectResolver.resolveProjectInfo(SbtProjectResolver.scala:28)
at
com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.a(RemoteExternalSystemProjectResolverImpl.java:37)
at
com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
at
com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
at
com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
at
com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51)
at
com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:139)
at
com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:125)
at
com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:414)
at
com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:486)
at
com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:710)
at
com.intellij.openapi.progress.impl.CoreProgressManager$11.run(CoreProgressManager.java:423)
at
com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
at
com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
at
com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:569)
at
com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
java.io.FileNotFoundException: SBT launcher does not exist:
/usr/local/Cellar/sbt/0.13.9/libexec/sbt-launch.ja
I have repeatedly tried changing the sbt launch settings. The error still occurs. Intellij is caching that information somewhere. I've even deleted the .idea and .iml files. Same result. Now I have reinstalled Intellij . Still same issue! What the heck !!!???
For Launcher, in preference window, pick "Bundled" option instead of custom.
I have a simple hybrid App for Android phones. I have a skin folder created for Android tablets. I create an HTML file under the android.tablet but if this HTML file name match the same name of the HTML file under common folder then Eclipse shows a pop up error message that says:
'Building Workspace' has encountered a problem
Errors occurred during the build.
Java.Lang.NullPointerException
I have Eclipse Kepler SR1 64bits on OS X I get same error in Eclipse Juno on Win7.
This is the exception:
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
org.eclipse.core.runtime.CoreException: java.lang.NullPointerException
at com.worklight.studio.plugin.utils.PluginUtils.toCoreException(PluginUtils.java:138)
at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:112)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:69)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
at com.worklight.studio.plugin.builders.WorklightProjectBuilder.incrementalBuild(WorklightProjectBuilder.java:73)
at com.worklight.studio.plugin.builders.WorklightProjectBuilder.build(WorklightProjectBuilder.java:61)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.NullPointerException
at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:78)
... 19 more
I cannot confirm this using Worklight 6.1.0:
Created new project and application, "test"
Added the Android environment
Add a skin to the Android environment, "android.skin"
Copied common\index.html to android.skin\
No pop-up
Changed the HTML a bit
Run As > Run on Worklight Server
No pop-up
Suggestions:
Try with a new workspace
Close Eclipse and follow these instructions to delete the wlBuildResources folder
Opening a maven project with IntelliJ 13, the plugin folder of each subproject shows the errors that can be see in the picture.
This is the log:
2013-12-13 14:55:37,477 [ 180923] INFO - #org.jetbrains.idea.maven - error in opening zip file
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.zip.ZipFile.<init>(ZipFile.java:159)
at org.jetbrains.idea.maven.utils.MavenArtifactUtil.createPluginDocument(MavenArtifactUtil.java:155)
at org.jetbrains.idea.maven.utils.MavenArtifactUtil.readPluginInfo(MavenArtifactUtil.java:50)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure$PluginNode.updatePlugin(MavenProjectsStructure.java:1070)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure$PluginNode.<init>(MavenProjectsStructure.java:1050)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure$PluginsNode.updatePlugins(MavenProjectsStructure.java:1023)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure$ProjectNode.updateProject(MavenProjectsStructure.java:705)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure$ProjectNode.access$000(MavenProjectsStructure.java:655)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure.doUpdateProject(MavenProjectsStructure.java:195)
at org.jetbrains.idea.maven.navigator.MavenProjectsStructure.updateProjects(MavenProjectsStructure.java:166)
at org.jetbrains.idea.maven.navigator.MavenProjectsNavigator$MyProjectsListener$3.run(MavenProjectsNavigator.java:455)
at org.jetbrains.idea.maven.navigator.MavenProjectsNavigator$11.run(MavenProjectsNavigator.java:378)
at com.intellij.util.DisposeAwareRunnable.run(DisposeAwareRunnable.java:66)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:346)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
In any case the build maven works.
No issue found on http://youtrack.jetbrains.com/issues/IDEA
What's going?
The issue has been fixed in version 13.1 (135 475) as reported at the following link:
From: http://youtrack.jetbrains.com/issue/IDEA-120840
The bundled version of Maven, 3.0.3, in the maven plugin has a bug
that causes it to save the body of redirect responses from the remote
repository as the requested artifact, rather than following the
redirect. This results in large numbers of jar and XML files being
saved to the local (~/.m2/repository) repo with invalid content
(typically an HTML file), causing all builds that use those artifacts
to fail. This bug was fixed with the update to the Maven Wagon plugin
in Maven 3.0.5...