question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import project

See original GitHub issue

I have just upgraded from beta-8 to beta-10. As was suggested in the release notes, I deleted my project from the project list and attempted to re-import it. I followed through the usual sequence (select folder → select project type → select sdk version) and clicked “Finish”. However, nothing happened after that.

I created a new project under a temporary directory and tried “Import project from existing sources” from the menu. This time, the IDE gave me an error message about an exception in intellij-haskell with the following traceback:

null
java.lang.NullPointerException
	at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:197)
	at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:197)
	at scala.collection.IndexedSeqOptimized.segmentLength(IndexedSeqOptimized.scala:192)
	at scala.collection.IndexedSeqOptimized.segmentLength$(IndexedSeqOptimized.scala:191)
	at scala.collection.mutable.ArrayOps$ofRef.segmentLength(ArrayOps.scala:191)
	at scala.collection.GenSeqLike.prefixLength(GenSeqLike.scala:94)
	at scala.collection.GenSeqLike.prefixLength$(GenSeqLike.scala:94)
	at scala.collection.mutable.ArrayOps$ofRef.prefixLength(ArrayOps.scala:191)
	at scala.collection.IndexedSeqOptimized.find(IndexedSeqOptimized.scala:49)
	at scala.collection.IndexedSeqOptimized.find$(IndexedSeqOptimized.scala:48)
	at scala.collection.mutable.ArrayOps$ofRef.find(ArrayOps.scala:191)
	at intellij.haskell.util.HaskellProjectUtil$.findCabalFile(HaskellProjectUtil.scala:89)
	at intellij.haskell.module.HaskellModuleBuilder$.getCabalFile(HaskellModuleBuilder.scala:168)
	at intellij.haskell.module.HaskellModuleBuilder$.createCabalInfo(HaskellModuleBuilder.scala:154)
	at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$4(StackProjectImportBuilder.scala:56)
	at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$4$adapted(StackProjectImportBuilder.scala:54)
	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)
	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
	at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$3(StackProjectImportBuilder.scala:54)
	at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$3$adapted(StackProjectImportBuilder.scala:53)
	at scala.Option.foreach(Option.scala:257)
	at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$2(StackProjectImportBuilder.scala:53)
	at scala.Option.map(Option.scala:146)
	at intellij.haskell.module.StackProjectImportBuilder.commit(StackProjectImportBuilder.scala:52)
	at com.intellij.projectImport.ProjectImportBuilder.commit(ProjectImportBuilder.java:60)
	at com.intellij.ide.impl.NewProjectUtil.a(NewProjectUtil.java:149)
	at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:76)
	at com.intellij.ide.actions.ImportModuleAction.a(ImportModuleAction.java:95)
	at com.intellij.ide.actions.ImportModuleAction.a(ImportModuleAction.java:89)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:151)
	at com.intellij.ide.actions.ImportModuleAction.createFromWizard(ImportModuleAction.java:89)
	at com.intellij.ide.actions.ImportModuleAction.doImport(ImportModuleAction.java:84)
	at com.intellij.ide.actions.ImportProjectAction.actionPerformed(ImportProjectAction.java:29)
	at com.intellij.ui.components.labels.ActionLink$1.linkSelected(ActionLink.java:67)
	at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:156)
	at com.intellij.ui.components.labels.ActionLink.doClick(ActionLink.java:80)
	at com.intellij.ui.components.labels.LinkLabel$MyMouseHandler.mouseReleased(LinkLabel.java:347)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:821)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

The project in question is https://github.com/input-output-hk/cardano-sl-explorer/ . I have branched away from master, but otherwise have made no commits and no changes to the working tree.

As I said earlier, I’m running beta10 under Intellij Idea Ultimate 2017.2.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dnikucommented, Aug 27, 2017

Thank you for taking the time to fix this.

0reactions
rikvdkleijcommented, Aug 26, 2017

This is new issue but it’s already created, see #209. I have to remove this error message and just ignore those directories which do not contain Cabal file.

Your project is indeed imported successfully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some projects cannot be imported because they already exist ...
Cut Ctrl + x myProject folder from eclipse workspace to other location ie Desktop · Right Click Navigator (you can get it from...
Read more >
Solved: Cannot Import Project - SmartBear Community
Projects - When I click File --> Import Project , Ready API 3.10.0 tool doesn't show the file dialog box to select the...
Read more >
Eclipse Import Project Some projects cannot be imported ...
Eclipse Import Project Some projects cannot be imported because they already exist in the workspace ... 2 Find the <name><name\> field, modify its ......
Read more >
Cannot import existing project into workspace of eclipse
Importing an "existing projects into workspace" means importing an existing Eclipse project, which is not your case. What you want to do is...
Read more >
KB39260: "Cannot import a package from a project source into ...
KB39260: "Cannot import a package from a project source into a configuration source" error appears in Object Manager when trying to import a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found