Casting of forms60all.jar objects fails no class defFound Error

We can get references to the objects and we can get any information from them under the limitations of the java.awt.Container API, meaning the location on screen, number of chidren, type, etc.
The problem is when we try to cast the object to its type so we can call methods in its API(for example call get/set text for a VTextField), we get a NoClassDefFound exception which is very weird because those same objects are used in side the applet., any idea?

Mia,
can you provide the stack trace? Do you always get a NoClassDefFound exception, or only with particular types? Do you import the Java classes for the type you cast to?
If you are casting to an awt class, make sure that you only cast to what's available in Java 1.3 (some Java IDE's by default use the JDK 1.4, making code work and compile in the IDE but fail at runtime).
If you select the project's deployment profile (the jar file you created) in JDeveloper then you can run a preview on it. This preview shows all classes that are missing in teh jar file in red.
Frank

Similar Messages

  • OC4J startup failed Annotated class format error on startup

    I'm using OC4J standalone (the 93MB "Pure Java" download) on Fedora 7. JAVA_HOME and ORACLE_HOME are set. Running the startup command gives the following error:
    OC4J startup failed with the following error:
    oracle.classloader.util.AnnotatedClassFormatError, and the invalid class is given as 'oracle.j2ee.ws.client.BasicService'.
    Any help is appreciated.

    What JDK did you use?
    Certification Information will help you
    Oracle Application Server 10g R3 10.1.3.1 Certification Information
    http://www.oracle.com/technology/software/products/ias/files/oracle_soa_certification_101310.html
    dgkim @ Databank Systems KR

  • Error while Debugging MSA  'Creation of Login Object Failed'

    Dear Friends,
    I am working on CRM Mobile Sales 5.0 SP 5.
    I have setup my Mobile Client and Mobile Application Studion On the same machine.
    I have perform the initial generation of the application from Mobile Repository server to my machine.
    it gave me 6 errors and 12 warnings  and took about 4 hrs for generation.
    Now when i tried to debug the generated application,
    i get my login screen and once I enter username and password.
    Error popups up stating "Creation of login object failed".
    and then another error
    "Starting MPPFailed" (MPP is my project name).
    Please suggest me how should i go about to debug the application solving the above errors.
    Awaiting Reply,
    Best Regards,
    Pratik Patel

    Am not sure if you were able to resolve the issue but below are some points:
    a. I think the dlls sfabol and msa are not any more registerable, since they are more of VB.NET components and here assembly is registered and not the dll.
    b. For logging into the application just ensure that you have user id in table SMOUSER and the employee for that user in SMOMITABT table.
    c. If this is fine, then ensure that you have the latest BDOC metadata information on your laptop. I think in 5.0 also you need to use Clientconsole to download this information.
    d. If this is all okay, then try running SQL profiler and check if the query to the ides db is being executed by the framework. If the query is fired then it means application seems to behave properly but the query is not retrieving relevant details.
    For further details feel free to contact me..
    thanks,
    Piyush

  • Unable to Cast a Object into Typed Class

    Hi, I am not able to cast a simple object in typed class.
    I have a class ItemVO.as
    package
        public class ItemVO
            public var idData:String;
            public var valData:String;
    In application on some action
                var obj:Object = new Object;
                obj['idData']="001";
                obj['valData']="abhinav";
                try{
                    var itemVO:ItemVO=ItemVO(obj);
                }catch(e:Error)
                    Alert.show(e.message);
    I am getting below error at var itemVO:ItemVO=ItemVO(obj)
    Error #1034: Type Coercion failed: cannot convert Object@b5c3ad9 to ItemVO.
    Where I am doing wrong??
    Please help.
    Thanks.
    Abhinav

    You need to do it by hand.
    Or make ItemVO able to take an object as constructor argument. Which is again doing it by hand.
    public function ItemVO(obj:Object)
        idData = obj.idData;
        valData = obj.valData;
    C

  • How to cast an object to a class known only at runtime

    I have a HashMap with key as a class name and value as the instance of that class. When I do a 'get' on it with the class name as the key, what I get back is a generic java.lang.Object. I want to cast this generic object to the class to which it belongs. But I don't know the class at compile time. It would be available only at runtime. And I need to invoke methods on the instance of this specifc class.
    I'm not aware of the ways to do it. Could anybody suggest/guide me how to do it? I would really appreciate.
    Thanks a lot in advance.

    Thanks all for the prompt replies. I am using
    reflection and so a generic object is fine, I guess.
    But a general question (curiosity) specific to your
    comment - extraordinarily generic...
    I understand there's definitely some overhead of
    reflection. So is it advisable to go for interface
    instead of reflection?
    Thanks.Arguments for interfaces rather than reflection...
    Major benefit at run-time:
    Invoking a method using reflection takes more than 20 times as long without using a JIT compiler (using the -Xint option of Java 1.3.0 on WinNT)... Unable to tell with the JIT compiler, since the method used for testing was simple enough to inline - which resulted in an unrealistic 100x speed difference.
    The above tests do not include the overhead of exception handling, nor for locating the method to be executed - ie, in both the simple method invocation and reflective method invocations, the exact method was known at compile time and so there is no "locative" logic in these timings.
    Major benefit at compile-time:
    Compile-time type safety! If you are looking for a method doSomething, and you typo it to doSoemthing, if you are using direct method invocation this will be identified at compile time. If you are using reflection, it will compile successfully and throw a MethodNotFoundException at run time.
    Similarly, direct method invocation offers compile-time checking of arguments, result types and expected exceptions, which all need to be dealt with at runtime if using reflection.
    Personal and professional recommendation:
    If there is any common theme to the objects you're storing in your hashtable, wrap that into an interface that defines a clear way to access expected functionality. This leaves implementations of the interface (The objects you will store in the hashtable) to map the interface methods to the required functionality implementation, in whatever manner they deem appropriate (Hopefully efficiently :-)
    If this is feasible, you will find it will produce a result that performs better and is more maintainable. If the interface is designed well, it should also be just as extensible as if you used reflection.

  • Casting base class object to derived class object

    interface myinterface
         void fun1();
    class Base implements myinterface
         public void fun1()
    class Derived extends Base
    public class File1
         public myinterface fun()
              return (myinterface) new Base();
         public static void main(String args[])
              File1 obj = new File1();
              Derived dobj = (Derived)obj.fun();
    Giving the exception ClassCastException......
    Can't we convert from base class object to derived class.
    Can any one help me please...
    Thnaks in Advance
    Bharath kumar.

    When posting code, please use tags
    The object returned by File1.fun() is of type Base. You cannot cast an object to something it isn't - in this case, Base isn't Dervied. If you added some member variables to Derived, and the compiler allowed your cast from Base to Derived to succeed, where would these member variables come from?
    Also, you don't need the cast to myinterface in File1.fun()
    Also, normal Java coding conventions recommend naming classes and interfaces (in this case, myinterface) with leading capital letters, and camel-case caps throughout (e.g. MyInterface)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Create  object for a class in jar file

    Hi
    I am using Oracle JDeveloper 10g. I have created a main application using Swing/JClient technologies. I am facing a problem for the past one week. I let u all people know my problem and I kindly request you to send a solution if known possibly confirmed.
    Problem: I have created a main application using swing that class extends JFrame. This main application consists of two parts. One left side panel and one right side panel. Left side panel contains JTree component. Each item in that tree refers to a class file located in a separate jar file.i.e that acts as a separate application. If we are executing separately that jar file class, I am able to see that small application running. If I am selecting an item in JTree during runtime, I should place that small application from the respective jar file in the right side panel of the main application. I can locate the jar file and even I can create object to that particular class file. But I cannot execute the application even separately and also not able to place in the right side panel of the main application.
    Note: The small application from the jar file contains one class file containing main method. That class file extends JPanel and implements JUPanel. i.e., with data binding. I am trying to create an object for this class file with data binding from my main application. Navigation bar is used in the main class file.
    If possible can any provide me solution at the earliest. Waiting eagerly for the positive reply.
    Regards,
    s.senthilkumar

    Can you sure that there is only a A class in the classpath of Tomcat, I advise you to add
    some statements into the A class so that you can be sure which classloader is used
    to load the A class.

  • How do i create objects of ordinary Classes from a javabean

    I want to create a class Person below that I want to create an object from in my javabeans.
    Look below Person class definition for continuation.
    package data;
    public class Person
    private String name;
    public Person()
    name = "No name yet.";
    public Person(String initialName)
    name = initialName;
    public void setName(String newName)
    name = newName;
    public String getName()
    return name;
    public void writeOutput()
    System.out.println("Name: " + name);
    public boolean sameName(Person otherPerson)
    return (this.name.equalsIgnoreCase(otherPerson.name));
    I run this bean class in the WEB-INF/classes/data folder creating a Person object in the deal() method below
    When I compile the class it seems to fail. It does not recognise the Person class. Can you help me with a description of what to do to call
    ordinary class objects from javabean class definitions.
    What directories should the simple classes be put and what should I include in the javabean to be able to access them?
    package data;
    import java.sql.*;
    import data.*;
    public class Bean
    { private Connection databaseConnection ;
    // private Person p;
    public Bean()
    super();
    public boolean connect() throws ClassNotFoundException, SQLException
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = "jdbc:odbc:robjsp";
    databaseConnection = DriverManager.getConnection(sourceURL);
    return true;
    public ResultSet execquery(String restrict) throws SQLException
    Statement statement = databaseConnection.createStatement();
    String full = "SELECT customerid,CITY,Address from customers " + restrict;
    ResultSet authorNames = statement.executeQuery(full);
    return (authorNames ==null ) ? null : authorNames;
    public String deal() throws SQLException
    {  Person p = new Person();
    p.setName("Roberto");
    return p.getName();
    }

    There is no "Copy File" function in Lightroom.
    Lightroom was designed to eliminate the need to make duplicate copies of files. The organizational tools in Lightroom allow you to have one file categorized in many ways, you can assign multiple keywords to the photos (for example: Winery, Finger Lakes, Fall Foliage, Jessica). Similarly, you can have a file categorized in multiple Lightroom collections at the same time, all without making a copy of the photo. The benefit of this is that you don't need to make multiple copies of each photo, one copy suffices, and thus disk space is saved; and furthermore if you should edit a photo or add metadata, you only need to do this once, and the photo's appearance, or the photo's metadata is changed, and visible to you no matter how you choose to access the photo (pick any keyword or any collection and you will see the change)

  • Creation of login object failed

    Hi all,
    I've got a problem with the mobile client development.
    We are using the mobile client for many years and we even develop a lot with it, but now i have a problem never seen.
    After extending a bDoc and start testing the application, after the generation and login, system states "Creation of login object failed".
    So i did a full generation. Result the same.
    I debugged the ValidateLogin class and found out, that in the following statement is failing
           BOLOGIN = BusinessRootObject.BusinessFactory.LoadBusinessObject("LOGIN", determineUser)
    BOLOGIN is Nothing at the end. I tried out to create the Object via        BOLOGIN = BusinessRootObject.BusinessFactory.CreateBusinessObject("LOGIN")
    same result. Next i tried to create the BOACTIVITY and it failed as well. One day before everything was fine, even with changing business documents.
    The error in the VB.ERR object says:
    -     err     {Microsoft.VisualBasic.ErrObject}     Microsoft.VisualBasic.ErrObject
         Description     "In der Methode BusinessFactoryCore.LoadBusinessObject ist eine System-Exception aufgetreten"     String
         Erl     0     Integer
         HelpContext     0     Integer
         HelpFile     ""     String
         LastDllError     3     Integer
         Number     5     Integer
         Source     "MTBLLFW"     String
    Can anybody please give a hint.
    We are using CRM 5.0 SP7 and MSA SP7 on MS 2003 Server with local repository. DB is SQL2000.
    Yesterday i was releasing a changelist and now its no longer working at all, what a mess.
    Thanks to all,
    Andreas Rose

    Hi Andreas,
    The problem may be incorrect or corrupt ARSREP.DAT file.
    The reason may be that the BDOCs are not synched from MAS. Once you sync this through MAS you will find the *.bdoc files at the location
    mentioned under the registry key HKLM\SOFTWARE\SAP\MSA\MW\TL\BDocPath
    Usually this would be default as C:\Program Files\SAP\Mobile\tpsfiles.
    After this when you generate the BusinessLibrary the Arsrep.dat file
    will have the *.bdocs incorporated in the Arsrep.dat file.
    Hope this helps.
    Regards, Gervase
    ps. For synching the BDocs refer to SAP Note 942942

  • SES creation of OracleSearchService object fails

    Have created a custom component which calls a java class. In the java code, I'm creating the OracleSearchService object. But it fails with the below error message.
    If I comment out the line OracleSearchService stub = new OracleSearchService(); the below error does not come up. Any help on this is greatly appreciated
    Content Server Request Failed
    Unable to execute service method 'cbiDidYouMean'. (System Error: oracle/search/query/webservice/client/OracleSearchService)
    [ Details ]
    The service stack for this request is
    --CBIDIDYOUMEAN (**no captured values**)
    java.lang.NoClassDefFoundError: oracle/search/query/webservice/client/OracleSearchService
    at cbiDidYouMean.CBIDIDYOUMEAN.cbiDidYouMean(CBIDIDYOUMEAN.java:55)
    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 intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:618)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at intradoc.server.Service.doCode(Service.java:473)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
    at intradoc.server.Service.doAction(Service.java:452)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
    at intradoc.server.Service.doActions(Service.java:448)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1121)
    at intradoc.server.Service.executeActions(Service.java:433)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:635)
    at intradoc.server.Service.doRequest(Service.java:1707)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:359)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:197)
    Thanks
    Priya

    Already found it in move-in customizing...

  • How to create a ActiveX Object with custom classes

    Hi
    I am trying to create a Active X object for some of the work I have done in Java to be used with VB, but I cannot get the Active X object to generate and it always come up with the following error:
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: uk/co/agena/minerva/model/Model
    at java.lang.Class.getMethods0(Native Method)
    at java.lang.Class.getDeclaredMethods(Unknown Source)
    at java.beans.Introspector$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
    at java.beans.Introspector.getTargetEventInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at sun.beanbox.JarInfo.<init>(Unknown Source)
    at sun.beanbox.JarLoader.createJarInfo(Unknown Source)
    at sun.beanbox.JarLoader.loadJar(Unknown Source)
    at sun.beans.ole.Packager.loadBean(Unknown Source)
    at sun.beans.ole.Packager.generate(Unknown Source)
    at sun.beans.ole.Packager.actionPerformed(Unknown Source)
    at java.awt.Button.processActionEvent(Unknown Source)
    at java.awt.Button.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    This appears to be beacuse the class uk/co/agena/minerva/model/Model is a custom class which is based on the software I am using. Does anyone know how I can get around this issue. I have tried incluijng those class files for the custom classes within the jar file, but I continue to get the same issue?
    Any help would be gratefully received.
    Thanks
    Angie

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • Load Jar and access a class in jar at run time

    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to Thing
    test.jar contains jartest.class and Thing.class
    jartest1.java
    try{
    File file =new File("test.jar");
    String lcStr ="jartest";
    URL jfile = new URL("jar", "", "file:" + file.getAbsolutePath() +"!/");
    URLClassLoader cl = URLClassLoader.newInstance(new URL[] { jfile });
    Class loadedClass = cl.loadClass(lcStr);
    Thing t=(Thing)loadedClass.newInstance();
    t.execute();
    catch(Exception e)
    System.err.println(e);
    Thing.java
    public interface Thing
    void execute();
    jartest.java
    public class jartest implements Thing
    public void exceute()
    System.out.println("Welcome");
    Thanks and Regards
    V.Senthil Kumar
    Edited by: senthilv_sun on Dec 16, 2008 8:30 PM

    senthilv_sun wrote:
    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to ThingPresumably we can only hope that that is a transciption error. It always helps to use copy and past actual errors and code rather than manually typing them.
    test.jar contains jartest.class and Thing.classWrong.
    The interface class and plugable class must not be in the same jar.
    A plugable interface requires two components
    - Interface (generic sense)
    - Functional components.
    The Interface must be independant (own jar) so that it is available to the framework (user of plugin) and to the functional components. And the plugable component must not be on the java class path.
    This also means that we know for certain that the plugable component is also on the system class path. That is a bad idea as well.
    Given that it is pretty pointless to even speculate as to why this error is showing up. Create the correct jar layout. Test using the command line. Then test using servlets. Insure that the plugable jar is NOT on the java classpath for both tests.

  • JARs in WEB-INF/classes on the classpath? [NEWBIE]

    Hello,
    I am under the impression that any files (including JARs and all within
    them) are on the classpath if they are in the folder WEB-INF/classes.
    I have a WAR file that contains a JAR file that in the WEB-INF/classes
    folder. The JAR file contains a class under the package structure
    "mvc.users.Members". I know its there as I checked the WAR file structure
    before deploying.
    In the WAR file I have a Struts RegisterAction class in the package/folder
    "mvc.registration.RegisterAction" which has the following code to create a
    Member object:
    Member member = new Member();The Member class is imported into RegisterAction using
    import mvc.users.Members;and JBuilder appears to recognise Members as on the classpath and compiles
    with no errors.
    My problem is after I have deployed the WAR file, submitting a form to the
    RegisterAction gets the error below:
    javax.servlet.ServletException: Servlet execution threw an exception:
    root cause:
        java.lang.NoClassDefFoundError: mvc/users/Member
            mvc.registration.RegisterAction.execute(RegisterAction.java:22)
            org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
            org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
            org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
            org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:856)If the class "mvc.users.Member" is in the JAR file in the WEB-INF/classes
    folder and the "mvc.registration.RegisterAction" class in the WAR file
    does (according to JBuilder) see the "mvc.users.Member" class on the
    classpath and compiles... why then do I get this error?
    Thanks for your help.
    A Desperate Newbie,
    Mark

    I answered this in the JSP forum - you need to put JAR files in WEB-INF/lib.

  • How to create an object of a class?

    plz read the question carefully ..
    how to create the object of a class by giving the class name as an String
    suppose i have a java file name:" java1.java ".
    so now how to create an object of this class "java1"by passing a string "java1"..

    kajbj wrote:
    rajeev-usendi wrote:
    thanks but still i have problem..
    i have created the object but now i m unable to do anything with that created object..
    i have coded like this..
    Object o= Class.forName("java1").new Instance();
    after this i m unable to do anything with the object 'o'..So why did you create the instance? You can also get all methods using reflection, but that is probably not what you want to do. You should instead let the class implement an interface and cast the created object into that interface ans call the methods that you want to call.
    KajI agree with Kaj. If you need to use a class that's unavailable at compile time, you should create an appropriate interface by which to refer to the class and then you create instances reflectively and access them normally via their interface (which is called reflective instantiation with interface access)

  • How to create object by getting class name as input

    hi
    i need to create object for the existing classes by getting class name as input from the user at run time.
    how can i do it.
    for exapmle ExpnEvaluation is a class, i will get this class name as input and store it in a string
    String classname = "ExpnEvaluation";
    now how can i create object for the class ExpnEvaluation by using the string classname in which the class name is storted
    Thanks in advance

    i think we have to cast it, can u help me how to cast
    the obj to the classname that i get as inputThat's exactly the point why you shouldn't be doing this. You can't have a dynamic cast at compile time already. It doesn't make sense. Which is also the reason why class.forName().newInstance() is a very nice but also often very useless tool, unless the classes loaded all share a mutual interface.

Maybe you are looking for

  • Delete a specific column only not the rows

    Hi below is my select statement select b.* from alco_external_key b inner join alco_user as a on  a.user_id = b.bob_id where b.external_key = '025' and it displays 3 columns (empID,emp_external_id,external_key) is there a way to only delete the value

  • Problem with hp photosmart c5180 and printing from computer

    Hello, I have windows 7 and an hp photosmart c5180 all in one printer, at first, I couldnt scan anything to my computer, so I reinstalled the software and drivers for windows 7, and it scans now, but the printer doesnt respond to the computers comman

  • Want to display a space after last field in the output txt file

    hi I want to display a space after last field in the output txt file which is generaed by my program on utility server the last field lengyt we have defined is four and in database it is of three characters and requirement is to disppaly the last fou

  • Imac + Playstation 3 = disaster for airport

    I bought my current 24", 2.8 ghz Imac one month ago and have never experienced problems with my wireless service. Last week I bought a playstation 3 and connected it wirelessly to the same router. Now, whenever I try and access the internet on my Ima

  • Is mpd the right solution for me?[more questions!]

    My scenario is as follows: I'm at work all day, but I want to listen to my music at home. I have complete access to SSH to my computer at home, I can open ports and all that from here. When I was running windows, I could just TS into my box, and hit