DomFileDescription and CGILib proxy

Ha all,

I managed to create dom model ( almost automatcically ) and dom file description  finds and recognizes my file type - how ever,
it borks on CCE:

Caused by: java.lang.ClassCastException: xxxxxxx.Module$$EnhancerByCGLIB$$dcc27d5 cannot be cast to com.intellij.util.xml.DomElement
     at com.intellij.util.xml.impl.DomInvocationHandler.<init>(DomInvocationHandler.java:107)
     at com.intellij.util.xml.impl.DomRootInvocationHandler.<init>(DomRootInvocationHandler.java:35)
     at com.intellij.util.xml.impl.DomFileElementImpl.<init>(DomFileElementImpl.java:128)
     at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.a(FileDescriptionCachedValueProvider.java:128)
     at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.getFileElement(FileDescriptionCachedValueProvider.java:67)
     at com.intellij.util.xml.impl.DomManagerImpl.getFileElement(DomManagerImpl.java:359)
     at com.intellij.util.xml.impl.DomManagerImpl.getFileElement(DomManagerImpl.java:58)
     at com.intellij.util.xml.DomManager.getDomFileDescription(DomManager.java:171)
     at com.intellij.util.xml.DomFileIconProvider.getIcon(DomFileIconProvider.java:33)
     at com.intellij.util.PsiIconUtil.getProvidersIcon(PsiIconUtil.java:41)
     at com.intellij.psi.impl.ElementBase.computeIconNow(ElementBase.java:133)
     at com.intellij.psi.impl.ElementBase.access$000(ElementBase.java:53)
     at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:63)
     at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:57)
     at com.intellij.ui.DeferredIconImpl$1$1.run(DeferredIconImpl.java:93)
     at com.intellij.ui.IconDeferrerImpl.evaluateDeferred(IconDeferrerImpl.java:100)
     at com.intellij.ui.DeferredIconImpl$1$2.run(DeferredIconImpl.java:108)
     at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1182)
     at com.intellij.ui.DeferredIconImpl$1.run(DeferredIconImpl.java:105)
     at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:145)
     at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:142)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
     at java.util.concurrent.FutureTask.run(FutureTask.java:166)
     at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
     at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)



Module is my root Tag and was generated (almost) automatically by idea internal tools::



package xxxxxxxx;

import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.GenericAttributeValue;
import com.intellij.util.xml.Namespace;
import com.intellij.util.xml.Stubbed;
import com.kosmosbanking.apdl.idea.ApdlConstants;
import org.jetbrains.annotations.NotNull;

/**
*
* @author Konstantin Pribluda
*/
@Namespace(ApdlConstants.EBIMODULE_NAMESPACE)
@Stubbed
public interface Module extends DomElement {

     /**
      * Returns the value of the name child.
      * @return the value of the name child.
      */
     @NotNull
     GenericAttributeValue<String> getName();


}

Looking into source,   there is either some implementation or CGI proxy for generic stuff.   Do I miss some component like dom.implementationProvider?
Struts2 plugin seems to work without.
4 comments

Please try removing @Stubbed to see if it works (you must provide corresponding values in your DomFileDescription otherwise).

0

Does not help:


un 15, 2013 1:52:59 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[  14211]   WARN - pl.ExternalResourceManagerImpl - Cannot find standard resource. filename:/META-INF/tapestry_5_0_0.xsd class=null
XmlFile:ebimodule_caaml.xml is mine> true
[  16563]  ERROR - api.project.CacheUpdateSession - Error while indexing C:\sources\demo-apdl\untitled\src\resources\ebimodule_caaml.xml
To reindex this file IDEA has to be restarted
java.lang.ClassCastException:xxxxxxx.Module$$EnhancerByCGLIB$$e4cf20ca cannot be cast to com.intellij.util.xml.DomElement
     at com.intellij.util.xml.impl.DomInvocationHandler.<init>(DomInvocationHandler.java:107)
     at com.intellij.util.xml.impl.DomRootInvocationHandler.<init>(DomRootInvocationHandler.java:35)
     at com.intellij.util.xml.impl.DomFileElementImpl.<init>(DomFileElementImpl.java:128)
     at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.a(FileDescriptionCachedValueProvider.java:128)
     at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.getFileElement(FileDescriptionCachedValueProvider.java:67)



Exception happens while indexing,   

PS: I tried stubbed as sinspiration from your code in first place.
Is there posibilty that this comes as some weird classpath issue while starting plugin in IDE?

0

Please try File|Invalidate Caches in your sandbox installation. Did you maybe compile your plugin against a different version of IntelliJ IDEA SDK than you're using to run the sandbox? If this doesn't help, could you provide ZIP of your plugin's sources?

0

Solved this issue.   Cause was class com.intellij.util.xml.DomElement which was in my sources -
it seems that it was created by idea XSLT processing to generate Dom-Model.  No it works perfectly

0

Please sign in to leave a comment.