Can't find class when executing javabean test

Hi,
I've installed Sunone 6.0
JSP is installed
JDK is installed
I've written and compiled a simple javabeans program
and it generates class correctly.
When I try to execute I get "Can't find class" error.
Where does the class need to reside after compiling?
Is my PATH hosed?
Thanks for any pointer
Willie

hi
did you get a chance to read this doc:
http://docs.sun.com/source/817-6251/pwajsp.html

Similar Messages

  • Can't find class when i use java.awt.Panel

    I got a Pocket PC with CE 3.0
    I made my first PJava application just a few hours ago. And it works fine. But when i introduce a Panel to improve the interface then application fails on the Pocket PC with the error message "could not find class application". When i remove the Panel it works fine again.
    I thought that java.awt.* is part of PJava. And even if not i should be able to introduce even a java.lang.* class to the PJava application if i use the JAR.
    Any suggestion?

    you should provide more detail about your deployment procedures.
    There are many ways to get this message. AWT in fact is part of pJava and works fine for most of us. So I assume the deployment is the problem. Have you checked the actual content of the JAR? Have you provided a path statement? How do you call your app (shortcut?)

  • Can't find class when connecting to db

    I have a db in MySQL-Front which I'd like to connect to a java-program.
    I'm new to this and don't know what to write but after reading in this forum I've come up with these lines. I suppose that it is the code by the arrows that are my problem. What shall I write there? I've tried a lot and nothing works....
    When I run the applet I get the "Class not found" so I guess it is "org.gjt.mm.mysql.Driver" that is my problem. What?
    The db is on the same pc as the java-code. At the "DriverManager.getConnection()" i guess I shall write password, login.... But I have no such. I only start my db. What shall I write there?
    Help me please!
    import java.sql.*;
    public class Car {
    private String CarNumber;
    private String Color;
    private String Type;
    private static Connection dbconn=null;
    public Car (String car, String color, String type) {
    CarNumber = car;
    Color = color;
    Type = type;
    public Car() {}
    public String getCarNumber() {return CarNumber;}
    public String getType() {return Type;}
    public String getColor() {return Color;}
    public static boolean connect() throws SQLException {
    - - - - - -> try {Class.forName("org.gjt.mm.mysql.Driver");}
    catch (ClassNotFoundException e) {
    System.err.println("Class not found");
    (Runtime.getRuntime()).exit(1);
    - - - - - -> dbconn = DriverManager.getConnection("????????????");
    return dbconn !=null;
    public static Car findCar (String seekCarNumber) throws SQLException {
    PreparedStatement select = dbconn.prepareStatement("SELECT CarNumber, Color, Type" +
    "FROM Car WHERE CarNumber =?");
    select.setString(1,seekCarNumber);
    ResultSet rs= select.executeQuery();
    rs.next();
    String n=rs.getString("CarNumber");
    String c=rs.getString("Color");
    String t=rs.getString("Type");
    return new Car(n,c,t);

    Your database should provide a JDBC driver JAR or something similar. Your Applet will need to make sure this is on its classpath (assuming it's called mysql.jar):
    <applet code="..." archive="mysql.jar">
    </applet>You should search the JDBC forum - Applets connecting to databases seem to be very popular (don't ask me why).

  • Can't find class org/apache/jk/apr/AprImpl

    Hi
    I have Tomcat 4.1.29 and Apache Web Server 2.0.48 installed.
    I have used this tutorial since I'm a newbie :(
    http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
    My problem is when I try to regroup them, I obtained this error error.log.
    error] Can't find class org/apache/jk/apr/AprImpl
    java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$100(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Here is my confid file (workers.properties) :
    [logger]
    level=DEBUG
    [config:]
    #file=C:/Apache2/conf/workers2.properties
    file=C:/Apache2/conf/workers2.properties
    debug=0
    debugEnv=0
    [uriMap:]
    info=Maps the requests. Options: debug
    debug=0
    # Alternate file logger
    #[logger.file:0]
    #level=DEBUG
    #file=C:/Apache2/logs/jk2.log
    [shm:]
    info=Scoreboard. Required for reconfiguration and status with multiprocess servers
    file=C:/Apache2/logs/jk2.shm
    size=1000000
    debug=0
    disabled=0
    [workerEnv:]
    info=Global server options
    timing=1
    debug=0
    # Default Native Logger (apache2 or win32 )
    # can be overriden to a file logger, useful
    # when tracing win32 related issues
    #logger=logger.file:0
    [lb:lb]
    info=Default load balancer.
    debug=0
    #[lb:lb_1]
    #info=A second load balancer.
    #debug=0
    [channel.socket:localhost:8009]
    info=Ajp13 forwarding over socket
    debug=0
    tomcatId=localhost:8009
    #[channel.socket:localhost:8019]
    #info=A second tomcat instance.
    #debug=0
    #tomcatId=localhost:8019
    #lb_factor=1
    #group=lb
    #group=lb_1
    #disabled=0
    #[channel.un:/opt/33/work/jk2.socket]
    #info=A second channel connecting to localhost:8019 via unix socket
    #tomcatId=localhost:8019
    #lb_factor=1
    #debug=0
    [channel.jni:jni]
    info=The jni channel, used if tomcat is started inprocess
    [status:]
    info=Status worker, displays runtime informations
    [vm:]
    info=Parameters used to load a JVM in the server process
    #JVM=C:\jdk\jre\bin\hotspot\jvm.dll
    OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar
    OPT=-Dtomcat.home=${TOMCAT_HOME}
    OPT=-Dcatalina.home=${TOMCAT_HOME}
    OPT=-Xmx128M
    #OPT=-Djava.compiler=NONE
    disabled=0
    [worker.jni:onStartup]
    info=Command to be executed by the VM on startup. This one will start tomcat.
    class=org/apache/jk/apr/TomcatStarter
    ARG=start
    disabled=0
    stdout=C:/Apache2/logs/stdout.log
    stderr=C:/Apache2/logs/stderr.log
    [worker.jni:onShutdown]
    info=Command to be executed by the VM on shutdown. This one will stop tomcat.
    class=org/apache/jk/apr/TomcatStarter
    ARG=stop
    disabled=0
    [uri:/jkstatus/*]
    info=Display status information and checks the config file for changes.
    group=status:
    #[uri:127.0.0.1:8003]
    #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
    #alias=myVirtualHost:8003
    #[uri:127.0.0.1:8003/ex]
    #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 )
    #context=/ex
    #group=lb_1
    [uri:/examples]
    info=Example webapp in the default context.
    context=/examples
    debug=0
    #[uri:/examples1/*]
    #info=A second webapp, this time going to the second tomcat only.
    #group=lb_1
    #debug=0
    [uri:/examples/servlets/*]
    info=Prefix mapping
    [uri:/examples/*.jsp]
    info=Extension mapping
    [uri:/examples/*]
    info=Map the whole webapp
    [uri:/examples/servlets/HelloW]
    info=Exampel with debug enabled.
    debug=10
    Thank you for your time !
    Max

    Btw: I get the warning starting IIS - It seems to me that IIS tries to load Tomcat on-the-fly. The Tomcat load the fails and IIS continues to load successfully.
    The beginning of the IIS Event log outputs this:
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (340)]: vm.detach() ok
    Apache Jakarta Connector2, Warning, Error: [jk_worker_jni.c (308)]: Can't find class org/apache/jk/apr/AprImpl
    Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (297)]: Loaded org/apache/jk/apr/TomcatStarter
    Apache Jakarta Connector2, None, Debug: [jk_vm_default.c (302)]: vm.attach() allready attached
    Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (252)]: jni.validate() class= org/apache/jk/apr/TomcatStarter
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (607)]: vm.open2() done
    Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (500)]: vm.init(): Jni lib: C:\wwwapps\j2sdk1.4.2_01\jre\bin\client\jvm.dll
    /watson

  • Can getGeneratedKeys() be used when executing batches of statements?

    Hi all,
    this question was posted in this thread:
    Can getGeneratedKeys() be used when executing batches of statements?
    but unfortunately I didn't find the answered appropriate.
    That thread is now locked, so I would like to start it again here.
    This is a summary of the other thread:
    Can you retrieve keys generated by a batch of insert statements? The following code produces an ArrayIndexOutOfBoundsException from the Oracle T4CNumberAccessor.unmarshalOneRow() method (see stack trace at the bottom of this message).
    The code is:
    String sql = "INSERT INTO FOO (ID, NAME) VALUES (FOO_SEQ.NEXTVAL, ?)";
    String generatedColumns[] = {"ID"};
    PreparedStatement pstmt = connection.prepareStatement(sql, generatedColumns);
    pstmt.setString(1, "A");
    pstmt.addBatch();
    pstmt.setString(1, "B");
    pstmt.addBatch();
    pstmt.setString(1, "C");
    pstmt.addBatch();
    //EXCEPTION OCCURS HERE
    pstmt.executeBatch();
    The exception is:
    java.lang.ArrayIndexOutOfBoundsException: 22
    at oracle.jdbc.driver.T4CNumberAccessor.unmarshalOneRow(T4CNumberAccessor.java:190)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:610)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10580)
    The only answer given was:
    "You should directly specify how big your batching is. For that reason you may use ExecutionContext where you can set setBatchingLimit(int) and setBatching(bool). This operation will tell execution context the size of supposed batching and also should be batching performed at all or not. You can add batching jobs but you can not execute the jobs without proper initialization of batching job size - it will fail with out of bounds."
    ExecutionContext is not something I found in jdbc drivers, so I'm a bit confused about this answer.
    Did anyone solve the problem?
    Thanks,
    Michele

    >
    We have the same problem. No solution so far.
    >
    I never found a definitive solution but testing seems to show that this is not possible.
    There is no code that can be written to get the generated keys if batching is used.
    This is because the 'getGeneratedKeys' method must be called on the prepared statement and would return the generated keys as a ResultSet object. But when batching there is only one prepared statement but multple sets of parameters, one for each batch entry.
    Thus there could only be one call to 'getGeneratedKeys' since there is only one prepared statement. This strongly implies that it is not possible to use 'getGeneratedKeys' when batching.
    See Retrieval of Auto-Generated Keys in the JDBC Dev guide
    http://docs.oracle.com/cd/B19306_01/java.102/b14355/jdbcvers.htm#CHDEGDHJ

  • Can't find class error on Tru64 UNIX

    I have written a class, TextProcessor, and I can compile and run it without any problems on my Win2K box. I ftp the source to works Tru64 box and compile the class just fine. When I issue the command "java TextProcessor" I get the msg "Can't find class TextProcessor". I immediately thought I had a classpath issue. I messed around with setting my classpath but without luck.
    I then wrote a new class on the Unix box using vi called Hello.java. I compile the Hello class without a problem. I issue the command "java Hello" and get "Hello!", just like I am supposed to get.
    The 2 classes reside in the same directory, TextProcessor does not have any package statements. I am totaly confused.
    Environment information:
    Tru64 UNIX version 5 or so.
    JDK 1.1.8 (not my choice and I have no control over the JDK)
    JRE 1.2.2 is also installed.
    Please help!
    Thanks

    Maybe.....
    Make sure that you have the permissions necesary to read,write and execute the file from your own account.
    If you canno't find any class maybe is because you cannot read.
    What account are you used to pute the file from Win?
    you can try this...
    chmod 777 TextProcessor.java
    chmod 777 TextProcessor.class
    But......????? uhmmmmmm??
    I'm not sure, because If you can compile then you can read the file, but it's depends you umask ......
    it's only a suggest

  • ERROR: Can't find class Startadmin

    Hello,
    why do I get this error message:
    Can't find class Startadmin
    I want to start my class Startadmin.java with "java Startadmin"!
    The file is in the current path, so I tried "java -classpath .: Startadmin" too, but I sill get this error!
    What can I do?

    Can you please post the solution, I'm having similar problem.
    I set the classpath before compiling the program
    export CLASSPATH=/usr/java/lib/classes.zip:/oracle/product/8.1.6/demo/lib/classes111.zip
    When I try to run the program at the command prompt
    $ java JdbcTest
    I am getting error message "Can't find class JdbcTest"
    When tried
    $ java -classpath . JdbcTest
    I was getting different error message
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JdbcTest.main(Compiled Code)
    Any help is appreiated
    Thanks
    SJ

  • Error: Can't find Class

    Hi there,
    I have added an external library (jtom) to my project. I get this runtime error when running my midlet:
    Error: Can't find Class jtom.service.JTOMException.
    When I extract the contents of the library(jtom), I can see that the class (jtom.service.JTOMException) exists. I can also see this class in myProject>>Build>>compiled folder.
    I'm using Netbeans Mobility 5.5
    Please Assist,
    Pheks

    Can you please post the solution, I'm having similar problem.
    I set the classpath before compiling the program
    export CLASSPATH=/usr/java/lib/classes.zip:/oracle/product/8.1.6/demo/lib/classes111.zip
    When I try to run the program at the command prompt
    $ java JdbcTest
    I am getting error message "Can't find class JdbcTest"
    When tried
    $ java -classpath . JdbcTest
    I was getting different error message
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JdbcTest.main(Compiled Code)
    Any help is appreiated
    Thanks
    SJ

  • HELP - 'Can't find class' error

    I have just bought a new computer with Windows XP and downloaded and installed the new versions of the jdk, jre, etc.
    I have written the Hello World program to check that everything works. It compiles fine, but when I try to run I get an error - Can't find class helloworld - and then it exits.
    I know that the path variable is set correctly and I used to have to set the classpath as well, but have been told that this is not necessary.
    I really need to get this working as have some important programming to do.
    Thanks for any help,
    Olly

    Try this;-
    prompt>set CLASSPATH=
    .......> return key
    prompt>java helloWorld
    Hello World!
    prompt>
    AMAZING!
    This works fine. Thanx.
    Is there any way to set it so that I dont have to do
    the set classpath stuff each time I run a program
    though?
    CheersWell, set a system variable
    CLASSPATH=.;<java_home>\jre\lib\rt.jar
    regardws, Thomas

  • "can't find class" error

    i have win xp as my OS and jdk1.1.8 installed. I have my class path set correctly. I have changed the environment variable to c:\jdk1.1.8\bin
    When I compile my java programs using javac at the command prompt, the program compiles successfully and the class file is made but when I run it I get the erro "can't find class filename"
    I there some other way to set the class path in XP .
    I don't understand where I am going wrong.
    Please help...

    to run a java file you would type c:\jdk1.1.8\bin\java ClassName
    leave it at that, i think the error your getting is caused when you type the .class extention ie. c:\jdk1.1.8\bin\java ClassName.class

  • Can't use F4 when try to test Z_INPUT_CUSTOMER function module

    Hi!
    I'm buy book "ABAP Objects" 2nd edition 2007 and try to make all exampless my self. All my examples have prefix Y (in program already used prefix Z by book authors). When i'm make reservation car example i have trouble to test my example with function module.
    Can't use F4 when try to test Y_INPUT_CUSTOMER function module.
    And i try to find error in Z_INPUT_CUSTOMERS. Bethween my program and builtint example i found 1 diffirence: built in example have object SREEN 1100 in tree OBJECT NAVIGATOR. When i try to make new srceen happents error (already exist). Because in module declared screen 1100.
    How can i fix error?
    Best Regards.
    [email protected]

    Hi!
    Thank every one. I have found my mistake. I forgot to make search help for id in table customers.
    Best regards.

  • I tried to download a game on my iphone 4 but it says I need the ios 4.3 update. My phone doesn't say there are any updates available and I can't find it when I connect to itunes. What do I do?

    I tried to download a game on my iphone 4 but it says I the iOS 4.3 update. My doesn't say an udate is available and I can't find it when I connect to itunes.

    Update to the current version of iTunes on the computer.
    Update the iOS on the device.

  • I get itunes can't find file when I tried to play a TV show I had purchased that was supposed to be in the cloud. There are several of these, including an entire season. In the store it shows that I purchased these shows when I checked them.

    I get itunes can't find file when I tried to play a TV show I had purchased. I then checked and had this problem with an entire TV season I had purchesed. The shows were supposed to be in the cloud. I went to the itunes store, went to the tv shows and they showed that I had purchesed them. They do not show up when I click on purchesed in the store.

    Try this...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • I've lost my iPhone 4... How can I find it when the device is offline when using "find my iPhone app"????? Any way of getting a location from it????

    I've lost my iPhone 4... How can I find it when the device is off linesmen using "find my iPhone app"????? Any way of getting a location from it?????

    No. It must be online in order to locate it.
    What To Do If Your iDevice Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. iCloud- Use Lost Mode
      6. What to do if your iOS device is lost or stolen
      7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      8. Find My iPhone
      9. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • I can't find folder when I make Search with new OS X Mavericks update?

    1- I can't find folder when I make Search with new OS X Mavericks update? I have 4 Tr HD when am looking for my file I have to make search but now search can't find files?????
    2- alt is not working?

    Hello,
    I use to do search like this before I update my Mac, how I can do it now?

Maybe you are looking for

  • Auto insert blank pages in a document and not count as page number.

    This might be too much to ask of the program but it would make my life easier. I have several documents with sub-sections. I print the final document and insert tabs between sub-sections. If a sub-section ends with the last page as the front side of

  • DVD RW DW-U10A won't read burned Dual Layer DVD

    My friend created a dual layer dvd for me on his PC. I put it in my G5 and after about 15 seconds of the drive trying to read the dist it just gets spit out. It won't mount or anything. Why is this happening? I've never had problems reading discs cre

  • Can I install my adobe photoshop elements II on more than one computer?

    Can I install my adobe photoshop elements II on more than one computer?

  • Windows 98 support

    is there a bonjour-compatible program for windows 98se? if not, then how would I access my PC from my MacBook Pro?

  • T42P Won't Recognize DVD/CD Drive

    My CD drive isn't recognized. Can't find it in Device Manager (WinXP). Can't find it in Tool Box diagnostics. System won't boot from CD drive, which leads me to think it's a hardware problem and not an XP problem. I'm told it's probably the motherboa