getCookie throws IllegalStateException

View: New views
7 Messages — Rating Filter:   Alert me  

getCookie throws IllegalStateException

by Shagil t :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: getCookie throws IllegalStateException

by David Strupl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Re: getCookie throws IllegalStateException

by Shagil t :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi David,

I am using Netbeans6.0 and Node1.0
+Shagil

On Mon, May 5, 2008 at 3:20 PM, David Strupl <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



Re: getCookie throws IllegalStateException

by David Strupl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>> 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
>
>
>


Re: getCookie throws IllegalStateException

by Shagil t :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...>> 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






Re: getCookie throws IllegalStateException

by David Strupl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>
>
>
>
>


Re: getCookie throws IllegalStateException

by Shagil t :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using enode-1.0.jar in my system
Here is the entry of manifest.mf of enode-1.0.jar

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
OpenIDE-Module-Public-Packages: org.netbeans.api.enode.*, org.netbeans
 .spi.enode.*
OpenIDE-Module-Module-Dependencies: org.openide.modules > 6.2, org.ope
 nide.filesystems > 6.2, org.openide.util > 6.2, org.openide.awt > 6.2
 , org.openide.dialogs > 6.2, org.openide.actions > 6.2, org.openide.n
 odes > 6.2, org.openide.loaders, org.netbeans.modules.registry/1
OpenIDE-Module-Implementation-Version: 080229
OpenIDE-Module: org.netbeans.modules.enode/1
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/enode/Bundle.pr
 operties
OpenIDE-Module-Specification-Version: 1.2
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat1

Thanks
Shagil

On Mon, May 5, 2008 at 5:53 PM, David Strupl <David.Strupl@...> wrote:
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