Apache Tomcat 7.0.4 can't recognize the classpath for .jar files

Hiii Everybody,
I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: jxl/Workbook
     CopyExcel.copy(CopyExcel.java:39)
     CopyExcel.copyMain(CopyExcel.java:81)
     ServicePage.processRequest(ServicePage.java:28)
     ServicePage.doPost(ServicePage.java:73)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: jxl.Workbook
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
     java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     CopyExcel.copy(CopyExcel.java:39)
     CopyExcel.copyMain(CopyExcel.java:81)
     ServicePage.processRequest(ServicePage.java:28)
     ServicePage.doPost(ServicePage.java:73)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
--------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
* To change this template, choose Tools | Templates
* and open the template in the editor.
* @author Administrator
* To change this template, choose Tools | Templates
* and open the template in the editor.
import java.io.File;
import java.io.IOException;
import jxl.Cell;
//import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import jxl.write.WritableWorkbook;
public class CopyExcel {
     private String inputFile;
     public void setInputFile(String inputFile) {
          this.inputFile = inputFile;
     public void copy() throws IOException  {
          File inputWorkbook = new File(inputFile);
          Workbook w;
                try{
                    System.out.println("Before w= Workbook.getWorkbook(inputWorkbook);  ");
          w= Workbook.getWorkbook(inputWorkbook);
                 System.out.println("After w= Workbook.getWorkbook(inputWorkbook);  ");
          WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
                copy.write();
                copy.close();
                }catch(Exception e){}
/*          try {
               w = Workbook.getWorkbook(inputWorkbook);
               // Get the first sheet
               Sheet sheet = w.getSheet(0);
               // Loop over first 10 column and lines
                    for (int i = 1; i < 6; i++) {
                         Cell cell = sheet.getCell(0, i);
                         //CellType type = cell.getType();
                         //if (cell.getType() == CellType.LABEL) {
                              //System.out.println("I got a label "
                                   //     + cell.getContents());
                         //if (cell.getType() == CellType.NUMBER) {
                              //System.out.println("I got a number "
                                        //+ cell.getContents());
                                                System.out.println(cell.getContents());
          } catch (BiffException e) {
               e.printStackTrace();
     public static  String copyMain(String args) throws IOException {
          String str=args;
          CopyExcel test = new CopyExcel();
          test.setInputFile(args);
          test.copy();
                return "Success";
}I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses thi..........But the problem remained...........
Plz. help me.
Thank u in advance for any help.

Hiii Everybody,
I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: jxl/Workbook
     CopyExcel.copy(CopyExcel.java:39)
     CopyExcel.copyMain(CopyExcel.java:81)
     ServicePage.processRequest(ServicePage.java:28)
     ServicePage.doPost(ServicePage.java:73)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: jxl.Workbook
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
     java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     CopyExcel.copy(CopyExcel.java:39)
     CopyExcel.copyMain(CopyExcel.java:81)
     ServicePage.processRequest(ServicePage.java:28)
     ServicePage.doPost(ServicePage.java:73)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
--------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
* To change this template, choose Tools | Templates
* and open the template in the editor.
* @author Administrator
* To change this template, choose Tools | Templates
* and open the template in the editor.
import java.io.File;
import java.io.IOException;
import jxl.Cell;
//import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import jxl.write.WritableWorkbook;
public class CopyExcel {
     private String inputFile;
     public void setInputFile(String inputFile) {
          this.inputFile = inputFile;
     public void copy() throws IOException  {
          File inputWorkbook = new File(inputFile);
          Workbook w;
                try{
                    System.out.println("Before w= Workbook.getWorkbook(inputWorkbook);  ");
          w= Workbook.getWorkbook(inputWorkbook);
                 System.out.println("After w= Workbook.getWorkbook(inputWorkbook);  ");
          WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
                copy.write();
                copy.close();
                }catch(Exception e){}
/*          try {
               w = Workbook.getWorkbook(inputWorkbook);
               // Get the first sheet
               Sheet sheet = w.getSheet(0);
               // Loop over first 10 column and lines
                    for (int i = 1; i < 6; i++) {
                         Cell cell = sheet.getCell(0, i);
                         //CellType type = cell.getType();
                         //if (cell.getType() == CellType.LABEL) {
                              //System.out.println("I got a label "
                                   //     + cell.getContents());
                         //if (cell.getType() == CellType.NUMBER) {
                              //System.out.println("I got a number "
                                        //+ cell.getContents());
                                                System.out.println(cell.getContents());
          } catch (BiffException e) {
               e.printStackTrace();
     public static  String copyMain(String args) throws IOException {
          String str=args;
          CopyExcel test = new CopyExcel();
          test.setInputFile(args);
          test.copy();
                return "Success";
}I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses thi..........But the problem remained...........
Plz. help me.
Thank u in advance for any help.

Similar Messages

  • Hello, I closed unintentionally 10 files and I can't retrieve the history for each file.Is there a solution ?

    Hello, I closed unintentionally 10 files and I can't retrieve the history for each file.Is there a solution ?

    Hello, do you mean 10 tabs ? check in [http://kb.mozillazine.org/Viewing_the_browsing_history_-_Firefox#Library Library] menu to view the browsing history (except if you [https://support.mozilla.org/en-US/kb/Clear%20Recent%20History Clear Recent History] ).
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Where can I download the plugin for .psdx files

    I have photoshop cs5.1 extended on a win7 desktop and photoshop touch on an android tablet.  I've read that there is a plugin called touch app plugins and I'm directed to adobe's download page but that plugin does not seem to exist there. Where can I download the plugin to open .psdx files in photoshop?

    If the above doesn't work, this one should, but only in the 64 bit version of photoshop cs5.1
    http://helpx.adobe.com/photoshop/kb/psdx-files-dont-open-photoshop.html
    After you extract the plugin (AdobePSDXLoader.8BI) put it in
    C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Plug-ins\File Formats

  • How Can I Change the Ports for WebDAV file shares.

    Title says it all. I have another piece of software using port 80 and 443, I'd like to create iOS shares using WebDAV but I can't find anywhere in the GUI to change the port numbers and I can't work out whether I need to do something involving Apache virtual hosts and if so which config files are relevant to the WebDAV server.
    Someone must have done this by now, anyone know how its done???!!!!
    Thanks in advance.

    OK, so I worked out which files to edit and I actually managed to change the Apache/WebDAV ports on a clean 10.8 Server.
    By clean I mean I installed 10.8.0, updated to 10.8.3 via the combo updater, then installed the latest version of Server app and configured the services.
    Having done that I was able to make the required changes and all is working well. I then replicated the process on my live server but it throws up an error when I try to start up the WebDAV sharing.
    This thread outlines the same issue:
    https://discussions.apple.com/thread/4199421?start=0&tstart=0
    I am getting this exact problem, in that any manual change at all to the 0000_any_443_.conf file will cause WebDAV to fail to start. This is annoying because I need to change that file. Its also annoying because the problem isnt there on my 'clean' server.
    I deleted the entire /Library/Server/ folder and the Server.app and reinstalled Server.app from the App Store, recreating the /Library/Server folder from scratch. This cleared out the apache config files which I tried to re-modify, but all the file sharing settings were retained. Does anyone think it would be worth deleting all the sharepoints? Any other ideas?

  • I can't recognize the DVD RW Optiarc

    Dear Sir,
    My system can't recognize the DVD RW on my Entertainment Notebook HP Pavilion dv6815el.
    I've upgrade it  to Windows 7 12 months ago, without problem, but from 5 days I've big troubles!
    Maybe for some mistake, using Nero or Alcool virtual drivers,  there is an  incompatibily beetwen drivers.
    Iìve  suddenly unistalled those programs, but   as in Device manager as on windows explorer I can't see it anymore
    It seem to work only  fiew seconds lighting and noising,  when I load a CD or DVD,  after it stops.
    I tried with  fixwin and by modifiyng regedit; now I tried your checks as suggested, but no results; there isnt!
    And I can't open DVD/CD-ROM Drives find it in order to find and uninstall it..
    I find only the HD drive and,  if plugged, a external DVD RW.
    Also restoring  old system images, I cannot fix the big bug.
    By driverwhiz I can see it;  Pls see my shots as follows:
    http://i192.photobucket.com/albums/z170/pamwagner47/devices.jpg
    http://i192.photobucket.com/albums/z170/pamwagner47/scandriverwhiz.jpg
    http://i192.photobucket.com/albums/z170/pamwagner47/reg.jpg
    http://i192.photobucket.com/albums/z170/pamwagner47/reg1.jpg
    At last, I can't  see, as in other models of HP notebooks, in  the bottom, under the battery,  the small screw  in order to put out or  change this Optiarc device, if damaged.
    Help me please!!!!

    Hi,
    The easiest solution may be to run Windows System Restore.  If you have Norton Internet Security installed, you will need to disable Nortons Tamper Protection as shown in Step 2, on the link below.
    http://us.norton.com/support/kb/web_view.jsp?wv_type=public_web&docurl=20091112171719EN&ln=en_US
    Once you've done this, shut down the PC.  Windows System Restore is usaully best run in Safe Mode.  Tap away at f8 as you start the PC to enter Windows Recovery Console.  Use the arrow keys to select Safe Mode and hit enter.  When this has loaded, from the Start Menu, click All Programs, click Accessories, click System Tools and launch System Restore.  Pick a restore point before the problem occured and then proceed with the restore process.  Windows will reboot as normal.
    If this doesn't work or you do not have a restore point earlier than the problem, try the automated fixit from Microsoft on the links below.
    Windows 7
    Check if the drive is now working.
    If the drive is not working, from the Start Menu, open the Control Panel and click on Device Manager.  Click to open the IDE ATA/ATAPI Controllers.  Right click on the first channel and select uninstall.  Do not delete drivers if asked.  When uninstalled repeat the process for each channel.  Also if an ATA controller is listed, right click and uninstall this, again not deleting drivers if asked. Then open DVD/CD-ROM Drives.  Right click the drive and select uninstall.  Do not delete drivers if asked.
    Reboot the PC and let Windows reinstall the devices.  Check the drive again.
    If it still isn't working, run the automated fixit from Microsoft on the link below again.
    Windows 7
    Next, from the Start Menu, open the Control Panel and click on Device Manager.  Next click to open DVD/CD-ROM Drives.  Right click the drive and select uninstall.  Do not delete drivers if asked.  When the device has uninstalled click on the 'Scan for Hardware Changes' icon ( usually just below Help on the toolbar ).  Let windows reinstall the drive and see if it now works.
    Hope this helps.
    Best wishes,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • My hp dm3-3027cl card reader can not recognize the class 10 sdhc card

    My hp dm3-3027cl card reader can not recognize the class 10 sdhc card. I downloaded and installed the card reader driver from HP web site for this dm3-3027cl, but still have same problem. There isn't a problem on class 6 SDHC card. It seems some other computers have the same problem on reading the class 10 SDHC card. My toshiba e105 laptop has no probblem to read class 10 SDHC card.

    Hello snowman90024 and welcome to community,
    Kindly install the USB and card reader driver then install cardreader driver and USB driver
    Please let us know about the status after this.
    Best Regards,
    Tanuj
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution".! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Hi, can someone help me how can i connected my multimeter to my pc with rs232, because my computer can´t recognize the device, i mean the multimeter, is a multimeter keithley serie 2400, and i already downloaded all the drivers for labview even the VISA

    hi, can someone help me how can i connected my multimeter to my pc with rs232, because my computer can´t recognize the device, i mean the multimeter, is a multimeter keithley serie 2400, and i already downloaded all the drivers for labview even the VISA

    Marco,
    Here are some suggestions:
    1) Check the manual the Keithley manual to see how to configure the RS-232.   
        On some models you need set Factory defaults to USER and turn on the RS-232.   
        Also there may be a setting for SCPI which you want on (probably on by default).
    2) On your PC - open Device Manager. See if a COM port exists and is functional.
         You must get this working before continuing.
          You can set the COM port parameters by right clicking and selecting Properties.  
         (On some PCs the onboard ports can be disabled in the BIOS)
    3) If step two was OK, open MAX (Measurement and Automation eXplorer).      
        On the left side, click on Devices and Hardware.   
        Click on Serial and Parallel.   
        Go to the COM port you found in Device Manager.   
        Open a VISA Test Panel.
        Now I don't have one I can look at right now, so this is general idea:
       Configure the COM port to match the Keithley settings (should be OK if step 2 worked)  
       Go to the (I think) Input Output tab (you want to send a command)   
       The command string input should already have a *IDN? entered, if not, type it in.   
       Click on the Query button to send the command and check the response.  
       If you get an ID string back (Company name, Model, FW Version ...) then it works.   
       (Disregard an error saying it did not get enough charcters back.) 
    I hope this helps,
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • HT5634 I already install bootcamp 5 on my Macbook Pro MD101 (Mid 2012). But when I plug the USB, my Mac can not recognize the USB or any Storage device. Pls help

    I already install Bootcamp 5 on my Macbook Pro MD101 (Mid 2012) but when I plug the USB, my Mac can not recognize the USB, also any storage device. Pls help !!! I am using Window 7

    I ran an Apple Hardware Test, says ''No trouble found'.

  • My computer can not recognize the new Apple iPod touch when it is connected via the USB cable (that goes with it) attempt to attach it to the computer.

    My computer can not recognize the new Apple iPod touch when it is connected via the USB cable (that goes with it) attempt to attach it to the computer.

    You do have iTunes installed right?
    See:
    iOS: Device not recognized in iTunes for Windows

  • My keyboard failed to put accents spelling.  Through the system can not recognize the keyboard. This keyboard has one year and has always worked well and suddenly became this way, what to do

    My keyboard failed to put accents spelling.
    Through the system can not recognize the keyboard. This keyboard has one year and has always worked well and suddenly became this way, what to do

    Hi ,
    Do you remember if you  have installed some software prior to this issue?
    Delete programs you never use.
    If the issue reoccurs in Clean Boot, but works fine in Safe Mode, the cause may be the disabled hardware drivers. You may narrow down the
    causes in Device Clean Boot.
    Device Clean Boot
    =================
    1. Click Start, type "devmgmt.msc" (without quotation marks) in the Search bar and press Enter.
    2. Expand "Sound, video and game controllers".
    3. Right click on your sound card and then click "Properties.
    4. In the dropdown menu of Device Usage, please choose "Do not use this device (disable)" and click OK.
    5. Please use the same method to disable other dubious hardware such as: internal modem, network card and CD-R drive. Please note some devices
    such as video adapter are not available to be disabled.
    Tracy Cai
    TechNet Community Support

  • Help!- ipad was disconnected when updating software...now it won't recognize the ipad and can't complete a restore.It can't recognize the serial # or name,etc..

    i was updating my ipad to the new ios software. the cable got disconnected just as it was completing the update. when it connected again it said i need to restore it. Once going thru the restore process, it said that Itunes can't recognize the ipad. one note, the ipad shows on my itunes as a "IPAD" and no name, serial #, etc...  The ipad has a symbol on it telling me to connect to itunes

    A System Reset cures many ills.  It's easy, quick and harmless:
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.
    A System Reset does not remove any apps, music, movies, etc. nor does it cause any settings to revert back to default.
    Also, you might wish to download the iPad-2 User Guide.  Pay special attention to page 162.  Note that this Guide also applies to the iPad-1 with IOS 4.3 except for those functions that are not supported by the hardware.
    http://support.apple.com/manuals/#ipad
    Finally,  the User Guide can be downloaded at no charge via iBooks and a less   comprehensive version of the Guide is included as a Safari bookmark.

  • Can I use the LCDS for... ?

    Hi,
    I'm a beginner in LCDS.
    I have a MySQL database for my ordering system. In this database there is a user table and there are some other tables. These tables use foreign keys of user.id. People can register on my sytem (+1 row in a user table). I communicate throught web services in my mobile application. People can see only their own rows (own orders) (it is defined by the user.id).
    I would like to improve my mob.app. with offline, sync, and real time changings features.
    Can I use the LCDS for my system?
    Thanks

    +information:
    Server: Apache Tomcat 7
    Web Services: Java WS, and it is protected with Custom Basic Authentication. The session contains user.id after the successful authentication.

  • Where can I get the driver for my HP DE8A4L external USB CD/DVD drive?

    Where can I get the driver for my HP DE8A4L external USB CD/DVD drive? 
    On the label it says, Model HSTNN-PD06-91
    and
    HP PN: 518819-001 Rev.B
    I've had my Mini 110-1000 running our music system for a couple of years, no complaints.  When I wanted a CD/DVD drive, I purchased a DE8A4L external USB drive directly from HP.  It didn't come with a driver disc.  When I plug it in, the USB subsystem does not enable it.  Device Manager shows a yellow exclamation point, saying, "Windows cannot load the device driver for this hardware..."   It is running Windows XP Home Edition SP3.
    What gives with this device?

    Following up on tactic 2) above, I upgraded the BIOS from version F07 to the latest version available on the HP download site, version F19.  This went well, but unfortunately the system still does not recognize the device.
    When I try to Device Manager, and select the DE8A4L DVD device, and try "search for a device driver", it says it cannot find a better match for the driver already installed.
    This Mini 110-1000 only came with 1 Gb RAM, and Windows XP Home.   Is one of these a critical limitation for running an external USB DVD drive?

  • Where can I download the driver for Satellite A200-121?

    Hello Team,
    I need assistance. Where can i download the driver for my laptop?
    Model Name: Satellite A200-121
    Model No: PSAE0E
    Appreciate your help. Thank you!

    > I tried following the steps in all forums but my wireless LAN is not being recognize.
    What does this mean exactly? Is Wlan card visible in device manager under Network Adapters? Can you see an unknown device or an Ethernet controller beside the LAN card?
    From my knowledge the notebook supports the Intel 3945ABG WLan card
    Did you install the Intel WLan driver for this Wlan card?

  • Can't install the software for the HP Photosmart

    I'm tryin g to install a network printer , The printer is on the network but when I try to add it to my printerer i get the following message
    Can't install the software for the HP Photosmart Plus B209a-m because it is not currently available from the Software Update server.

    I followed another thread  and recieved this advice
    That means you go here:
    http://support.apple.com/kb/DL907?viewlocale=en_US&locale=en_US
    to get the latest HP drivers.
    Once I installed the drivers and SHUT DOWN the computer and printer it finally recognize the printer. I had no luck installing the drivers until I restarted the computer

Maybe you are looking for