Emmanuel Constant

Greenhorn
+ Follow
since Oct 20, 2009
Merit badge: grant badges
For More
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 Constant

ok I got the server running but i get this error





can I get some assistance
13 years ago
my log4j properties file is in the source directory under the package com.techops.tools and it looks like this:

13 years ago
I got it to work cuz I was using the wrong url.

I'm using this URL now:

http://localhost:8089/TechOpsTools/SearchServlet?dsp=VEV&catKey=G010001916075F

but I get this error for the log4j:

log4j:WARN No appenders could be found for logger (com.techops.tools.SearchServlet).
log4j:WARN Please initialize the log4j system properly.
13 years ago
This is what I get when I do a clean and rebuild:



This is what I get when I deploy:



13 years ago
I changed the port from being 8080 to 8089.

The TechOpsTools is the name a the war file when I deploy.
13 years ago
also this is what I get in the log when I start and restart:

Using CATALINA_BASE: C:\Documents and Settings\econsta\.netbeans\6.8\apache-tomcat-6.0.20_base
Using CATALINA_HOME: C:\Program Files\NetBeans 6.8\Apache Software Foundation\Apache Tomcat 6.0.20
Using CATALINA_TMPDIR: C:\Documents and Settings\econsta\.netbeans\6.8\apache-tomcat-6.0.20_base\temp
Using JRE_HOME: C:\Program Files\Java\jdk1.6.0_18
Apr 26, 2010 9:35:35 AM 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_18\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.6.0_18\bin;.C:\OracleClient\product\11.1.0\client_2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Wave Systems Corp\Dell Preboot Manager\Access Client\v5\;C:\Program Files\Admin Tools\;C:\Program Files\Sybase\Sybase Central\win32\;C:\Sybase\dll\;C:\Sybase\asep\;C:\Sybase\bin\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX;C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX/Support binaries;C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Broker;C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Client;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\QuickTime\QTSystem\;c:\python25\;C:\Program Files\IDM Computer Solutions\UltraCompare
Apr 26, 2010 9:35:36 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8089
Apr 26, 2010 9:35:36 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2883 ms
Apr 26, 2010 9:35:36 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 26, 2010 9:35:36 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Apr 26, 2010 9:35:38 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8089
Apr 26, 2010 9:35:39 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 26, 2010 9:35:39 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
Apr 26, 2010 9:35:39 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2943 ms
13 years ago
Using Netbean 6.8 to create a Servlet app that queries a database but fails with a

HTTP Status 404
The requested resource (/TechOpsTools/) is not available.

The code that I'm using is



I also attached the xml files that I'm using for the tomcat setup (I'm using Tomcat 6.0.20 that came with netbeans 6.8)




also the server.xml file



Please help me.
13 years ago
Thanks Steve. Yes the JUnit test passed. I really appreciate the help.
14 years ago
I'm wrong again. It should be this:





Is this correct?
14 years ago

Adding the final to both modelNumber and SerialNumber will do it?


14 years ago
Ok I took your advice steve, I read up on Access modifiers and this is what I came up with:




The Junit class ran with no errors; however, for this piece of code in the ApplianceTest.java Junit class:


I get the warning 'The local variable appliance1 is never read', 'The local variable appliance2 is never read', 'The local variable appliance3 is never read'
I don't understand why if the Junit class ran with no errors, why I get these warnings?
14 years ago
My problems is that I don't know how to do the following:

1) One String type field called modelNumber that can not be modified after initialization and it is visible to outside world without any getter.
2) One int style field called serailNumber that can not be modified after initialization and it is visible to outside world without any getter.

Our teacher gave us a Juint class and our job was to create the the Apliance class to confirm with the Junit class
in the JUnit class I have errors specific to these lines:

assertEquals(modelNumber,appliance.modelNumber);
assertTrue(appliance2.serialNumber==appliance1.serialNumber+1);
14 years ago
This is a homework project but my teacher rarely calls me back when I send questions can somebody explain this to me so i can best understand. I have the Java file below for it, plus the Appliance class is
almost complete. Again I'm just looking to understand


Create a class called Appliance that has the following:
1) One String type field called modelNumber that can not be modified after initialization and it is visible to outside world without any getter.
2) One int style field called serailNumber that can not be modified after initialization and it is visible to outside world without any getter.
3) One Customer type field called 'owner' that is NOT visible to the outside world without using Getter and Setter.
4) One Dimension type field called 'dimension' that is NOT visible to the outside world without using Getter and Setter.
5) Three public constructors – the first one only takes model number, the second one takes model number and owner and the third one takes model number, owner and dimension.
6) Public Getters and Setters for owner and dimension.
7) A method getNumberOfApplianceCreated() that will return object count.

Please note that you will need additional fields to meet the requirements about and the rules below but I am not going to specify them, neither do I expect them to be visible directly or via getters and setter.


Rules:

a) Serial number should be automatically assigned by all three constructors by incrementing a number by one.
b) Set the starting serial number to 100. Use constant 'STARTING_SERIAL_NUMBER ' to store starting serial number.
c) Constructors should not repeat the same code. They should call one another for execution of the same code.
d) getNumberOfApplianceCreated() should be a class method not object method


So far I have this:

Appliance.java



and here is the JUnit test
ApplianceTest.java


14 years ago