Setting the classpath of classes12.zip for Tomcat
Hi
I am using Apache Tomcat webserver and while trying to run a jsp page which intializes oracle.jdbc.driver.OracleDriver it throws an error
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Please suggest how to set the classpath of classes12.zip in Apache Tomcat
My Code Snippett
<%@ page import="java.util.*,java.sql.*,javax.servlet.*"%>
<body>
<%
Connection con ;
ResultSet rs ;
Statement stmt ;
ResultSetMetaData rsmd ;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(Exception e)
out.println(e);//print the exception on the command prompt
%>
The simplest way to do this is to copy classes12.zip to the WEB-INF/lib directory. The JSP should then find this automatically.
As a side note, that is an ancient JDBC driver - you might want to upgrade to something from this millennium.
Similar Messages
-
Where to set the classpath for custom classes in jsp
Hi,
we have created our custom classes in and ported in contentDB and that classes are internally using some jar files. Previously we have set the classpath of all the jar files provided in CDB devkit in the orion-web.xml but if are opening the explorer.jsp or any other jspx of contentDB we are getting the classcastexception and page is not opening.
Is there any problem in setting the classpath. Please if any one knows abt this, reply as soon as possible.
thanks,
swapna soni.I think it is Oracle 10g Release 2... since when I click the top OAS link in the Enterprise Manager Console, it took me to 'Enterprise Manager 10g Grid Control Release 2' this page.
And...10g Application Server Control Release 10.1.2.0.1, I think 2.0.1 means Release 2.
Thanks and let me know if you need something else. -
How to set the classpath for external .jar files after importing?
Hi techs,
How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
urgentI got it.
after importing the jar file to the perspective,we need to right click on project name, go to proprties,
goto java build path,
there we need to include the external jar files. -
How to set the classpath in windows operating system
hi,
how to set the classpath in window operating system
i want this help for setting the classpath for the tomcat
please help me
thank you
darshan soniOpen autoexec.bat in texteditor. This is an example from my autoexec, win me. Running resin
SET CLASSPATH=c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;C:\Program\MtsAndreas -
Help, how to install jvm and set the classpath using a batch file
hello,
i have created my java application and now have to create an installable / batch file which will install the JVM on the users machine and also the java packages such as javamail and the class files that i have created . it also has to set the classpath.
i would like to know if anyone can tell me how to go about iti.e. how can i install the JVM using a batch file and then place the javamial packages etc in the apropriate directory .
or is it advisable to explain it to the user how to go about it in tht user manual.
and would also like to know that if i install the JVM will the path for the java.exe be set
or will i have to set the path explicitly from the "batch file" so that the user can run the application without and problem just by running the java command followed by filename from the command prompt.hi,
I have windows and I use it.
The only problem with the free edition is that you can only create 1 launcher and that during the installation you get 1 popup showing that the installer was created with an unregistered version.
Stijn -
How to set the CLASSPATH in Unix Server
Hi, everyone~
Do anyone noe how to set the CLASSPATH in the hp-ux server? I tried the setenv CLASSPATH, but not working.. I think should use export. But my jsp pages still cannot working, dunnoe y?
I wonder is the hp-ux support jsp and servlet or not?
In order to let the jsp and servlet to run properly in the unix server, what kinds of steps should taken ?
Hope somemore who experience with this situation b4 can give me some guidance.. Thanks~~
regards,
tzeyikTomcat ignores any and all CLASSPATH environment variables. Even if you could figure out how to set it, Tomcat wouldn't use it.
Better to learn how Tomcat's CLASSPATH works and how to deploy Web apps properly. - MOD -
How to set the classpath and path from the jsp to call java class function
Hi Exprets,
I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
If any one know how to achieve it, please reply as soon as possible.
thanks in advance,
swapna soni.It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
1. How costly is the query retrieving the data from the database?
If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
2. Are there chances for the data to become stale within a session?
In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
3. How many data sets does the session already holds?
If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
4. Does the server employ some kind of caching mechanism?
Using session cache can definitely improve performance.
You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
Thanks,
Shakti -
Java newbie questions...Setting the classpath in Unix
When you set the classpath, how do you include anything already in the classpath? For instance, if your profile sets your classpath to
"/home/weblogic/:home/weblogic/weblogic.jar, and you want to add MyJar.jar to it, can you enter:
export classpath=~:MyJar.jar
My question really boils down to how do you prefix the existing CLASSPATH environment variable to any new classes or jars you want to add to it. I think it's the tilde, but I'm not sure.In csh, the CLASSPATH environment variable is modified with the setenv command. The format is:
setenv CLASSPATH path1:path2
In sh, the CLASSPATH environment variable can be modified with these commands:
CLASSPATH = path1:path2:...
export CLASSPATH
====
(From the Sun documentation)
or, in sh,
export CLASSPATH=path1:path2
should work -
How to set the classpath in CVM?
Hi everybody,
experimenting with the J2ME Personal Profile Runtime Environment on a Linux PC I wonder how to set the classpath. The command line options only allow me to set the bootclasspath.
My original problems deals with determining the codebase for a class that is contained in a jar.
1) If I put this jar into the bootclasspath, that class is found and can be loaded, but the codebase (retrieved using class.getProtectionDomain().getCodeSource) is NULL.
2) If I put it into the classpath by using the command line option -Djava.class.path=... the class cannot be found by the ClassLoader.
3) If I put the jar into both, the classpath and the bootclasspath, the latter one is applied and result 1) shows up.
Any idea how to work around this?@see http://forum.java.sun.com/thread.jsp?forum=8&thread=410868
-
doing a jsp page which calls for:
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="sun.jdbc.rowset.*" %>
<%@ page import="java.util.*;" %>
at the top of the page , so i downloaded the jar files that i needed and set the classpath to:
C:\jdk1.3.1_01\rowset.jar;C:\jdk1.3.1_01\jdbc2_0-stdext.jar;C:\jdk1.3.1_01\jndi
this is the first time ive set the classpath
but when i run the page i get loads of Error: Could not find package named:
anyone no what im doing wrong?When you say you "set the classpath", does that mean that you changed the system CLASSPATH environment variable, or that you went into the configuration of whatever it is that's running your JSPs and put those jars and directories into the appropriate place?
-
Setting the CLASSPATH from the JVM by a class
Hy experts
I have an application thats searching a jar file and have to access classes from this jar file.
There are two ways to do this:
1.
Loading the jar file byte by byte and create the classes to load them into memory. This is the hard way.
2.
Setting the CLASSPATH variable in the running program! Thats the easy way! May how does it works?
Is there any possiblity to set the classpath in a running application or only in the shell?
Thanks for help
konradthe classpath is readin when you run the JVM ie issue the 'java' command, the environment cant be altered to update a new classpath. However, why not just put the files you wish to load at runtime within the current classpath you've setup. If you use the System.loadLibrary(), you should be able to pick up the classes you wish to readin at run time via this approach.
good luck
rob -
How to set the classpath on OS X 10.6
I am trying to build a web site (first time from mac) I have written a java swing applet in eclipse which works great when run from inside eclipse - however, when I run it from Safari or Firefox via .html doc the applet isn't displayed - I don't get an error message it just doesn't display. I have been able to run other applets this way but this one uses swing and I think it isn't able to find the classes.jar file. I believe if I can set the classpath to point to the classes.jar it should then work or perhaps I am way off base. Any other suggestions or how can I set classpath. I tried echo $CLASSPATH but it appears it isn't set with the exception of perhaps the default as no path is displayed. I really need to get this going as it is holding up the release of its counter part iPhone app.
thanks,
PMAIt's possible, then, that the computers running Snow Leopard have a software problem. I would start by reinstalling Snow Leopard on them.
Reinstall OS X without erasing the drive
1. Repair the Hard Drive and Permissions
Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
2. Reinstall Snow Leopard
If the drive is OK then quit DU and return to the installer. Proceed with reinstalling OS X. Note that the Snow Leopard installer will not erase your drive or disturb your files. After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
Download and install Mac OS X 10.6.8 Update Combo v1.1. -
I am unable to set the classpath from unix shell script
) I am new to java, provide me the solution to my problem, as it is urgent
I am unable to execute shell script on unix machine, the code is given below:
Basically it is not setting the classpath
dbUpload .java is astand alone java program to retrieve the report instance statistics from crystal server
Created a jar file from dbUpload.java as
Jar �cvf dbUpload.jar dbUpload.class
Here is mycode(script.sh)
CLASSPATH=/u01/CrystalList/cecore.jar:${CLASSPATH}:
CLASSPATH=${CLASSPATH}:/u01/CrystalList/cereports.jar:
CLASSPATH=${CLASSPATH}:/u01/CrystalList/dbUpload.jar:
Export CLASSPATH
Echo ${CLASSPATH}
Java dbUploadvenkat123,
if the code you posted is the original code of your script - it has some misspellings. Please try this one - it works for me both on solaris and linux.
#! /bin/bash
CLASSPATH=/u01/CrystalList/cecore.jar:$CLASSPATH
CLASSPATH=$CLASSPATH:/u01/CrystalList/cereports.jar
CLASSPATH=$CLASSPATH:/u01/CrystalList/dbUpload.jar
export CLASSPATH
echo $CLASSPATH
java dbUpload -
Does weblogic.Deployer set the CLASSPATH?
Hi,
I need to deploy an application with the weblogicDeployer utility. Does it automatically
set the CLASSPATH, as is done with the Admin console? Or do I need to set the
CLASSPATH explicitly?
Thanks,
-Amiah. weblogic.Deployer and the console use the same underlying API to
our Deployment subsystem. There shouldn't be any difference in
application behavior (eg classpath).
-- Rob
Ami wrote:
Hi Rob,
When I use the Admin console to deploy a web app, the CLASSPATH for the application
is set automatically. If I use weblogic.Deployer does that also automatically
set the CLASSPATH for the application?
-Ami
Rob Woollen <[email protected]> wrote:
Not sure I understand the question. weblogic.Deployer is a class in
the
weblogic.jar, so weblogic.jar has to be in your classpath to run java
weblogic.Deployer ...
-- Rob -
Setting the Classpath of a VM launched using JDI
I using VirtualMachineManager to get a LauchingConnector and fire off a new VM.
It seems that there should be some way of me setting the classpath for this new VM.
In general I'd like a list of the options that I can put in that argument map.In J2SE 5.0, jdb has a new option that will list the available connectors and the arguments that can be passed to them EG:
jdb -listconnectors
Available connectors are:
Connector: com.sun.jdi.CommandLineLaunch Transport: dt_socket
description: Launches target using Sun Java VM command line and attaches to it
Argument: home Default value: /net/foo/p/jdk/1.5.0/jre
description: Home directory of the SDK or runtime environment used to launch the application
Argument: options (no default)
description: Launched VM options
Required Argument: main (no default)
description: Main class and arguments, or if -jar is an option, the main jar file and arguments
Argument: suspend Default value: true
description: All threads will be suspended before execution of main
Required Argument: quote Default value: "
description: Character used to combine space-delimited text into a single command line argument
Required Argument: vmexec Default value: java
description: Name of the Java VM launcher
This means that you would want to put "-classpath ......" into the 'options' argument.
Hope this helps
Maybe you are looking for
-
How to display error message ??
Hi, I have a BDC program to upload data from an excel sheet. I could see that some records of data fail to pass and hence after my bdc run i would like to display error message for the failed records as follows: costcenter: cost element: fiscal year:
-
SAP HR Technical Accounts related to payroll posting.
Hi experts, I have a doubt in Assign Technical Accounts related to payroll posting. Menu Path IMG -> Payroll SG -> Reporting for Posting Payroll Results to Accounting -> Activities in the AC System -> Assigning Accounts -> Assign Technical Accounts A
-
BizTalk 2013 SFTP Adapter : Host Instance configured for SFTP Receive cause high CPU usage
Hi, Our BizTalk 2013 Server test env have 16 GB RAM. We have one SFTP Receive Location which is using a dedicated Host instance for SFTP receive. As soon as we start this SFTP Host Instance it starts consuming 50-60% CPU. (Even when it is not handli
-
I'm currently using a pc running windows xp which is no longer supported. how can I easily move my iTunes library to a PC running Windows 8.1
-
LaserJet 1320 not being recognized, really strange
Hello all, I'm having a really strange problem that I think is mostly my fault. I just recieved a LaserJet 1320, and when I first hooked it up everything worked fine. However, I couldn't figure out how to do duplex printing, so I installed HP's Toolb