Java.lang.NoClassDefFoundError: jxl/write/WritableCell
Hello
Im using jxl.jar in my project for generating excel sheet
We are using web sphere server , I write the small code to generate the Excel
WritableWorkbook w = Workbook.createWorkbook(response.getOutputStream());
WritableSheet s = w.createSheet("Demo", 0);
s.addCell(new Label(0, 0, "Hello World"));
w.write();
w.close();
This code is generating Exception in web sphere
[08/09/30 21:10:12:796 JST] 00000066 WebApp E SRVE0026E: [サーブレット・エラー]-[action]: java.lang.NoClassDefFoundError: jxl/write/WritableCell
while same code in Tomcate working fine but getting exception in web sphere
Any one can help me
?
Thanks
Edited by: SainiAmit on Sep 30, 2008 5:45 AM
chk it
I can't see my view in new application
Webdynpro runtime problem
Similar Messages
-
Java.lang.NoClassDefFoundError: jxl/Workbook
Hi Friends,
I have created an DC application where i read data from excel.For this i have used jxl.jar.I have created External Library DC and add this jar to it.
Now i have added the External Library DC to the actual application.
I dont get any compilation error.But when i execute it im getting the following error.
java.lang.NoClassDefFoundError: jxl/Workbook
at test.com.wdp.InternalExceldataView.<init>(InternalExceldataView.java:121)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
Can any one help me to over come this error.
Regards
Divyahi,
check in vsual administrator in libraries with name poi jars.
other wise do one thing
create a new project of type j2ee servercomponent-->library
open server-provider.xml
give providername =sap.com
component name=poijars
display name=poijars
select jars tab-->add jxl.jar
right click on proj build library archive , deploy the sda file
now add library reference for your wd project =sap.com~poijars
Regards,
Naga -
Java.lang.NoClassDefFoundError: jxl/format/CellFormat
hi Experts,
i m trying Excel export and import functionality for this i m using jxl.jar ,but when i m deploying my application i m getting java.lang.NoClassDefFoundError: jxl/format/CellFormat
how to resolve this problem.Hi,
it depends whether you are using JDI or not. If you use JDI, you only have to create an External Library DC and add the jxl.jar per Drap&Drop in Navigation panel to the DC. Add the file also to the public part. In the Web Dynpro DC add the External Library DC as used DC and deploy both DCs on the server.
The only error you can make is to deploy the components using "Deploy new archive and run..." -> this command won't deploy the jar and you have the same result as now. You have do build & deploy it step-by-step (Development Component -> Build..., Development Component -> Deploy).
If you don't use JDI, perform like described by Lakshmi.
Regards,
Martin -
Working fine and then java.lang.NoClassDefFoundError out of nowhere?
Running Java 1.4.2 and Tomcat 5.0.25, both due to shared platform limitations...
I'm new to Java but managed write the JSP's I needed and they have been working beautifully. Then today, out of nowhere, I get the following in the log:
2007-02-06 22:00:20 StandardContext[/servlets-examples]SessionListener: contextDestroyed()
2007-02-06 22:00:20 StandardContext[/servlets-examples]ContextListener: contextDestroyed()
2007-02-06 22:00:22 StandardContext[/jsp-examples]SessionListener: contextDestroyed()
2007-02-06 22:00:22 StandardContext[/jsp-examples]ContextListener: contextDestroyed()
2007-02-06 22:00:35 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2007-02-06 22:00:35 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2007-02-06 22:00:35 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2007-02-06 22:00:35 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2007-02-06 22:00:35 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2007-02-06 22:00:37 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpClient
at org.apache.jsp.host.get_jsp._jspService(get_jsp.java:96)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
at java.lang.Thread.run(Thread.java:534)when I found the server, it seemed to be unresponsive to any http request I sent it. After a restart, all was functioning again just like before. The jar for org/apache/commons/httpclient/HttpClient is in my web_inf/lib dir as it always has been. It wouldn't have worked on restart if it wasn't.
So, the question is... is there some bug in the Tomcat and Java combination I've got that caused this? If not, then what happened? Should I up the logging level to warnings? Should I move the jars I'm using into the tomcat lib dir? Any help would be appreciated by this early java learner.
Thanks,
MacCould this be a situation where load played a factor? Just another thought I had...
-
Java.lang.NoClassDefFoundError when running the Junit method
Hi Friends
I am stuck in this typical Junit problem for a copule of days but still not able to find any solution for it.The problem is as below.
I have written Junit test case for 1 method that has been added in the session bean. the code is as below.
public void testfindResponses() {
ClientManager cMgr = null;
Collection retvalue= new ArrayList();
try {
System.out.println("Before");
cMgr = EJBHomeUtilities.getClientManagerHome().create();
System.out.println("After" + cMgr.toString());
// retvalue=cMgr.findSurveyResponses(clientPk,startTime,endTime);
}catch (RemoteException e) {
//logger.error(e.getMessage());
throw new EJBException(e.getMessage());
} catch (CreateException e) {
// logger.error(e.getMessage());
throw new EJBException(e.getMessage());
} finally {
EJBHomeUtilities.removeSessionBean(cMgr);
//return retvalue;
when i run this using the Junit consol;e on the eclipse i am getting
java.lang.NoClassDefFoundError
at sun.reflect.GeneratedSerializationConstructorAccessor35.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:120)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:37)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy0.create(Unknown Source)
at com.march.hth.test.client.ClientManagerBeanTest.testfindSurveyResponses(ClientManagerBeanTest.java:3918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
The remote reference that i get seems to not work atall.i tried to put debug statements to see if i am getting the remote reference,but the control seems to not go there itself.
The same method if i write for another session bean it is working fine without any errors.
Please let me know whats wrong here as i am stuck up with this issue for a long time .waiting for positive replies from your side.
Thanks & Regards
Vikram KI also came across this error . . . the exception message seemed to indicate a problem in the HTML file. In mine, I had the HEIGHT and WIDTH attributes set to 100% -- something that is nonsensical outside of a browser context. I changed those values to some number of pixels (800 and 600, say), and the exception did not reoccur. I suggest you try the same.
--john -
Hi,
I have an application jar file which is run from a .sh file.
The application uses ridc api to checkin a document on UCM.
I have placed jars for supporting the application on the folder where we have kept the application jar
also we have mentioned the supporting jar file names in the Manifest.mf file of the application jar.
The necessary jar files which we have placed are:
com.lnt.ucm.integrationutility.ucm.Client
log4j-1.2.16.jar
oracle.ucm.ridc-11.1.1.jar
poi-2.5.1.jar
commons-codec-1.2.jar
commons-httpclient-3.1.jar
commons-logging-1.0.4.jar
mail.jar
jxl-2.6.10.jar
com.bea.core.antlr.runtime_2.7.7.jar
com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar
jrf.jar
org.eclipse.persistence_1.1.0.0_2-1.jar
weblogic.jar
wlfullclient.jar
wseeclient.jar
jaxws-rt-2.1.4.jar
we are getting below exception when we run the jar from the .sh file.
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint
at weblogic.wsee.jaxws.spi.WLSProvider.<clinit>(WLSProvider.java:90)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:31)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
at javax.xml.ws.spi.Provider.provider(Provider.java:83)
at javax.xml.ws.Service.<init>(Service.java:56)
at com.abc.ucm.proxy.JDEUCMManagerService.<init>(JDEUCMManagerService.java:66)
at com.abc.ucm.integrationutility.ucm.Client.executeUtilty(Client.java:50)
at com.abc.ucm.integrationutility.ucm.Client.main(Client.java:540)
I'm not able to find any jar for weblogic/diagnostics/instrumentation/JoinPoint can you please tell me which jar needs to be added.
Regards,
Tejaswini L914897 wrote:
I encounter the similar error. Anyone knows how to fix it?By providing a configuration file which validates with the corresponding XSDs found in coherence.jar. Sorry, but can't point you to the specific issue without seeing the erroneous configuration file.
Best regards,
Robert -
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtException
Exception in thread "main"
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
I dont know why, but after 3 hours of processing I get this error. I encapsulated my main with try/catch but nothing is caught. Nor is there a traceback.
[gat@asus dist]$ java -Xdiag -XshowSettings:vm -Xint -jar jgps.RTI.jar localroads
VM settings:
Max. Heap Size (Estimated): 1.73G
Ergonomics Machine Class: server
Using VM: Java HotSpot(TM) 64-Bit Server VM
[gat@asus dist]$ java -version
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)I don't have any idea to offer on what the problem is. However, here are some suggestions:
Perhaps you can provide an example of your code and/or a more through description of what it does so someone might see something wrong with the code.
I assume you print out the entire stack trace using somthing like this, so you can get the entire stack trace:
} catch (Exception e) {
e.printStackTrace();
and not something like this:
System.out.println( e.getMessage());
You can also consider peppering your code with System.out.println() statements (or write to the log file) to get a better understanding of whats going on and where it crashes.
What is jgps.RTI.jar? Is that a jar file you created or a vendor jar file? If its a vendor jar file, you might research their web site on how to use it. -
Java.lang.NoClassDefFoundError: javax/mail/Service
Hi,
Happy New Year Everyone! Sadly, it's not that happy for me right now, I'm trying to write a mail app using JavaMail, but I'm getting a NoClassDefFoundError when I run the program.... The program compiles fine, it only crashes when I run the program. Does anyone have any ideas why that's happenning? I compile the program using javac -classpath .:mail.jar *.java and I'm working on a Unix Box. Any help anyone can provide is greatly appreciated!
The error message I received is pasted below (I left out the stack trace to make reading easier).
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: javax/mail/Service
[Stack Trace]
Thanks in Advance!
JuivetteRead the directions that came with the javamail API...it tells you the OTHER API you need. Also, word of advice....I un jar'd and re-jar'd all the classes from BOTH API's in one file...makes life easier.
-
Signed Applet gives "java.lang.NoClassDefFoundError" message
I am using a Signed Applet to access resources on the disk and as well as to write on to the disk.
My Applet class "Applet.class" is bundled along with other required jar files(SignedA.jar , SignedB.jar) into a single jar file "SignedApplet.jar". The external jar files have also been signed using the same key.
When I run this applet, it gives an error " java.lang.NoClassDefFoundError" for the classes that Applet.class tries to access in the external jar file SignedA.jar
Please helpYou need to set your classpath correctly. Search the forums for NoClassDefFoundError and you will find hundreds of posts on this topic. Many of them have answers explaining how to set your classpath.
-
ERROR: java/lang/NoClassDefFoundError. HELP!!!
Hi all, can any one tell me what's wrong with my program that runs fine in JavaONEStudio5, but i find following error message when i run it in WTK21:
Project "readWriteRights" loaded
Project settings saved
Building "readWriteRights"
Build complete
Running with storage root DefaultColorPhone
Uncaught exception java/lang/NoClassDefFoundError: ReadWriteRights.
Here is my simple program:
* readWriteRights.java
* A simple application program to read a text file
* and store it's content into a Record Store.
* the data is read from the Record Store for verification
* Created on 2004/4/8 2:29am
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import javax.microedition.rms.*;
import java.io.*;
public class readWriteRights extends MIDlet {
public readWriteRights() { } // constructor
public void startApp() throws MIDletStateChangeException {
String fileName = "origin.drm";
String field[] = new String [] {"","","","","","","",""}; // Total 8 constraints in the file
int i = 0;
// retrieve the contents of a resource file
System.out.println("Retrieving the resource file - readme.txt");
System.out.println("--------------------------------------------");
InputStream is = this.getClass().getResourceAsStream(fileName);
try {
if ( is != null ) {
int ch = is.read();
while ( ch != -1) {
// print out the contents of the readme file
System.out.print((char) ch);
// temp = (temp-10)*2; // decoding
if (ch == 10) { i++; } //skip it if the character is \n
else
field[i] += (char)ch;
if(i >= field.length)
{ ch = -1;}
else{ ch = is.read();}
is.close();
} catch (IOException e) {
System.out.println(e);
// Write to a record store
String rs_Name = "db1";
RecordStore rs = null;
try {
if ( exist(rs_Name) == true) {
RecordStore.deleteRecordStore(rs_Name);
} // check and delete existing Record Store
rs = RecordStore.openRecordStore(rs_Name,true);
System.out.println("Record Store "+rs_Name+" is opened.");
catch(Exception e){
System.out.println("Error: "+e.getMessage());
finally{
//* write records
for (int j = 0; j < field.length; j++)
byte[] rec = field[j].getBytes();
//close the record store
try {
rs.addRecord(rec,0,rec.length);
System.out.println((j+1) +" record is added to db1");
System.out.println("Record: "+field[j]);
catch (Exception e){System.out.println("Error: "+e.getMessage());}
System.out.println("Write reord completed.");
//* read records
try {
int len =50;
byte[] recData = new byte[len];
System.out.println("The data read from Record Store.");
for (int k=1; k <= rs.getNumRecords(); k++)
len = rs.getRecord(k, recData, 0);
System.out.println("Record #"+k+": "+new String(recData, 0, len));
System.out.println("---------------------------------------------------");
catch (Exception e){System.out.println("Error2: "+e.getMessage()); }
// * close record Store
try {
rs.closeRecordStore();
System.out.println("record store db1 is closed");
catch (Exception e){System.out.println("Error: "+e.getMessage());}
destroyApp(true);
notifyDestroyed();
* The method to check if the Record Store existed or not
public boolean exist(String recordStoreName) {
boolean existF=true;
RecordStore rs=null;
if(recordStoreName.length()>32) return false;
try {
rs=RecordStore.openRecordStore(recordStoreName,false);
catch(RecordStoreNotFoundException e) {existF=false;}
catch(Exception e){}
finally{
try{
rs.closeRecordStore();
}catch(Exception e){}
return existF;
} // end of check Record Store existance method
* Pause the MIDlet
public void pauseApp() { }
* Called by the framework before the application is unloaded
public void destroyApp(boolean unconditional) { }
}I doubt that the error is caused by " java.io.* " which is not included in MIDP so that my program cannot run in WTK21.. is that true?
if yes, what can I do with it because I have to run it in WTK21 for demonstration. thx!!!!! -
ChiliBean Control error '800a03e8' java.lang.NoClassDefFoundError
hi all,
http://forum.java.sun.com/thread.jspa?forumID=759&threadID=5019680
in reference to the post above, i have a Win2003 server running Sun ONE with Chilisoft ASP plug-in. i did the suggestions there but am still getting the same error, to be exact:
ChiliBean Control error '800a03e8'
java.lang.NoClassDefFoundError: MyHelloWorld
/myhelloworld.asp, line 3
<html>
<% Dim mhw, mhwString, mwh1
REM Set mhw = NewJavaObject("MyHelloWorld")
Set mhw = Server.CreateObject("Chili.Beans")
Set mhw1 = mhw.Construct("MyHelloWorld")
Set mhwString = mhw1.myString
Response.Write(mhwString)
%>
</html>
public class MyHelloWorld {
public String myString = "Hello World!";
}hope you could help me out.
thanks in advance :Dhi all,
http://forum.java.sun.com/thread.jspa?forumID=759&threadID=5019680
in reference to the post above, i have a Win2003 server running Sun ONE with Chilisoft ASP plug-in. i did the suggestions there but am still getting the same error, to be exact:
ChiliBean Control error '800a03e8'
java.lang.NoClassDefFoundError: MyHelloWorld
/myhelloworld.asp, line 3
<html>
<% Dim mhw, mhwString, mwh1
REM Set mhw = NewJavaObject("MyHelloWorld")
Set mhw = Server.CreateObject("Chili.Beans")
Set mhw1 = mhw.Construct("MyHelloWorld")
Set mhwString = mhw1.myString
Response.Write(mhwString)
%>
</html>
public class MyHelloWorld {
public String myString = "Hello World!";
}hope you could help me out.
thanks in advance :D -
Please HELP me with installation - java.lang.noclassdeffounderror:
Please Help! For school we need to install JAVA. I installed JDK 5.0 and id did not work. I got exception in thread "main" java.lang.noclassdeffounderror: hello. I was using Texpad to write, compile, and run it. In short I deleted all JAVA 5.0 using My Computer program removal. I installed JAVA 1.4..2_10 and I am still getting that same error. I want the JAVA 1.4..2_10 to be installed and not JAVA.5.0.
My System Variable CLASSPATH still shows C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip. My System Variable PATH has nothing as far as JAVA in it. MY PATHEXT has JS and JSE amoung other things in it. My System Variable QTJAVA still has Files\Java\jre1.5.0_03\lib\ext\QTJava.zip in it.
Please tell me step-by-step how I can fix this. I never updated these variables before. What do I need to type and where? What do I need to get rid of or change?
PLEASE HELP!
Thanks,
JimI left my System variable classpath --> C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip I left my QT JAVA --> C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip I added Path --> ;C:\j2sdk1.4.2_10\bin and then restarted my computer. I added hello file in C:\j2sdk1.4.2_10\bin and tried to compile it under a new name and it would not compile. it gave me the error below. I was able to compile other java program in my other folder in a different directory. I am still getting the same error messages/ Anything else I should try? IS there anyplace or person I can call who would come and fix this? Something is wrong. This should not be giving me this much trouble. All The Java directions on other websites tell me to do different things. I am so confused... please help.
I get this during the compilenow:
javac: invalid flag: C:\j2sdk1.4.2_10\bin\helloa.txt
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-help Print a synopsis of standard options
Tool completed with exit code 2
Jim
If you can fix this I will give you 14 points. I hope it is enough. I just want this to work for school. -
Geting java.lang.NoClassdefFoundError
hi i m new in java,
i m writen the folowing code
class Example
public static void main(String args[])
System.out.println("this is my first program");
the code compiles SUCESSFULLY but when i write "java Example.class" on the command prompt to run this program it gives the folowing error(i have written the error word by word):
"Exception in thread "main" java.lang.NoClassdefFoundError: Example/class"
I know that this eror comes due to missing class or something .......
but hu can i SHORT OUT this problem.......... what is the way to run this program.
IT GIVES THE SAME ERROR IN j2sek1.4 and j2se 5
PLZ PLZ help meone more thing after installing jave it have been installed in folowing directory
D:\Program Files\Java
again in this directory there r two folder named
1) jdk1.5.0_06 (complete pathis "D:\Program Files\Java\jdk1.5.0_06")
2)jre1.5.0_06(complete path is "D:\Program Files\Java\jre1.5.0_06")
In jdk1.5.0_06 FOLDER there is bin,lib,jredemo,sampleinclude directories
and in jre1.5.0_06 FOLDER there is only bin and lib directories
SOOOOOO if my problem is related to path setting plz help me to set the correct path with full step plz -
Exception in thread "main" java.lang.NoClassDefFoundError: MayaFrame
Hi I'm trying to run a Java program in DOS and I always get the following error message:
C:\decom>java -classpath .;./jxl.jar Formula
Exception in thread "main" java.lang.NoClassDefFoundError: MayaFrame
at Application1.<init>(Application1.java:18)
at Formula.main(Formula.java:35)
Does anyone know what is wrong? I've tried to change the path several times, and it does not work. This is what I am using:
C:\Program Files\Java\jdk1.5.0\bin
Any help would be very much appreciatedStart by going through this tutorial:
Your First Cup of Java: Detailed instructions to help you run your first program:
UNIX,
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/unix.html
Microsoft Windows,
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
Mac
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/mac.html
Then take a look at these sections of the tutorial:
JAR Files
http://java.sun.com/docs/books/tutorial/jar/index.html
Lesson: Solving Common Coding Problems
http://java.sun.com/docs/books/tutorial/java/problems/index.html -
Java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
I am trying to connect from a servlet running in Tomcat on my desktop to an instance of Personal Oracle9i running on my desktop. I am gettiung NoClassDefFoundError. The code compiles.
I know it is a path issue but I am at a loss to figure out where. Tomcat does not find the driver however it is in my machines path.
Running following:
j2sdk1.4.1_02
Personal Oracle 9.2
Tomcat 4.1.29
Windows XP
I have added the location of Classes12.zip to the class path: .;c:\Sun\AppServer\lib\j2ee.jar;c:\Sun\AppServer\lib\j2ee-svc.jar;d:\oracle\ora92\jdbc\lib\classes12.zip;
The "root cause" of error is:
java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
at OOP.OracleConnectionDemo.doPost(OracleConnectionDemo.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
The code is as follows:
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.jdbc.OracleDriver;
//import oracle.jdbc.driver.*; //did not work either
public class OracleConnectionDemo extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException{
Connection con = null;
// Load the Oracle JDBC driver
try{
//two versions did not work
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver);
DriverManager.registerDriver(new OracleDriver());
con = DriverManager.getConnection
("jdbc:oracle:thin:@micron.1521:MCAP","scott","scott");
catch (SQLException e){
catch (Exception e){
finally{
try{
if (con != null)
con.close();
catch(SQLException ignored){
}//finally
}What you should be realizing is that Tomcat doesn't give a hoot about your system CLASSPATH. It totally ignores it. You really shouldn't even have one, because IDEs and app servers don't even take it into account. Get rid of it.
You're making lots of mistakes here:
(1) The Tomcat docs explicitly state that it won't look inside ZIP files. Change it to a JAR file.
(2) You're using JDK 1.4.1 and classes12.zip? You realize, of course, that there's an ojdbc14.jar available for download from Oracle. Go get it.
(3) Put the JDBC JAR in the WEB-INF/lib directory of your Web app. If you don't have one, you're not deploying your Web app properly.
(4) You've got Java code with empty catch blocks? That's one of the most foolish things a person can do. If an exception's thrown you'll never know it. For goodness sake, at least print the stack trace.
(5) Why do you have those Oracle imports? That ties your code to Oracle. The design of the java.sql package lets you use interfaces. Why don't you write JDBC the way it was meant to be written?
(6) Why aren't you setting up a JNDI data source?
%
Maybe you are looking for
-
Internal & external hard drives disappeared in Finder
It happened yesterday on my G5 running 10.4.6. I have 2 hard drives inside my G5 and one external hard drive connected with firewire 800. The second hard drive and the external hard drive disappeared in Finder. But the one that has the system on it i
-
Hi , I have generated the Stock analysis report according to product group level when we are displaying that in detail level we are missing one material group totally, can anyone will tell me do we have limit for displaying the values in excel sheet
-
No drag and drop from iTunes to Toast anymore
Hello I love to create compilations for my friends using the crossfade tool within Toast10. Now apple prevents dragging titels directly into Toast since iTunes 8 or 9. You have to copy them on the desktop first, which is great because you have to kee
-
Quality inspected stock for the sales return material
Hi, For the very first time I'm working on Reworking order type. There was a material from customer return. My client want to reprocess it. So for the testing purpose in quality, I activated inspection type 06 (Inspection for returns from customer)
-
Help with crash (kernel panic) during new backup
I had problems with TM after 10.5.2 update. As discussed in other places, I decided to completely erase the parition on the FW drive and start from scratch. At this point, TM gets "stuck" after backing up about 250MB (already had 25 GB of 120GB backe