Search:

Type: Posts; User: aueddonline

Search: Search took 0.07 seconds.

  1. Replies
    0
    Views
    1,026

    SAX parser using wrong file location

    I am getting the following exception when using the sax xml parser;


    I have no idea why it's using this location



    System.out.println(mappedlocation);
    saxParser.parse(mappedlocation,...
  2. DEBUG SMTP: could not connect to host "host.domain.uk", port: 25, response: 421

    I am using the java mail libary to try and send a confirmation email at the end of my program to say that everything went ok.

    I am getting the error 'DEBUG SMTP: could not connect to host...
  3. Replies
    5
    Views
    5,248

    Re: heap size vs heap used

    does the 'used heap' only include referenced objects? or is this where non-referenced objects are before a garbage collection?

    Noted.

    atm - at the moment

    Thanks for the information. My...
  4. Replies
    5
    Views
    5,248

    Re: heap size vs heap used

    would GC lower the heap size or the amount of heap used?

    my program is running atm

    heap size: 3.8GB
    heap max: 8GB
    used heap: 350MB
  5. Replies
    5
    Views
    5,248

    Re: heap size vs heap used

    I found these two bits of text, I think i'll try System.gc() at each iteration of the bigger loops for starters

    "In addition to freeing unreferenced objects, a garbage collector may also combat...
  6. Replies
    5
    Views
    5,248

    heap size vs heap used

    I'm getting a java.lang.outofmemoryerror: java heap space exception.

    I downloaded VisualVM to try and monitor.

    It seems the heap size increases but never decreases, however the heap that's used...
  7. Re: MySQL Quit while java application is running

    Just having a better look at where it's failing. within given directory there is multiple csv file, and i'm using a wildcard to type them all, it seem to randomly fail while going from one file to...
  8. Re: MySQL Quit while java application is running

    Ah, just tried it on the second directory in the group and it freezes,

    third directory runs okay
  9. Re: MySQL Quit while java application is running

    Hey that's cool we're neighbors, also in Oxford. I made a new class (below). Runs with no exceptions



    public class TestClass {
    public static void main(String[] args) throws Exception{
    ...
  10. Re: MySQL Quit while java application is running

    I've run this a few times now and getting different outcomes, here's the code that crashes (occasionally)



    String cmd = "cmd /c type C:\\Data\\" + x + "\\*.csv";
    String line;
    ...
  11. MySQL Quit while java application is running

    I have a java app that takes data from a .csv file and put it on my MySQL database. The application has been freezing at random times during the running of the application. At first I though my code...
  12. Replies
    1
    Views
    1,780

    XML using Sax simple examples

    I want the parse an XML file within my java application and put appropriate data into an array.

    I get the basic idea of the way this would work; I would create a reader, parse an input source and...
  13. Re: using ArrayList to hold double, convert from object

    I'm having trouble with the two parts,

    what to put in the arraylist and how to get it out again.

    is the first bit of my code correct?


    while (closeRS.next()){
    ...
  14. Re: using ArrayList to hold double, convert from object

    The database contains double values, I want to do maths with them.

    So I want to take the objects from the ArrayList and do maths
  15. Re: using ArrayList to hold double, convert from object

    i'm not really getting anywhere with this and can't find any simular examples using ArrayList and doubles, this code works but it's a bit of a mess, getting a string and then parsing as a double.

    ...
  16. Re: using ArrayList to hold double, convert from object

    so the compiler does this for you?


    Object lastmacd = macd.get(mdhpos - 1);
    System.out.println(lastmacd);

    can you do maths with the object? I'd try but i'm not connected to my db...
  17. using ArrayList to hold double, convert from object

    ArrayList macd = new ArrayList();

    //Populate the arrays with associated data
    while (closeRS.next()){
    macd.add(closeRS.getString("macd"));
    }


    I am...
  18. Replies
    5
    Views
    2,421

    Re: connect to mysql database

    What a mission I made that,

    In the left hand panel there is the libraries folder, I downloaded mysql-connector-java-5.1.18-bin.jar are save it to disk. The right clicked the libraries folder and...
  19. Replies
    5
    Views
    2,421

    Re: connect to mysql database

    I'm using netbeans 6.9

    tools>library

    then I created a new library called mysql and added;

    /usr/share/java/mysql-connector-java-5.1.10.jar &
    /usr/share/java/mysql-connector-java.jar
    ...
  20. Replies
    5
    Views
    2,421

    Re: connect to mysql database

    I've changed my code to this, which it doesn't seem to like all that much, it says "throwable print stack should be removed"



    catch (Exception e)
    {
    ...
  21. Replies
    5
    Views
    2,421

    connect to mysql database

    I'm using the following code to try to establish a connection with my database, I get "Cannot connect to database server" when I run it.

    When I debug, I get this list of error but it doesn't...
Results 1 to 21 of 21