Class not found but exists in classpath..

Hi all! I'm using the Eclipse IDE and i put a jar file in my build path.. I import a class from this file with no problem but when i run my application, it tells me that:
java.lang.NoClassDefFoundError
where is the problem....??
Thanx in advance..

By double-clicking the resulting JAR file?No.. i put the jar file in my build path, i import the class from this jar file with no problem, i run my application, but it can't find the class from the jar file that i've imported..

Similar Messages

  • Java.rmi.UnmarshalException: skeleton class not found but required for clie

    Hello everyone,
    I am new to RMI and getting a strange exception. I am using Java 1.5.0_07 both on client and server. They are running on the same machine, the rmi registry is started inside the server application.
    I am wondering why java complains about skeletons, I thought they are automatically created when using java 5.0?
    Please have a look at the stacktrace below.
    Thank you for your help.
    Best Regards
    Patric
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
         java.rmi.UnmarshalException: skeleton class not found but required for client version
         sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
         sun.rmi.transport.Transport$1.run(Transport.java:153)
         java.security.AccessController.doPrivileged(Native Method)
         sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         java.lang.Thread.run(Thread.java:595)
         sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
         sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         java.rmi.Naming.lookup(Naming.java:84)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:58)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    The full class path information that I can gather is as follows (some of the library path locations could be suspect...):
    Class path: /edge/node3/hotfix::/edge/node3/current/lib/JMdsApi.jar:/edge/node3/current/lib/MemoryProfilingAgent.jar:/edge/node3/current/lib/T2common-2.6.0-SNAPSHOT.3200.jar:/edge/node3/current/lib/T2scripting-jython.jar:/edge/node3/current/lib/activation.jar:/edge/node3/current/lib/alib.jar:/edge/node3/current/lib/alibom.jar:/edge/node3/current/lib/ant.jar:/edge/node3/current/lib/authapi.jar:/edge/node3/current/lib/bbdlapi.jar:/edge/node3/current/lib/bcpg-jdk15-136.jar:/edge/node3/current/lib/bcprov-jdk15-136.jar:/edge/node3/current/lib/c3p0-0.9.1.2.jar:/edge/node3/current/lib/castor-1.1-codegen-anttask.jar:/edge/node3/current/lib/castor-1.1-codegen.jar:/edge/node3/current/lib/castor-1.1-xml.jar:/edge/node3/current/lib/castor-1.1.jar:/edge/node3/current/lib/colt-1.2.0.jar:/edge/node3/current/lib/common-annotations.jar:/edge/node3/current/lib/commons-beanutils.jar:/edge/node3/current/lib/commons-codec-1.3.jar:/edge/node3/current/lib/commons-collections-3.2.1.jar:/edge/node3/current/lib/commons-jexl-1.1.jar:/edge/node3/current/lib/commons-lang-2.3.jar:/edge/node3/current/lib/commons-logging-1.1.1.jar:/edge/node3/current/lib/commons-net-1.4.1.jar:/edge/node3/current/lib/dsn.jar:/edge/node3/current/lib/eagleapi.jar:/edge/node3/current/lib/ezmorph-1.0.3.jar:/edge/node3/current/lib/f2-loader-1.8.jar:/edge/node3/current/lib/fasttrade-boviewer-1.0.1.jar:/edge/node3/current/lib/hsqldb.jar:/edge/node3/current/lib/icu4j-3.4.4.jar:/edge/node3/current/lib/ivy.jar:/edge/node3/current/lib/janino.jar:/edge/node3/current/lib/janus-sdk-1.7.0.0.jar:/edge/node3/current/lib/jasypt-1.4.1.jar:/edge/node3/current/lib/javolution.jar:/edge/node3/current/lib/jcalendar-1.3.2.jar:/edge/node3/current/lib/jcl-over-slf4j-1.5.6.jar:/edge/node3/current/lib/jcommon-1.0.9.jar:/edge/node3/current/lib/jconn2.jar:/edge/node3/current/lib/jconn3-6.05-b26214.jar:/edge/node3/current/lib/jdom.jar:/edge/node3/current/lib/jfreechart-1.0.5.jar:/edge/node3/current/lib/jgroups-all.jar:/edge/node3/current/lib/jline.jar:/edge/node3/current/lib/jmkv123p1.jar:/edge/node3/current/lib/jna.jar:/edge/node3/current/lib/joda-time-1.5.2.jar:/edge/node3/current/lib/jscience.jar:/edge/node3/current/lib/json-lib-2.2.1-jdk15.jar:/edge/node3/current/lib/jul-to-slf4j-1.5.6.jar:/edge/node3/current/lib/junit.jar:/edge/node3/current/lib/jython.jar:/edge/node3/current/lib/log4j-1.2.15.jar:/edge/node3/current/lib/log4j-over-slf4j-1.5.6.jar:/edge/node3/current/lib/loggablePreparedStatement-1.6.jar:/edge/node3/current/lib/looks-2.1.4.jar:/edge/node3/current/lib/mailapi.jar:/edge/node3/current/lib/model-12021.jar:/edge/node3/current/lib/mysql-connector-java-5.1.7-bin.jar:/edge/node3/current/lib/opencsv-1.8.jar:/edge/node3/current/lib/rfa.jar:/edge/node3/current/lib/rspcore.jar:/edge/node3/current/lib/slf4j-api-1.5.6.jar:/edge/node3/current/lib/slf4j-log4j12-1.5.6.jar:/edge/node3/current/lib/smtp.jar:/edge/node3/current/lib/smtphandler-0.6.jar:/edge/node3/current/lib/spring-2.5.2.jar:/edge/node3/current/lib/statsvn.jar:/edge/node3/current/lib/swingx-0.9.3.jar:/edge/node3/current/lib/t2-12021.jar:/edge/node3/current/lib/testng-5.9-jdk15.jar:/edge/node3/current/lib/tibmsg.jar:/edge/node3/current/lib/tibrvj.jar:/edge/node3/current/lib/trove.jar:/edge/node3/current/lib/velocity-tools.jar:/edge/node3/current/lib/velocity.jar:/edge/node3/current/lib/xalan.jar:/edge/node3/current/lib/xerces.jar:/edge/node3/current/lib/patng/activeio-core-3.0.0-incubator.jar:/edge/node3/current/lib/patng/activemq-core-4.1.1.jar:/edge/node3/current/lib/patng/avalon-framework-4.1.3.jar:/edge/node3/current/lib/patng/backport-util-concurrent-2.2.jar:/edge/node3/current/lib/patng/binding-1.4.0.jar:/edge/node3/current/lib/patng/cglib-nodep-2.1_3.jar:/edge/node3/current/lib/patng/common-1.30.jar:/edge/node3/current/lib/patng/commons-cli-1.0.jar:/edge/node3/current/lib/patng/commons-configuration-1.2.jar:/edge/node3/current/lib/patng/commons-discovery-0.2.jar:/edge/node3/current/lib/patng/commons-math-1.1.jar:/edge/node3/current/lib/patng/concurrent-1.3.4.jar:/edge/node3/current/lib/patng/geronimo-j2ee-management_1.0_spec-1.0.jar:/edge/node3/current/lib/patng/geronimo-jms_1.1_spec-1.0.jar:/edge/node3/current/lib/patng/logkit-1.0.1.jar:/edge/node3/current/lib/patng/mina-core-1.0.1.jar:/edge/node3/current/lib/patng/mina-filter-ssl-1.0.1.jar:/edge/node3/current/lib/patng/mina-java5-1.0.1.jar:/edge/node3/current/lib/patng/mx4j-remote-3.0.1.jar:/edge/node3/current/lib/patng/mx4j-tools-3.0.1.jar:/edge/node3/current/lib/patng/org.apache.felix.framework-1.0.0.jar:/edge/node3/current/lib/patng/org.osgi.core-1.0.0.jar:/edge/node3/current/lib/patng/pat-dt-common-1.18.jar:/edge/node3/current/lib/patng/pat-sdt-1.18.jar:/edge/node3/current/lib/patng/patNg-api-1.27.1.jar:/edge/node3/current/lib/patng/patNg-server-aoc-1.21.jar:/edge/node3/current/lib/patng/patNg-server-common-1.21.jar:/edge/node3/current/lib/patng/patNg-server-session-manager-1.21.jar:/edge/node3/current/lib/patng/patNg-utils-1.27.1.jar:/edge/node3/current/lib/patng/qpid-broker-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-client-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-common-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-mina-core-2.2.2.0.jar:/edge/node3/current/lib/patng/rsee-2.11.jar:/edge/node3/current/lib/patng/servlet-api-2.3.jar:/edge/node3/current/lib/patng/silk-1.3.jar:/edge/node3/current/lib/patng/slf4j-api-1.4.0.jar:/edge/node3/current/lib/patng/slf4j-log4j12-1.4.0.jar:/edge/node3/current/lib/patng/validation-1.2.0.jar
    Boot class path: /apps/jdk/1.6.0_13/linux/jre/lib/resources.jar:/apps/jdk/1.6.0_13/linux/jre/lib/rt.jar:/apps/jdk/1.6.0_13/linux/jre/lib/sunrsasign.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jsse.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jce.jar:/apps/jdk/1.6.0_13/linux/jre/lib/charsets.jar:/apps/jdk/1.6.0_13/linux/jre/classes:/tmp/yjp200811122006.jar
    Library path: /apps/jdk/1.6.0_13/linux/jre/lib/i386/server:/apps/jdk/1.6.0_13/linux/jre/lib/i386:/apps/jdk/1.6.0_13/linux/jre/../lib/i386::/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/usr/java/packages/lib/i386:/lib:/usr/lib

  • "Java Class not found in classpath" Error in DESIGNER

    Hello All,
    I'm trying to connect in Designer using a JDBC connection to MS SQL Server 2008.  As per the instructions, I updated my jdbc.sbo file with the path to the existing two JAR files.  However, I still get the following error when I try and connect in Designer:  "Java Class not found in classpath : C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc\Drivers\sqlsrv".  Of course, this error includes the drive path with the location to my JAR files.  Any help in resolving this nagging issue is very GREATLY appreciated.  Also, if anyone needs it I can post a copy of the jdbc.sbo file to this thread.
    Thank you,
    Pankaj

    Stratos,
    Your suggestion didn't help.  I tried to connect after restarting my machine and I still get the error.  And, I've also tried adding a connection to MS SQL Server 2005 using this JDBC driver, and that didn't help either.  Any other suggestions?  Would it help to see my "jdbc.sbo" file?  Thanks again for your and everyone else's help, and I look forward to your reply.
    Regards,
    Pankaj

  • Created serializable object, but get "Class not found" on "createObjectMessage()" cal

    I'm using OC4J 9.0.2.1 and JDeveloper 9.0.2 with Oracle db. I have a set of queues created in the database.
    Before I try to send my request, I create an instance of the serializable object I want to send. I do all of my queue connection setup, then I call:
    queueSession.createObjectMessage(request);
    Where "queueSession" is a QueueSession obtained from "queueConnection.createQueueSession()".
    When I step over this function call, I get the following:
    oracle.jms.AQjmsException: JMS-109: Class not found: com.attws.it.bsa.felix.mci.common.ServiceInfoRequest
    (The indicated class name is the type of the "request" object.)
    What could I be doing wrong?

    The code below creates the following classes when I compile it (using jsk1.3):
    DistanceBarApplication2.class
    DistanceBarApplication2$1
    DistanceBarApplication2$2
    DistanceBarApplication2$3
    DistanceBarApplication2$DistanceBar2
    The error I receive is: load: class DistanceBarApplication2 not found
    Here is my HTML code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    </HEAD>
    <BODY>
    <applet code="DistanceBarApplication2.class" width=300 height=50>
    </applet>
    </BODY>
    </HTML>
    Here is the Java code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DistanceBarApplication2 extends JApplet {
    private final DistanceBar2 bar = new DistanceBar2();
    public void init() {
    bar.setMaximum(100);
    bar.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    bar.stop();
    JOptionPane.showMessageDialog(bar, bar.getValue() + " yards");
    bar.start();
    this.getContentPane().add(bar);
    bar.start();
    static class DistanceBar2 extends JProgressBar {
    private Thread mThread;
    private boolean mRunning= false;
    private int mValue = 0;
    private boolean mUp = true;
    private Runnable updater = new Runnable() {
    public void run() {
    setValue(mValue);
    public void start() {
    if (mRunning) {
    return;
    mRunning = true;
    mThread = new Thread(new Runnable() {
    public void run() {
    while (mRunning) {
    try {
    Thread.sleep(30);
    } catch (InterruptedException e) { }
    adjust();
    mThread.setDaemon(true);
    mThread.start();
    public void stop() {
    mRunning= false;
    // Best to let a thread run itself out
    // if (mThread != null)
    // mThread.interrupt();
    // Don't need this for this applet, but possibly later
    // public Dimension getPreferredSize() {
    // return new Dimension(300,70);
    private void adjust() {
    int delta = getMaximum() / 40;
    mValue += delta * (mUp ? 1 : -1);
    if (mValue >= getMaximum()) {
    mValue = getMaximum();
    mUp = false;
    } else if (mValue <= 0) {
    mValue = 0;
    mUp = true;
    SwingUtilities.invokeLater(updater);

  • Jasper exception? Class not found? But the resources are there!

    Hi, thanks for reading. I am building a simple web application. Just servlets and jsp working together to either retrieve or add or edit or delete data in a mysql database.
    The problem i have is, some servlets compile and run fine and properly, while others return me the 'jasper error' (see below) and class not found error. The code in these servlets (those that work, and those that don't) are almost identical. I've checked them a couple of times, does not seems like there is any problem with the programming at all.
    Please advise. Thanks for reading. If there is any files that you think i should upload, please let me know. Though it says class not found, the resources are there! What could be wrong? From the advice of someone on another thread, i've looked into the web.xml. And it looks like its right.
    If anyone is willing to look into the matter for me. I'll upload all the files. (But that feels really rude to just impose on someone like that). Irregardless, thanks, really.
    And what about the Jasper Exception? I've googled that already. But nothing that i found has been useful (even the official ones from apache).
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class Maintenance.Support.AddProdLog or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:619)
    root cause
    java.lang.ClassNotFoundException: Maintenance.Support.AddProdLog
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:619)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 55 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:110: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    An error occurred at line: 91 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:148: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    2 errors
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 55 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:110: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    An error occurred at line: 91 in the jsp file: /support_editUAT.jsp
    Generated servlet error:
    C:\Documents and Settings\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\work\Catalina\localhost\MaintenanceSite\org\apache\jsp\support_005feditUAT_jsp.java:148: cannot find symbol
    symbol  : variable branchname
    location: class org.apache.jsp.support_005feditUAT_jsp
          out.print( branchname);
                     ^
    2 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:249)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

    Thanks for the reply. I'm sorry for cross-posting. The other thread is here: http://forum.java.sun.com/post!reply.jspa?messageID=9920352#
    sunish_jose suggested that:
    The servlet classes u mentioned in web.xml should be in WEB-INF/classes. U can add in many ways, you can manually copy and paste(But u have to follow the package structure) or You can mention the class folderd in your editor to
    WEB-INF/classes so that the editor will automaticall generate the class file into that folder with the folder structure. By looking at the error.txt what I can understand is Exceptions are thrown due to the above issue and more than that there are some compilation errors in support_getContact.jsp.
    And i'm looking into that right now.

  • Class not found error while accessing a Web Service

    Hi All,
    Im getting a Class not found error while doing method calls of a third party API.
    The required jars(axis.jar) are set in the weblogic 8.1 classpath and I tried putting those jars(axis.jar) in my application lib folder also, but dint help. Please help me with a solution.
    I'll paste the exception logs here by
    java.lang.NoClassDefFoundError: org/apache/axis/AxisFault
    at java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run()Ljava/lang/Object;(URLClassLoader.java:194)
            at jrockit.vm.AccessController.do_privileged_exc(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;I)Ljava/lang/Object;(Unknown Source)
            at jrockit.vm.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;(Unknown Source)
    Thanks
    Noufal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    Verify the 3rd party class files names are correctly written in your program. Sometimes wrong case might be the reason.
    bye for now
    sat

  • Class not found error while executing jar file

    I have written a java code in which i am connecting to database....when i run the class file using......java class_filename it works........
    but when i run the jar file using .......java -jar jar_name ...yi gives me the error as 'Class not found'......
    can anybody help me please......
    Thanks and Regards,
    Siddhesh

    that class is part of jar file.....in classpath i have included zip files for jdbc ...to get databse connection.....and the jar being executed ................still it gives the error ClassDefnotfound which i think is due to database connection problem.....the exception is raised while.....
    Class.ForName("Driver_name").newInstance();/ This driver is present in zip files that i have added in classpath....
    above statement doesn,t giv error while i execute the class file............but exception while executing jar file only..
    Thnaks and regards,
    siddhesh

  • Class not found exception XMLGregorianCalendarImpl* in PI 7.0

    Hello Experts,
    I have written java Class where  used the following package and Class in PI 7.1and it is working fine
    import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
    //part of the Java Class code
    XMLGregorianCalendarImpl XMLGenTime = new XMLGregorianCalendarImpl(gentime);
    XMLGregorianCalendarImpl XMLExpTime = new XMLGregorianCalendarImpl(exptime);
    but when I am trying to use the same  Class XMLGregorianCalendarImpl in PI 7.0 I I am getting the runtime exception.
    <Trace level="1" type="T">Class not found:                                         
    com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImp           
    l</Trace>                                                                          
    if I write a seperate UDF for the below code and use the jar file jaxp-ri-1.4.1.jar in PI 7.0 ,
    long TicketTime=3600000;
              String LoginTicketRequest_xml=null;
                 Date GenTime = new Date();
              GregorianCalendar gentime = new GregorianCalendar();
              GregorianCalendar exptime = new GregorianCalendar();
              String UniqueId = new Long(GenTime.getTime() / 1000).toString();
              exptime.setTime(new Date(GenTime.getTime()+TicketTime));
              XMLGregorianCalendarImpl XMLGenTime = new XMLGregorianCalendarImpl(gentime);
              XMLGregorianCalendarImpl XMLExpTime = new XMLGregorianCalendarImpl(exptime);
    I am getting the following error
    /usr/sap/X7R/DVEBMGS41/j2ee/cluster/server0/./temp/classpath_resolver/Mapcedceb44283d11e0c032000018b99fca/source/com/sap/xi/tf/_MM_test_.java:81: cannot access javax.xml.datatype.XMLGregorianCalendar bad class file: /usr/sap/X7R/DVEBMGS41/j2ee/cluster/server0/./temp/classpath_resolver/Mapcedceb44283d11e0c032000018b99fca/classpath/IA_javax_2.jar(javax/xml/datatype/XMLGregorianCalendar.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. XMLGregorianCalendarImpl XMLGenTime = new XMLGregorianCalendarImpl(gentime);
    Kindly help me to solve this problem.
    Thanks,
    Kubra

    I have found the solution.
    The problem is solved by adding jaxp_api_1.3 jar and jaxp-ri-1.4.1.jar.we have to have both these jar in PI 7.0 to use com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl package
    Thanks
    Kubra

  • Class Not Found Exception - applet won't run anywhere outside of IDE

    I have an applet that runs perfectly in the netbeans IDE, but won't run from command prompt (I'm using windows) or from a browser. I've been banging my head against the wall for a few days on this one. Here's the HTML I'm using:
    <applet width="400" height="525" code="musicapplet.class" archive="crypticgraffiti.jar">
    <param name="bgcolor" value="ffffff"> <param name="fontcolor" value="000000">
    </param> </param> Your browser is not Java enabled. </applet>
    Here is the structure of the jar file's contents:
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/crypticgraffiti/
    com/crypticgraffiti/music/musicapplet
    com/crypticgraffiti/music/GetNotes.class
    com/crypticgraffiti/music/InstList.class
    com/crypticgraffiti/music/Mode.class
    com/crypticgraffiti/music/MusicCreator.class
    com/crypticgraffiti/music/OctaveTransformer.class
    com/crypticgraffiti/music/Phrase.class
    musicapplet/MusicApplet$playerThread.class
    musicapplet/MusicApplet.class
    (Musicapplet.class is the main class)
    When I attempt to run from command prompt, I get:
    "Error: Could not find or load main class crypticgraffiti.MusicApplet"
    When I attempt to load via html:
    "basic: load: class musicapplet.class not found.
    load: class musicapplet.class not found.
    java.lang.ClassNotFoundException: musicapplet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ClassNotFoundException: musicapplet.class
    security: Accessing keys and certificate in Mozilla user profile: null"
    I have tried every possible variation for the 'code' element of the applet tag (package.mainclass.class, mainclass, mainclass.class, etc). I have also tried compiling with JDK 1.6 and this didn't change anything. I've tried clearing out the cache of temporary files using the java control panel settings, and have verified that my browser can run other applets using JRE 6 and 7.
    I've tried some different ways of distributing the applet, also: putting all the class files in the folder with the html file, putting the classes in a source folder in the same folder as the html file, and finally putting a jar in the same folder as the html file (which really seems the simplest).
    Any help at all would be most appreciated! This applet is a very cool and original music creating app that draws heavily on the JFugue API. It's a shame that I can't get it online for people to play with!

    Cryptic Graffiti wrote:
    Here is the structure of the jar file's contents:
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/crypticgraffiti/
    com/crypticgraffiti/music/musicapplet
    com/crypticgraffiti/music/GetNotes.class
    com/crypticgraffiti/music/InstList.class
    com/crypticgraffiti/music/Mode.class
    com/crypticgraffiti/music/MusicCreator.class
    com/crypticgraffiti/music/OctaveTransformer.class
    com/crypticgraffiti/music/Phrase.class
    musicapplet/MusicApplet$playerThread.class
    musicapplet/MusicApplet.class
    (Musicapplet.class is the main class)
    Please note that class names are case sensitive so "MusicApplet" is not same as "Musicapplet" or "musicapplet". Your applet tag should have fully qualified class name (without quotes) and should look like this:
    <applet width=400 height=525 code=musicapplet.MusicApplet archive="crypticgraffiti.jar">
    </applet>
    The JAR should be in the same directory as your HTML file. While launching from command line, you can also check if your JAR file is getting included in classpath.
    Thanks,
    Nitin

  • Class not found error afer loading classes to oracle

    hi i have loaded quite a few jars into oralce 11g databse
    created a java stored function
    and executed it
    some times it works... and hits the java front end environment... we are hitting a servlet.. and recording some output statements .. in the function
    but sometimes it throws class not found error
    any idea why its working sometimes and not some othr times?
    Also when i load the jars.. the classes are loaded but when i see the name of the classes using
    select * from user_objects where object_type like 'J%'
    then i see some additional characters prefixxed the class names ... is that causing the problem?
    something like this
    /1a248e6f_GetMethod
    Edited by: learning_man on Mar 11, 2010 1:27 PM

    Learning_man,
    Obviously you need to learn how to ask a question.
    There is nothing in your post other than 'It doesn't work. Why? Help"
    without any specific example. Also you still fail to include a 4 digit version!!!
    It is also the third or the fourth time you asked this very same question.
    Can you learn how to ask a question please? And stop repeating the question when you don't get a response?
    And no, the extra characters are not the problem.
    An incorrect CLASSPATH probably is.
    Sybrand Bakker
    Senior Oracle DBA

  • Class not found error for COM.ibm.db2.jdbc.app.DB2Driver

    i have written this code:
    import java.io.*;
    import java.sql.*;
    public class tryjdbc
    {  public static void main (String args[])
    {  try
    {  Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");  }
    catch (java.lang.ClassNotFoundException e)
    {  System.out.print(e.getMessage());  }
    and once i try to run it, it gives out a class not found exception error.
    I haven't changed anything with the classpath since I don't think the problem is with the classpath. I have read in the IBM Developer Kit for Java documentaton that the AS/400 Developer Kit for Java automatically adds the db2_class.jar file to the classpath. So why do I get a class not found exception error?

    I was using Web Spehere 4.0.3 and trying to connect to a database on DB2 7.2. I was just following a tutorial and trying to get a handle on Web Sphere. I am running all of these on a Windows 2000 Operating System. Here are some of my observations :
    a. db2java.zip packaged under %DB2ROOT%\SQLLIB\JAVA, does not work.
    b. CLASSPATH needs to be set to %DB2ROOT%\sqllib\java12\db2java.zip
    c. Include this as one of the packages in the package defined in
    WebSphere, using the Java Perspective.
    d. Ensure that case sensitivity is respected. All though the package
    shows up as COM.ibm.db2.jdbc.app.DB2Driver, for some reason, it
    will only accept com.ibm.db2.jdbc.app.DB2Driver.
    With these settings, I was able to connect to a db2 database.
    I am a little puzzled on the following. I did not include java.io package, but still it could print the messages. Did anybody have a similar experience
    Thanks for this posting.

  • Error : class not found exception : com.mysql.jdbc.driver in Eclipse Tool

    Hi
    I have impoted project file in eclipse in new machine using option import from existing workbence . When i stat to debug this project ,
    i am getting error as class not found exception : com.mysql.jdbc.driver . my project folder already consist of mysql .jar file in /web appls/web-inf folder.
    Application is running successfully in other machine from where i took the application file. As this error appeared I also added jar file into project path as Project ---->properties-- build java path---libraries----add external jar file.
    kindly hep me.

    Sounds like an eclipse question - not a JDBC one.
    But since eclipse is telling you it can't find it then it means it is not in the eclipse path. So you must add it. (The fact that it is somewhere is irrelevant - all that matters is it is not in the class path.)

  • Class not found exception for the startup class defined.

    iam using weblogic server 10 and bea jrockit 1.5.0.12.
    i have created a startup class in the admin console for a web project and i have deployed the war file using the console in a user defined domains, user project directory.
    when i start the server, iam getting class not found exception for the startup class.
    But, the startup class is available in the web archive (war). how should we add the classes and jars in the war to the classpath in setDomainEnv.sh or is there any other setting available in the console to enable this.

    Hello Julius,
    yes sure, we can move this post to the NW admin forum. I have already posted similar thread on sun forums. I was hoping that someone from SAP SDN already tackled this problem and if not someone specialized in J2EE Engine could troubleshoot me from the class problem I'm getting. I don't know if it's specific from the agent or if this ClassNotFound is a general SAP J2EE Engine error relating to a library not correclty defined.
    Kind regards,
    Tanguy Mezzano

  • Class not Found Exception while running an EJB

    I have created and published a EJB in Oracle 8i (in a particular
    schema) by running the deployejb tool supplied. The ejb was
    published successfully. On running the client program I get an
    error saying that the mybeans's HomeHelper class cannot be
    found. This error occurs when there is a lookup to the home
    interface of the bean. The exception thrown says Reasons are
    unknown. On checking the objects of type 'JAVA CLASS' I found
    that the homeHelper class object had been created automatically
    be the deploy process. What is the reason for the class not
    found exception and what can I do to correct it. ?
    The code for the beans is as given below :
    Home Interface
    package mituser ;
    import javax.ejb.*;
    import java.rmi.RemoteException;
    public interface MITUserHome extends EJBHome {
    public MITUser create()
    throws CreateException, RemoteException;
    Remote Interface
    package mituser ;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface MITUser extends EJBObject {
    public int validateUserName (String username)
    throws java.sql.SQLException, RemoteException;
    public int validatePassword (String username, String password)
    throws java.sql.SQLException, RemoteException;
    public String validateSearchAccess (String username, String
    password)
    throws java.sql.SQLException, RemoteException;
    Bean
    package mituserServer ;
    import java.sql.*;
    import java.rmi.RemoteException;
    import javax.ejb.*;
    public class MITUserBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() throws CreateException,
    RemoteException {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void setSessionContext(SessionContext ctx) {
    this.ctx = ctx;
    public int validateUserName (String username) throws
    SQLException, RemoteException
    int count = 0 ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select count(username) from
    useraccountinfo where username = ?");
    try {
    ps.setString (1, username);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("no registered user with User
    Name " + username);
    count = rset.getShort(1) ;
    return count ;
    } finally {
    ps.close();
    public int validatePassword (String username, String password)
    throws SQLException, RemoteException
    int count = 0 ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select count(username) from
    useraccountinfo where username = ? and password = ?");
    try {
    ps.setString (1, username);
    ps.setString(2, password);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("Invalid Password ");
    count = rset.getShort(1) ;
    return count ;
    } finally {
    ps.close();
    public String validateSearchAccess (String username, String
    password) throws SQLException, RemoteException
    String searchaccess = "" ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select searchprofileaccess from
    useraccountinfo where username = ? and password = ?");
    try {
    ps.setString (1, username);
    ps.setString(2, password);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("Access Denied for " +
    username );
    searchaccess = rset.getString(1) ;
    return searchaccess ;
    } finally {
    ps.close();
    Client program
    import mituser.MITUser;
    import mituser.MITUserHome;
    import oracle.aurora.jndi.sess_iiop.ServiceCtx;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    public class Client {
    public static void main (String [] args) throws Exception {
    int count = 0 ;
    String access = "" ;
    if (args.length != 4) {
    System.out.println("usage: Client serviceURL objectName
    user password");
    System.exit(1);
    String serviceURL = args [0];
    String objectName = args [1];
    String user = args [2];
    String password = args [3];
    Hashtable env = new Hashtable();
    env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    env.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    Context ic = new InitialContext(env);
    MITUserHome home = (MITUserHome)ic.lookup (serviceURL +
    objectName);
    MITUser testBean = home.create ();
    count = testBean.validateUserName("MITA");
    if (count > 0 )
    System.out.println ("Valid User");
    else
    System.out.println ("Invalid User");
    count = testBean.validatePassword("MITA", "MITA");
    if (count > 0 )
    System.out.println ("Valid Password");
    else
    System.out.println ("Invalid Password");
    access = testBean.validateSearchAccess("MITA", "MITA");
    if ( access.equalsIgnoreCase("YES") )
    System.out.println ("Search Access Available");
    else
    System.out.println ("Search Access Denied");
    The Descriptor file
    // MIT UserBean EJB deployment descriptor
    SessionBean mituserServer.MITUserBean {
    BeanHomeName = "test/mitUserJDBCBean";
    RemoteInterfaceClassName = mituser.MITUser;
    HomeInterfaceClassName = mituser.MITUserHome;
    AllowedIdentities = {MIT};
    SessionTimeout = 20;
    StateManagementType = STATEFUL_SESSION;
    RunAsMode = CLIENT_IDENTITY;
    TransactionAttribute = TX_REQUIRED;
    Batch File for deploying the ejb
    @echo off
    if (%ORACLE_HOME%)==() goto usage
    if (%ORACLE_SERVICE%)==() goto usage
    if (%JDK_CLASSPATH%)==() goto usage
    @echo on
    set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
    \jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
    ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
    JDK_CLASSPATH%
    javac -g mituser\MITUser.java
    javac -g mituser\MITUserHome.java
    javac -g mituserServer\MITUserBean.java
    jar cf0 mituser.jar mituser\MITUser.class
    mituser\MITUserHome.class mituserServer\MITUserBean.class
    javac -g Client.java
    call deployejb -republish -temp temp -u mit -p mit -s %
    ORACLE_SERVICE% -descriptor mituser.ejb mituser.jar
    @echo off
    goto done
    :usage
    @echo -------------------------------------------------------
    @echo Following are the requirements to run this script
    @echo set ORACLE_HOME to installed Oracle home
    @echo set ORACLE_SERVICE to the CORBA service name of
    your databae
    @echo for example sess_iiop://localhost:2481:ORCL
    @echo set JDK_CLASSPATH to the full path of your JDK
    classes.zip
    @echo -------------------------------------------------------
    :done
    Batch file for running the cleint program
    @echo off
    if (%ORACLE_HOME%)==() goto usage
    if (%ORACLE_SERVICE%)==() goto usage
    if (%JDK_CLASSPATH%)==() goto usage
    @echo on
    set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
    \jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
    ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
    JDK_CLASSPATH%;server_generated.jar
    java Client %ORACLE_SERVICE% /test/mitUserJDBCBean mit mit
    @echo off
    goto done
    :usage
    @echo -------------------------------------------------------
    @echo Following are the requirements to run this script
    @echo set ORACLE_HOME to installed Oracle home
    @echo set ORACLE_SERVICE to the CORBA service name of
    your databae
    @echo for example sess_iiop://localhost:2481:ORCL
    @echo set JDK_CLASSPATH to the full path of your JDK
    classes.zip
    @echo -------------------------------------------------------
    :done
    I know this is not strictly to do with JDBC but there appears to
    be no discussion forum for EJB
    Hoping for a response soon as it us very URGENT
    Thanks
    Mita
    null

    I have created and published a EJB in Oracle 8i (in a particular
    schema) by running the deployejb tool supplied. The ejb was
    published successfully. On running the client program I get an
    error saying that the mybeans's HomeHelper class cannot be
    found. This error occurs when there is a lookup to the home
    interface of the bean. The exception thrown says Reasons are
    unknown. On checking the objects of type 'JAVA CLASS' I found
    that the homeHelper class object had been created automatically
    be the deploy process. What is the reason for the class not
    found exception and what can I do to correct it. ?
    The code for the beans is as given below :
    Home Interface
    package mituser ;
    import javax.ejb.*;
    import java.rmi.RemoteException;
    public interface MITUserHome extends EJBHome {
    public MITUser create()
    throws CreateException, RemoteException;
    Remote Interface
    package mituser ;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface MITUser extends EJBObject {
    public int validateUserName (String username)
    throws java.sql.SQLException, RemoteException;
    public int validatePassword (String username, String password)
    throws java.sql.SQLException, RemoteException;
    public String validateSearchAccess (String username, String
    password)
    throws java.sql.SQLException, RemoteException;
    Bean
    package mituserServer ;
    import java.sql.*;
    import java.rmi.RemoteException;
    import javax.ejb.*;
    public class MITUserBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() throws CreateException,
    RemoteException {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void setSessionContext(SessionContext ctx) {
    this.ctx = ctx;
    public int validateUserName (String username) throws
    SQLException, RemoteException
    int count = 0 ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select count(username) from
    useraccountinfo where username = ?");
    try {
    ps.setString (1, username);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("no registered user with User
    Name " + username);
    count = rset.getShort(1) ;
    return count ;
    } finally {
    ps.close();
    public int validatePassword (String username, String password)
    throws SQLException, RemoteException
    int count = 0 ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select count(username) from
    useraccountinfo where username = ? and password = ?");
    try {
    ps.setString (1, username);
    ps.setString(2, password);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("Invalid Password ");
    count = rset.getShort(1) ;
    return count ;
    } finally {
    ps.close();
    public String validateSearchAccess (String username, String
    password) throws SQLException, RemoteException
    String searchaccess = "" ;
    Connection conn =
    new oracle.jdbc.driver.OracleDriver().defaultConnection ();
    PreparedStatement ps =
    conn.prepareStatement ("select searchprofileaccess from
    useraccountinfo where username = ? and password = ?");
    try {
    ps.setString (1, username);
    ps.setString(2, password);
    ResultSet rset = ps.executeQuery ();
    if (!rset.next ())
    throw new RemoteException ("Access Denied for " +
    username );
    searchaccess = rset.getString(1) ;
    return searchaccess ;
    } finally {
    ps.close();
    Client program
    import mituser.MITUser;
    import mituser.MITUserHome;
    import oracle.aurora.jndi.sess_iiop.ServiceCtx;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    public class Client {
    public static void main (String [] args) throws Exception {
    int count = 0 ;
    String access = "" ;
    if (args.length != 4) {
    System.out.println("usage: Client serviceURL objectName
    user password");
    System.exit(1);
    String serviceURL = args [0];
    String objectName = args [1];
    String user = args [2];
    String password = args [3];
    Hashtable env = new Hashtable();
    env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    env.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    Context ic = new InitialContext(env);
    MITUserHome home = (MITUserHome)ic.lookup (serviceURL +
    objectName);
    MITUser testBean = home.create ();
    count = testBean.validateUserName("MITA");
    if (count > 0 )
    System.out.println ("Valid User");
    else
    System.out.println ("Invalid User");
    count = testBean.validatePassword("MITA", "MITA");
    if (count > 0 )
    System.out.println ("Valid Password");
    else
    System.out.println ("Invalid Password");
    access = testBean.validateSearchAccess("MITA", "MITA");
    if ( access.equalsIgnoreCase("YES") )
    System.out.println ("Search Access Available");
    else
    System.out.println ("Search Access Denied");
    The Descriptor file
    // MIT UserBean EJB deployment descriptor
    SessionBean mituserServer.MITUserBean {
    BeanHomeName = "test/mitUserJDBCBean";
    RemoteInterfaceClassName = mituser.MITUser;
    HomeInterfaceClassName = mituser.MITUserHome;
    AllowedIdentities = {MIT};
    SessionTimeout = 20;
    StateManagementType = STATEFUL_SESSION;
    RunAsMode = CLIENT_IDENTITY;
    TransactionAttribute = TX_REQUIRED;
    Batch File for deploying the ejb
    @echo off
    if (%ORACLE_HOME%)==() goto usage
    if (%ORACLE_SERVICE%)==() goto usage
    if (%JDK_CLASSPATH%)==() goto usage
    @echo on
    set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
    \jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
    ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
    JDK_CLASSPATH%
    javac -g mituser\MITUser.java
    javac -g mituser\MITUserHome.java
    javac -g mituserServer\MITUserBean.java
    jar cf0 mituser.jar mituser\MITUser.class
    mituser\MITUserHome.class mituserServer\MITUserBean.class
    javac -g Client.java
    call deployejb -republish -temp temp -u mit -p mit -s %
    ORACLE_SERVICE% -descriptor mituser.ejb mituser.jar
    @echo off
    goto done
    :usage
    @echo -------------------------------------------------------
    @echo Following are the requirements to run this script
    @echo set ORACLE_HOME to installed Oracle home
    @echo set ORACLE_SERVICE to the CORBA service name of
    your databae
    @echo for example sess_iiop://localhost:2481:ORCL
    @echo set JDK_CLASSPATH to the full path of your JDK
    classes.zip
    @echo -------------------------------------------------------
    :done
    Batch file for running the cleint program
    @echo off
    if (%ORACLE_HOME%)==() goto usage
    if (%ORACLE_SERVICE%)==() goto usage
    if (%JDK_CLASSPATH%)==() goto usage
    @echo on
    set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
    \jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
    ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
    JDK_CLASSPATH%;server_generated.jar
    java Client %ORACLE_SERVICE% /test/mitUserJDBCBean mit mit
    @echo off
    goto done
    :usage
    @echo -------------------------------------------------------
    @echo Following are the requirements to run this script
    @echo set ORACLE_HOME to installed Oracle home
    @echo set ORACLE_SERVICE to the CORBA service name of
    your databae
    @echo for example sess_iiop://localhost:2481:ORCL
    @echo set JDK_CLASSPATH to the full path of your JDK
    classes.zip
    @echo -------------------------------------------------------
    :done
    I know this is not strictly to do with JDBC but there appears to
    be no discussion forum for EJB
    Hoping for a response soon as it us very URGENT
    Thanks
    Mita
    null

  • Struts class not found for war file

    Hello,
    I am tring to deploy my struts web application in weblogic 8.1. I have all the
    library files in web-inf\lib directory. It gave me the error that class not found
    for some class in struts library. The console also told me the classpath. But
    I can use javap to find the class using the same classpath. Could any one point
    me some direction what I am doing wrong here.
    Thanks.
    Here is the error message:
    java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter.>
    <Nov 13, 2003 11:05:29 AM EST> <Error> <HTTP> <BEA-101216> <Servlet: "action"
    fa
    iled to preload on startup in Web application: "voppocWebApp".
    javax.servlet.ServletException: [HTTP:101250][ServletContext(id=9921725,name=vop
    pocWebApp,context-path=/voppocWebApp)]: Servlet class org.apache.struts.action.A
    ctionServlet for servlet action could not be loaded because a class on which it
    depends was not found in the classpath C:\bea\weblogic81\server\bin\myserver\upl
    oad\voppocWebApp.war;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extrac
    t\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\activation30425.jar;C:
    \bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp
    _voppocWebApp\jarfiles\WEB-INF\lib\commons-beanutils30426.jar;C:\bea\weblogic81\
    server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\ja
    rfiles\WEB-INF\lib\commons-collections30427.jar;C:\bea\weblogic81\server\bin\.\m
    yserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF
    \lib\commons-digester30428.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdel
    ete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\commons-file
    upload30429.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\mys
    erver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\commons-lang30430.jar;C:\be
    a\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_vo
    ppocWebApp\jarfiles\WEB-INF\lib\commons-logging30431.jar;C:\bea\weblogic81\serve
    r\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfile
    s\WEB-INF\lib\commons-validator30432.jar;C:\bea\weblogic81\server\bin\.\myserver
    \.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\ja
    karta-oro30433.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\
    myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\jdbc2_0-stdext30434.jar;
    C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebA
    pp_voppocWebApp\jarfiles\WEB-INF\lib\mailapi30435.jar;C:\bea\weblogic81\server\b
    in\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\W
    EB-INF\lib\struts30436.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\
    extract\myserver_voppocWebApp_voppocWebApp\jarfiles\_wl_cls_gen.jar.
    java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter.
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:800)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3236)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    ServletContext.java:3181)

    Hello Mark,
    Your suggested solution (putting an empty commons-logging.properties into
    web-inf/classes or in a jar in web-inf/lib)
    does not make any change at all. It still complains about not being able to
    preload the servlet and still
    gives exceptions upong calling upon LogFactory.
    What I have been able to do is put the three classes from
    com.bea.wlw.netui.util.logging into a separate jar
    and add that to web-inf/lib.
    However I am sometimes getting funny exceptions upon undeploy
    (NoClassDefFoundError for org.apache.commons.collection.FastHashMap$KeySet).
    Regards,
    Robert Varga
    "Mark Griffith" <[email protected]> wrote in message
    news:[email protected]...
    From a FAQ on netui:
    1. Why do I get a ServletException while trying to deploy a struts web
    application on a Workshop/Integration/Portal domain?
    In the "<WL-HOME>/server/lib/knex.jar" file there is a properties file
    called "commons-logging.properties" which configures the
    com.bea.wlw.netui.util.logging.StrutsLogFactory class for Struts loggingas
    below:
    org.apache.commons.logging.LogFactory=com.bea.wlw.netui.util.logging.StrutsL
    ogFactory
    This class file is not available for a Struts web application that was not
    built using Workshop, the reason being the containing NetUI jar files are
    not present in the web application's WEB-INF/lib folder. This leads to a
    ServletException while deploying the web application. The solution is toadd
    a blank file (or a JAR containing the file) namedcommons-logging.properties
    to the server CLASSPATH, or to the WEB-INF/lib folder of the concerned web
    application. This issue will be fixed in Service Pack 2.
    cheers
    mbg
    "Robert Varga" <[email protected]> wrote in message
    news:[email protected]...
    Hi Rob,
    I also have a similar error with deploying a Struts web application into
    a
    8.1 Basic Workshop Domain created
    by 8.1 Platform.
    I get a ClassNotFoundException for 'com.wlw...StrutsLogFactory', whenStruts
    tries to load any Jakarta class
    from commons-beanutils or Struts which has logging.
    This happens because commons-logging picks up some property whichinstructs
    it to load that class, which is
    naturally not included in most web applications, since it is
    workshop-specific. This property definition, I think,
    is in <bea>\weblogic81\server\knex.jar, called
    commons-logging.properties,
    containing the following line:
    org.apache.commons.logging.LogFactory=com.bea.wlw.netui.util.logging.StrutsL
    ogFactory
    How can I override this in my webapp in a property file, so that when a
    Struts or Beanutils class calls
    LogFactory.getLog(org.apache.....<classname>.class), it would not try touse
    the property file and the
    class defined in knex.jar.
    Thanks in advance,
    Robert Varga
    "Rob Woollen" <[email protected]> wrote in message
    news:[email protected]...
    Actually it complained about a NoClassDefFoundError. Generally this
    is
    caused by something in a parent classloader that is found but then
    depends on something only loadable in a child classloader.
    eg.
    You have something in your $CLASSPATH that references something in the
    WEB-INF/lib. This will NoClassDefFoundError.
    So, as I recommended, remove everything you've added to the$CLASSPATH,
    add the jars to WEB-INF/lib. If you're still having problems, show me
    your $CLASSPATH, the contents of WEB-INF/lib, and the error message
    /stack trace.
    -- Rob
    yuruo chen wrote:
    Hello, Rob,
    I did put the common-beanutils and other jar files in the
    web-inf/lib
    directory.
    And from the weblogic console, I do see the jar file get included in
    the
    classpath.
    (those generated file name have some number attached at the end.)
    As
    I
    mentioned
    before, I can use javap find the class using this weblogic generatedclasspath.
    But weblogic complained that the class is not found.
    Rob Woollen <[email protected]> wrote:
    Remove anything you've added to the server's classpath.
    Add the required jar files to WEB-INF/lib
    -- Rob
    yuruo chen wrote:
    Hello,
    I am tring to deploy my struts web application in weblogic 8.1. I
    have
    all the
    library files in web-inf\lib directory. It gave me the error that
    class
    not found
    for some class in struts library. The console also told me the
    classpath.
    But
    I can use javap to find the class using the same classpath. Could
    any
    >>>>>
    one point
    me some direction what I am doing wrong here.
    Thanks.
    Here is the error message:
    java.lang.NoClassDefFoundError:
    org/apache/commons/beanutils/Converter.>
    <Nov 13, 2003 11:05:29 AM EST> <Error> <HTTP> <BEA-101216>
    <Servlet:
    >>>>>
    "action"
    fa
    iled to preload on startup in Web application: "voppocWebApp".
    javax.servlet.ServletException:
    [HTTP:101250][ServletContext(id=9921725,name=vop
    pocWebApp,context-path=/voppocWebApp)]: Servlet classorg.apache.struts.action.A
    ctionServlet for servlet action could not be loaded because a classon which it
    depends was not found in the classpath
    C:\bea\weblogic81\server\bin\myserver\upl
    >
    oad\voppocWebApp.war;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extrac
    >
    t\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\activation30425.jar;C:
    >
    \bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp
    >
    _voppocWebApp\jarfiles\WEB-INF\lib\commons-beanutils30426.jar;C:\bea\weblogic81\
    >
    server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\ja
    >
    rfiles\WEB-INF\lib\commons-collections30427.jar;C:\bea\weblogic81\server\bin\.\m
    >
    yserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF
    >
    \lib\commons-digester30428.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdel
    >
    ete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\commons-file
    >
    upload30429.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\mys
    >
    erver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\commons-lang30430.jar;C:\be
    >
    a\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_vo
    >
    ppocWebApp\jarfiles\WEB-INF\lib\commons-logging30431.jar;C:\bea\weblogic81\serve
    >
    r\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfile
    >
    s\WEB-INF\lib\commons-validator30432.jar;C:\bea\weblogic81\server\bin\.\myserver
    >
    \.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\ja
    >
    karta-oro30433.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\
    >
    myserver_voppocWebApp_voppocWebApp\jarfiles\WEB-INF\lib\jdbc2_0-stdext30434.jar;
    >
    C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_voppocWebA
    >
    pp_voppocWebApp\jarfiles\WEB-INF\lib\mailapi30435.jar;C:\bea\weblogic81\server\b
    >
    in\.\myserver\.wlnotdelete\extract\myserver_voppocWebApp_voppocWebApp\jarfiles\W
    >
    EB-INF\lib\struts30436.jar;C:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\
    extract\myserver_voppocWebApp_voppocWebApp\jarfiles\_wl_cls_gen.jar.
    java.lang.NoClassDefFoundError:
    org/apache/commons/beanutils/Converter.
    atweblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:800)
    atweblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3236)
    atweblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    ServletContext.java:3181)

Maybe you are looking for

  • A/V input?

    Hello I have a super nintendo with A/V cables and I have no TV in my room I was wondering if there was any A/V input adapter for me to use it with my iMac??? Just to make it easier on me.

  • Changeable Current Date field

    I need the "Current Date" field enabled to be changed by the user. Any help will be appreciated. I thought the "Calculated - User can Override" would work but no such luck! (I am using the Custom - Current Date field) Thanks

  • Possible to "grab" a video clip from a web page?

    I am listening to a video clip (spoken by a favorite writer of mine, http://anon.salon.speedera.net/anon.salon/mp3s/nin1.mp3 ) and I would like to get it, have it, and put it in my hard drive to listen to with a single click. Is this possible? To "gr

  • WiFi is Fast, But Ethernet Extremely Slow

    On both my old 2008 24" iMac and my brand new 27" iMac, the Internet is extremely slow when the Ethernet cable is plugged in. When it's unplugged and I'm on WiFi, it's lightning quick. When I'm on Ethernet, even retrieving text-only emails from Mail

  • Retraction BCS

    Hi Friends ! Performed the necessary steps required for the retraction. Ques: 1) When I click execute in TCode FMBPRET_BCS, in which table the data will be retracted? As I see the datasource, they are build on the structures like "IFMBWRBT"? 2) How t