Setting CLASSPATH question

Hi,
          I'm evaluating Weblogic 5.1. My evaluation requires me to write an
          Enterprise Java Bean that uses Container Managed Persistence, place it on a
          server, and have an HTML page call into the EJB through a servlet. The
          servlet is also sitting on the server. I've managed to prove that this
          works within the confines of Visual Cafe EE, but cannot make it work
          independantly.
          I've set my HTML page to have a link to the servlet I need to hit
          (http://Local IP:7001/ServletName). The EJB is properly deployed. The
          servlet is registered in weblogic.properties. But when I hit my link, it
          returns a "10.5.1.500 Internal Server Error". And the server throws a
          ServletException which tells me that "Servlet class:
          weblogic.servlet.ServletName could not be loaded - the requested class
          wasn't found in classpath."
          "weblogic.servlet.ServletName" is my location on the server. I've
          registered that location in my wl.props and it shows on the server. I'm
          running Win2K and have the location of my EJB and location of the servlet in
          both the User CLASSPATH and the System CLASSPATH.
          Can anyone help me out? Where can I find the exact meaning of error
          "10.5.1.500 Internal Server Error"?
          Feel free to contact me at [email protected] or directly at 303-987-3499
          ext-35.
          Thanks, 'Soli
          

[email protected] (Chris Basoli) wrote in
          <[email protected]>:
          >Hi,
          >"weblogic.servlet.ServletName" is my location on the server. I've
          >registered that location in my wl.props and it shows on the server. I'm
          >running Win2K and have the location of my EJB and location of the
          >servlet in both the User CLASSPATH and the System CLASSPATH.
          I'm having a little trouble understanding "my location on the server". The
          registration is for associating names with classfiles. Thus, in order for
          what it seems like you're saying here to work, you'd need (assuming a
          default installation of WLS):
          in weblogic.properties:
          weblogic.httpd.servlet.classpath=c:/weblogic/myserver/servletclasses
          weblogic.httpd.register.ServletName=weblogic.servlet.ServletName
          on the filesystem:
          c:\weblogic\myserver\servletclasses\weblogic\servlet\ServletName.class
          >
          >Can anyone help me out? Where can I find the exact meaning of error
          >"10.5.1.500 Internal Server Error"?
          From this error, I can determine that you do have the register part of the
          properties file properly set up. Either the class file is not there (see
          filesystem statement) or it does not have the proper package statement.
          The error is actually "500 Internal Server Error". The 10.5.1 might be a
          documentation reference (Cameron? BEA?), but the 500 error is sufficient.
          It means the web server you're talking to had a processing error that it
          couldn't recover from and thus could not return the response you requested.
          You'll usually get in in servlet failures, or app server failures.
          Jesse
          

Similar Messages

  • To set classpath or unset classpath? That is the question

    I notice that Sun application examples make a point of unsetting the classpath when starting rmiregistry. In Windows they suggest the command:
    unset CLASSPATH
    but I have found that I get the response:
    Bad command or file name
    Any suggestions?
    However, having said this, I have found it advantageous to having the classpath set when I start the rmiregistry for the following reason:
    When I try this sequence of commands, things seem to work pretty simply:
    set classpath=c:\javaWork\project
    start rmiregistry
    java Server
    However, if I try it this way, the java command line has to be more complicated:
    start rmiregistry
    set classpath=c:\javaWork\project
    java -Djava.rmi.server.codebase=file:/c:/javaWork/project/ Server
    Is there any reason I shouldn't use the first way of going about it? Or a compelling reason for going for the second approach?
    Thanks, Rob

    Yes, and to reiterate daney's post ...regarding the question in your header... if the rmiregistry can find the classes in the classpath, it will make no attempt to download the stubs to your client. Since it sounds like you are supplying permanent stubs with your client, this will be of no concern to you. However, that is the explanation as to why you keep comimg accross this information in your sources. :-}

  • Help with setting classpath

    Hi All,
    I am new to servlets and JSP. I have a question regarding setting Classpath. My development directory structure is like this c:\..\desktop\java\project1\src\com\eg\web\e1.java. Servlet.jar file is in C:\Program Files\Apache Group\Tomcat 4.1\common\lib. I tried setting Classpath in windows 2000 using control panel=>System utility by this command
    SET CLASSPATH=.;c:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar . I try to compile my program by going into the whole development directory structure C:\..\src\com\eg\web using javac e1.java. But I get the error "package javax.servlet does not exist". Can somebody help me resolve this?
    Thank You in advance
    Jaya

    Question 1: Are you using an IDE?
    [IDEs ignore the system classpath]
    Question 2: Did you try setting the classpath using the -cp option for javac, if you are not using an IDE?
    [you could also try to print the classpath on command line to check if it has taken effect]

  • Setting classpath and creating packages

    Hi
    I am new to Java and my questions are basic.
    1)I am using the kawa IDE and i dont know how to create and use packages.
    2)Creating classpath to compile and run java programs from the Dos prompt.
    I would appreciate any help on these questions

    I'm not sure how to use KAWA.
    When it comes to classpaths, though, I would recommend not setting it as an environment variable - this tends to cause confusion if you work on more than one project at a time on your machine. Either set it locally or specify it directly on the command line.
    Often it's a good idea to write a batch file for compiling and executing your code:
    setlocal
    set PATH=c:\j2sdk-1.3
    set CLASSPATH=c:\jars\Servlet.jar
    javac MyClass.java
    endlocalHope this helps.

  • Setting classpath in Windows XP

    I have read numerous questions and replies pertaining to setting the classpath in Windows XP but have yet to find a clearcut answer. I have JDK 1.4 with the correct PATH set. Generally speaking, what do I type when setting up the CLASSPATH for windows XP? In addittion, what about jar files, libraries, and packages? Thanks

    CLASSPATH contents depend totally on what you establish as your Java environment.
    A classpath value tells Java to look "here" for the files that you create. (It knows where it's "own" files and jars are, we don't any longer have to tell it where to find them.)
    If no classpath variable is set. Java uses a default CLASSPATH of the current directory. Many people can run this way.
    If you set a classpath it cancels the default setting. Therefore, it's necessary to start it with a period, which represents the current directory. Use a semicolon to separate this and subsequent entries.
    Follow that with directory paths that point to directories that you want Java to search to find files and jars that you create or that applications need to use.
    If Java needs a file or jar and it can't find it in one of the classpath entries, it will complain with a "classpath not found" error.
    Here's my SET CLASSPATH statement:
    SET CLASSPATH=.;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_01lib\tools.jar;C:\mnrx;C:\NetRexx\NrxRedBk

  • Setting classpath within java application

    Hi
    Sorry if this question has already been asked, I've searched for it but couldn't find it.
    I've written a class (see below) that when given a directory will add all of the jar files to the classpath.
    The classpath is updated to include all of the jar files but if I try to use a class within one of these jar files then an exception is generated stating that the class can't be found.
    Can anyone help me with this problem? I thought that I would only need to update the classpath.
    Thanks,
    Rob
    public class Jar {
         public static void addJarsToClasspath(String root) {
              File f = new File(root);
              if (f.exists()) {
                   File[] jars = f.listFiles(new FilenameFilter(){
                        public boolean accept(File dir, String file) {
                             return ((String)dir.getName()+file).endsWith(".jar");
                   String classpath = System.getProperty("java.class.path");
                   for (int i=0; i<jars.length; i++) {
                             classpath = classpath.concat(":"+root+"/"+jars.getName());
                   System.setProperty("java.class.path",classpath);
                   System.out.println(System.getProperty("java.class.path"));

    You can do this with batch files in Windows NT/2000:
    1) create a batch file called "setcp.bat" containing the following:
    for %%i in (C:\myPath\*.jar) do call appendcp.bat %%i
    2) create another batch file called "appendcp.bat" containing the following:
    set CLASSPATH=%CLASSPATH%;%1
    Now you can run setcp.bat and it will add all JAR files in C:\myPath to your CLASSPATH.
    Jesper

  • Setting Classpath and Path on Windows ME

    Hi..How do I set up the classpath and path on windows ME. Do I use DOS or run the autoexec.bat from windows directly. I have jdk1.3.1 abd my classpath and path are:
    set classpath="C:\jdk1.3.1\bin"
    set PATH=C:\windows\xxxx\;C:\jdk1.3.1\bin
    I sometimes can't compile my programs from other directories other than jdk1.3.1\bin. Why? Is there a way I can compile my program just from the C:\ directory like:
    C:\javac myprogram.java
    C:\java myprogram
    Thanks.

    If you put . in the beginning of your classpath, java always searches the folder you are currently in.
    Now to set the classpath try clicking from the startmenu:
    settings/control panel/system. Then click advanced tab and then the Enviroment variables. I'm on win2000 but I think it should be the same on ME.
    Make sure it starts with .;C:\jdk1.3.1\bin;....
    I think installing jdk puts in the essentials, but if you have certain folders you store your classes in you can stick those in there as well.
    If you hava more questions about this, I suggest searching these forums on Keywords like : "set CLASSPATH PATH". Then you'll find a bunch of threads solving this problem.
    Sjur

  • Trouble Setting Classpath on Windows XP

    I'm having trouble setting up a classpath on Windows XP for SDK1.3.1_04.
    I've tried Control Panel\Advanced\Environment Variables\System Variables. There was a Path variable present, to which I've added:
    c:\jdk1.3.1_04\bin;
    There wasn't a Classpath variable present though. I've tried adding it myself in System Variables as follows:
    Variable name: Classpath
    Variable value: set classpath=.;
    But no joy. When I run "set" from the command prompt, there's no classpath present.
    I'd appreciate any help.
    Cheers.

    Hi,
    I am running on XP (unfortunately), but also win2000 and win98.
    Setting up the classpath is not a problem, although if you are logged in as root, then it does not always show correctly.
    Try logging back in as yourself and then checking the classpah through the set command.
    Altrnatively, if this is not the problem, actualy try a reboot. which should not be necessary.
    best
    kev

  • How to set classpath from java class ??

    I have tried to use System.setProperty("java.class.path", "my class path string ") to set classpath dynamically. But it is not working. How to set it dynamically from java class ?? Thanks , gary

    Look into the java.net.URLClassLoader. You can't set the classpath after the fact but you can specify URL's that will checked when you try to load a class with that loader.

  • Problems in setting classpath in vista

    i am using Xp pro and Vista.
    My issue is that I am not able to set classpath in vista.
    i want to set classpath so that I can compile and run programs from different folder other than default one in which java is installed.
    Please help.

    i am using Xp pro and Vista.
    My issue is that I am not able to set classpath in
    vista.
    Don't worry about it. The CLASSPATH variable is best avoided anyway. Specify classpaths for particular apps on the command-line. Teh Docs show you how
    i want to set classpath so that I can compile and run
    programs from different folder other than default one
    in which java is installed.
    Please help.This suggests you're talking about PATH rather than classpath. Do you understand the difference?

  • Setting Classpath in linux

    Hi !! Can anyone help me in setting classpath in linux to run servlets/? I tried using this command..but didnt work
    export CLASSPATH="$CLASSPATH:/usr/share/tomcat5/server/lib/servlets-common.jar"
    Thanks
    Nive

    in ur autoexec.bat file write the following
    set PATH=C:\jdk1.5.0_04\bin;%PATH%
    set JAVA_HOME=C:\jdk1.5.0_04
    set
    CLASSPATH=.;C:\jakarta-tomcat-5.5.9\common\lib\servlet
    -api.jar;C:\jakarta-tomcat-5.5.9\common\lib\jsp-api.ja
    r;C:\Servlets+JSP;..;..\..;C:\jakarta-struts-1.2.4\lib
    \struts.jarThis response is meaningless. Principally because the OP specifically mentioned the use of LINUX. Not Windows.
    I've taken the advice of other forum users by avoiding a system level classpath variable. I define the classpath each time I compile and run. Working on Linux I tend to use command line argument files ( http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#commandlineargfile ) which eliminates the need to redefine the classpath each time I compile or run my classes and apps. But others may do things differently.
    Here is a website you might want to check out which pertains to setting the classpath on Solaris and Linux.
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html

  • How to set classpath and server configuration in eclipse

    i am new to eclipse tool pls anyone tell me to set classpath and serverconfiguration (tomcat) and sample program

    Get WTP [1], install it [2] and checkout one of the lot Eclipse WTP tutorials [3].
    [1] http://www.eclipse.org/webtools/
    [2] http://ftp.osuosl.org/pub/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html
    [3] http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

  • Package does not exist even though I set classpath right!

    Hi, my JSP got an error message saying "Package does not exist" at line
    <% import ="org.jfreechart.*"%>
    And I have put the myjar.jar file containing the above classes into blabla\WEB-INF\classes,(where blabla is my current working directory) and set my classpath= blabla\WEB-INF\classes
    It does not either if set classpath= blabla\WEB-INF\classes\myjar.jar
    Anybody could give suggestion? By the way I am using Tomcat.

    your .jar files should be in WEB-INF/lib

  • Code that handles a set of questions from database and place it on JSP

    Hi,
    How to write a code that handles a set of Quiz questions from database and place it on JSP page..
    Thanks in advance
    Haritha

    975033 wrote:
    Hi,
    I hav got the answer from you r previous link, but not completly. I need help regarding on how to do code that handles a set of questions from database and place it on JSP.
    Any help is highly appreciated.Yes but what kind of help do you expect to get? What kind of help do you think is possible through something as cold and distant as a forum, where you clearly require personal guidance and tutoring?
    If you are going to answer "example code", I should warn you that the answers are not going to be to your liking.

  • How to create yes or no radiogroup dynamically for a set of questions

    hi,
    I am new to APEX.Depending upon my project requirement I need to create a set of questions with yes or no as radiogroup buttons,appended with a textarea for each question.For ex:
    1.Name o Y o N [ "text area"]
    The above line specifies the model I need.
    Here text area is used for writing comments.
    Now the question is how can I create them dynamically using apex_item.
    Its very urgent.Kindly reply me soon.
    Thanks in advance.

    Thanks for ur quick reply.
    But what actually I need is,I need to create the radiobuttons also dynamically.
    I have created them by the following syntax,
    select ename,apex_item.radiogroup(eno,'y' ) yes,apex_item.radiogroup(eno,'N')
    from emp;
    but the problem with this is ,
    when I inserted yes for the first one it is taking and if i am giving the second one also as YES then it is not accepting ..means it is checking the second item by clearing the first one.
    What I need is when I check the second one the first one should not get cleared.
    Thanks in advance.

Maybe you are looking for

  • Ever since upgrading to lion my wifi has been dropping out constantly is apple going to fix this?

    Ever since upgrading to lion my wifi has been dropping out constantly is apple going to fix this?

  • No suitable driver when using MySQL in J2EE server

    Hi everyone I use MySQL's mm driver version 2.0.11 in conjuction with j2ee server. I added it thru deploytool->Tools->Server configuration->Data source->Standard following the instuctions in the help document, either un-jared or not, setting the clas

  • OWSM Gateway Implementation Problem

    Hi , I m trying to secure my web service using Oracle Web Service Manager.Gateway is what i tried to implement.The same example as given in the guide works well. But when i implement it on my wsdl The following error is reported. The document 'http:/

  • Third Party Vendor - Start Up

    We are starting to use third party vendors and payroll has been running for a year. Is there a way to pay 2009 first quarter taxes using third party vendors without payting the benefit vendors, other vendors, or garnishment vendors?  I tried to run t

  • Help, ibook not booting after installing update 10.4.8 combo

    Hi there, i just updated my ibook 500 dual usb, with 10.4.8 combo and when i restarted the screen was gray with a flashing question mark. I tried to boot in every mode (with x, with startup manager) and also i checked with disk warrior and disk utili