« Return to Thread: getCookie throws IllegalStateException
And does your com.my.myCookieImpl implement LookupContentFactory? And is it a class with public default constructor in your module.
BTW I am not able to find the corresponding version of the Extensible Node module that would match your line numbers. Can you check what revision of org.netbeans.modules.enode.FactoryWrapper do you actually use?
Br,
David
Shagil t napsal(a):
Hi David,
Here is the sample entry in my layer.xml
<folder name="ExtensibleNode">
<folder name="Lookup">
<folder name="CM">
<file name="myCookie.instance" >
<attr name="instanceOf" stringvalue="org.netbeans.spi.enode.LookupContentFactory" />
<attr name="instanceCreate" methodvalue="org.netbeans.spi.enode.LookupContentFactoryManager.create"/>
<attr name="factoryClass" stringvalue="com.my.myCookieImpl" />
<attr name="implements" stringvalue="com.my.myCookie" />
</file> </folder>
</folder> </folder>
Thanks
Shagil
On Mon, May 5, 2008 at 5:06 PM, David Strupl <David.Strupl@... <mailto:David.Strupl@...>> wrote:
Hello,
if I read the source code correctly the exception invocation says
throw new IllegalStateException("Attribute factoryClass not
specified for " + f); // NOI18N
So the exception should be telling you more than what you mentioned.
What is in your layer.xml fragment related to ExtensibleNode?
Best regards,
David
Shagil t napsal(a):
Hi David,
I am using Netbeans6.0 and Node1.0
+Shagil
On Mon, May 5, 2008 at 3:20 PM, David Strupl
<David.Strupl@... <mailto:David.Strupl@...><mailto:David.Strupl@... <mailto:David.Strupl@...>>> wrote:
Hello,
what version of NetBeans, what version of ENode library?
Br,
David
Shagil t napsal(a):
Hi,
When I try to call node.getCookie(), it throws following
Error
java.lang.IllegalStateException
at
org.netbeans.modules.enode.FactoryWrapper.clazz(FactoryWrapper.java:164)
at
org.netbeans.modules.enode.FactoryWrapper.instantiate(FactoryWrapper.java:177)
at
org.netbeans.modules.enode.FactoryWrapper.create(FactoryWrapper.java:67)
at
org.netbeans.modules.enode.ExtensibleLookupImpl.beforeLookup(ExtensibleLookupImpl.java:153)
at
org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:177)
at
org.netbeans.api.enode.ExtensibleLookup.lookup(ExtensibleLookup.java:71)
at
org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:182)
at org.openide.nodes.Node.getCookie(Node.java:687)
at
org.openide.nodes.AbstractNode.getCookie(AbstractNode.java:731)
could anyone please help me on this ?
Thanks in advance
+Shagi
« Return to Thread: getCookie throws IllegalStateException
| Free Forum Powered by Nabble | Forum Help |