Exception in Class class native method

Hi Guys,
I am getting an Exception in the Class class native method getMethod0. The Exception is java.lang.NoSuchMethodException. Can some put light on this, as to why is this coming???
Here's the starckTrace........
java.lang.NoSuchMethodException
     at java.lang.Class.getMethod0(Native Method)
     at java.lang.Class.getMethod(Class.java:888)
     at com.gepower.gees.vc.utility.VCComparator.compare(VCComparator.java:67)
     at java.util.Arrays.mergeSort(Arrays.java:1181)
     at java.util.Arrays.mergeSort(Arrays.java:1189)
     at java.util.Arrays.mergeSort(Arrays.java:1189)
     at java.util.Arrays.mergeSort(Arrays.java:1188)
     at java.util.Arrays.mergeSort(Arrays.java:1189)
     at java.util.Arrays.mergeSort(Arrays.java:1189)
     at java.util.Arrays.mergeSort(Arrays.java:1188)
     at java.util.Arrays.sort(Arrays.java:1128)
     at java.util.Collections.sort(Collections.java:121)
Thanx,
Chandan.

Class.getMethod() throws that exception if the method that is being searched for does not exist.
And VCComparator.compare() used Class.getMethod().
So something is wrong in VCComparator.compare().

Similar Messages

  • Testing ActionScript classes with native methods?

    Hi,
    I have an ActionScript class that I'm writing and would like to test using FlexUnit.
    The only issue is that the ActionScript class has a member in it that is a class with native methods.
    So, I get the following error when trying to run a test of that ActionScript class:
    VerifyError: Error #1079: Native methods are not allowed in loaded code.
    Does anyone know of a way to get around this?  FlexUnit seems not to like native methods being present.
    Thanks,
    Matt

    Hi casdvm,
    by definition, you only own objects that you created using one of the alloc* methods, copy: or new:. All other objects (IIRC with a few noted exceptions) are autoreleased.
    If you create convenience methods in your own class, you should follow the same rule. For example, if you have a class Pet and want to implement the method +petWithName, your code might look something like that:
    + petWithName: (NSString *)name
    return [[[Pet alloc] initWithName: name] autorelease];
    Alex

  • Class.forName1(Native Method)

    Hi all,
    We are experiencing an irregular memory issue and the Java stack trace is throwing a line:
    at java.lang.Class.forName1(Native Method)
    What does this line indicate? Is this a call into a Unix native library method...i.e a method that the JITC has compiled into native code?
    The stack trace is huge, but this line appears near the top, surrounded by Oracle JDBC traces:
    <snip>
    3XMTHREADINFO "ApplicationServerThread" (TID:0x7035FA20, sys_thread_t:0x3A2CFAA8, state:R, native ID:0x2499) prio=5
    4XESTACKTRACE at com.evermind.io.IOUtils._eu(.(Compiled Code))
    4XESTACKTRACE at com.evermind._ok._tw(.(Compiled Code))
    4XESTACKTRACE at com.evermind._ig.lookup(.(Compiled Code))
    4XESTACKTRACE at com.evermind._lv._ua(.(Compiled Code))
    4XESTACKTRACE at com.evermind.naming.archive.MemoryArchiveContext._tq(.(Compiled Code))
    4XESTACKTRACE at com.evermind.naming.archive.MemoryArchiveContext._gh(.(Compiled Code))
    4XESTACKTRACE at com.evermind.naming.archive.MemoryArchiveContext._ij(.(Compiled Code))
    4XESTACKTRACE at com.evermind._as.findClass(.(Compiled Code))
    4XESTACKTRACE at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
    4XESTACKTRACE at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
    4XESTACKTRACE at java.lang.Class.forName1(Native Method)
    4XESTACKTRACE at java.lang.Class.forName(Class.java(Compiled Code))
    4XESTACKTRACE at oracle.jdbc.ttc7.TTC7Protocol.safelyGetClassForName(TTC7Protocol.java:3664)
    4XESTACKTRACE at oracle.jdbc.driver.OracleConnection.safelyGetClassForName(OracleConnection.java(Compiled Code))
    4XESTACKTRACE at oracle.jdbc.driver.OracleConnection.addClassMapEntry(OracleConnection.java(Compiled Code))
    </snip>
    Our environment is as follows:
    - Unix 64 bit AIX 5.3
    - IBM 32 bit Java JDK, JITC Enabled
    - Oracle 10g
    - Oracle Type 4 Drivers
    Also, is there a website, book or any documentation that delves into these types of Java exceptions and how to interpret a stack trace?
    Any help would be greatly appreciated?
    tia,
    adym
    Message was edited by:
    adym-lincoln

    "scripts" are entirely different from GUI applications. What do you expect to happen when you run a Swing application through telnet on another machine? Do you expect the Swing UI to be magically transported to the local Windows machine?
    Not gonna happen. Yes, like ejp hinted, you could run an X-environment on your local machine and have the Swing UI tunnel its output there, but are you sure you want GUI apps to run on a remote machine like that? It's not gonna be fun to work with, I'll tell you that.
    Why not create a Java WebStart app (or perhaps even an applet) out of your application, so your users can run the application locally?

  • NullPointerException at java.lang.Class.forNameImpl(Native Method)

    Hi All,
    We installed an enterprise application using Websphere Application Server 6.1 and we use Java 1.5.0_18. We encountered the following error while testing the application:
    [6/07/09 18:32:56:825 EST] 0000002b SystemErr R java.lang.NullPointerException
    [6/07/09 18:32:56:825 EST] 0000002b SystemErr R      at java.lang.Class.forNameImpl(Native Method)
    [6/07/09 18:32:56:825 EST] 0000002b SystemErr R      at java.lang.Class.forName(Class.java:130)
    <the remaining part of the stack trace has been removed as it contains the names of our application specific classes>
    Could you please let me know the root cause of this error?
    Thank you.
    Regards,
    Venkatesh

    I would double- and triple-check that. A null classname string is almost certainly the cause here.

  • Exception when creating instance of a class with native method by JNI

    I am trying to use JNI - I want to have a Java class Foo have a
    method, that is a native C function.
    I follow the Sun's tutorial
    http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jnie...
    exactly, and everything compiles fine, and I have compiled my C .dll
    as well (on Win XP). So I am ready to run - ...
    Now when I finally try to run the Java application, it throws this
    exception when it tries to create the Foo instance:
    at Foo.<init>(Foo.java:11)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:
    513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:786)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:715)
    at sun.applet.AppletPanel.run(AppletPanel.java:369)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.security.AccessControlException: access denied
    (java.lang.Runtim
    ePermission loadLibrary.Foo)
    Why would this be so??? Thank you for your insights

    Mark_Galeck wrote:
    I am trying to use JNI - I want to have a Java class Foo have a
    method, that is a native C function.
    I follow the Sun's tutorial
    http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jnie...
    exactlyNot quite exactly. Yours is an applet, theirs is an application.
    Applets are not allowed many things that applications can do.
    Among them, loading native libraries.

  • NoClassDefFoundError problems -native method

    hi all,
    i've got a wierd problem... when i try to run a java appln ( for instance curl.java whose class is stored in a jar file) without giving a proper argument say like:
    java XX.RR.YY.curl
    a message prompts me to input a valid argument :
    Usage: XX.RR.YY.hyd <options>
    but when i try to run the same program - this time giving it a valid argument- like :
    java XX.RR.YY.curl -curltest.xml
    it spews out the following error messages along many others
    Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:130)
    my point is why does java fail to find the class when i give it a valid argument and not when i do not give it any.
    thanks in advance

    exactly ... my java program has a similar code in it
    regarding the arg checking .
    so it does mean that java had found my appln
    class(yay! my classpath is right) and had run thru a
    few lines of code to get to the point where it
    realized it needed some arguments and so gently asked
    me supply an argument (a valid filename in my case)...Did you write this code? Did you put in the line where it displays the usage?
    so the next thing i do is run the same command java
    xx.xx.xx -curltest.xml ( i've supplied a valid
    argument this time ) ... the result :
    Exception in thread "main"
    java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:130)
    why did java fail to grab my appln class this time -
    in contrast to the first time where it found the class
    file w/o any problems. Try just using "java xx.xx.xx curltest.xml" (without the '-').

  • Accessing a native method from within a packaged class

    I have seen some very useful information from RPaul. However, I can not quite get it to work.
    I have a class "JNIGetUserId" that is in a package "com.services.localoptions". I am trying to call a native method from a dll. it works fine at the default package level. But not in the package. I have tried adding the "_" between each level of the directory in the h and c++ files. I also found that doing a javah at the top of the package structure it includes some information in the h file. A "_0005" shows up between each level.
    This is on Windows XP. I am also using VisualAge for Java. I also am using JDK 1.3.1.
    The source files:
    package com.services.localoptions;
    * This class provides the JNI Interface to call the
    * AD User Maintainence routines.
    * These routines are stored in the JNIGetUserIdLibrary.dll.
    * The routines are:
    * <ul>
    * <li>getUser - returns a string containing the User Id
    * <eul>
    * @author: Ray Rowehl
    * @date (10/15/2003 10:30:59 AM)
    public class JNIGetUserId
         // Load the library
         static
         try
              System.out.println("loading dll");
         System.loadLibrary("JNIGetUserIdLibrary");
         System.out.println("loaded dll");
         catch (UnsatisfiedLinkError ue)
              System.out.println("Link Error");
    * native C++ method to call getUserId routine
    public native String getUser() throws Exception;
    * This method allows us to test standalone..
    * Creation date: (10/16/2003 2:08:58 PM)
    * @param args java.lang.String[]
    public static void main(String[] args)
         try
              System.out.println("Trying method 3");
              JNIGetUserId lGUD = new JNIGetUserId();
              System.out.println(lGUD.getUser());
         catch (Exception e)
              System.out.println("Got an exception " + e);
              e.printStackTrace();
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class JNIGetUserId */
    #ifndef IncludedJNIGetUserId
    #define IncludedJNIGetUserId
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: JNIGetUserId
    * Method: getUser
    * Signature: ()Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_com_localoptions_JNIGetUserId_getUser
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    // Implements method to return a string to Java
    // C++ core header
    #include <iostream.h>
    // header from Java Interface
    #include "JNIGetUserId.h"
    #include "JNIGetUserId2.h"
    // returns a string back to Java for package structure
    JNIEXPORT jstring JNICALL Java_com_services_localoptions_JNIGetUserId_getUser
    ( JNIEnv * env, jobject thisObject )
         // set up constant user id for testing return
         char* userid = "RROWEHLP";
         // return userid to caller
         return env->NewStringUTF( userid );     
    // returns a string back to Java for flat structure
    JNIEXPORT jstring JNICALL Java_JNIGetUserId_getUser
    ( JNIEnv * env1, jobject thisObject1 )
         // set up constant user id for testing return
         char* userid1 = "RROWEHL1";
         // return userid to caller
         return env1->NewStringUTF( userid1 );     
    }

    Ok. A co-worker figured it out for me. The key thing is to do "javah com.services.localoptions.JNIGetUserId". Note the use of "." instead of "\". Running on windows, I was used to doing "\". That was part of the problem. Another key is doing the javah at the top of the package structure. This was mentioned in a post over at IBM.
    We got our JNI stuff working now. thanks, ray.

  • Class not found -java.security.AccessController.doPrivileged(Native Method)

    The applet was working fine around 6 months back but now the application is throwing the below exception:
    load: class DisiConnectionApplet.class not found.
    java.lang.ClassNotFoundException: DisiConnectionApplet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed:http://messaging.danskenet.net/ie/NewsTicker/NewsTicker.nsf/f49a4a079e88f527c12572020033b098/$FILE/DisiConnectionApplet/class.class
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    Exception: java.lang.ClassNotFoundException: DisiConnectionApplet.class
    I have checked and found the class is on proper place... I googled the issue and found that there might be any issue in IE settings... but didn't get any proper solution...
    I am using IE 6.0 with below Java plug-in :::::::::::::
    Java Plug-in 1.6.0_11
    Java(tm) Plug-in 2 SSV Helper
    Java(tm) Plug-in SSV Helper
    Web Browser Applet Control
    Please let me know what should be done on this case....????

    its exactly that... and who are you calling a fool? I think its a case of the pot calling the kettle black there mate (except you have no right to call me anything, since you are the one looking for help, and we are the ones that know)... oh and check the date... it says aug 2003... is that a month ago? come back in a month and i'll give you your answer then

  • How do I declare a native method outside of the main class?

    Hi
    This is a JNI particular question.
    I am having a problem with generating the header .h file after executing javah. The file is generated correctly but is empty under certain circumstances.
    This is the 'empty file:
    =================
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class gui_GuiMain */
    #ifndef Includedgui_GuiMain
    #define Includedgui_GuiMain
    #ifdef __cplusplus
    extern "C" {
    #endif
    #ifdef __cplusplus
    #endif
    #endif
    This is what it should look like:
    =========================
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class gui_GuiMain */
    #ifndef Includedgui_GuiMain
    #define Includedgui_GuiMain
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: gui_GuiMain
    * Method: getValueOIDTestMIB
    * Signature: ()V
    JNIEXPORT void JNICALL Java_gui_GuiMain_getValueOIDTestMIB
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    The header file becomes "empty" when the native function getValueOIDTestMIB is declared in a different class than what my main() function is declared in.
    For example something like this will work:
    class Main
    public native void getValueOIDTestMIB
    static {
    System.loadLibrary("libsnmp++");
    //............some more functions etc.............
    public static void main(String[] args)
    //............some more stuff...........................
    But when I declare this:
    public native void getValueOIDTestMIB
    static {
    System.loadLibrary("libsnmp++");
    outside the class, in another class within the same package, nothing happens.
    I am probabily doing something stupid. Can somebody help or give me some guidance to where I should look. I come from a C++ background, not a guru in Java.
    Thanks

    You need to run javah and give it as a parameter the full class name of the class which contains the native methods.
    For example (if your class is called A and its package is a.b.c)
    javah -jni a.b.c.A

  • Native method in local class

    Hi there,
    this is a repost of my question but now in the right forum.
    I have a problem with a native method of a local class that hides a member class:
    public class SomeClass
         class MemberClass
              public native void bla();
              public void out()
                   System.out.println("A");
         public void foo()
              class MemberClass
                   public native void bla();
                   public void out()
                        System.out.println("B");
              MemberClass myClass = new MemberClass();
              myClass.out();
         public static void main(String[] args)
              SomeClass someClass = new SomeClass();
              someClass.foo();
    }The class MemberClass exist in two different ways. Every class has it's own out() method. The local class just hides the member class. Now I want to implement the native methods bla() of the two classes.
    If I call
    javac SomeClass.hI get
    SomeClass.class
    SomeClass$MemberClass.class
    SomeClass$1MemberClass.classwhich makes sense to me. We have one class file for the member class and one for the local class.
    If I use
    javah SomeClassthen I get
    JNIEXPORT void JNICALL Java_SomeClass_00024MemberClass_bla(JNIEnv *, jobject);in the header file for the member class. No header file for the local class was created.
    Therefore I call
    javah SomeClass$1MemberClassand I get another header file which is for the local class. But this header file declares the same native method:
    JNIEXPORT void JNICALL Java_SomeClass_00024MemberClass_bla(JNIEnv *, jobject);This is ambiguous... If I would implement the native method, then I couldn't even say for which one of the native methods it will be used. Maybe for both.. which wouldn't make any sense too.
    What is wrong here?
    Thank you for your thoughts :-)

    Interesting...From the JLS under "fully qualified name"
    [http://java.sun.com/docs/books/jls/third_edition/html/names.html#71701]
    "Every package, top level class, top level interface, and primitive type has a fully qualified name."
    From the javah docs
    javah [ options ] fully-qualified-classname
    And note this under the JNI spec for "FindClass"
    [http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/functions.html#wp16027]
    "The name argument is a fully-qualified class name or an array type signature "
    Does that mean that you can't use JNI to access a local class? Seems like I have seen posts that said that was possible.

  • Native methods inside C++ class

    Hey all,
    Tried posting this already but it didn't appear in the forums. So apologies if this appears twice on same forum :o)
    Want to wrap my native methods inside a C++ class but get UnsatisfiedLinkerError when I do. Is it possible to do this? Do I have to change some method signatures or what?
    I want something like :
    public class A
    native void doSomething();
    class B
    public:
    JNIEXPORT void JNI Java_A_doSomething() { ... } /* or whatever */
    It works ok outside of a C++ class but I'd prefer to contain my methods inside a class. Any help?
    Cheers,
    Conor

    Java needs to find your functions in the DLL or SO. But the names are "mangled" if you declare the function inside a class - even declaring the function "static" does not help. For instance, using the Microsoft C++ compiler:
    class B
    public:
    static JNIEXPORT void JNI Java_A_doSomething() { ... }
    };the name is mangled to ?Java_A_doSomething@B@@SAXXZ
    But Java tries to locate the entry _Java_A_doSomething@0 in the DLL.
    You can write the global functions as:
    JNIEXPORT void JNI Java_A_doSomething() {
        B::doSomething();
    }and implement your functions in the class B. The advantage of this approach is that you can write all bookkeeping work of converting Java data to C++ data in the global function, and leave the real work to the function declared in the C++ class.

  • Native method in object class........

    I would like to know that which method of object class is a native method..........

    flounder wrote:
    The natives are getting restless.
    What they do with him when he arrives, I don't know.This reminds me of one of my favorite entries in Ambrose Bierce's [Devil's Dictionary|http://en.wikipedia.org/wiki/Devil%27s_dictionary]
    h3. Aborigines
    Persons of little worth found cumbering the soil of a newly discovered country. They soon cease to cumber; they fertilize.

  • Exception Description: Entity class [] has no primary key....

    Received the following error in jdeveloper - some info on how to fix would be greatly appreciated
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar
    C:\Oracle\MiddlewareNew\jdk160_05\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\.adf;C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\SAM_CM_AUTONUM_GEN\classes;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\toplink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\antlr.jar;C:\oracle\MiddlewareNew\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\oracle\MiddlewareNew\modules\javax.persistence_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xmlparserv2.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xml.jar;C:\oracle\MiddlewareNew\modules\javax.jsf_1.2.0.0.jar;C:\oracle\MiddlewareNew\modules\javax.ejb_3.0.1.jar;C:\oracle\MiddlewareNew\modules\javax.enterprise.deploy_1.2.jar;C:\oracle\MiddlewareNew\modules\javax.interceptor_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.jms_1.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.jsp_1.1.0.0_2-1.jar;C:\oracle\MiddlewareNew\modules\javax.jws_2.0.jar;C:\oracle\MiddlewareNew\modules\javax.activation_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.mail_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.soap_1.3.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.xml.rpc_1.2.1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.ws_2.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.management.j2ee_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.resource_1.5.1.jar;C:\oracle\MiddlewareNew\modules\javax.servlet_1.0.0.0_2-5.jar;C:\oracle\MiddlewareNew\modules\javax.transaction_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.stream_1.1.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\wlserver_10.3\server\lib\weblogic.jar -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar SAM.CMAUTONUMGENClient
    java.lang.reflect.InvocationTargetException
         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:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         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:597)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:870)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:101)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:149)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
    FATAL ERROR in native method: processing of -javaagent failed
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:830)
         ... 16 more
    Exception in thread "main" Process exited with exit code 1.

    Hi,
    you may want to try the J2EE forum here on OTN in case you don't get a sufficient answer to the problem.
    Frank

  • Getting the JAXB exception like "Two classes have the same XML type name-"

    Getting the JAXB exception like "Two classes have the same XML type name...",
    Here is the exception details:
    Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "city". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at com.model.City at public com.model.City com.model.Address.getCurrentCity() at com.model.Address this problem is related to the following location: at com.common.City at public com.common.City com.model.Address.getPreviousCity() at com.model.Address
    at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at com.PojoToXSD.main(PojoToXSD.java:17)
    I took the example like:
    package com.model; ---->this package contains 'Address' class and 'City' class
    public class Address {
    private String areaName; private City currentCity; private com.common.City previousCity;
    package com.model;
    public class City {
    private String cityName;
    Another city class in "com.common" package.
    package com.common;
    public class City {
    private String pinCode;
    We need to create XSDs and needs to do the Marshalling and unmarshalling with the existing code in our project(like as above example code), code does not have any annotations like "@XmlRootElement/@XmlType" and we can not able to change the source code.
    I would like to know is there any solution to fix the above issue or any other ways to create XSDs and marshaling/unmarshalling(like MOXy..etc)?
    It would be great if i can get the solution from any one....May thanks in advance.
    Thanks,
    Satya.

    Getting the JAXB exception like "Two classes have the same XML type name...",
    Here is the exception details:
    Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "city". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at com.model.City at public com.model.City com.model.Address.getCurrentCity() at com.model.Address this problem is related to the following location: at com.common.City at public com.common.City com.model.Address.getPreviousCity() at com.model.Address
    at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at com.PojoToXSD.main(PojoToXSD.java:17)
    I took the example like:
    package com.model; ---->this package contains 'Address' class and 'City' class
    public class Address {
    private String areaName; private City currentCity; private com.common.City previousCity;
    package com.model;
    public class City {
    private String cityName;
    Another city class in "com.common" package.
    package com.common;
    public class City {
    private String pinCode;
    We need to create XSDs and needs to do the Marshalling and unmarshalling with the existing code in our project(like as above example code), code does not have any annotations like "@XmlRootElement/@XmlType" and we can not able to change the source code.
    I would like to know is there any solution to fix the above issue or any other ways to create XSDs and marshaling/unmarshalling(like MOXy..etc)?
    It would be great if i can get the solution from any one....May thanks in advance.
    Thanks,
    Satya.

  • Error when testing a webservice - Exception raised in class CL_SOAP_REGIST

    Dear coleagues,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    If I try to test the service in WSADMIN by using the test-button, I just get an exception after the internet browser opens:
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I did a look into the coding and think that the exception is raised since the methode
    Hi folks,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    At first I create a Web Service by using the context menue of an existing rfc-enabled function module. Afterwards the service is visible in SICF. If I try to test the service in WSADMIN by using the test-button I only get an exception in the opening internet browser:
    Cannot download WSDL from http://serverurl:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1: Invalid Response Code: (400) Bad Request. The requested URL was:"http://ciswi.sap.swm.de:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1"
    If I go onto the used url I get the following message:
    Your request could not be processed
    SRT: ASSERT failed: object reference not bound
    What has happened?
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I did a look into the coding and found out that the exception is raised since
    Hi folks,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    At first I create a Web Service by using the context menue of an existing rfc-enabled function module. Afterwards the service is visible in SICF. If I try to test the service in WSADMIN by using the test-button I only get an exception in the opening internet browser:
    Cannot download WSDL from http://serverurl:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1: Invalid Response Code: (400) Bad Request. The requested URL was:"http://ciswi.sap.swm.de:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1"
    If I go onto the used url I get the following message:
    Your request could not be processed
    SRT: ASSERT failed: object reference not bound
    What has happened?
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I found out that the exception is raised since CL_SRT_WSDL_GEN_FACTORY=>GET_WSDL_GENERATOR doesn't return an instance of the class referring to the interface IF_SRT_WSDL_GEN.
    If I test that method in SE24 using the name of the service definition in SE80 for the parameter WSD, the value '1' fpr the parameters TYPE and STYLE, an instance of the class CL_SRT_WSDL11_GEN is rendered.
    Could you give any hints how I could debug that issue to verify the import parameters when the static method CL_SRT_WSDL_GEN_FACTORY=>GET_WSDL_GENERATOR is called in the body of the browser call ?
    Or any other hints?
    Thank you very much and best regards
    Stefan

    The issue was due to missing authorizations of the RFC-user (type 'Communication') calling the webservice. The RFC-user itsself has been assigned before to the webservice in the http-service tree (transaction SICF). RFC-User needs (at least) the role SAP_BC_WEBSERVICE.

Maybe you are looking for

  • You know... I thought it would be easy to migrate ...

    My life was a happy place. I had an E72, I had Nokia Suite and I had my own mail server. These three things all talked to each other. My mail would come to my phone and I could sync my calendar to my mail server (for a backup  E72 - Control Panel - p

  • New to Java. Want to write a simple applet for a mobile phone.

    Hello, I want to write a simple java applet for a mobile phone. currently I am in the stage of thinking about whether this is possible in a timeframe of about a month. I have very little java experience from a while back so I'm pretty much starting f

  • How to quit frozen "Help" in PSE 9 on MAC OS X Version 10.5.2?

    I run PSE 9 (no updates) on my MAC OS X Version 10.5.2. I was working with a photo and needed additional information for the photo I was editing, and consulted "Help" (upper right tool bar). The Help screen opened but the search did not reveal the in

  • Data types incompatable

    Hi friends here iam giving simple coding. In this i got alpha  and  it-f1 are type incompatable. both are charecter data types .y iam getting this error.plz let me know the solution. Thanks in advanve. data: begin of it1 occurs 10,              f1,  

  • Cannot create bean of class

    Dear Friends My tomcat server 3.2.4 is giving following error when i am going to run my jsp. javax.servlet.ServletException: Cannot create bean of class dts.query.ProjectSearchResultsPage      at jspprojects._0002fjspprojects_0002fprojectsearchresult