Help regarding socket and postgresql

hi, i found this error while im generating a report
for my system, "Aging of Accounts Receivables"
hope someone might give me a hint to what should i do.
here's my StackTrace:
***Exception:
org.postgresql.util.PSQLException: The connection attempt failed because Exception: java.net.BindException: Address already in use: connect
Stack Trace:
java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at org.postgresql.core.PGStream.<init>(PGStream.java:47)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139)
org.postgresql.util.PSQLException: The connection attempt failed because Exception: java.net.BindException: Address already in use: connect
Stack Trace:
java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at org.postgresql.core.PGStream.<init>(PGStream.java:47)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:197)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
End of Stack Trace
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:208)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:72)
at org.postgresql.jdbc2.optional.BaseDataSource.getConnection(BaseDataSource.java:55)
at org.postgresql.jdbc3.Jdbc3ConnectionPool.getPooledConnection(Jdbc3ConnectionPool.java:39)
at org.postgresql.jdbc2.optional.PoolingDataSource.getPooledConnection(PoolingDataSource.java:406)
at org.postgresql.jdbc2.optional.PoolingDataSource.getConnection(PoolingDataSource.java:338)
at csfwdbillingmodules.dbConnect.<init>(dbConnect.java:73)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:794)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:406)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.doInBackground(frmAgingOfAccounts.java:400)
at javax.swing.SwingWorker$1.call(SwingWorker.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
at csfwdbillingmodules.dbConnect.query(dbConnect.java:96)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.processAccountAR(frmAgingOfAccounts.java:798)
at csfwdbillingmodules.frmAgingOfAccounts$genAgingOfAccounts.genDetailedReport(frmAgingOfAccounts.java:1102)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:319)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
End of Stack Trace
here's my dbConnect.class:
* dbConnect.java
* Created on November 14, 2006, 5:06 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author darkoasis
package csfwdbillingmodules;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketImpl;
import java.sql.*; // All we need for JDBC
import javax.naming.NamingException;
import org.postgresql.jdbc3.Jdbc3PoolingDataSource;
public class dbConnect
extends java.lang.Object
private Socket socket;
private SocketImpl socketImpl;
private int refPosition = 0;
private Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
private DriverManager drvMgr;
private Connection db = null; // A connection to the database
private Statement sql; // Our statement to run queries with
private ResultSet results; // A result container
private DatabaseMetaData dbmd; // This is basically info the driver delivers
// about the DB it just connected to. I use
// it to get the DB version to confirm the
// connection in this example.
/** Creates a new instance of dbConnect */
public dbConnect()
try
this.source.setServerName("10.10.10.10");
this.source.setDatabaseName("myDB");
this.source.setUser("xxxx");
this.source.setPassword("xxxx");
this.db = this.source.getConnection();
this.socket = new Socket();
dbmd = this.db.getMetaData(); //get MetaData to confirm connection
sql = this.db.createStatement(); //create a statement that we can use later
catch (Exception ex)
System.out.println("***Exception:\n"+ex);
ex.printStackTrace();
public ResultSet query(String strSQL)
throws SQLException
this.results = this.sql.executeQuery(strSQL);
return this.results;
public void update(String strSQL)
throws SQLException
this.sql.executeUpdate(strSQL);
public void close()
throws Exception
this.db.close();
this.socket.close();
this.source.close();
public boolean isClosed()
throws SQLException
return this.db.isClosed();
i ran into some forums and found this:
Hi Graham
I'm making a bit of progress. I found a website that suggested the following
This is a problem of the used sockets with Windows NT. You can request the active sockets with the command netstat. The problem is a function of:
MaxUserPort (default 5000)
KeepAliveTime (default 120)
it suggested the workaround was connection pooling
I have run netstat to look at the number of connections when the problem occurs and waited for the timeout to reset the os back to the minimum and on each occasion my report has run
Does this sound logical?
If so
do you have any examples on connection pooling
it seems that even if i have closed my database connection it still doesn't free my port that was used, that's why i get this error
i am looking for a way to close my db connection and free its socket or port used at the same time, hope you can help,
thanks in advance

Duplicate of this thread, reply there:
http://forum.java.sun.com/thread.jspa?threadID=5121873&messageID=9426716#9426716

Similar Messages

  • Need help on Socket and HTTP

    Hi,
    I need help ... please ... I have to use socket and not HTTPURLConnection
    I try to connect with a socket to a web server (apache2) and request one page but two times.
    The first time it works well but the second one it doesn't ... I get a null message.
    Why ?
    Does the server close the socket as soon as the page is sent ?
    If it doesn't how I can continue sending and receiving data on the same socket ?
    Here is my code:
    package test;
    import java.net.*;
    import java.io.*;
    public class Test
    private String laRequete = new String(
    "POST http://localhost:5577/Test/ HTTP/1.0\r\n"+
    "Host:localhost:5577\r\n"+
    "\r\n");
    PrintWriter laSortie;
    BufferedReader lEntree;
    Socket laSocketTCP;
    public Test()
    String tmp;
    try
    laSocketTCP = new Socket("localhost", 5577);
    laSortie = new PrintWriter(laSocketTCP.getOutputStream());
    lEntree = new BufferedReader(new InputStreamReader(laSocketTCP.getInputStream()));
    laSortie.println(laRequete);
    laSortie.flush();
    // Premier essai OK
    System.out.println(lEntree.readLine());
    while((tmp = lEntree.readLine()) != null)
    System.out.println(tmp);
    // Second essai => Not OK
    laSortie.println(laRequete);
    laSortie.flush();
    System.out.println(lEntree.readLine());
    while((tmp = lEntree.readLine()) != null)
    System.out.println(tmp);
    catch (Exception e)
    e.printStackTrace();
    public static void main(String args[])
    Test tp = new Test();
    Here is the result of the execution
    HTTP/1.1 200 OK
    Date: Wed, 29 Sep 2004 08:35:35 GMT
    Server: Apache/2.0.51 (Win32)
    Last-Modified: Wed, 29 Sep 2004 08:27:57 GMT
    ETag: "23a46-9a-56c93f9a"
    Accept-Ranges: bytes
    Content-Length: 154
    Connection: close
    Content-Type: text/html; charset=ISO-8859-1
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> Index Test 1 </TITLE>
    </HEAD>
    <BODY>
    Test 1
    </BODY>
    </HTML>
    null
    Thanks, bye.

    Send an HTTP 1.1 request instead of a 1.0 request.
    HTTP 1.0 does not support keeping the connection open, so yes, the server closes the connection.
    Dave.

  • Help regarding ABAP and ABAP Objects

    Dear all,
    I am very new in abap and abap objects. But i have some expr. in other language..specialy development. Right now i am working for srm module...So i want to move my self into abap object and specialy in workflow...Please provide me help regarding this...along with the starting point for this.
    Best Regards
    Vijay Patil

    hi
    Object Oriented prg
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Have a look at these good links for OO ABAP-
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Hope this helps
    if it helped, you can acknowledge the same by rewarding
    regards
    ankit

  • Need help Regarding Payroll and OM

    Hi All,
    Can any one of you provide me a configuration documents regarding Payroll and OM ..I need it very badly.Can any of you help me out in this.You can mail to my id
    [email protected].
    Thanks in advance,
    Sandeep

    hi friends
    can u anybody have Payroll(PCR) DOC , please help me andn  send to my mail ID. [email protected]
    Thanks in advance
    Regards,
    Ramesh.n

  • Help regarding Stacks and Queues.!!!!!!Please....

    I have a working program right now..But it lacks some things to be done..It already does the stacks and queues..But still it doesnt print the info on the desired output file outTwo.dat..Both the stacks and queues should be printed on it..Also it has to compute the total commission on categories 1 and 2...and put it again on the outTwo.dat..Any kind hearted people would want to help me here?Here's the assignment detail...Thank YOU!!!!
    Q2. Linked List
    a.     create a compile AStack class, and a AQueue class similar to the text
    b.     provide an application that will:
    �     instantiate an AStack object and an AQueue object
    �     create a property object for each data line read from the input file assign4.dat
    �     push it ti the stack if its is category 1 property; queue if its is category 2; ignore all others
    �     print a title called category 1 to an output file called outTwo.dat
    �     after printing a few blank lines to outTwo.dat, print a title called category 2 to outTwo.dat
    �     traverse the queue and print it to the same output file outTwo.dat
    �     print the total commission earned on this category of property to outTwo.dat
    Note that for this question you should also print out and submit outTwo.dat. Have Fun!
    //This is the program I have done so far....
    import java.io.*;
    import java.util.StringTokenizer;
    public class TestSQ {
         public static void readFileSQ(AStack s, AQueue q)
              try {
    FileReader inStream=new FileReader("assign4.dat");
    BufferedReader ins= new BufferedReader(inStream);
    FileWriter outStream=new FileWriter("outTwo.dat");
    PrintWriter outs= new PrintWriter(outStream);
    String line;
    int category;
    double price;
    String categoryString;
    String priceString;
    StringTokenizer st;
    while((line=ins.readLine())!=null) {
    st=new StringTokenizer(line," ");
    if(st.countTokens()==2){
    categoryString = st.nextToken();
    priceString = st.nextToken();
    try{
    category = Integer.parseInt(categoryString);
    price = Double.parseDouble(priceString);
    Property myProperty = new Property(category, price);
    myProperty.setCommissionRate();
    myProperty.getCommission();
         if(category==1)
    s.push(myProperty);
    outs.println(s.toString());
    if(category==2)
                             q.insert(myProperty);
                             outs.println(q.toString());
    }catch(NumberFormatException nfe){
    System.out.println("error while parsing Integer: "+categoryString+"/"+priceString);
    else
    System.out.println("invalid number of elements in line: " +st.countTokens());
    catch (IOException e) {
    System.out.println("i/o error:"+e.getMessage());
    e.printStackTrace();
         public static void showStack(AStack s){
              while(!s.isEmpty()){
                   Object line=s.pop();
                   System.out.println(line);
    public static void main(String args[])
         AStack stackOfProperty=new AStack();
         AQueue queueOfProperty=new AQueue();
         readFileSQ(stackOfProperty,queueOfProperty);
         showStack(stackOfProperty);
         System.out.println();
         System.out.println(queueOfProperty.toString());
    }

    import java.io.*;
    import java.util.StringTokenizer;
    public class TestSQ {
         public static void readFileSQ(AStack s, AQueue q)
              try {
                FileReader inStream=new FileReader("assign4.dat");
                BufferedReader ins= new BufferedReader(inStream);
                FileWriter outStream=new FileWriter("outTwo.dat");
                PrintWriter outs= new PrintWriter(outStream);
                String line;
                int category;
                double price;
                String categoryString;
                String priceString;
                StringTokenizer st;
                 while((line=ins.readLine())!=null) {
                    st=new StringTokenizer(line," ");
                    if(st.countTokens()==2){
                        categoryString = st.nextToken();
                        priceString = st.nextToken();
                        try{
                            category = Integer.parseInt(categoryString);
                            price = Double.parseDouble(priceString);
                            Property myProperty = new Property(category, price);
                            myProperty.setCommissionRate();
                            myProperty.getCommission();
                                if(category==1)
                            s.push(myProperty);
                          //  outs.println(s.toString());
                            else if(category==2)
                                 q.insert(myProperty);
                                 outs.println(q.toString());
                        }catch(NumberFormatException nfe){
                            System.out.println("error while parsing Integer: "+categoryString+"/"+priceString);
                    else
                        System.out.println("invalid number of elements in line: " +st.countTokens());
                outs.close();
                ins.close();
            catch (IOException e) {
                System.out.println("i/o error:"+e.getMessage());
                e.printStackTrace();
         public static void showStack(AStack s){
              while(!s.isEmpty()){
                   Object line=s.pop();
                   System.out.println(line);
        public static void main(String args[])
             AStack stackOfProperty=new AStack();
             AQueue queueOfProperty=new AQueue();
             readFileSQ(stackOfProperty,queueOfProperty);
             showStack(stackOfProperty);
             System.out.println();
             System.out.println(queueOfProperty.toString());
       }//This is the updated version of my program..Now the ouput file works now, but then it shows different ouput..Thats only for the queue.I dont know about the stack..Tnx for looking...

  • I need some advanced help regarding AE and PPRO workflow

    Hi all.
    I have a problem and require a solution. I am creating a video that has cellphone/IM chat graphics, animated in After Effects. The problem is the layering.
    In PPRO, the layers are as follows on the timeline.
    Top layer: Chat Graphics
    Middle Layer: Adjustment layer with colour grade effects
    Bottom Layer: Footage
    Now the issue I am having is that I need the chat graphics to cast a Gaussian Blur underneath them (the graphics are at 80% opacity) - and I have successfully done this using the AE Adjustment Layer switch, however since the graphics are in AE, and the footage is in Premiere, they blur does not appear. In other words, the graphics in AE are set to blur the layer below itself IN AE, but the footage layer below is IN PPRO.
    So... one might think that the obvious solution is to layer it all in AE, using the Replace with AE Composition option in PPRO. However, this means that the adjustment layer for the grade will affect the chat graphics which need to be consistent.
    Help...

    Just to report back - The Track Matte Key effect worked like a charm.
    Just had to create two extra layers in PPro.
    One duplicate layer of blurred footage. One duplicate layer of graphics to become the matte, on top of the footage layer.
    The effect of Gaussian Blur and Track Matte Key was applied on the footage layer.
    Thanks again Richard

  • Urgent Help Regarding PDF and Word Document Downloading

    Many Thanks Shaik for you humble help. Actually now what I did in the past 3 days,
    I used Oracle Intermedia to store my PDF and Word Documents in the database using Oracle SQL Loader. Then I used PL/SQL Server Pages and Oracle Web Toolkit for the downloading of my documents.
    Now the problem is I saved all my formatted documents in the databse and for retrieval I am using following code in my stored procedure
    * Select BLOB Data
    select blob_data into myblob from mytable where blob_name = name;
    Setup headers which describes the content
    owa_util.mime_header('text/html', FALSE);
    htp.p('Content-Length: ' || dbms_lob.get_length(myblob));
    owa_util.http_header_close;
    Initiate Direct BLOB download
    wpg_docload.download_file(myblob);
    end;
    The structure of the mytable table:
    create table mytable
    doc_id varchar2(128),
    doc_name varchar2(128),
    blob_data blob
    But when it prompt the client to download the file actually it gives the junk file name like 'B104ea56' (which i understand is the address of the blob address). What I want is to show the "SAVE AS" download box with the proper document name which is stored in my field in the following way
    1 SALES.PDF
    2 PLANNING.PDF
    3 MANUAL.DOC
    4 STANDARD.TXT
    If I set the MIME type for the file format than it automatically starts download the file to the client browser, that I do not want, It should ask the user to download with the proper document name.
    Waiting consiously for your help
    Regards

    Presumedly you'd like those documents being accessiable by users as well, so they should be put on a web server, ftp or nfs sharing. You can just add the urls to those documents, or the directory they are in, into robot system as starting points and let robot run to collect them.

  • Need help regarding socket programming

    hi
    i have three machines "W", "D" and "K" on "W" and "D"
    i have server programs which listens to port 9999
    on "D" and "K" i am running client programs which connects to these servers (from "K" either to "W" or to "D" whichever is available and from "D" to "W")
    can this situation ever lead to a BindException

    ... have three machines "W", "D" and "K" on "W" and "D"Huh? Your explaination doesn't make it clear to me.
    Maybe you meant that you have three 'processes' on two different machines?
    What kind of socket are you using - TCP or UDP?
    Typically a bind exception occurs when the socket is already in use. This can occur if you kill a process and bring it up again. Or if two TCP socket servers on the same box try to start up (one of them will fail to grab the socket.)

  • Need Help Regarding Users and Roles

    Hi,
    I have Created a role with Password authentication and in that role only object privilege (SELECT TABLE) and System Privilige (CREATE SESSION)
    Now I created user name abbasi and add above role to it and make that role as its default role.
    Now when I connect above user from SQL*Plus its Connected.
    I want to know since for there is Password Authentication then why during the session databse server not authenticate for role password.
    Actually I want to know real usage of password autheticated role.
    Regards.
    D.abbasi

    See the following demo
    SQL> conn aman/aman
    Connected.
    SQL> create user test identified by test;
    User created.
    SQL> create role test_role ;
    Role created.
    SQL> grant create session to test_role;
    Grant succeeded.
    SQL> create role dangerous identified by danger;
    Role created.
    SQL> grant drop any table to dangerous;
    Grant succeeded.
    SQL> grant dangerous, test_role to test;
    Grant succeeded.
    SQL> alter user test default role test_role;
    User altered.
    SQL> conn test/test
    Connected.
    SQL> select * from session_roles;
    ROLE
    TEST_ROLE
    SQL> select * from session_privs;
    PRIVILEGE
    CREATE SESSION
    SQL> set role dangerous;
    set role dangerous
    ERROR at line 1:
    ORA-01979: missing or invalid password for role 'DANGEROUS'
    SQL> set role dangerous identified by danger;
    Role set.
    SQL> select * from session_roles;
    ROLE
    DANGEROUS
    SQL> select * from session_privs;
    PRIVILEGE
    DROP ANY TABLEYou should not make the roles haivng the passwords as the default roles. Let them be there but not as the default roles. These roles can be enabled by the end user when he needs that. In my example, I have made a user TEST, two roles, TEST_ROLE, Dangerous. Dangerous is password protected and contains a priv drop any table. I have made TESt_role as the default role for the user and it becomes active. But for the dangerous,I need to supply the paswword. If I don't , I get an error like I have shown inthe example.
    HTH
    Aman....

  • My iPad mini was working very fine from last 9 months....but suddenly today I found it discharging from 100% to 34% though I didn't use it at all...and also found my mini is slightly heated up at the bottom..any help regarding this would be greatful

    My iPad mini was working very fine from last 9 months....but suddenly today I found it discharging from 100% to 34% though I didn't use it at all...and also found my mini is slightly heated up at the bottom..any help regarding this would be greatful

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

  • Need help regarding converting text to Lines and Arcs.

    In my program i have text.Lets say the text is JAVA.
    Now i need to group that text(JAVA) in the form of line and arcs.
    Its like organizing lines and arcs and make it looks like a text(JAVA).
    Can we have such a possibilities to do that?
    Please help regarding this!!
    Thanks in Advance.
    Boopathy.

    Have a look at TextLayout class (http://java.sun.com/javase/6/docs/api/java/awt/font/TextLayout.html)
    Graphics2D g = ...;
    Point2D loc = ...;
    Font font = Font.getFont("Helvetica-bold-italic");
    FontRenderContext frc = g.getFontRenderContext();
    TextLayout layout = new TextLayout("This is a string", font, frc);
    Shape shape = layout.getOutline(null);
    Edited by: AlexeyUshakov on Sep 29, 2008 8:46 AM

  • Need help regarding image scanning from scanner and resizing it...

    Hi,
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!
    Thanks,
    Avinash.
    Edited by: Kalakonda on Jul 24, 2009 8:08 AM

    Kalakonda wrote:
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!So what you are doing is you have a Scanner (hardware: like an HP flatbed scanner) attached to a server that you want to use as a scanning station? Is this the senario that you are talking about?

  • Hey guys need help regarding iTunes U. My school is moving for iOS and Mac in the classroom and I have been appointed Junior Administrator for the schools technical department and integrating these devices into the classroom.

    Hey guys need help regarding iTunes U. My school is moving for iOS and Mac in the classroom and I have been appointed Junior Administrator for the schools technical department and integrating these devices into the classroom.
    I have an appointment with a director on Tuesday. I want to demo iTunes U. Problem is I have never used it before and have no idea how to set it up and even if I should sign up.
    Please help any ideas regarding iTunes U and how I should direct the meeting tomorrow.
    Please please post here.
    Thanks
    Tiaan

    Greetings fcit@!A,
    After reviewing your post, it sounds like you are not able to select none as your payment type. I would recommend that you read this article, it may be able to help the issue.
    Why can’t I select None when I edit my Apple ID payment information? - Apple Support
    Thanks for using Apple Support Communities.
    Take care,
    Mario

  • Need help regarding Simple Data Client and Simple Data Server VIs

    Hi everyone.
    I have a simple objective. I just want to test the 2 example VIs, "Simple Data Client" and "Simple Data Server" between 2 computers. I just want to check whether is this working between the 2 computers.
    What I have done for now is that I changed the "address", from "localhost" in the "Simple Data Client.vi" to the IP address of the computer running the "Simple Data Server". I runned the "Simple Data Server" VI in one of the computers first followed by the "Simple Data Client" in the other computer. Nothing is received and the client just timed out.
    Can anyone please help me troubleshoot and tell me what are the possible problems for this? Are there any wires connections between 2 computers that I am missing or any other configurations I have to make before I can successfully do this?
    Thanks.
    Regards,
    Jonathan

    Hi Lee.P.
    I understand that. I was just feeling frustrated about the project not working. Sincere apologies from me.
    I was wrong about the error number. It is not Error 60. It is Error 59 - The network is down, unreachable, or has been reset.. Yes, I have tried changing the port numbers at the 2 computers when trying to send/receive.
    Could anything else be the problem?
    Regards,
    Jonathan  

  • Any help regarding iphone 4 and locks with o2

    any help regarding iphone 4 and locks with o2
    i just got my second hand iphone4
    and a friend of a friend said it was factory unlocked
    and received txt from o2 saying it was unlocked
    however when i got home i put my micro sim into it
    and
    itunes said
    "this sim card appears to be unsupported" or something similer
    it is factory unlocked because the model number in the settings is
    MC603B
    i rang o2 to ask for unlock. gave them the imei code and they said they have to send the request off to apple for a code

    i rang o2 to ask for unlock. gave them the imei code and they said they have to send the request off to apple for a code
    Obviously the iPhone was/is not unlocked or this would not be required, and there is your answer, which can take up to two weeks.

Maybe you are looking for

  • Error with com/sleepycat/db/EnvironmentConfig

    i have this message error when runing exampleLoadContainer.java in the examples java.lang.UnsupportedClassVersionError: com/sleepycat/db/EnvironmentConfig (Unsupported major.minor version 49.0)      at java.lang.ClassLoader.defineClass0(Native Method

  • Vi locks up, LV2011sp1

    After a fresh installation of LV2011sp1 vi's (including NI examples) run but when I click any menu item, tool box or call up the block diagram; LV seems to lockup.  The vi continues to run but all menus and such are nonfunctional.  I am able to close

  • Song constantly pauses - why?

    I have an 80G classic ipod which is awesome. I cannot use the supplied earphones because they just do not sit in my ear. So I used an old pair of headphones. Recently on my long commute to work, I press play, flip the LOCK button and places the ipod

  • 64  bit trial version crashing upon start up

    I just downloaded it last night. What is going on?

  • Demodulation pa detection d'envelloppe

    Bonjour, Je suis entrain de réalisé un projet sur l'acquisition d'information sous labview, cela consiste à faire une démodulation d'un signal modulé afin d'extraire l'information. D'après moi, le principe est de faire un redressement du signal, et d