Creating Class Importent

Hai,
I want to create a class object in Dinamically. How can i do in java..?
and i have to access all the methods of that perticular class say if java class is having method called getValue() that method i have to access in main method
for example :
Say sun,java,test calsses are there.
in my code i want load and create a object for a existing class..
it may be
sun s = new sun() or
java j = new java() or
test t = new test()
this i can do but i don't want to do like that. at any point of time only one instence should be there..?
class Example
public static void main(String args[])
/* here i will get class name as Command line args, so that i have to create a class name dinamically for example if i get args as java i have to create a object for java class.and i have to access all the methods of that perticular class say if java class is having method called getValue() that method i have to access in main method*/
pls help me.
Regards,
Viswa

http://forum.java.sun.com/thread.jsp?forum=31&thread=321083

Similar Messages

  • Error during BCC base data import:  Unable to create class DeploymentServer

    Unable to create class atg.deployment.server.DeploymentServer for configuration /atg/epub/DeploymentServer java.lang.NoClassDefFoundError
    Hello~~~. Can anyone point me into the right direction
    I had checked my class path it got atg.deployment.server.DeploymentServer.
    and the 'legacy' /atg/epub/DeploymentServe looks like (which is doing nothing...really)
    #/atg/epub/DeploymentServer/
    #/atg/epub/DeploymentServer property allowMissingNonEssentialAgents is set to true. By default, this property is set to false. If set to false, unessential agents are treated like essential agents and must be online and functional during deployment.
    #All agents that are flagged as essential are online and functional.
    #allowMissingNonEssentialAgents     false
    ----------stack trace error ---------------
    [exec] **** info     Wed Mar 07 10:20:01 EST 2012     1331076001656     /DPSLicense     atg.service.ServiceResources->dynamoPrintMaxSessions : Only 20 concurrent sessions can be managed with this license
    [exec] **** info     Wed Mar 07 10:20:01 EST 2012     1331076001656     /DPSLicense     atg.service.ServiceResources->dynamoPrintMaxDynamoServers : Only 3 Dynamo server(s) can be used concurrently with this license
    [exec] **** info     Wed Mar 07 10:20:01 EST 2012     1331076001656     /DPSLicense     DPS is licensed to Hutchison 3G Australia Pty Limited - Development
    [exec] **** info     Wed Mar 07 10:20:01 EST 2012     1331076001656     /DPSLicense     atg.service.ServiceResources->unlimitedLicenseMsg : This product is licensed for an unlimited number of CPUs.
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003062     /atg/epub/version/VersionManagerRepository     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003203     /atg/dynamo/server/SQLRepositoryEventServer     Service /atg/dynamo/server/SQLRepositoryEventServer listening at http://cgi-hxc15q12:3040/
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003265     /atg/epub/process/ProcessData-ver     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003281     /atg/epub/process/ProcessDataRepository     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003390     /atg/epub/file/PublishingFiles-ver     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003421     /atg/epub/file/PublishingFileRepository     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003781     /atg/userprofiling/InternalProfileRepository     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003890     /atg/dynamo/security/AdminSqlRepository     SQL Repository startup complete
    [exec] **** info     Wed Mar 07 10:20:03 EST 2012     1331076003890     /atg/dynamo/security/AdminAccountInitializer     Initializing account database /atg/dynamo/security/AdminAccountManager from /atg/dynamo/security/SimpleXmlUserAuthority
    [exec] Nucleus running
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004453     /     Unable to create class atg.deployment.server.DeploymentServer for configuration /atg/epub/DeploymentServer java.lang.NoClassDefFoundError: javax/ejb/FinderException
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /     Unable to resolve component /atg/epub/Configuration      java.lang.NoClassDefFoundError: javax/ejb/FinderException
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at java.lang.Class.forName0(Native Method)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at java.lang.Class.forName(Class.java:242)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.PropertyEditors.getPropertyEditor(PropertyEditors.java:254)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.getProperty(BeanConfigurator.java:731)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.configureStateProperty(BeanConfigurator.java:683)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.configureStateProperty(BeanConfigurator.java:594)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.configureState(BeanConfigurator.java:418)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.PropertyConfiguration.configureState(PropertyConfiguration.java:809)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.PropertyConfiguration.configureService(PropertyConfiguration.java:748)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SingleNucleusConfigurator.configureService(SingleNucleusConfigurator.java:62)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureService(NucleusNameResolver.java:1319)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1119)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:787)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:569)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:550)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:394)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:1051)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.ConfigurationRef.getValue(ConfigurationRef.java:81)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.ConfigurationRefProperty.getValue(ConfigurationRefProperty.java:82)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleComponentState.setBeanProperty(SimpleComponentState.java:357)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleConfigurationState.saveToBean(SimpleConfigurationState.java:218)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleConfigurationState.configureBean(SimpleConfigurationState.java:241)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.configureBean(BeanConfigurator.java:275)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.PropertyConfiguration.configureService(PropertyConfiguration.java:752)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SingleNucleusConfigurator.configureService(SingleNucleusConfigurator.java:62)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureService(NucleusNameResolver.java:1319)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1119)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:787)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:569)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:550)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:394)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:1051)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.ConfigurationRefArray.getValue(ConfigurationRefArray.java:146)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleComponentState.setBeanProperty(SimpleComponentState.java:357)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleConfigurationState.saveToBean(SimpleConfigurationState.java:218)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SimpleConfigurationState.configureBean(SimpleConfigurationState.java:241)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.BeanConfigurator.configureBean(BeanConfigurator.java:275)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.PropertyConfiguration.configureService(PropertyConfiguration.java:752)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.SingleNucleusConfigurator.configureService(SingleNucleusConfigurator.java:62)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureService(NucleusNameResolver.java:1319)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1119)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:787)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:569)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:550)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:394)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.Nucleus.resolveName(Nucleus.java:2648)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.GenericService.resolveName(GenericService.java:315)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.nucleus.GenericService.resolveName(GenericService.java:367)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.adapter.gsa.xml.TemplateParser.runParser(TemplateParser.java:5498)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /          at atg.adapter.gsa.xml.TemplateParser.main(TemplateParser.java:5072)
    [exec] **** Error     Wed Mar 07 10:20:04 EST 2012     1331076004484     /

    The class that is missing is javax/ejb/FinderException
    Download one of the jars from below site and add it to classpath. Then build the ear again and restart the server.
    http://www.jarfinder.com/index.php/java/info/javax.ejb.FinderException
    Peace
    Shaik

  • I dont understand creating classes they seem a waste of time and efficiency

    I dont understand why we would want to create classes with constructors and get and set statements... I know that VB and Java did not create these just to have us writing extra code so I am missing something in my thinking.
    I read about data hiding and that I understand I guess...but everytime my professors want me to create a class then create an object from that class to access it I dont really get it. I know how to do the basics of it but I can do all of it in my main or the primary class whats the benefit of creating a whole entire class such as the following?
    Everytime I get an assignment and they are like create a class and I try to rack my head for a good idea but the nearest analogy I can come up with is this... creating your own class seems like one of those old straws you drink out of with all the loops, yes you can make it go around in a big loop but why waste time? you want to get to point A to point B so create the most efficient way to get there if possible.
    I am sure the problem is I am not seeing something and there is some logic missing but I just am getting irritated as I am not seeing it and I am finding it, its like I add an extra obstacle course to my code for no other reason than to run through a bunch of extra tasks that I could perform in my main class or main.
    input is welcome to help me arrive at some type of enlightenment thanks
    Class may not be the correct wording for this as I know we have to have a class but what I mean is a non application class. The class I have below goes with another class that actually does a lot of stuff but I am forced to push data through this class that basically does nothing but run water through some different pipes if you will. To me thats a waste when I can do everything in my original class which was called menu that I am messing with and that creates an array for a user who wants to keep a list of his items and prices of those items in inventory.
    public class Item
    private String itemName;
    private double itemPrice;
              public Item()
    public Item (String item, double price)
    setName(item);
    setPrice(price);
    public String getName()
         return itemName;
    public void setName(String item)
         itemName = item;
    public double getPrice()
         return itemPrice;
    public void setPrice(double price)
         itemPrice= price;
    Edited by: Bricatw on Oct 30, 2009 10:33 PM

    What I was plugging into it and please forgive the code as its not finished... (I am still messing with it) its just for learning and I am required to have certain parts in the Item Class and Certain parts in the Menu class..... But you it pushes through the input to the java bean.... in a case like this I just dont see the need for doing it not that I can think of anyway.
    import java.util.Scanner;//my imports for scanner so can read from the screen
    import java.util.*;//imports for my array I used astrix to just import it all as the book said it does not have any negative affects.
    public class Menu //My application class Menu that contains my main
         public static void main(String[] args)//Main method
              final int NUMBER_Of_Elements = 30; //created a symbolic constant so that I only have to change the constant
              //to edit the size of the array if I should want to change it.
              Item[]inventory = new Item[NUMBER_Of_Elements];//I create a new array object with the constant as the number of elements.
              Scanner sc = new Scanner (System.in);//created object from the scanner class used to get input from the console screen.
              System.out.println("Please enter Item on first line and price on second line.");//outputted text to prompt user and give instructions.
              System.out.println("Enter STOP to exit");//instructions on how to exit the program. I would have rather used a different
              //word than stop here. If my choice I would have used "exit" as its more widely used and to promote uniformity.
              int count;//count variable used to count my loops very important as we use it to control our arrays and loops here.
              double price;//our variable that we plug in values from the user via the console.
              String item;//same as previously mentioned for the "price"
                        System.out.println("Wings Coffee Shop Menu");
              System.out.println("");
              System.out.println("Menu Item Price");
              for (count=0; count<inventory.length; ++count)//This is our for loop it uses the length method to control how many times
              //it runs. In this case inventory.length = 30 elements so would run 30 times unless it stopped early.
                   item = sc.nextLine();//reads the input from console into the item variable.
                   if(item.equalsIgnoreCase("STOP"))//if statement that states if = stop (ignores case sensitivity) then it will break out of the loop.
                   break;//the break command which is executed if the if statement is true.
                   price = Double.parseDouble(sc.nextLine());//
                   inventory[count]= new Item(item, price);
                   Item Call = new Item(item, price);
                   System.out.printf("%-13s %.2f\n", Call.getName(), Call.getPrice());
              System.out.println("Wings Coffee Shop Menu");
              System.out.println("");
              System.out.println("Menu Item Price");
    //           for(int x = 0; x < count; ++x)
    //           System.out.printf("%15s\n",inventory[x].toString());
    //                System.out.printf("%-13s %.2f\n", Call.getName(), Call.getPrice());
    //           String[] namesOfItems = {"Coffee", "Milk", "Soda", "Bagel", "Croissant", "Donut"};
    //           double[] prices = {3.99, 2.99, 2.49, 2.99, 2.49, 1.99};
    //           for(int x = 0; x < prices.length; ++x)
    //           System.out.printf("%-13s %.2f\n", namesOfItems[x], prices[x]);
    //           Item arrayPrice = new Item(); HOW COME I CANNOT CREATE THIS OBJECT?
    //           Item call = new Item ();
    //           Item Call = new Item("item", 4.9);
    Edited by: Bricatw on Oct 30, 2009 11:22 PM

  • Cannot create class in system package

    Hello,
    I wrote a J2ME game for nokia S40 phones. It compiles without any errors, but when I'm trying to run in on the Nokia 7210 phone emulator I receive the following message:
    Cannot create class in system package.
    Howerver running on the Nokia 6230 phone emulator is ok.
    I have obfuscated my applet as I read in previous topics, but still it does not work.
    Can anyone help me?
    Thanks,
    Alexander.

    You get that error when you try to reference a class that is part of the MIDP framework but isn't installed on the phone.
    The 7210 doesn't support MMAPI or WMA or MIDP 2.0, while the 6230 does, so check that you don't have any references (even an import statement), to classes from those packages (like the javax.microedition.media.*, javax.microedition.lcdui.game.*,javax.wireless.messaging.*, etc. packages hierarchies).
    shmoove

  • Cannot create class in system package while Using Sprite class

    Hi i developed a game using Sprite class & imported
    javax.microedition.lcdui.game.*; package. But when i tried to build this project it gave me "Cannot create class in system package" error. Worst thing is that now again if i build, then it displays error "package javax.microedition.lcdui.game.*; does not exist" . Pls help me

    First exception means that you tried to create a class with the package name equaling one from the predefined libraries in midp/cldc.
    For your second error, add all the jars you are using into the project's classpath.
    Mihai

  • Yet another ALERT: Cannot create class in system package

    I've searched on the forums and seen several postings and none that really explained a solution, just the initial poster replying they fixed the problem. I am new to J2ME and java in general, I'm going off a book and my first test worked fine but this one gives me the the ALERT: Cannot create class in system package, when I select the GO command. The error occurs in the commandAction method where command == go trying to create an alert message. I am using MIDP 2.0 and as I stated new to this whole thing so a detail response would be greatly appreciated and what I need to do to resolve this for now and the future.
    Source code for TextBoxTest.java :
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TextBoxTest extends MIDlet implements CommandListener
       private TextBox textBox;
       private Alert alert;
       private Command quit;
       private Command go;
       public TextBoxTest()
          // Setup the UI
          textBox = new TextBox("Enter Name", "", 20, TextField.ANY);
          go = new Command("Go", Command.SCREEN, 1);
          quit = new Command("Quit", Command.EXIT, 2);
          textBox.addCommand(go);
          textBox.addCommand(quit);
          textBox.setCommandListener(this);
       protected void startApp() throws MIDletStateChangeException
          Display.getDisplay(this).setCurrent(textBox);
       protected void pauseApp()
       protected void destroyApp(boolean unconditional)
            throws MIDletStateChangeException
       public void commandAction(Command command, Displayable displayable)
          try
             if (command == quit)
                destroyApp(true);
                notifyDestroyed();
             if (command == go)
                alert = new Alert("", "Greetings " + textBox.getString(), null,
    AlertType.CONFIRMATION);
                Display.getDisplay(this).setCurrent(alert);
          catch (MIDletStateChangeException me)
             System.out.println(me + " caught.");
    }

    Ok so my problem isn't with the code it's with the build order. I guess I needed to state that I was following a book and trying to compile and preverify through command line and not using the toolkit or an IDE. So if I use NetBeans 5.0 or the Wireless Toolkit 2.5 I can compile fine.
    So my new question is, can someone show me the steps to build through command line? This is MIDP 2.0.

  • Creating class & methods

    Hello all,
    How to create a class..
    Please send me the sample steps.

    hi,
    We can create class by using these simple steps.
    class has declaration step, in this we can define call componets like
    methods, attributes,evnts..
    *<b>local class creation</b>
    CLASS <class> DEFINITION.
    METHOD <meth>. "for defining methods.
    ENDMETHOD.
    ENDCLASS.
    class has implementation section, in this section we can provide implementations to all the definitions which are declared in class declaration section.
    CLASS <class> IMPLEMENTATION.
    ENDCLASS.
    <b>simple example;</b>
    CLASS C_COUNTER DEFINITION.
      PUBLIC SECTION.  " here declare public components
        METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,
                 INCREMENT_COUNTER,
                 GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.
      PRIVATE SECTION.         "here declare local components
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER IMPLEMENTATION.
      METHOD SET_COUNTER.                " method implemetation
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
      METHOD GET_COUNTER.
        GET_VALUE = COUNT.
      ENDMETHOD.
    ENDCLASS.
    Follow these steps to declare object to class.
    data: obj type ref to <name of the class>.  "here refarence variable is created
            CREATE OBJECT obj. "here object is created
    <b>*global class creation</b>
    we can create global class in CLASS BUILDER, for that one we work with SE24.
    <b>follow this link for class builder.</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/e440a670a111d1b44c0000e8a52bed/content.htm
    <b>follow this link for knowing types of classes and types of class components.</b>
    http://www.erpgenie.com/abap/OO/syntax.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm
    regards,
    Ashokreddy.

  • Included #sql context DB1Ctx; did not create .class file

    Hello,
    Request explanations on why this does not create a
    SQLJTst3.class file? I type in sqlj SQLJTst3.sqlj
    This creates the SQLJTst3.java and the .ser profile files but
    no .class file.
    My set-up is:
    Oracle SQLJ Release 8.1.7.0.0 Production
    Build version: 2.0.0.0 - Built on May 31, 2000
    IDE interface version: 8.1.7.0.0/2.0.0.0
    JDBC version: Oracle JDBC driver version 8.1 (8.1.7.0.0)
    SQLJ runtime: Oracle 8.1.7 for JDBC 8.1.7 or later/JDK 12EE -
    Built on Aug 18, 2000
    Java version: 1.3 (1.3.0)
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    import sqlj.runtime.ref.DefaultContext;
    #sql context DB1Ctx; // Define connection context
    #sql context DB2Ctx;
    public class SQLJTst3 {
    public static void main(String[] args) {
    Connection c = null;
    String URL = "jdbc:oracle:thin:@gnj:1521:oralin";
    String userid = "scott";
    String passwd = "tiger";
    try {                
    DriverManager.registerDriver(new
    Oracle.jdbc.driver.OracleDriver() );
    // Connect to multiple databases
    DB1Ctx dB1 = new DB1Ctx(DriverManager.getConnection(URL,
    userid, passwd));
    DB2Ctx dB2 = new DB1Ctx(DriverManager.getConnection(URL,
    userid, passwd));
    // Select a row from database DB1
    String dBuser1;
    #sql [dB1] { select user into :dBuser1 from dual };
    System.out.println("Database username is " + dBuser1);
    // Select a row from database DB2
    String dBuser2;
    #sql [dB2] { select user into :dBuser2 from dual };
    System.out.println("Database username is " + dBuser2);
    // Close the database connection
    #sql { rollback work };
    c.close();
    System.out.println("Disconected...");
    } catch (SQLException e) {
    e.printStackTrace();
    YET this one creates all the files and I can then java SQLJTst2.
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    // Iterators must be delared on top - sqlj will create classes
    for them
    #sql iterator TabIter (String, String);
    public class SQLJTst2 {
    public static void main(String[] args) {
    Connection c = null;
    String URL = "jdbc:oracle:thin:@gnj:1521:oralin";
    String userid = "scott";
    String passwd = "tiger";
    try {
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    c = DriverManager.getConnection(URL, userid, passwd);
    System.out.println("Successfully conencted to Oracle...");
    // You need to set a Context for SQLJ, otherwise -
    // SQLException: found null connection context
    DefaultContext.setDefaultContext( new DefaultContext(c));
    // Fetch multiple values
    TabIter tabIter;
    #sql tabIter = { select tname, tabtype from tab };
    while (true) {
    String dBTabName = null;
    String dBTabType = null;
    #sql { fetch :tabIter into :dBTabName, :dBTabType };
    if ( tabIter.endFetch() ) break;
    System.out.println("Name: " + dBTabType + "." +
    dBTabName);
    // Close the database connection
    #sql { commit work };
    #sql { rollback work };
    c.close();
    System.out.println("1..2..3..Disconected...");
    } catch (SQLException e) {
    e.printStackTrace();

    Disgregard previous posting...I found the typo. It does create
    the .class files now.
    However the problem im getting this time is
    Database username is SCOTT
    Database username is SCOTT
    java.sql.SQLException: found null connection context
    at sqlj.runtime.error.Errors.raiseError(Errors.java:118)
    at sqlj.runtime.error.Errors.raiseError(Errors.java:60)
    at
    sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX(RuntimeRe
    fErr
    ors.java:118)
    at SQLJTst3.main(SQLJTst3.java:297)
    It does not like two sessions from same user?

  • Error while creating class

    Error while creating class java/util/LinkedHashMap$EntryIterator
    ORA-29545: badly formed class: User has attempted to load a class (java.util
    .LinkedHashMap$EntryIterator) into a restricted package. Permission can be grant
    ed using dbms_java.grant_permission(<user>, LoadClassInPackage...
    -----Any Suggestion?
    regards,
    Anjan

    Anjan,
    Pardon me for stating the obvious, but did you do what the error message suggested? In other words, did you grant the required permission?
    Good Luck,
    Avi.

  • Is the prores file that FCPx creates when importing c300 .mxf files stable/quality enough to then copy to other drives for further use? Are there any quality disadvantages to doing that?

    Im wondering if I can directly copy the prores files fcpx creates when importing c300 .mxf files from the "original media" folder, reimport them for another project to and use them that way. Is there any problem with working that way? I'm doing this bc I want to have an organize finder structure for a client but cant break the c300 card structure to split clips on a card into different "scenes" to make it easier for them to understand what they're looking at. This is all to stay NLE nuetral--we like fcpx but they might want to edit somewhere else and more details in the finder level seems like the best solution? Suggestions on any of that? Thanks.

    Thanks for your response. Are you sure that FCPx is working with .mxf/c300 natively? I thought it was just a background sort of repackaging or transcode into prores that it does without you having a choice? And bc of that, for me, it's sort of a "back end" feeling file: I'm curious if it's bad to get into the package contents folder to copy it over? Not about copying prores in general-- specifically, is the prores created of c300 footage in fcpx more of a fcpx, high quality alias file? Maybe I'm just feeling a little uncomfortable grabbing things from the inside/finder level of fcpx.

  • Creating or importing a table into Mail

    I have searched and found a few threads with this same question. The problem is, there is no answer in any of the threads!
    Can someone help me figure out how to either create or import a table into a Mail message?
    Thanks for any advice provided.

    I don't think you can create a table directly in Mail. Mail html capabilities are fairly pathetic. The only way I know how to do it is to create an html file using some html editor, put your table there. then open that file in Safari copy the table there and paste it into a message composition window.
    Message was edited by: V.K.

  • How to create class interface

    Hi all,
    How shud i create class interface.
    Does this have an impact with the activation of program in sicf txn.
    basically my problem is i did not create a class interface or implement it.
    when i go into sicf txn i cant my program.
    please help me out.
    Regards,
    varun

    Vadnala,
    Go to SE24 to create your class interface and take a look at the tutorials we have spread in the SAP help and SDN. Take a quick look at BSP aplications SBSPEXT_*.
    Regards,
    Alexandre

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • What are the steps to create classes?

    What are the steps to create classes?

    Hello.
    Here's one example applied to a BSP page.
    How to create your first OO Abap Class for a BSP
    Kind regards.
    Bruno

  • Cannot create class of type 'flex.samples.factories.SpringFactory'

    I have an application that is trying to use BlazeDS.  I am using Flash Builder 4 Plug-in on RSA 7.5.5.  Any help would be apprecialted!
    Here is the relevant lines in the services-config.xml:
    <factories>
    <factory id="spring" class="flex.samples.factories.SpringFactory"/>
    </factories> 
    I have the flex.samples.factories.SpringFactory in the web projects src folder and verified that it is getting compiled and the class exists in the WEB-INF/classes folder.
    Here is the full stack trace:
    [5/31/11 8:54:44:530 CDT] 00000018 SystemErr     R **** MessageBrokerServlet failed to initialize due to runtime exception: [1]flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:65)
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:47)
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:55)
    at flex.messaging.config.MessagingConfiguration.createFactories(MessagingConfiguration.java: 114)
    at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java: 93)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:125)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:220)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:328)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1252)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:161)
    at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtens ionProcessor.java:99)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:882)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:804)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:522)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:359)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:337)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:666)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:619)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:395)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:611)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1304)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedAppl icationImpl.java:1165)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:8 32)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java: 950)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.jav a:2131)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.ja va:342)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    [0]flex.messaging.config.ConfigurationException: An error occurred trying to construct FlexFactory 'flex.samples.factories.SpringFactory'.   The underlying cause is: 'flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.'.
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:72)
    at flex.messaging.config.MessagingConfiguration.createFactories(MessagingConfiguration.java: 114)
    at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java: 93)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:125)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:220)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:328)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1252)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:161)
    at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtens ionProcessor.java:99)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:882)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:804)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:522)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:359)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:337)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:666)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:619)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:395)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:611)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1304)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedAppl icationImpl.java:1165)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:8 32)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java: 950)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.jav a:2131)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.ja va:342)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    Caused by: flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:65)
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:47)
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:55)
    ... 27 more

    You can download it here:
    http://code.google.com/p/rapid-framework/source/browse/trunk/rapid-framework/src/rapid_fra mework_common/cn/org/rapid_framework/flex/messaging/factories/SpringFactory.java
    Am 16.08.2010 um 21:42 schrieb ZéSóZé:
    Sorry http://forums.adobe.com/people/PHANTOMIASA,
    >
    but I need to write what?
    >
    Where is the attached file?
    >
    Thanks for quick answer...
    >
    Best regards..
    >
    José.
    >

Maybe you are looking for

  • How do I install Mountain Lion on a blank harddrive?

    I'm currently living in a Snow Leopard world and thinking of switching to Mountain Lion. My question is, if I have a blank hard drive how do I install the OS? Do I have to have to install Snow Leopard first and then upgrade or is there a way to skip

  • How to use in submit with variant

    Dear Freinds     As per the my requirement from my program i want to send the data to spool and from tehre i want to download as PDF .   for the standard program i have a variant . I want to use the variant which has been set for the standard program

  • Add 1 single element in Java Mapping

    I have quite a simple requirement for my Java Mapping, however as I have done just message mappings and XSLT mappings maybe you could help how to achieve the following: I have an input message with attachment, what I want to do now is to read a strin

  • XML dataset stucks in rendering on html page

    Hi When i choose a test.xml file with 'insert - spry dataset', 'datatype xml', the datapreview in the 'set data options' window display the data correctly. In the 'choose insert options' i choose 'insert table'. I don't use the setup button there, le

  • Dual Drive (SSD) Macbook pro, Data Transfer from SSD to SSD Slow

    hello, I have in my Macbook (early 2011 / 2.3 I5, 8gb ram) a new SSD (Samsung 1TB Evo 840) installed.The old still-functioning SSD (Crucial m4 512GB)  i built with an iFixit kit (Dual Drive)  in the Optical drive Bay.  The two SSD are working. My pro