So I'm busy with a small website I'm able to login at the website with the help of sessions that all goes well.
But I'd like to expand the website a bit more, it's a sport website where people can add players, add teams, and add matches, and those are stored on a MySQL DB.

The thing where it goes wrong is when I'm trying to store a player to the Database.
Here is the java class:

package oeffenen;

import java.sql.ResultSet;
import database.DatabaseConnection;
import java.sql.SQLException;

public class Speler {

    oeffenen.Connection connection;
    DatabaseConnection dbc;
    boolean verbinding = false;
    String spelerCode = "";
    String spelerNaam = "";
    String spelerAdres = "";
    String spelerPostcode = "";
    String spelerTelefoon = "";
    String spelerGeboortedatum = "";

    public Speler() {
    }

    public Speler(String spelerCode) {
        this.connection = new Connection("oeffenen", "root", "");
        int con = connection.openConnection();

        if (con == 0) {

            verbinding = true;
            this.dbc = connection.getConnection();

            String selectQuery = "select spelerNaam, spelerAdres, spelerPostcode, spelerTelefoon, spelerGeboortedatum from speler where spelerCode = '";
            ResultSet rs;

            selectQuery += (spelerCode + "'");
            if (dbc.sendQuery(selectQuery) == -1) {
                return;
            }
            this.spelerCode = spelerCode;
            rs = dbc.getResultSet();
            try {
                rs.first();
                this.spelerNaam = rs.getString("spelerNaam");
                this.spelerAdres = rs.getString("spelerAdres");
                this.spelerPostcode = rs.getString("spelerPostcode");
                this.spelerTelefoon = rs.getString("spelerTelefoon");
                this.spelerGeboortedatum = rs.getString("spelerGeboortedatum");
            } catch (SQLException se) {
            } catch (NullPointerException ne) {
            }

            if (dbc.sendQuery(selectQuery) == -1) {
                connection.closeConnection();
                return;
            } else {
                connection.closeConnection();
                return;

            }
        } else {
            connection.closeConnection();
            return;
        }
    }

    public boolean wijzigen() {
        this.connection = new Connection("oeffenen", "root", "");
        int con = connection.openConnection();

        if (con == 0) {

            verbinding = true;
            this.dbc = connection.getConnection();

            String updateQuery = "update speler set spelerNaam = " + this.spelerNaam
                    + ",  spelerAdres = '" + this.spelerAdres
                    + "', spelerPostcode = '" + this.spelerPostcode
                    + "', spelerTelefoon = '" + this.spelerTelefoon
                    + "', spelerGeboortedatum = '" + this.spelerGeboortedatum + "'";
            int ret = 0;

            if (dbc.sendQuery(updateQuery) == -1) {
                connection.closeConnection();
                return true;
            } else {
                connection.closeConnection();
                return false;

            }
        } else {
            connection.closeConnection();
            return false;
        }
    }

    public boolean toevoegen(String spelerCode, String spelerNaam, String spelerAdres, String spelerPostcode, String spelerTelefoon, String spelerGeboortedatum) {
        this.connection = new Connection("oeffenen", "root", "");
        int con = connection.openConnection();

        if (con == 0) {

            verbinding = true;
            this.dbc = connection.getConnection();

            String insertQuery = "insert into speler (spelerCode,spelerNaam,spelerAdres,spelerPostcode,spelerTelefoon,spelerGeboortedatum)"
                    + " Values('" + this.spelerCode + "','" + this.spelerNaam + "','" + this.spelerAdres + "','" + this.spelerPostcode + "','" + this.spelerTelefoon + "','" + this.spelerGeboortedatum + "');";

            if (dbc.sendQuery(insertQuery) == -1) {
                connection.closeConnection();
                return true;
            } else {
                connection.closeConnection();
                return false;

            }
        } else {
            connection.closeConnection();
            return false;
        }
    }

    public boolean verwijderen(String spelerCode) {
        String deleteQuery = "delete from speler where spelerCode='" + spelerCode + "'";
        int ret = 0;

        if (dbc.sendQuery(deleteQuery) == -1) {
            connection.closeConnection();
            return true;
        } else {
            connection.closeConnection();
            return false;

        }
    }

    public void setSpelerCode(String spelerCode) {
        this.spelerCode = spelerCode;
    }

    public String getSpelerCode() {
        return this.spelerCode;
    }

    public void setSpelerNaam(String spelerNaam) {
        this.spelerNaam = spelerNaam;
    }

    public String getSpelerNaam() {
        return this.spelerNaam;
    }

    public void setSpelerAdres(String spelerAdres) {
        this.spelerAdres = spelerAdres;
    }

    public String getSpelerAdres() {
        return this.spelerAdres;
    }

    public void setSpelerPostcode(String spelerPostcode) {
        this.spelerPostcode = spelerPostcode;
    }

    public String getSpelerPostcode() {
        return this.spelerPostcode;
    }

    public void setSpelerTelefoon(String spelerTelefoon) {
        this.spelerTelefoon = spelerTelefoon;
    }

    public String getSpelerTelefoon() {
        return this.spelerTelefoon;
    }

    public void setSpelerGeboortedatum(String spelerGeboortedatum) {
        this.spelerGeboortedatum = spelerGeboortedatum;
    }

    public String getSpelerGeboortedatum() {
        return this.spelerGeboortedatum;
    }
}

And here is the JSP file:

<%@page import="oeffenen.Speler"%>
<%@page import="oeffenen.Connection"%>
<%@page import="database.DatabaseConnection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="session.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%

           

            String msg = "";
            boolean invoerok = true;
            String spelerCode = "";
            String spelerNaam = "";
            String spelerAdres = "";
            String spelerPostcode = "";
            String spelerTelefoon = "";
            String spelerGeboortedatum = "";


            if (request.getParameter("Toevoegen") != null) {
                if (request.getParameter("spelerCode") != null && request.getParameter("spelerCode").equals("")) {
                    msg = "Spelercode is niet ingevuld";
                    invoerok = false;
                } else {
                    spelerCode = request.getParameter("spelerCode");
                    invoerok = true;
                }

                if (request.getParameter("spelerNaam") != null && request.getParameter("spelerNaam").equals("")) {
                    msg = "Spelernaam is niet aanwezig";
                    invoerok = false;
                } else {
                    spelerNaam = request.getParameter("spelerNaam");
                    invoerok = true;
                }
                if (request.getParameter("spelerAdres") != null && request.getParameter("spelerAdres").equals("")) {
                    msg = "Speleradres is niet aanwezig";
                    invoerok = false;
                } else {
                    spelerAdres = request.getParameter("spelerAdres");
                    invoerok = true;
                }

                if (request.getParameter("spelerPostcode") != null && request.getParameter("spelerPostcode").equals("")) {
                    msg = "Spelerpostcode is niet aanwezig";
                    invoerok = false;
                } else {
                    spelerPostcode = request.getParameter("spelerPostcode");
                    invoerok = true;
                }

                if (request.getParameter("spelerTelefoon") != null && request.getParameter("spelerTelefoon").equals("")) {
                    msg = "Spelertelefoon is niet aanwezig";
                    invoerok = false;
                } else {
                    spelerTelefoon = request.getParameter("spelerTelefoon");
                    invoerok = true;
                }

                if (request.getParameter("spelerGeboortedatum") != null && request.getParameter("spelerGeboortedatum").equals("")) {
                    msg = "Spelergeboortedatum is niet aanwezig";
                    invoerok = false;
                } else {
                    spelerGeboortedatum = request.getParameter("spelerGeboortedatum");
                    invoerok = true;
                }

                if (invoerok = true) {
                    Speler speler;
                    speler = new Speler();
                    speler.setSpelerCode(spelerCode);
                    speler.setSpelerNaam(spelerNaam);
                    speler.setSpelerAdres(spelerAdres);
                    speler.setSpelerPostcode(spelerPostcode);
                    speler.setSpelerTelefoon(spelerTelefoon);
                    speler.setSpelerGeboortedatum(spelerGeboortedatum);
                    if (speler.getSpelerCode().equals("")) {
                        msg = "Speler is al aangemeld!";
                    } else {
                        speler.toevoegen(spelerCode, spelerNaam, spelerAdres, spelerPostcode, spelerTelefoon, spelerGeboortedatum);
                        msg = "Speler is aangemaakt.";
                    }
                }
            }


%>


<html>
    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
        <link href="web.css" rel="stylesheet" type="text/css" />
        <title>Gegevens</title>
    </head>

    <body onload="document.forms[0].username.focus();">
        <div id="wrapper">
            <div id="header">
                <div id="logo">

                </div>
                <div id="ingelogt">
                    <div><p>lol hoi</p><%=username%></div>
                </div>
            </div>
            <div id="menu">
                <div id ="hmenu">
                    <ul>
                        <li><a href = "index.jsp"> Home</a></li>
                        <li><a href = "registeren.jsp"> Registeren</a></li>
                        <li><a href = "#"> About us</a></li>
                        <li><a href = "profiel.jsp"> Profiel</a></li>
                        <li><a href = "team.jsp"> Team</a></li>
                        <li><a href ="#"> Shizzle</a></li>
                        <li><a href ="#"> Contact</a></li>
                    </ul>
                </div>


            </div>
            <div id="submenu">

                <h2>Profiel</h2>
                <ul>
                    <li><a href = "profiel.jsp" class = "selected">profiel</a></li>
                    <li><a href = "gegevens.jsp">mijn Gegevens</a></li>
                    <li><a href = "team.jsp">team</a></li>
                </ul>




            </div>

            <div id="maincontent">
                <div id="profiel">
                    <h3>Speler toevoegen</h3>
                    <div>Hier kan je een speler toevoegen.</div> <div><%= msg%></div>
                    <form action="team.jsp" method="get">
                        <fieldset><legend>Profiel Gegevens</legend>

                            <div><legend>Speler toevoegen:</legend></div>
                            <div>
                                <label class="label">Spelercode</label><input id="velden" type="text" name="Spelercode" value="" maxlength="32"/>
                            </div>
                            <div>
                                <label class="label">Spelernaam</label><input id="velden" type="text" name="Spelernaam" value="" maxlength="32"/>
                            </div>
                            <div>
                                <label class="label">Speleradres</label><input id="velden" type="text" name="Speleradres" value="" maxlength="32"/>
                            </div>
                            <div>
                                <label class="label">Spelerpostcode</label><input id="velden" type="text" name="Spelerpostcode" value="" maxlength="32"/>
                            </div>
                            <div>
                                <label class="label">Spelertelefoon</label><input id="velden" type="text" name="Spelertelefoon" value="" maxlength="32"/>
                            </div>
                            <div>
                                <label class="label">Spelergeboortedatum</label><input id="velden" type="text" name="Spelergeboortedatum" value="" maxlength="32"/>
                            </div>
                        </fieldset>

                        <div id="submitbt"><input type="submit" name="Toevoegen" value="Toevoegen"/></div>
                    </form>
                    <a href="index.jsp" title="uitloggen">uitloggen</a>
                </div>

            </div>
            <div id="footer">

            </div>
        </div>

    </body>

</html>

This has been keeping me busy for some weeks.

Recommended Answers

All 10 Replies

You should have posted exact error message. You cannot expect people to try and debug your code without knowing exact DB structure...

You should have posted exact error message. You cannot expect people to try and debug your code without knowing exact DB structure...

Ya I kind of figured that out.
But I'm not really getting any error message.
Here is the error I get:

http://imageshack.us/photo/my-images/151/errormsg.png/

It says that there is a detailed error message in the log, but I don't know the log location....

Here is my DB structure:

drop database if exists oeffenen;
create database oeffenen;
use oeffenen;

create table account (
        username varchar(40) ,
        wachtwoord varchar(32) ,
	primary key(username)
) engine = innodb;

create table speler (
        spelerCode varchar(40) ,
        spelerNaam varchar(40) ,
        spelerAdres varchar(40) ,
        spelerPostcode varchar(40) ,
        spelerTelefoon varchar(40) ,
        spelerGeboortedatum varchar(40) ,
        primary key(spelerCode)
) engine = innodb;

insert into account(username,wachtwoord)
            Values('matt','super');

insert into speler(spelerCode,spelerNaam,spelerAdres,spelerPostcode,spelerTelefoon,spelerGeboortedatum)
            Values('453464','Testing','Test Adres 2','3674 TE','06347969357','12-12-2009');

Thanks for the reply.

YOUR_TOMCAT_INSTALLATION_DIRECTORY/logs and check catalina.out

YOUR_TOMCAT_INSTALLATION_DIRECTORY/logs and check catalina.out

Hmm I'm using Netbeans in combination with Xampp.
My "C:\xampp\tomcat\logs" folder is empty.
There is a "catalina_start.bat" file in the root folder of Tomcat, but when I try to run that, it give me some errors:

Error: The system was unable to find the specified registry key or value.

XAMPP: Cannot find the current JDK of the installation!

XAMPP: Cannot set JAVA_HOME. Aborting...

Or maybe I'm just looking at the wrong place.

I also checked: "C:\Program Files (x86)\Apache Software Foundation\Apache Tomcat 6.0.26\logs" Also empty.

And "C:\xampp\apache\logs" Does contain log files.
"access.log" < Empty.
"ssl_request.log" < Empty.
"error.log" < Contains logs, but nothing useful.

1) Make sure that you set JAVA_HOME as your environment variable (there is a description how to do it in this post)
2) This may sound harsh but either you need to read XAMPP documentation to find where the things are or just delete XAMPP and use simple installation of Tomcat and your chosen database so you can follow advice given.

Personally I see no need for XAMPP that was predominantly developed for lazy PHP developers that weren't willing to learn how to set up Apache 2 with PHP and MySQL

1) Make sure that you set JAVA_HOME as your environment variable (there is a description how to do it in this post)
2) This may sound harsh but either you need to read XAMPP documentation to find where the things are or just delete XAMPP and use simple installation of Tomcat and your chosen database so you can follow advice given.

Personally I see no need for XAMPP that was predominantly developed for lazy PHP developers that weren't willing to learn how to set up Apache 2 with PHP and MySQL

Here is the log file.

catalina.2011-06-05.log

5-jun-2011 5:16:11 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_25\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static ;C:\Program Files\Java\jdk1.6.0_25\bin;C:\Program Files (x86)\UltraVPN\bin;C:\Program Files (x86)\OpenVPN\bin
5-jun-2011 5:16:11 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
5-jun-2011 5:16:11 org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:16:11 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 692 ms
5-jun-2011 5:16:11 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
5-jun-2011 5:16:11 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.5
5-jun-2011 5:16:11 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
5-jun-2011 5:16:11 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
5-jun-2011 5:16:11 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: /SimpleTagLibrary is already defined
5-jun-2011 5:16:11 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://tomcat.apache.org/example-taglib is already defined
5-jun-2011 5:16:12 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
5-jun-2011 5:16:12 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
5-jun-2011 5:16:12 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
5-jun-2011 5:16:12 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
5-jun-2011 5:16:12 org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:16:12 org.apache.catalina.startup.Catalina start
INFO: Server startup in 684 ms
5-jun-2011 5:22:59 org.apache.coyote.http11.AbstractHttp11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
5-jun-2011 5:23:00 org.apache.coyote.ajp.AbstractAjpProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:23:00 org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
5-jun-2011 5:23:00 org.apache.coyote.http11.AbstractHttp11Protocol stop
INFO: Stopping Coyote HTTP/1.1 on http-8080
5-jun-2011 5:23:00 org.apache.coyote.ajp.AbstractAjpProtocol stop
INFO: Stopping Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:23:19 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_25\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static ;C:\Program Files\Java\jdk1.6.0_25\bin;C:\Program Files (x86)\UltraVPN\bin;C:\Program Files (x86)\OpenVPN\bin
5-jun-2011 5:23:19 org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind <null>:8080
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:395)
	at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:118)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:873)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:555)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:729)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:571)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
Caused by: java.net.BindException: Address already in use: JVM_Bind
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
	at java.net.ServerSocket.bind(ServerSocket.java:328)
	at java.net.ServerSocket.<init>(ServerSocket.java:194)
	at java.net.ServerSocket.<init>(ServerSocket.java:150)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:54)
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:384)
	... 15 more
5-jun-2011 5:23:19 org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8080]]
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:875)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:555)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:729)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:100)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:571)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
5-jun-2011 5:23:19 org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:23:19 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 445 ms
5-jun-2011 5:23:19 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
5-jun-2011 5:23:19 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.5
5-jun-2011 5:23:19 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
5-jun-2011 5:23:19 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
5-jun-2011 5:23:19 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: /SimpleTagLibrary is already defined
5-jun-2011 5:23:19 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://tomcat.apache.org/example-taglib is already defined
5-jun-2011 5:23:19 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
5-jun-2011 5:23:19 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
5-jun-2011 5:23:19 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
5-jun-2011 5:23:19 org.apache.catalina.core.StandardService startInternal
SEVERE: Failed to start connector [Connector[HTTP/1.1-8080]]
LifecycleException:  An invalid Lifecycle transition was attempted ([before_start]) for component [Connector[HTTP/1.1-8080]] in state [INITIALIZING]
	at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:336)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:134)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:456)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:674)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:596)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
5-jun-2011 5:23:19 org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
5-jun-2011 5:23:19 org.apache.catalina.startup.Catalina start
INFO: Server startup in 522 ms

2. It's not harsh at all, I'm just happy someone is at least helping me!
And XAMPP is just a temp solution, soon it will be gone.
But for now I will keep using it(But it will be gone within a month.)

Hope the log gave you enough information, I just got this all to work around 5:30 am so couldn't check the log myself(To sleepy).

1. Line 2 is showing that you have double declaration for Java (not a big issue but you should clean it out)
2. Line 47 is saying that you have something already running on port 8080 you should check that Windows is not running Tomcat as service be default on pc start up

1. Line 2 is showing that you have double declaration for Java (not a big issue but you should clean it out)
2. Line 47 is saying that you have something already running on port 8080 you should check that Windows is not running Tomcat as service be default on pc start up

1. The double declaration is a weird thing, because the java path was only 1 time in my System variable: Path. So I removed that one.

2. I changed the ports to 8081 instead, hope that doesn't matter.
Here is the new log:

5-jun-2011 15:01:52 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_25\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\UltraVPN\bin;C:\Program Files (x86)\OpenVPN\bin
5-jun-2011 15:01:52 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
5-jun-2011 15:01:52 org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
5-jun-2011 15:01:52 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 751 ms
5-jun-2011 15:01:52 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
5-jun-2011 15:01:52 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.5
5-jun-2011 15:01:52 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
5-jun-2011 15:01:52 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
5-jun-2011 15:01:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: /SimpleTagLibrary is already defined
5-jun-2011 15:01:53 org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://tomcat.apache.org/example-taglib is already defined
5-jun-2011 15:01:53 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
5-jun-2011 15:01:53 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
5-jun-2011 15:01:53 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
5-jun-2011 15:01:53 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
5-jun-2011 15:01:53 org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
5-jun-2011 15:01:53 org.apache.catalina.startup.Catalina start
INFO: Server startup in 598 ms
5-jun-2011 15:03:59 org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
5-jun-2011 15:04:01 org.apache.coyote.http11.AbstractHttp11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8081
5-jun-2011 15:04:02 org.apache.coyote.ajp.AbstractAjpProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
5-jun-2011 15:04:02 org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
5-jun-2011 15:04:02 org.apache.coyote.http11.AbstractHttp11Protocol stop
INFO: Stopping Coyote HTTP/1.1 on http-8081
5-jun-2011 15:04:02 org.apache.coyote.ajp.AbstractAjpProtocol stop
INFO: Stopping Coyote AJP/1.3 on ajp-8009

;) you need to run your application get that error in the logs. What you did is just starting and stopping server. So there is nothing in the logs

;) you need to run your application get that error in the logs. What you did is just starting and stopping server. So there is nothing in the logs

Uhm I have been running the application.
This is how I do it:
First I start catalina_start.bat
Then I start Netbeans, run the website, go to the part that gives me the NULL pointer and get the NULL pointer.
After that I use: catalina_stop.bat

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.