Connection Object filed in O/P file

Dear Experts,
As per my requirement, i need to get the connection objects fields in output Excel file, but right now, through el06 they are generating mass data, but in that output file one filed is not coming, but it was maintained in connection object .
now i want to get that filed ( filed name "other city" ) in my excel sheet also.
can any body have clue , how to get that filed in my output file also.
cheers..

Hi Avinash,
Thanks for reply, my req is, i have to give the data to meter readers, to which location they have to go , for collecting the MR readings, in that list i need all the fields which i maintained in CO. i guess they didn't maintained one filed earlier, now i want to have one filed in o/p excel sheet.
hope i made clear.
Cheers.

Similar Messages

  • Having the connection object for the specific schema

    hi
    My application interacting with the database of having many no of schema's. I need to create a connection object which is pointing to the specific schema in my database. This is help me to avoid writing schema name in the query every time.
    Thanks
    Siva

    How to specify the schema name in properties file?
    Say for example, i created properties file like that,
    Properties props = new Properties();
    props.setProperty("user", "username");
    props.setProperty("password", "password');
    In which property i can set for schema?

  • Connection object is getting closed before the stored procedure is complete

    Hi Everyone,
    I am facing an issue where by the java connection object is closed before the stored procedure it is connected to is complete.
    I am not sure if the fault is in SP or Connection pool.
    After spending some time, i could able to figure out that the procedure is taking a tad more time for processing as there are over 1000 records in the database tables it is dealing with.
    Would that be a potential cause ? or Am i required to handle it in Java only ?
    I want to know what could be possible causes for this issue ?
    Please Help.
    FYI,
    The following are the logs which says,
    XYZ (Stored Procedure) : Start Time is 1349217771302 Procedure started here
    INFO >2012-10-02 18:43:09,935 [ConnectionPool]: Closing connection: DataSource [ABC](684)
    INFO >2012-10-02 18:46:03,512 DAO[main]: XYZ : End Time is 1349217963512 Procedure ended here
    Thanks in Advance.

    Hi ,
    Thank you all for your quick response.
    Well it's my bad i dint provide you any code to look into thinking that i am dealt with a gen issue and also i am too paranoid to post any code i am dealing with in the forum (i am sorry).
    But here is some information for you,
    Database : Oracle 10g
    Java: 1.5 version
    We are using only One connection object for the entire java backend process .
    The SP is of over 1000 lines of code which for obvious reasons i can't past it here but this morning i figured out an issue in SP where by a query taking way more than usual time to execute which led to SP's poor performance and also the reason for why it is taking very long time than usual.
    This query is a simple SELECT query where it is trying fetch over 2000 records from a table of over 3 million records. The execution time is over 30-40 seconds which is the root cause of SP's poor performance.
    When i eliminated this from the logic and ran the query it could able process (inserting huge volume around 5000 records of data) in 1 second instead of 3-4 minutes earlier.
    I tried to replicate this issue (which occurred in our production server) in my local system but no luck as there was no connection issue here but only the substantial time difference.
    We are using a customized connection pool which is as follows,
    I am not sure what's going on here because it seems to be greek and latin to me.
    What we are doing in our DAO is we are using method of the below ConnectionPool.getInstance(SCHEMA) to get the connection object.
    Looking forward to seeking advice from you on how connection pool in general works.
    public class ConnectionPool extends Thread
         private static final ConnectionPool me = new ConnectionPool();
         private Hashtable dataSources = new Hashtable();
         private static final int MIN_TIMEOUT = 0;
         private long timeOut;
         private Hashtable cons = new Hashtable();
         private Hashtable active = new Hashtable();
        private boolean trace = false;
         private ConnectionPool()
              registerDataSources();
              this.timeOut = PropertyManager.getIntProperty("connectionPool.timeOut", MIN_TIMEOUT);
              setName("ConnectionPool");
              setPriority(MIN_PRIORITY);
              if (timeOut > 0)
                   start();
         private void registerDataSources()
            dataSources.clear();
              Properties props = System.getProperties();
              String app = props.getProperty("X", "Y");
              for(Enumeration e = props.keys(); e.hasMoreElements();)
                   String key = (String) e.nextElement();
                   if (key.startsWith(app + ".connectionPool.dataSources.") && key.endsWith(".selector"))
                        String ds = key.substring((app + ".connectionPool.dataSources.").length(), key.length() - ".selector".length());
                        LogManager.logStatus("Registering [" + ds + "] (selector) " +
                                  props.getProperty(app + ".connectionPool.dataSources." + ds + ".selector"));
                        dataSources.put(ds,
                             new GenDataSource(
                                  ds,
                                  props.getProperty(app + ".connectionPool.dataSources." + ds + ".selector")));
                        continue;                    
                   if (!key.startsWith(app + ".connectionPool.dataSources.") || !key.endsWith(".server"))
                        continue;
                   String ds = key.substring((app + ".connectionPool.dataSources.").length(), key.length() - ".server".length());
                   try
                        LogManager.logStatus("Registering [" + ds + "] " +
                                  props.getProperty(app + ".connectionPool.dataSources." + ds + ".url"));
                        loadDriver(props.getProperty(app + ".connectionPool.dataSources." + ds + ".driver"));
                   catch (Exception se)
                        LogManager.logException(se);
                   GenDataSource genDataSource = new GenDataSource(
                             ds,
                             props.getProperty(app + ".connectionPool.dataSources." + ds + ".useMatrix", "false").equals("true"),
                             props.getProperty(app + ".connectionPool.dataSources." + ds + ".server"),
                             props.getProperty(app + ".connectionPool.dataSources." + ds + ".url"),
                             props.getProperty(app + ".connectionPool.dataSources." + ds + ".user"),
                             props.getProperty(app + ".connectionPool.dataSources." + ds + ".password"));
                   // Set the schema if schema is defined in settings.xml file
                   if (genDataSource != null && props.getProperty(app + ".connectionPool.dataSources." + ds + ".schema") != null ) {
                        genDataSource.setSchema(props.getProperty(app + ".connectionPool.dataSources." + ds + ".schema"));
                   dataSources.put(ds, genDataSource);
         public static Connection getConnection(String dataSource) throws SQLException
              GenDataSource ds = (GenDataSource) me.dataSources.get(dataSource);
              if (me.timeOut <= 0)
                   if (ds.getSchema() != null )
                        return updateSchema ( ds);
                   else
                        return DriverManager.getConnection(ds.url(), ds.user(), ds.password());
              String key = dataSource;
              Stack free;
              GenPooledConnection pc = null;
              synchronized (me)
                   if ((free = (Stack) me.cons.get(key)) == null)
                        free = new Stack();
                        me.cons.put(key, free);
                   if (!free.empty())
                        pc = (GenPooledConnection) free.pop();
                   if (pc == null)
                        if (ds.getSchema() != null )
                             pc = new GenPooledConnection("DataSource [" + key + "]",
                                                 updateSchema ( ds), free, me.active, me.timeOut, me.trace);
                        else
                             pc = new GenPooledConnection("DataSource [" + key + "]",
                                       DriverManager.getConnection(ds.url(), ds.user(), ds.password()), free, me.active, me.timeOut, me.trace);
                   else
                        pc.touch();
              LogManager.logStatus("Using " + pc);
              me.active.put(pc.id(), pc);
              return pc;
         public void run()
              for(;;)
                   try
                        sleep(60 * 1000);
                        synchronized (me) {
                             for(Enumeration e = cons.elements(); e.hasMoreElements();)
                                  Stack stack = (Stack) e.nextElement();
                                  for (int i = stack.size()-1; i >= 0; i--)
                                       GenPooledConnection pc = (GenPooledConnection) stack.elementAt(i);
                                       if (pc.isExpired())
                                            stack.removeElementAt(i);
                   catch (Exception e)
                        GenUtil.reportException(e);
         private static Connection updateSchema ( GenDataSource ds) throws SQLException {
              Connection con = DriverManager.getConnection(ds.url(), ds.user(), ds.password());
              if (ds.getSchema() != null ) {
                   String sql = "SET SCHEMA  " + ds.getSchema()+ ";";
                   LogManager.logDebugMessage("updating the Schema with sql statement " + sql);
                   PreparedStatement ps = con.prepareStatement(sql);
                   ps.execute();
                   ps.close();
              return con;
    }Thanks.
    Edited by: EJP on 5/10/2012 14:09: added {noformat}{noformat} tags. Please use them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Connection Object validation

    Hi,
    During the migration of Connection Object, the (postal code and street)data does not match 100% with the Regional Structure data. I have turned off the Street validation using the "Flag Street Directory" from ADRCITY but EMIGALL does not let me migrate connection objects whose postal codes does not already exist. Is there a way to turn this validation off or to circumvent this issue? The problem arises because Regional Structure and Connection Object/Premise are being extracted from two different source systems.

    Hi,
    You  need to turn off the flag "city file active" (IMG -> SAP Netweaver -> General Settings -> Set countries ->  Set country-specific checks. Please check the Guildines ISMW for implication in not having the address validation turned off.
    Cheers,
    Fritz

  • Is possible to make Serializable a Connection object?

    Hi I would like to know if is possible to make Serializable a Connection Object, I would like to save the Connection object into a text file so other class can read it and execute a proper query. If is possible how can I do it?.
    Thanks.

    Actually, if a class isn't already Serializable, you can't make it become Serializable reliably. Consider the following case:
    class A
        int x = 0;
        public void setX(int new_x) { x = new_x; }
        public int getX() { return x; }
    class B extends A implements Serializable
        int y = 0;
        public void setY(int new_y) { y = new_y; }
        public int getY() { return y; }
    public static void main(String arg[]) throws Exception
        B b = new B();
        b.setX(10);
        b.setY(12);
        someObjectOutputStream.writeObject(b);
    }The problem with this is that the implementation of Serializable by class B does not affect class A. In the above example, the ObjectInputStream that obtains the instance of B will have a y value of 12, but an x value of 0 (not 10).
    Thus, unless the Connection object implemented Serializable to begin with, it can't become Serializable. And, as the above post has described, the implementers of the Connection object would not make it Serializable as the local Connection object uses underlying O/S resources which cannot simply be transformed into a byte array.

  • Updating to connection object in JDeveloper

    Dear all,
    For my BC4J project, I have a connection by name CorrosionConnection. This connection is set with username=cer2265, password=cer2265,sid=cer, hostname=196.15.40.23,port=1521.
    So for so good. Application is working fine and I can happily make any transaction.
    This is my default setting. Suppose I have placed a text file as follows.
    username: cer2265
    password: cer2265
    sid: cer
    hostname: 196.15.49.23
    port: 1521
    Let us name this file as connection.txt. When ever application starts application should read this file and should update CorrosionConnection object with this information.
    Now suppose If i need to change the ip address from 196.15.49.23 to 196.15.49.22 what I need to do is the following..
    username: cer2265
    password: cer2265
    sid: cer
    hostname: 196.15.49.22
    port: 1521
    Thus a type of dynamic connection object is now created, where I can even change the username, password , sid and port.
    I don't know how to do this. Reading the file can be done by any filestream object. Updating the connection object is the problem.
    Can any one help me in this regard,
    Thanks in advance.

    If you need your connection to be dynamic because of DHCP you could use "localhost" or "127.0.0.1" for your IP address if your database server is on same machine as application server.
    Otherwise I would recomend reading BLOG from Steve:
    http://radio.weblogs.com/0118231/2004/08/11.html
    and Oracle documentation:
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    and Google :)

  • Where to store the Connection object?

    Hi,
    I am using JDBC together with JSF technology to building web applications. I have the following questions:
    1. Where do we usually store the open Connection object so that every class in my web application can make use of it to update or retrieve database data?
    2. Since JSF uses managed-beans which is not a servlet itself, if I store the Connection object as an attribute in the application scope then it can only be retrieved from a servlet.
    3. If I make the Connection object on every class where I would like to have database access, it seems that it is not following good practice since this would create duplicate codes in every Java class which is going to have database access.
    Does anybody have an idea? Thank you.

    Hensome wrote:
    1. But how do I use the managed bean within a servlet? Could you write some simple sample codes?
    2. If I only use simple navigation rules and backing beans, when the submit button is clicked then the action method of the managed bean is triggered. I will then trigger the action which uses JDBC for database access. This whole process does not go through a particular servlet. Is this also possible? If yes, how?
    Thank you.the process does run through a particular servlet, it's the faces servlet and is defined by something that looks like
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
      </servlet> in your web.xml file. You don't have direct access to it, but you can save references to objects in the session or request so other objects can access it. Lets say that your faces code uses a DAO to read some data and you want to pass the data to a servlet, what you need to do something like:
         List data = myDAO.read();
         FacesContext facesContext = FacesContext.getCurrentInstance();
         HttpSession session = (HttpSession)facesContext.getExternalContext().getSession(true);
         session.setAttribute("myData", data);this will save the data object or list in the session as an attribute. Then, when the other servlet runs, you can do something like:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
         HttpSession session = request.getSession(false);
         Object obj  = session.getAttribute("myData");
         List myData = (List)obj;
    }          Now the servlet has access to the list of data read by the faces bean. You shouldn't directly access faces beans themselves from another servlet, you should instead access POJOs that you have defined or collections of them.

  • Parameterizing connection object

    I'd like to pass login info to the JDeveloper connection object (like you can do with the JDBC conn object).
    sessionInfo.setConnectionInfo(new LocalConnection("<<login info here??>>"));
    Is this possible?

    Dixon,
    It depends on what context you are talking about. All connection information used by a client at runtime is stored in a file named connections.properties. The connections are listed by name. Within the different client applications you can create, you only reference the name of the connection itself, allowing you to alter this text-file at runtime without having to edit your code in many places and re-compile it.
    We do allow for passing in a password at runtime. For the connection itself, make sure the checkbox for 'Include deployment password at runtime' is unchecked. It is (unchecked) by default, meaning the password for each connection is not written to the connection.properties file as text so the user must provide it.
    From a DAC client such as an application or an applet, you can create a login dialog where the user enters their username and password, and this information is used to perform the connection to the specified database. There is a login dialog control you can pick from the InfoSwing controls palette.
    From a JSP web application or servlet, you will need to do some work by hand. In the case of a JSP web app, the connection name is included in your BC4J.xcfg file, and the name of the config (and password) is listed in your appmodule.properties file. So it is a little more indirect.
    I believe the BC4J Auctions demo includes an example of a 'login dialog'. See the online help topic 'Business Components for Java Auctions Sample Web Application' under the Samples and Tutorials folder, then under Sample Applications.

  • Oracle Connection object is not getting instantiated

    We have a Web application developed in .net (code behind vb.net) using Visual Studio 2003 and Oracle Database 10G version 10.1.0.2. We have a test machine which we use to test our Web application with the same version of oracle. Our web application was working fine in that test machine until Oracle got corrupted in the that machine. After that I reinstalled Oracle 10G and when I tried to run the web application it threw an exception saying "Object Reference Not set to instance of an Object". When I went into that problem a bit deeper , I came to know that Oracle Connection Object was not getting instantiated (ie OracleConnection object=nothing). At the same time the web application is working fine in my machine. One of my friend suggested me that I have to register some of the Oracle DLL files using regsvr32 utility. But he is not sure which DLL to be registered. Also we do have a Windows Application developed in .net using the same VS2003 and oracle 10 G which is running fine in the same test machine.

    Thanks for the reply. I was desperately waiting for that.
    I found the following result when I run the gacutil utility on my machine.
    The Global Assembly Cache contains the following assemblies:
    Oracle.DataAccess,version=10.2.0.100, Culture=nuetral, PublicKeyToken=89b483f429c47342, Custom=null
    The cache of ngen files contains the following entries:
    Number of items = 1
    But when I used the same utility on the test machine it resulted as follows
    The Global Assembly Cache contains the following assemblies:
    Oracle.DataAccess,version=10.1.0.200, Culture=nuetral, PublicKeyToken=89b483f429c47342, Custom=null
    The cache of ngen files contains the following entries:
    Number of items = 1
    That is there was change in the version of ODP.net what I use in my machine and Test Machine. But I clearly remember that I have installed Data Access layer DLL's of the web project from my machine to the test machine and were running successfully befor eoracle got re installed on that test machine.

  • SQL Connection object

    Hi,
    Is there any issue(or problem) if we use SQLConnection object and communicate to SQL server instead of using business object or business query.
    thanks and regds
    harish

    Hi Kai/Pratik Patel
    Thanks for replying. One more question in this regard. Where to store the connection string if you are going to use SQL Connection object, so that we have to create the connection string only once.
    As in other .NET application (Windows and Web) we store it in the configuration file but in the MSA we do not have configuration file.
    Thanks and Regds
    Harish

  • Closing the Connection object

    I was looking at one of the database examples in a Java book I recently purchased. In their example they establish the connection in the class with the main. ( is this referred to as the Moment Interval? ) Anyway, they pass the private Connection connection object to another class called AddRecord which implements an ActionListener. In this class, the AddRecord Constructor changes the name to con which is also declared as private in this class. What they don't show is how to close the connection object now that it has a new name. How do I close the connection object.
    The example is using an Access mdb and when the appication is closed, the Access.ldb file is still there.
    Is there a better solution?
    Thanks everyone,
    Leo D.

    I'm sorry. I meant to say "Where" do I close the connection? If I close the connection in the AddRecord Class, then I won't be able to add another record. And I can't close the connection in the moment interval because I've declared the connection object in class AddRecord as Private. Should I give the connection object package access?
    Thanks,
    Leo D.

  • Updating to connection object

    Dear all,
    For my BC4J project, I have a connection by name CorrosionConnection. This connection is set with username=cer2265, password=cer2265,sid=cer, hostname=196.15.40.23,port=1521.
    So for so good. Application is working fine and I can happily make any transaction.
    This is my default setting. Suppose I have placed a text file as follows.
    username: cer2265
    password: cer2265
    sid: cer
    hostname: 196.15.49.23
    port: 1521
    Let us name this file as connection.txt. When ever application starts application should read this file and should update CorrosionConnection object with this information.
    Now suppose If i need to change the ip address from 196.15.49.23 to 196.15.49.22 what I need to do is the following..
    username: cer2265
    password: cer2265
    sid: cer
    hostname: 196.15.49.22
    port: 1521
    Thus a type of dynamic connection object is now created, where I can even change the username, password , sid and port.
    I don't know how to do this. Reading the file can be done by any filestream object. Updating the connection object is the problem.
    Can any one help me in this regard,
    Thanks in advance.

    If you need your connection to be dynamic because of DHCP you could use "localhost" or "127.0.0.1" for your IP address if your database server is on same machine as application server.
    Otherwise I would recomend reading BLOG from Steve:
    http://radio.weblogs.com/0118231/2004/08/11.html
    and Oracle documentation:
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    and Google :)

  • I am trying to install software for iTwin Connect, but after downloading the dmg file and launching the program, I receive a message saying the file can't open and to check my internet connection.  Any ideas?

    I am trying to install software for iTwin Connect, but after downloading the dmg file and launching the program, I receive a message saying the file can't open and to check my internet connection.  Any ideas?

    Many Thanks, Kurt.
    I knew I'd seen the solution you've provided somewhere - either in MacWorld or MacFormat - but couldn't remember the Gatekeeper bit!
    I shall save it somewhere VERY safe now in case this happens again …
    You have made an old man very happy and saved me from worrying that senile decay had suddenly set in. (I was 70 last week so you might understand the situation from that.)
    Best wishes
    OllyanDinah

  • In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File

    Post Author: bhaveshbusa
    CA Forum: Crystal Reports
    In the ReportDocument.Load method it tries to connect using the using the connection information embedded in the Report File. When the application calls ReportDocument.Load(reportFileName). This
    tries to connect to the database using the connection information embedded in
    the "reportFileName". This was only realised on checking the ODBC Trace
    Log. The connection itself is not a problem. The problem is that the embedded
    connection information is related to OLD production system. And failed
    connections had raised some concerns.
    Note: I am using
    SetDataSource to populate the data for the report. So I don't need the
    connection.
    Is there any way I
    can disable this auto-connect?
    Thanks and
    regards,
    Bhavesh

    960738 wrote:
    I need a help in answering one of the issue encountered last week.
    I have created a database link and tried to access the information from a table using the program written in another language. The password provided was incorrect for that user while creating database link. So we expected that,while retrieving the data, Database connection has to be errored out as password provided is incorrrect.
    But unfortunately, user account was locked out. When i checked with DBAs they mentioned that it tries to connect 16 ports with in a min of time.we were shocked as it STOPS another scheduled jobs with that user. and affects production badly.
    As per the program, it has to connect only one time and yesterday we tried to execute the program in DBAs observation and it errored out as expected. Didn't tried for multiple ports.
    Now the question is, WHY the database connection established 16 times last week and caused user account locked. DBAs are unable to answer it. Any EXPERTs opinion on this would greatly appreciated.
    I have verified managing ports in oracle documentation, it was mentioned that if one port is busy it will try to connect to another port in the range of ports mentioned during the installtion. DBAs verified ports related file and it was blank. and they are not agreeing with this reason. Please HELP me in finding the correct REASON for this.
    is it a NETWORK issue or issue with DATABASE SERVER only?
    Thanks
    SSP
    Edited by: 960738 on Sep 22, 2012 9:13 PMDBLINK is 100% oblivious to the fact any port exists.
    DBLINK only contains username, password & TNS Alias.
    can you post actual SQL & results?

  • How to store Connection object and call it from other programs.

    Hi,
    I am trying to connect to the database, store the connection object and use this connection object from other standalone java programs.
    Can any one tell me how to do this? I've tried in the following way:
    In the following program I am connecting to the database and saving the connection object in a variable.
    public class GetKT2Connection {
       public static void main(String[] args) {
          String url = "jdbc:odbc:SQLDsn;
          String dbUser = "sa";
          String dbPwd = "sa";
          Connection kt2conn = Connection connection = java.sql.DriverManager.getConnection(url, dbUser, dbPwd);
          if(kt2conn == null) {
             System.out.println("Database Connection Failure!");
          else {
             System.out.println("Connected to Database...");
         GetKTConnectionObj.storeKT2ConnectionObj(kt2conn);
    } Here is the program to save connection object in a variable.
    public class GetKTConnectionObj {
       static Connection kt2Connection = null;
       public static void storeKT2ConnectionObj(Connection conn) {
       kt2Connection = conn;
       public static Connection getKT2ConnectionObj() {
       try {
          return kt2Connection;
       catch(Exception e){
          System.out.println(e);
      return null;
    }Now from the following code I am trying to get the connection object that is stored. But this is throwing NullPointerException.
    public class Metrics_Migration {
      public static void main(String args[]) {
         try {
        java.sql.Connection connection_1 =   GetKTConnectionObj.getKT6ConnectionObj();
         catch(Exception e){
    }

    kt2Connection is null. You need to store it first, to make it not null. Otherwise it will stay null forever. And why on earth are you trying to do this THIS way?
    If you are running the two applications separately, it wont work either.

Maybe you are looking for

  • IDOC to Soap  Webservice (Async/Sync scenario)

    is any can provide somesteps please

  • Oracle 9i in RedHat 7.2

    Exception thrown from action: make Exception Name: MakefileException Exception String: Error in invoking target toolsinstall of makefile /opt/oracle/product/9.0.1/ldap/lib/ins_ldap.mk Exception Severity: 1 Calling action unixActions2.0.1.4.0 make ins

  • Can't set label

    In CS2 I used this line tell application "Adobe InDesign CS2" set properties of every text frame whose label starts with "dude" to {label:"sweet"} of document 1 end tell But in CS3 a strange error occurs tell application "Adobe InDesign CS3" set prop

  • IPad 2 charging issue.

    While charging and laying on a flat surface (table) touch screen respond really strange. As soon as I take it in hands everything become usual. Is it normal? P.S. if its just laying on table and not charging it works normal as well.

  • Proxy iChat???

    So here's the deal. A particular firewall that one of my computers is sitting behind doesn't like SIP and some other traffic, so I can't do iChatAV from there, only AIM/jabber text IM stuff. I want to be able to do AV stuff on iChatAV from this compu