Emmanuel Waûters

Ranch Hand
+ Follow
since Jul 16, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Emmanuel Waûters

Hallo,

I had resolved my problem. When using Eclise Helios and Tomcat 6 or 7 You have to do the next:
“Copy the ROOT (Default) Web App into Eclipse.
Eclipse forgets to copy the default apps (ROOT, examples, etc.) when it creates a Tomcat folder inside the Eclipse workspace. Go to C:\apache-tomcat-7.0.8\webapps, R-click on the ROOT folder and copy it. Then go to your Eclipse workspace, go to the .metadata folder, and search for "wtpwebapps". You should find something like your-eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps (or .../tmp1/wtpwebapps if you already had another server registered in Eclipse). Go to the wtpwebapps folder, R-click, and paste ROOT (say "yes" if asked if you want to merge/replace folders/files). Then reload http://localhost/ to see the Tomcat welcome page.”
Source : http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html
When updating the the used and to be used jar-files my application worked ok. But now when using Eclipse Indigo and Tomcat 6 or 7 on my new computer I get – when typing localhost:8080 after starting Tomcat in the Eclipse IDE- the Tomcat homepage. But when running my application http://localhost:8080/cew/login.faces I got the Tomcat error page http 404 the resource could not be found. My opinion is that it had to do something with the Tomcat configuration, more specifically the place where the war-file and project map are to be found, although mine are found in de webapps file – the cew war-file and the project map cew with all the files-. There are no project errors –it is the same webapplication that runned on my old computer with Eclipse Helios and Tomcat 7. But now it won’t work. Even more when I installed Eclipse Helios and Tomcat 7 and I got also again the HTTP 404 error of Tomcat. I don’t undertand it any more.

Emmanuel
7 years ago
I use Eclipse as IDE. I’ve installed succesfully the Liferay plugin. Now I made a new JSF project . When I use(d) the Ant build file to do the build, I receive the message that I’ve succesfully build the project. When I want to start ‘Liferay v6.0 Server (Tomcat 6) at localhost’ in menu Servers by clicking on ‘Start the server (Ctrl+Alt+R)’ button I get the following error message:
‘Starting Liferay v6.0 Server (Tomcat 6) at localhost’ has encountered a problem.
The specified jre installation does not exist.
How can I make it work again to start Tomcat server?
Could somebody help me, please.

Thanks forward.

Yours sincerely,

Emmanuel
7 years ago

Hello,


I have a problem. I run the server Apache Tomcat - after installing Eclipse and Tomcat on a new computer - in Eclipse and haven't any problem: INFO: Server startup in 575 ms. But when I type http://localhost:8080/, I didn't get the Apache Tomcat Home Page, but get the following error message : HTTP Status 404 error in tomcat, The requested resource is not avaliable. What did I wrong?


Thanks forward.


Yours sincerely,


Emmanuel
8 years ago
Hello,


I have a simular problem. I run the server Apache Tomcat - after installing Eclipse and Tomcat on a new computer - in Eclipse and haven't any problem: INFO: Server startup in 575 ms. But when I type http://localhost:8080/, I didn't get the Apache Tomcat Home Page, but get the following error message : HTTP Status 404 error in tomcat, The requested resource is not avaliable. What did I wrong?


Thanks forward.


Yours sincerely,


Emmanuel
8 years ago
Dear Mister Johnson,


The problem is that some suggestions I didn't understood well or presumed to have understood. But I will never forget it anymore.
I have to say, by following Your instructions, I understand more about my operating system, the maps on my computer,....

Always willing to return a favour.


Yours sincerely,


Emmanuel Waûters
Dear Mister Johnson,




Thousand times thanks for You persistent help. The problem is solved and I will post the solution here. You had the solution. I didn't understand it well – so I looked over it-. My excuses for it, but I'm a really greenhorn in much things of computers. I have to say You already had it right at the beginning.


So the problem was, that due to some circumstances – some people say an update of Windows Vista- the system didn't recognize anymore the relative variable localhost. So using the relative address localhost in my java application or using this address in adding a database to Eclipse, didn't work. So Mr Gert Cuppens –here is the link to his personal website with all matters on the subject Java and related subjects – suggested me to put the absolute address into the java application – the IP-address 127.0.0.1 instead of localhost – , so the application will work. What it did.

And here it comes where You solved the problem. If You add or better said write - because when You open the file with notepad for example You can write into this document - 127.0.0.1 localhost into the file hosts of the directory C:\Windows\System32\drivers\etc You can go on using localhost as an relative address in Your applications. So You don't have to fill anymore the absolute – IP – address – what reduce faults – in Your applications..


I want to express another time my gratefullness for all the help You provided me. I owe You a big, big, big favour. So I want to offer You something to show my thankfullness for Your persistent help.
My e-mailaddress is wauters underscore emmanuel at hotmail dot com, all in one line. So could you
give me an address where I can send the present to.



Yours sincerely,



Emmanuel Waûters
Hallo,


I've again followed Your instructions. Yesterday before I've removed and reinstalled MySQL, so the MySQL JDBC driver and the version of MySQL matched those of my fellow student who's program worked. So I needed to change the password. I've included in the commandline as You asked.
Please see here what I got:




C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>javac -d b
uild src/ConnectDB.java

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>java -cp b
uild;build/mysql-connector-java-5.1.7-bin.jar ConnectDB
SQL problem
Communications link failure

Last packet sent to the server was 0 ms ago.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link fai
lure

Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2120)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:282)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ConnectDB.main(ConnectDB.java:9)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicatio
ns link failure

Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
... 12 more
Caused by: java.net.ConnectException: Connection refused: 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:209)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:253)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
... 13 more

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>

Thanks forward.


Emmanuel
Hallo,

I made an mistake before. The jar-file wasn't included in the build directory. Now it is and I've included e.printStackTrace() in the java-file as demanded.
So that is what I got:

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>javac -d b
uild src/ConnectDB.java

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>java -cp b
uild;build/mysql-connector-java-5.1.7-bin.jar ConnectDB
SQL problem
Communications link failure

Last packet sent to the server was 0 ms ago.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link fai
lure

Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2120)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:282)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ConnectDB.main(ConnectDB.java:9)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicatio
ns link failure

Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
074)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
... 12 more
Caused by: java.net.ConnectException: Connection refused: 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:209)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:253)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
... 13 more

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>


Thanks forward,


Emmanuel
Hallo,


It seems to have something to do with my system Window Vista Business.
Here is the link where is a similar problem. This persons system worked fine , until an update of windows: "Probably after an update of Windows Defender in Windows Vista the JDBC connection to MySQL has given up working, even for applications that have always worked until now."

So it has something to do with windows.

Thanks,


Emmanuel
Hallo,

I found out how to copy – can only copy everything or nothing - text from the command line. So I typed again the commando's You suggested and got this:


Microsoft Windows [versie 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. Alle rechten voorbehouden.


C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>javac -d b
uild src/ConnectDB.java

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>java -cp b
uild;build/mysql-connector-java-5.1.7-bin.jar ConnectDB
JDBC driver not found

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>java -cp b
uild;build/mysql-connector-java-5.1.7-bin.jar ConnectDB
JDBC driver not found

C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen>

I compared today everything to another student: I compared what he writes, markes, fills in, chooses in MySQL and Eclipse. I've done the same things. We've looked to everything: every map, file and we've got the same. But always I can't get connected with the database.
And now when I see what I've got – JDBC driver not found - from the command line – after compiled and run the little application – and know I've copied the jar-file to the src- and the builddirectory and even copied it to the parentdirectory of both, I start to think my computer or some system on my computer can't read the jar-file, can't acces it. It exists but the application don't find it. I've worked once in the system- and the environement-variables, I hope it has not got any implications.


Thanks forward.



Emmanuel Waûters
Dear Mister,


So I followed Your instructions. I've typed the following text in notepad++ :
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectDB {
public static void main(String[] args) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.
getConnection("jdbc:mysql://localhost/bierendb","root", "");
System.out.println("Connection OK");
con.close();
} catch (ClassNotFoundException e) {
System.out.println("JDBC driver not found");
} catch (SQLException e) {
System.out.println("SQL problem");
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}

I saved the file as C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen\src\ConnectDB.java .
I copied the file mysql-connector-java-5.1.7-bin.jar into this map
C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen\src

and into this map :
C:\Users\Emmanuel\Contacts\Documents\Informatica\Java\SCJP-oefeningen\build

and that is what I got when I compiled and runned the program.




Thanks forward.



Emmanuel
Hallo,

I've retyped the javafile of 22th of july in notepad and want it now to run. Do I have to fill in somewhere in that file the absolute adress of the MySQL JDBC JAR file ?
How would the commando looks like that I have to use in the command line, where is the MySQL JDBC JAR file included? I would save the jarfile in the same map as my java-file, so with the classpath it will be both compiled.
If I have to do more difficult things. I can ask other students next monday, buth not for resolving this JDBC problem. I already asked them and the theacher also. But they can help me providing You the exact information you requested me.

Thanks forward.


Emmanuel
Dear Mr. Johnson,


I downloaded the last version of the driver- so a driver that is diiferent of the former driver-.And again I got the same notifications as before.

In green are the links or buttons I clicked on.
In red is the text I wrote in the blank spaces.
In black, italic the text I get : the menu, problemnotifications,....

Java EE

Data Source Explorer

I marked “Database Connections” and open with the right mousekey the menu and clicked on “New
Connection Profile
Create a DB2 for Linux, UNIX, and Windows connection profile.
Connection Profile Types:
MySQL
Name: ( Where I put in the next line)
BeersLocalHost
Next>'

Specify a Driver and Connection Details
Select a driver from the drop-down and provide login details for the connection.
Drivers: MySQL JDBC Driver [+] (I clicked on this button “New Driver Definition”)

Specify a Driver Template and Definition Name
Name/Type
MySQL JDBC Driver MySQL 5.1
First I get this answer:
Unable to locate JAR/zip in file system as specified by the driver definition: mysql-connector-java-5.1.0-bin.jar.
Jar List
I remove mysql-connector-java-5.1.0.-bin.jar and loose notification:
Unable to locate JAR/zip in file system as specified by the driver definition: mysql-connector-java-5.1.0-bin.jar.
When I then want to install the driver “C:\Users\Emmanuel\Contacts\Documents\Programma's\mysql-connector-java-5.1.8\mysql-connector-java-5.1.8\mysql-connector-java-5.1.8-bin.jar” I get :
A driver already exists with that name. Please provide a unique driver name
I can't push then the button “ok”, but just can push the button “cancel”.
If I trie again and this time I do the following steps:

Specify a Driver and Connection Details
Select a driver from the drop-down and provide login details for the connection.
Drivers: MySQL JDBC Driver [+] (I clicked on this button “New Driver Definition”)

Specify a Driver Template and Definition Name
Name/Type
MySQL JDBC Driver MySQL 5.1

First I get this answer:
Unable to locate JAR/zip in file system as specified by the driver definition: mysql-connector-java-5.1.0-bin.jar.
Jar List
I let the file “mysql-connector-java-5.1.0.-bin.jar “ as it is and add the next file
“C:\Users\Emmanuel\Contacts\Documents\Programma's\mysql-connector-java-5.1.8\mysql-connector-java-5.1.8\mysql-connector-java-5.1.8-bin.jar” to and I get following notification :
A driver already exists with that name. Please provide a unique driver name.
So in both cases I get as answer – even if the driver is in the list - their isn't a driver available and when I want to remove the driver and/or add a new driver to it I get as answer the driver already exists.


When I typed the commando ipconfig /all, I get the folowing response.

Please look at the screenshots 7,8,9.



Thanks forward.


Emmanuel Waûters
Hallo Mister Johnson,


Did my information helped to solve the problem?


Thanks forward.


Emmanuel
Dear Mister,

My excuses for asking You to mail. I'm very new to this forum, more, I'm very new into the ICT-business and programming. I just started a very intensive course end of april last, but I'm loving it.The harder it is, the more I like it.

I've hosted the screenshots on Picasa Web Albums. This is the link: Screenshots PC
I will type here the text of my mail with the reference to the screenshots in between.

Screenshot1
Screenshot2


Here are some IP-addresses communicated to my by the system. In the left menu You find the button “Catalogs” where my databases are – so too bierendb-. But I don't know how to find out which IP-address bierendb has.



In Database i've found nothing filled in.


Screenshot3
Screenshot4


Adapter for wireless LAN Wireless networkconnection
MediumStatus.......................................:medium disconnected
Connectionspecification. DNS-postfix: telenet.be

Ethernet-adapter LAN-connection:
Mediumstatus..........................: medium disconnected
Connectionspecification. DNS-postfix:

Tunnel-adapter LAN-connection*7:
Mediumstatus..........................: medium disconnected
Connectionspecification. DNS-postfix:

That's what I get by typing ipconfig. But can't type ipconfig /all. In the map System32 of Windows I only get ipconfig.

Screenshot5
Screenshot6

I think here You see the the localhost of bierendb is not 3306. I don't find where the IP-address is. Don't know how to find it. So I think that is the problem. How can I change that?


I found both Ipv4 and Ipv6 enabled but how I have to add Ipv4 address for localhost or how i have top update hosts file don't know how to do it.


So that is what I found out. If You need more information, ask me. I will try to get it. Please be awre I'm new, so sometimes I need a guide to find this information out.

Another time much thanks for willing to help me so much.

I'm always willing to do a favour to You also and will not forget my promesse when we resolve my problem.

Thanks forward.




Emmanuel Waûters