Loading ...
Sorry, an error occurred while loading the content.
 

KeyGenerator-InstantiationException

Expand Messages
  • jan.wollny@web.de
    Well, some additional question. I was creating some KeyGenerators with: KeyGenerator keyGen = (KeyGenerator)Class.forName(KEYGENERATOR).newInstance();
    Message 1 of 2 , Jan 23, 2005
      Well,

      some additional question. I was creating some KeyGenerators with:

      KeyGenerator keyGen = (KeyGenerator)Class.forName(KEYGENERATOR).newInstance();
      domToDBMS.addKeyGenerator("UID", keyGen);

      but all i got was :

      java.lang.InstantiationException: org.xmlmiddleware.xmldbms.keygenerators.KeyGenerator
      at java.lang.Class.newInstance0(Class.java:291)
      at java.lang.Class.newInstance(Class.java:259)
      at XMLDBMSStore.main(XMLDBMSStore.java:85)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
      Exception in thread "main" Process terminated with exit code 1

      What's wrong with this Instatiation?

      greetz
      jan
      __________________________________________________________
      Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
      weltweit telefonieren! http://freephone.web.de/?mc=021201
    • Ronald Bourret
      KeyGenerator is an interface, not a class, so you can t instantiate it. The version 2.0 alpha 3 release does not come with any implementations of the
      Message 2 of 2 , Jan 23, 2005
        KeyGenerator is an interface, not a class, so you can't instantiate it.

        The version 2.0 alpha 3 release does not come with any implementations
        of the KeyGenerator interface, so you will need to either:

        a) Write your own. Do this if you want to use custom code to generate keys.

        b) Download the HighLow class from the CVS tree. This class uses a
        high/low scheme to generate keys. You should use the 1.1 revision:


        http://cvs.sourceforge.net/viewcvs.py/xmldbms/org/xmlmiddleware/xmldbms/keygenerators/HighLow.java?rev=1.1&view=markup

        -- Ron

        jan.wollny@... wrote:

        > Well,
        >
        > some additional question. I was creating some KeyGenerators with:
        >
        > KeyGenerator keyGen = (KeyGenerator)Class.forName(KEYGENERATOR).newInstance();
        > domToDBMS.addKeyGenerator("UID", keyGen);
        >
        > but all i got was :
        >
        > java.lang.InstantiationException: org.xmlmiddleware.xmldbms.keygenerators.KeyGenerator
        > at java.lang.Class.newInstance0(Class.java:291)
        > at java.lang.Class.newInstance(Class.java:259)
        > at XMLDBMSStore.main(XMLDBMSStore.java:85)
        > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        > at java.lang.reflect.Method.invoke(Method.java:324)
        > at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
        > Exception in thread "main" Process terminated with exit code 1
        >
        > What's wrong with this Instatiation?
      Your message has been successfully submitted and would be delivered to recipients shortly.