tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

Error when importing a new project that uses spring-jdbc #86

Closed oharsta closed 5 years ago

oharsta commented 5 years ago

The following stack-trace occurs when importing a project that has a dependency on spring-jdbc:

Error while indexing /Users/okkeharsta/.m2/repository/org/springframework/spring-jdbc/4.3.20.RELEASE/spring-jdbc-4.3.20.RELEASE.jar!/org/springframework/jdbc/support/sql-error-codes.xml
To reindex this file IDEA has to be restarted

java.lang.IllegalStateException: file.virtualFile must not be null
    at dev.blachut.svelte.lang.codeInsight.SvelteNSInfoProvider.overrideNamespaceFromDocType(SvelteNSInfoProvider.kt:13)
    at com.intellij.xml.util.XmlUtil.getDefaultNamespaces(XmlUtil.java:589)
    at com.intellij.xml.XmlExtension.getNamespacesFromDocument(XmlExtension.java:94)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.computeNamespaceMap(XmlTagImpl.java:899)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.lambda$getNamespaceMap$12(XmlTagImpl.java:867)
    at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:148)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:240)
    at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:241)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValueFromExHolder(CachedValuesManagerImpl.java:72)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:45)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:147)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:129)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.getNamespaceMap(XmlTagImpl.java:866)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.getNamespaceByPrefix(XmlTagImpl.java:785)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.lambda$getNamespace$10(XmlTagImpl.java:768)
    at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:148)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:240)
    at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:241)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValueFromExHolder(CachedValuesManagerImpl.java:72)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:45)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:147)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:129)
    at com.intellij.psi.impl.source.xml.XmlTagImpl.getNamespace(XmlTagImpl.java:767)
    at com.intellij.util.xml.impl.DomFileElementImpl.getRootTag(DomFileElementImpl.java:183)
    at com.intellij.util.xml.impl.RootDomParentStrategy.getXmlElement(RootDomParentStrategy.java:41)
    at com.intellij.util.xml.impl.RootDomParentStrategy.getXmlElement(RootDomParentStrategy.java:26)
    at com.intellij.util.xml.impl.DomInvocationHandler.getXmlElement(DomInvocationHandler.java:258)
    at com.intellij.util.xml.impl.InvocationCache.m(InvocationCache.java:63)
    at com.intellij.util.xml.impl.DomInvocationHandler.invoke(DomInvocationHandler.java:670)
    at com.intellij.jam.model.common.BaseRootImpl$$EnhancerByJetBrainsMainCglib$$6f929b05.getXmlElement(<generated>)
    at com.intellij.util.xml.DomUtil.getDefinedChildren(DomUtil.java:225)
    at com.intellij.spring.index.SpringIndexUtil.processChildren(SpringIndexUtil.java:127)
    at com.intellij.spring.index.SpringIndexUtil.getAllBeanInfos(SpringIndexUtil.java:122)
    at com.intellij.spring.index.SpringIndexUtil.indexFile(SpringIndexUtil.java:31)
    at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:312)
    at com.intellij.util.indexing.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:109)
    at com.intellij.util.indexing.impl.MapReduceIndex.calculateUpdateData(MapReduceIndex.java:268)
    at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:250)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1680)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$28(FileBasedIndexImpl.java:1605)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:656)
    at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1564)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1550)
    at com.intellij.util.indexing.UnindexedFilesUpdater.lambda$indexFiles$0(UnindexedFilesUpdater.java:109)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$0(CacheUpdateRunner.java:219)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.lambda$run$1(CacheUpdateRunner.java:235)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:232)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    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)
tomblachut commented 5 years ago

hmm thanks for reporting