How to set classpath for classes in war files

Hi All,
After deploying the WAR file I could access the JSP files but gives classnotfound exception when the information is expected from the java servlet.DO I need to set the classpath if yes how to do for the war file.
thanks

The web.xml,file structure and error is below let me know if more information is required.
As you said weblogic is looking for the classes in lib directory inspite of having the classes in web-inf/classes directory.
web-app>
<servlet>
<servlet-name>ControllerServlet</servlet-name>
<servlet-class>com.test.site.pds.Controller</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ControllerServlet</servlet-name>
<url-pattern>/controller</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
File Structure:
C:\test\PDSWebApp\WEB-INF\classes\com\test\site\pds\*.class
PDSWebApp
     css
     html
     images
     javascript
     jsp
     WEB-INF
     classes
     com/test/site/pds/*.java
     lib
     servlets
The error:
javax.servlet.ServletException: [HTTP:101249][ServletContext(id=18129862,name=PdsApp,context-path=/PdsApp)]: Servlet class com.test.site.pds.Controller for servlet ControllerServlet could not be loaded because the requested class was not found in the classpath C:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\PdsApp.war;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\classes12.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-beanutils.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-collections-2.1.1.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-lang-2.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\displaytag-1.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\jstl.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\standard.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\_wl_cls_gen.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp.
java.lang.ClassNotFoundException: com.test.site.pds.Controller.

Similar Messages

  • How to set Classpath for MySQL

    Hi
    I want to connect to my mySQL db with a java program , but I don't know how to install the mySQL connector driver. Can anyone help me? or indicate somewhere where I might find the answer?
    And how to set Classpath for MySQL.
    my program gives an exception ClassNotFound.
    Exception :com.mysql.jdbc.Driver
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at Files.main(Files.java:352)
    Plz help me
    Thanx
    Lalit

    to make your life easy i tried to connect..
    what you have to do is.. you mysql database server should be running
    next you have to download one of the version of mysql driver.. i downloaded mysql-connector-java-5.0.5
    go to my computer right click - >advance tab -> click on environment variable -> put you path e.g. C:\Program Files\Java\jarFiles\mysql-connector-java-5.0.5\mysql-connector-java-5.0.5-bin.jar
    into your classpath in a user variable section..
    Try this code
    import java.sql.*;
    public class MySqlConnect{
         public static void main(String [] args){
              try{
                   Class.forName("com.mysql.jdbc.Driver");
                   String url ="jdbc:mysql://localhost:3306/test";
                   Connection con =DriverManager.getConnection(url,"root", "password");
                   System.out.println("Connection: " + con);
              }catch(ClassNotFoundException cnfe){
                   cnfe.printStackTrace();
              }catch(SQLException se){
                   se.printStackTrace();
    }have fun
    Gurnah

  • How to set classpath for J2ME

    how to set class path for j2me. I downloaded J2ME Wireless tool kit. And set the classpath "set classpath=c:\J2mewtk\lib\midpapi.zip;.;". but i could compile java file. .how to set.
    With regards
    Santhosh

    When you are downloading j2MEWTK, everything is included within it. You dont require MIDP seperately. When you are runnung the ktoolbar , which is provided with J2mewtk, the preverifier runs and creates the required jad file for you. You dont need a forte to run these.
    If you want to download MIDP seperately, that also is possible. Then you have to go for command line arguments. Please refer to Sun's MIDP page for details.
    Let me know, if you face any further problem

  • How to set classpath for third party jdbc-driver

    my application contains bc4j jsp. when i try to run this jsp application which connect to postgresql, i get a error message
    "Application Error
    Return
    Error Message: JBO-30003: The application pool (App_ModLocal) failed to checkout an application module due to the following
    exception:
    Error Message: JBO-26061: Error while opening JDBC connection."
    how to solve this.

    The JDBC for your database should be added to your client project.
    In JDeveloper created a new 'named' library item and specify the JDBC jar files for your database.
    See also related article
    http://otn.oracle.com/products/jdev/howtos/bc4j/bc_pdb2walkthrough.html#edit
    - Sathish

  • In UNIX how to set classpath

    I know nothing about UNIX. pls kindly give me some instruction on how to set classpath in UNIX, thanks!

    best way is to set in your .profile (name differs between different shells, but whatever the OS/Shell is, it should starts with . and has a 'profile' string in the name). Try ls -a to find the file, edit it, insert lines like this:
    CLASSPATH=xxxx
    export CLASSPATH
    Use : to seperate different path/files.
    then every time when you log in, the classpath is setted.
    if you already logged in, use the above lines in command line, but it only set class path of the current shell/console.
    anyway, you should learn Unix before you do anything, or you'll have more trouble. do a search in yahoo or google to find on line tuturials, and SUN's Java tuturial has some basic instructions on how to use Java in Unix.

  • How to set an actionscript class runnable + some question?

    Dear all,
      i am new to actionscript (Flex 3).
      i am from java camp and i want to achive some java-style functionality in actionscript,and hope you can help me:
      1. how to set an actionscript class runnable??
          in java, i just add a "public static void main(String[] args)" method which will be the program entry point. (IDE, right click the class and click run)
          i can't set a plain, ordinary actionscript runnable in flex builder.
          To test the class, i have to create an mxml (which in turn invoke the testing class) and it be runnable in the flex builder 3.
          any other way to ease the testing?
       2. it there any good 3rd party library for datatype conversion ? (e.g. string <> date, the build-in DateFormatter don't accept milliseconds)...
           it seems actionscript come with limited such kind of utility function
       3. in a custom mxml component, which contains several controls (say testboxes, comboboxes)...etc,
           for information hiding/prevent others to change the child controls in the custom component, how can i hide the child control, not allow
           other code to access the child by  "Component.textbox1"....any scope modifier, e.g. protected, private...etc in mxml?
       thank you.
    ppk luk

    Hi Alex,
      for question 3:
      i just wondering if it is ok or not for better code/validation.....(and it follow the good
    information hiding principle?)
      if i write the component in actionscript only, i can set the child control with scope modifier
    'private' or 'protected'..so that the component user can't just use the dot syntax to gain
    access to the child control,
    e.g. MyComponent.childControlTextInputBox.value = "A";...
    i want to force user to use MyComponent.setInputBoxValue("A")...
    (e.g. in this method, i can do some checking/validate before passing to the textbox)
      this can enforce the data consistency in my custom UI component...
      there is no way to achieve the same effect in MXML?
    (e..g <mx:TextInput id="privateChildControl" accessScope="private" .../>)
      thank you..

  • How to set value for selectOneChoice

    Hello,
    How to set value for selectOneChoice defined as:
    <af:selectOneChoice label="Label" id="soc1" binding="#{DepositorMergingBean.socSurnameComponent}">
    <f:selectItems id="si1" value="#{DepositorMergingBean.socSurnames}"/>
    </af:selectOneChoice>
    where socSurnames is List<SelectItem> - manually filled list of SelectItem(SomeObject, (String)text_description), so - SOC is filled manually (no binded iterators, etc..)
    Neither socSurnameComponent.setValue( new Integer(0) ) nor socSurnameComponent.setValue( socSurnames.get(0) ) do not help.
    Thanks in advance.

    this.selectOneChoice.setValue(selectItems.get(2).getValue());Try as per the following sample:
    SelectOneChoiceTest.JSPX:
    <af:form id="f1">
    <af:selectOneChoice label="Select One Choice" id="soc1"
    binding="#{SelectOneChoiceTestBean.selectOneChoice}">
    <f:selectItems value="#{SelectOneChoiceTestBean.selectItems}"
    id="si1"/>
    </af:selectOneChoice>
    <af:commandButton text="Set Selected Value" id="cb1"
    actionListener="#{SelectOneChoiceTestBean.onClick}"/>
    </af:form>
    SelectOneChoiceTestBean.java:
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class SelectOneChoiceTestBean {
    private RichSelectOneChoice selectOneChoice;
    public SelectOneChoiceTestBean() {
    super();
    private List<SelectItem> selectItems;
    public void setSelectItems(List<SelectItem> selectItems) {
    this.selectItems = selectItems;
    public List<SelectItem> getSelectItems() {
    selectItems = new ArrayList<SelectItem>();
    selectItems.add(new SelectItem("One", "One"));
    selectItems.add(new SelectItem("Two", "Two"));
    selectItems.add(new SelectItem("Three", "Three"));
    return selectItems;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    public void onClick(ActionEvent actionEvent) {
    this.selectOneChoice.setValue(selectItems.get(2).getValue());
    Thanks,
    Navaneeth

  • Set classpath for java in fedora core 1?

    i am new to programming java on linux and im having trouble finding out how to set classpath in the shell, permenently. i have the sdk installed and tried the usual "hello world" test and failed. the response i would get a message telling me javac is not a bash command. i have no clue how to set classpaths in linux so i would much appreciate it if someone would show me thanks

    Ok, there is two ways to achieve this. Either by setting it globally for all the user, or only for your self. If you are working on your own station and have super user access, you can set it up for all th eusers, if not, just set it for your self. How ??
    for all the users, modify the file /etc/profile and include this:
    PATH=$PATH:/path/to/jdk/bin:.
    CLASSPATH=$CLASSPATH:/path/to/jdk/lib/tools.jar:/path/to/jdk/lib/rt.jar
    export PATH CLASSPATH
    If you want to add it only for ur self then, modify the lsame line in ~/.bash_profile
    hope this helps

  • How to set View for Completed items inside Tasks?

    How to set button for 'View' and see Completed items or not completed inside Tasks?

    Hi,
    You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
    Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
    tasks; Click Active button to view incomplete tasks.
    In Outlook 2007, just click View > Current View to switch between different views.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set  password for BPEL domain

    Hi,
    I am new to SOA.
    I want to setup client-server environment for few developers.
    I installed SOA 10.1.3.3 in the server machine.
    And I created few domains in BPEL, one for each developer.
    It didn't ask me to set the password while creation of the domain.
    Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
    Thanks!!!

    Thanks for the prompt response.
    What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
    And I would like to know how to set the password for a BPEL domain too.
    Message was edited by:
    user644377

  • How to set password for a zip file?

    I am able to add files to a zip file using java.util.zip.ZipOutputStream. I'd like to set password for the generated zip file, but could not find any relevant API in JDK doc.
    How to do that in Java? Maybe using a third party library?
    Any suggestions are welcome.
    Thanks.

    Thanks bro, I am looking at the Zip4J :) one of its feature is "Read/Write password protected Zip files" :)

  • How to set password for every application

    Hi,
    As a administrator how to set password for every weblication in sharepoint 2013.
    Is there any way to set?
    Thanks,

    Who's password are you trying to set? Please provide more details.

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

Maybe you are looking for

  • A workflow (and the limits of the 'module' concept?)

    Often, choices regarding the best shots (when shooting in difficult conditions, e.g. contre-jour) are determined by which picture better supports adjustments. You might want to check if you get better results by lightening the shadows on picture A or

  • Itunes crashes playing mp4 version 11.1.4.62

    I imported an mp4 into itunes,  Itunes seemed to import fine, but whenever I attemt to play it crashes,  Quicktime can play fine.  Can I use itunes to convert to another format that it likes better?  any ideas?  Thanks. 

  • Ayuda, el video digitalizado aparece con la pantalla partida.

    Resulta que estoy trabajando con Premier Pro 2.0, a la hora que comenze a digitalizar mi material me di cuenta que el video aparecía con la pantalla ...partida. Es decir: Tomando como referencia el centro de la pantalla, del lado izquierdo me aparece

  • Mac CS3 Bridge - Keywords subfolders -unableable to create

    I just reinstalled my CS3 Photoshop/ Bridge  on my iMac computer. Had to replace the hard drive.  I  open bridge  to add keywords for images . However when I want to add a subfolder(s) to the top level keywords folder it will not give me the option t

  • SAP BO Universe Creation - No Metadata

    I have SAP 7.0 and BOXI Rel 2 with the 640 gui. In Designer when I log on as administrator with the u201Centerpriseu201D pulldown and try to create a universe I get: [BusinessObjects115.OLAPI.Cube.1] : Error getting dimensions for cube 0D_PU_C01/0D_P