Problem in running a simple html program in netbeans 5.5.1

Dear all
when i am running a simple html program in netbeans 5.5.1, it is not showing the result. In url address is showing defferent. such as
http://localhost 8084/... while i need http://mydocument and setting/...
so i want to set the default address. from where shound i set it, so that in url address should come right.
thanks
From
Rajeev Sarawat

Hi cliff,
Worked as per ur Suggestion , the .tld file had
<!DOCTYPE taglib tag, I removed it, it is still not working , I m using tomcat 3.2
I tried to run the simpletag example given with Tomcat it runs, but when I copied that example to my webapps/TagViews direcotry and corrected the package and made necessary changes in web.xml kept in
WEB-INF direcotry , it gives the same error,
Is there any requirement to make a war file for taglib to run or some thing like that, or is there any other requirement after making
1) The .class file kept in install_dir/webapps/TagViews/WEB-INF/classes/Tagbeans
2) The .tld file kept in
install_dir/webapps/TagViews/WEB-INF/jsp/
3) Made cahnges in web.xml kept in
install_dir/webapps/TagViews/WEB-INF/
4) Made the jsp file kept in
install_dir/webapps/TagViews/jsp/
After doing this I restarted the tomcat server and then tried http://localhost:8080/TagViews/jsp/myTag.jsp

Similar Messages

  • Problems with running Applet through HTML

    I am currently having problems with running my file through the HTML. For some reason when I open it in the browser it keeps saying Error. I am programming in NetBeans.
    The code I am using is:
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <applet code=”CarApplet.class” codebase="RedCarApplet.jar" width=690 height=300></applet>
    </body>
    </html>

    Heres the error message, I see that it cannot find the class I have stated above. Any solutions?
    My class is in the 'build' folder but, the HTML file is in the 'src' folder. Now my applet contains a 'jar' file, do I need to add that to the HTML code?
    load: class ‚Ä?TunerApplet.class‚Ä? not found.
    java.lang.ClassNotFoundException: ‚Ä?TunerApplet.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)
    Caused by: java.io.FileNotFoundException: C:\Users\*****\*******\NetBeansProjects\RadioApplet\src\‚Ä?TunerApplet\class‚Ä?.class (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 9 more
    Exception: java.lang.ClassNotFoundException: ”TunerApplet.class”

  • I'm not able to run a simple Hello Program in java

    I have just now installed jdk 1.3.1_2.
    I have set the path and class path.
    I'm able to compile the class without any errors but am not able to run the program.
    when i say java Hello(after compiling Hello.java), i'm seeing the following error:
    Exception in thread "main" java.lang.NoclassDefFoundError:Hello
    Thanks in advance in this regard

    Hmm..
    Okay.. set aside any import or package stuffs.. lets say about a simple HelloWorld program which is called Hello.class. It resides in c:\, which means the full path is c:\Hello.class.
    Make sure you got one of your path as c:\jdk1.3\bin(assuming you are using jdk 1.3).
    If you are in the same directory as Hello.class, which is c:\>, you can execute the class file by typing:
    C:\>java Hello
    If you are not in the same directory and you wishes to run the class file, example you are in directory temp now:
    C:\Temp>java -cp C:\ Hello
    So the cp set will be just c:\. Hope that answers your question somehow.. well... if I never intepret it wrongly.

  • Problem in running a simple session bean in JOnAS

    Hi folks ,
    I just started to learn J2EE using Netbeans(5.5) and JOnAS (4.8.4 ) . I
    tried to run a simple session bean(stateless)
    invoked through client application. I successfully deployed in jonas using Netbeans (5.5) but i can't able to successfully run it.
    Output i got when i run client application :
    ==========================
    init:
    deps-jar:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    dist:
    compile:
    run:
    Feb 19, 2007 11:07:08 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:10 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:11 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:13 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:14 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:15 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:17 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:18 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:19 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:20 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:22 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:23 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Nativ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    There is a ClassDefNotFound Exception, this means that a class used (probably by the corba marshalling stuff) cannot be located. You'll need to add these classes to the client's CLASSPATH.
    Usually a client-jar file can be created or is provided by the j2ee server. If you're using the sun-wapp-server then it is done this way:
    - deploy the beans to the server (asadmin deploy)
    - create the client-stubs (asadmin client-stubs)
    - add the created client-stubs to the clients class path.
    I don't remember the exact commands for asadmin. Plz check the help. (asadmin help)
    In JBOss youll have to add jboss-all.jar to the client's classpath. It depends on the j2ee server you use.

  • How to create desktop application for simple server program using netbeans?

    Hi,can anyone help me on this one??
    I'm am very new to java,and I already trying different example program to create desktop applications
    for simple server program but it's not working.
    This is the main program for the simple server.
    import java.io.*;
    import java.net.*;
    public class Server {
    * @param args the command line arguments
    public static void main(String[] args) {
    try{
    ServerSocket serverSocket = new ServerSocket(4488);
    System.out.println("Server is waiting for an incoming connection on port 4488");
    Socket socket = serverSocket.accept();
    System.out.println(socket.getInetAddress() + "connected");
    PrintWriter out = new PrintWriter(socket.getOutputStream(), true);
    BufferedReader in = new BufferedReader( new InputStreamReader(socket.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null){
    out.println(inputLine);
    System.out.println("Connection will be cut");
    out.close();
    in.close();
    socket.close();
    serverSocket.close();
    }catch(IOException e){
    e.printStackTrace();
    // TODO code application logic here
    }

    and this is the Main Processing :
    import java.awt.*;
    import java.awt.event.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import java.text.*;
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class MainProcessing {
    private static final long serialVersionUID = 1L;
    static private boolean isApplet_ = true;
    static private InetAddress argIp_ = null;
    static private int argPort_ = 0;
    public TCPIP TCPIP_ = null;
    private InetAddress ip_ = null;
    private int port_ = 10001;
    static private boolean conectFlag = false;
    private BufferedWriter bw;
    FileOutputStream fos;
    OutputStreamWriter osw;
    public int[] current = new int[400];
    public int[] volt = new int[400];
    public int[] revolution = new int[400];
    public void init() {
    public void start() {
    if (isApplet_) {
    try {
    ip_ = InetAddress.getByName(getCodeBase().getHost());
    } catch (UnknownHostException e) {
    } else {
    ip_ = argIp_;
    if (argPort_ != 0) {
    port_ = argPort_;
    // IP&#12450;&#12489;&#12524;&#12473;&#12364;&#19981;&#26126;&#12394;&#12425;&#20309;&#12418;&#12375;&#12394;&#12356;
    if (ip_ != null) {
    // &#12467;&#12493;&#12463;&#12471;&#12519;&#12531;&#12364;&#25104;&#31435;&#12375;&#12390;&#12356;&#12394;&#12356;&#12394;&#12425;&#12289;&#25509;&#32154;
    if (TCPIP_ == null) {
    TCPIP_ = new TCPIP(ip_, port_);
    if (TCPIP_.getSocket_() == null) {
    System.out.println("&#12511;&#12473;&#65297;");
    // &#12456;&#12521;&#12540;&#12513;&#12483;&#12475;&#12540;&#12472;&#12434;&#34920;&#31034;
    return;
    if (TCPIP_ == null) {
    System.out.println("&#12511;&#12473;&#65298;");
    return;
    System.out.println("&#25104;&#21151;");
    conectFlag = true;
    try {
    TCPIP_.sendF();
    } catch (IOException ex) {
    Logger.getLogger(MainProcessing.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("" + conectFlag);
    return;
    public void receive() {
    try {
    // Calendar cal1 = Calendar.getInstance(); //(1)&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12398;&#29983;&#25104;
    // int year = cal1.get(Calendar.YEAR); //(2)&#29694;&#22312;&#12398;&#24180;&#12434;&#21462;&#24471;
    // int month = cal1.get(Calendar.MONTH) + 1; //(3)&#29694;&#22312;&#12398;&#26376;&#12434;&#21462;&#24471;
    // int day = cal1.get(Calendar.DATE); //(4)&#29694;&#22312;&#12398;&#26085;&#12434;&#21462;&#24471;
    // int hour = cal1.get(Calendar.HOUR_OF_DAY); //(5)&#29694;&#22312;&#12398;&#26178;&#12434;&#21462;&#24471;
    // int min = cal1.get(Calendar.MINUTE); //(6)&#29694;&#22312;&#12398;&#20998;&#12434;&#21462;&#24471;
    // int sec = cal1.get(Calendar.SECOND); //(7)&#29694;&#22312;&#12398;&#31186;&#12434;&#21462;&#24471;
    byte[] rev = TCPIP_.receive();
    // System.out.println("&#21463;&#20449;");
    if (rev != null) {
    byte[] Change = new byte[1];
    int j = 0;
    for (int i = 0; i < 1200; i++) {
    Change[0] = rev;
    current[j] = decimalChange(Change);
    i++;
    Change[0] = rev[i];
    volt[j] = decimalChange(Change);
    i++;
    Change[0] = rev[i];
    revolution[j] = decimalChange(Change);
    } catch (NullPointerException e) {
    public int decimalChange(byte[] byteData) {
    int bit0, bit1, bit2, bit3, bit4, bit5, bit6, bit7;
    int bit = 0;
    for (int i = 0; i < 8; i++) {
    int a = (byteData[0] >> i) & 1;
    System.out.print(a);
    System.out.println();
    return 1;
    public void destroy() {
    // &#20999;&#26029;
    if (TCPIP_ != null) {
    TCPIP_.disconnect();
    if (TCPIP_.getSocket_() != null) {
    try {
    System.out.println("\ndisconnect:" + TCPIP_.getSocket_().getInetAddress().getHostAddress() + " " + TCPIP_.getSocket_().getPort());
    } catch (Exception e) {
    TCPIP_ = null;
    public boolean conect(int IP) {
    conectFlag = false;
    String address = "192.168.1." + IP;
    System.out.println(address);
    try {
    argIp_ = InetAddress.getByName(address);
    } catch (UnknownHostException e) {
    // xp.init();
    isApplet_ = false;
    start();
    return (conectFlag);
    public void send(String command, int value, int sendData[][], int i) {
    int j = 0;
    Integer value_ = new Integer(value);
    byte values = value_.byteValue();
    Integer progNum = new Integer(i);
    byte progNums = progNum.byteValue();
    try {
    TCPIP_.send(command, values, progNums);
    for (j = 1; j <= i; j++) {
    Integer time = new Integer(sendData[j][0]);
    byte times = time.byteValue();
    Integer power = new Integer(sendData[j][1]);
    byte powers = power.byteValue();
    TCPIP_.send(times, powers);
    TCPIP_.flush();
    } catch (IOException ex) {
    Logger.getLogger(MainProcessing.class.getName()).log(Level.SEVERE, null, ex);
    public void file(String name) {
    ublic void fileclose(String name, String command, int value, int sendData[][], int i) {
    try {
    fos = new FileOutputStream("" + name + ".csv");
    osw = new OutputStreamWriter(fos, "MS932");
    bw = new BufferedWriter(osw);
    String msg = "" + command + "," + value + "";
    bw.write(msg);
    bw.newLine();
    for (int j = 1; j <= i; j++) {
    msg = "" + j + "," + sendData[i][0] + "," + sendData[i][1];
    bw.write(msg);
    bw.newLine();
    bw.close();
    } catch (IOException ex) {
    Logger.getLogger(MainProcessing.class.getName()).log(Level.SEVERE, null, ex);

  • Help: Problem in running a simple EJB client

    Hi All,
    I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
    I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
    // EJB client code in main()
    Context ctx = new InitialContext();
    Object hwobj = ctx.lookup("HelloWorldApp");
    HelloWorldHome hworldHome = (HelloWorldHome)
    PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
    HelloWorld hworld = hworldHome.create();
    String msg = hworld.sayHelloWorld();
    System.out.println(msg);
    When I am running my client I am getting the following exception. Can anyone tell me why ?
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at HelloWorldClient.main(HelloWorldClient.java:13)
    Thanks
    Ratheesh

    * I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
    * Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
    Forum Home > Enterprise JavaBeans
    Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Welcome ratheeshpai!
    Search Forum
    Not watching this topic.
    This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
    [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: NicholasHsiao Oct 28, 2001 5:51 AM
    Hi,
    I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
    org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
    Context ic = null;
    try
    ic = new InitialContext();
    catch(Exception e)
    System.out.println("1: "+e.toString());
    This exception is happend when I try to lookup the jndi name
    This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: cdunn5
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
    Reply 1 of 4
    hi,
    I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: scottiep
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
    Reply 2 of 4
    Da:Frederik Hansen ([email protected])
    Message 2 in thread
    Soggetto:Re: J2EE - NO_PERMISSION
    Newsgroups:dk.edb.programmering.java
    View this article only
    Data:2001-11-10 03:32:12 PST
    For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
    beta 2 stop running under the 1.3 FCS release with the
    following message: java.rmi.AccessException: CORBA
    NO_PERMISSION 0 No. Why does this happen and what
    can be done about it? When your application ran under the 1.3 beta 2
    version of the reference implementation (RI), security permissions may
    not have
    been checked. For example, the beta 2 RI allowed
    calls to enterprise beans that required username-password permission,
    even
    when the client provided no username-password
    information. With 1.3 FCS release, the J2EE SDK became strict
    about checking adherence to the security policies of J2EE components. How can you make your application run under the
    FCS release? 1.If you don't want security checks, do the
    following: Use the deploytool to build a deployment
    descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
    or the Security tab of the EJB inspector in deploytool, click
    "Deployment
    Settings..". Under the box "Client
    Authentication", make sure "Support Client Choice" is checked instead of
    "Certificate"
    or "Password". 2.To require the application pass security
    checks to run, do the following: When an enterprise bean specifies
    "Certificate" or "Password" as the method of Client Authentication, use
    a J2EE
    application client, instead of a stand-alone
    Java application, to access the bean. You will need to login as a valid
    J2EE
    user.
    By : scottiep
    Thanks
    Ratheesh

  • Running a Simple Java Program in Windows 7

    Hello:
    Learning Java.
    I have Windows 7 64 bit. I have following Java installed:
    C:\Program Files\Java\jdk1.6.0_21\demo>java -version
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)
    My path is as follows:
    C:\Program Files\Java\jdk1.6.0_21\demo>path
    PATH= C:\Program Files\Java\jdk1.6.0_21\bin;C:\Windows\system32;C:\Windows;C:\Wi
    ndows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files
    (x86)\QuickTime\QTSystem\
    When I try to run a program called Exampleprogram.java as follows, I see below error:
    C:\Program Files\Java\jdk1.6.0_21\demo>java exampleprogram.java
    Exception in thread "main" java.lang.NoClassDefFoundError: exampleprogram/java
    Caused by: java.lang.ClassNotFoundException: exampleprogram.java
    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)
    Could not find the main class: exampleprogram.java. Program will exit.
    C:\Program Files\Java\jdk1.6.0_21\demo>
    Will appreciate your early help. Thanks.
    Victor

    Recomplied and still no luck. I gave a different name to the program and still getting the same error as follows:
    C:\Program Files\Java\jdk1.6.0_21\bin>dir hel*
    Volume in drive C is WINDOWS7PRO
    Volume Serial Number is EB0E-8900
    Directory of C:\Program Files\Java\jdk1.6.0_21\bin
    10/03/2010 11:29 AM 269 helloworld.java
    10/03/2010 11:33 AM 429 HelloWorldApp.class
    2 File(s) 698 bytes
    0 Dir(s) 123,998,978,048 bytes free
    C:\Program Files\Java\jdk1.6.0_21\bin>java helloworld.java
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld/java
    Caused by: java.lang.ClassNotFoundException: helloworld.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: helloworld.java. Program will exit.
    C:\Program Files\Java\jdk1.6.0_21\bin>
    Thoughts please.

  • How to run the simple java card program in eclipse?

    I am trying to run a simple HelloWorld program in eclipse 3.5 having java card development kit 2.2 installed in it.
    Firstly,I go to the JCWDE tab and press start..then when trying to deploy that package its giving me error like " com.hw.HelloWorld: unsupported class file format of version 50.0." can any one help me in this what is this error???n how to resolve n run this program..

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • What is the most reliable way to run one Windows accounting program in Osx 10.5.8?

    I have a simple Windows application where I basically do my accounts. I do not want to tie up my Imacs resources with running a full Windows Os "emulation" like Paralells or VMware Fusion just to run a simple accounting program.
    I have heard about apps that can run one windows application at the time through a kind of Osx Application which emulates windows some how. Is is true that this is a better way of running my accounting program? Is it reliable? What I do is to punch in invoices and print out reports basically. How much resources does this "consume" to run it in "one simple application mode" in comparison with for example Paralells?
    And what is the term for running windows in "one simple application mode"?

    I guess you could try the free trial of CrossOver. http://www.codeweavers.com/products/crossover/ You did not say what app you want to run so it is difficult for us to recommend crossover as being able to run the app.
    But your question is that you are looking for the "most reliable" way to run a Windows program. In my opinion you need Parallels or Fusion. These run the real Windows OS so my thinking is it is the "most reliable" method of running a Windows app on an Apple computer, other than Boot Camp.
    But you said you don't want Parallels. This is probably why you have not received any responses. You eliminated the most reliable and easiest method, in my opinion, when you initially posted. Parallels does not consume any resources until you start it up to use your app. You can close it after you are done with your app. Of course hard drive space is required for storing the OS, your app, and data. But you still need to store your app and data regardless of method you choose.
    One more thing, Parallels and Fusion create a virtual machine for running Windows.
    So my recommendation, use Parallels or Fusion.

  • Running JMX with HTML adapter

    Hi!
    I am new to JMX MBeans and I'm trying to run a simple sample program with HtmlAdaptorServer. I have three .java files, one with the interface, on with the class having its implementation and a main .java file to register with the server..etc.
    I am able to compile the 3 files without any error but while running, it gives me the following exeption:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    HelloAgent (wrong name:com/example/mbeans/HelloAgent)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Can someone please help me as to where am I goin wrong?
    -Kanak

    Kanak10 wrote:
    hi!
    I have the same, a com, then example, mbean and inside it HelloAgent.java.That's not what I've been describing. Almost, but not entirely. Check what I wrote above.
    But how do I exactly set the classpath? should it be an environment variable?Sorry, but if you don't know that, then you must keep away from JMX for some time and go back to the basics.
    See this and this.

  • Problems running a simple program

    I just installed java on my home machine and I am new to Java. I typed in a simple HelloWorld program and saved it to my c:\temp. It compiled ok and created a .class file. When I run that file, I get the following error message:
    Exception in thread "Main" java.lang.NoClassDefFound error
    How can I correct this?
    Thank you,
    Rich

    Did you run with the command "java XXXX.class"?
    If so, you will get error message like you post.
    run like this:
    java XXXX
    (don't input ".class")

  • I have some software problems of running matlab script node in the LabVIEW program.

    Hi there,
    I wrote a simple matlab code, like x= 1, y = x*2. Then I tried to put them into matlab script node in LabVIEW.
    However, when I ran the program, I couldn't run and Labiew show some error. 
    Then I tried the method talked before on this forum. Please see the following link.
    http://forums.ni.com/ni/board/message?board.id=Mat​hScript&thread.id=571
    I followed the instruction and open the "command prompt," type some commands then I could run the program, and simultaneously, the LabVIEW program open "Matlab command line window" and run my labview code. However, if I didn't use the command prompt, the  "matlab command window" will not be opened by running the labview program. It would just show some error. And even if I turn on the matlab program in advance, I still couldn't run the labview program.
    Is there any effecient way to deal with this problem without using "command prompt?" Because I try another PC with both matlab and labview installed on it, I "can" run my simple matlab script node on it, and it will open the matlab command line window automatically by running my code. Therefore, I thought there might be some software linking problems in the previous PC I used . Do you have any ideas?
    Thanks in advacne.  

    This board is for Mathscript, but you seem to have a matlab problem. You should probably post in the LabVIEW forum instead.
    What is your LabVIEW version? What is you matlab version?
    LabVIEW Champion . Do more with less code and in less time .

  • Run simple java program error

    Hi:
    I followed the step by step at "Your First Cup of Java (for Microsoft Windows)" at
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#
    all the steps work, esecpt for the run program part, I get Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp. but the HelloWorldApp clases is there. and I set my path and classes path at xp enviroment
    classes %CATALINA_HOME%\common\lib\servlet.jar;c:\jdom-b8\build\jdom.jar;c:\jdom-b8\lib\xerces.jar; Library.java;c:\hsqldb\lib\hsqldb.jar
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;c:\jdk1.4.0_02\bin; %path%
    hope you can help !
    Thank you

    The problem with running the HelloWorldApp is because you have set the classpath.
    It looks like Tomcat and others are installed on your system. Trying to run before you can walk, eh!
    This is your system CLASSPATH and points to directories that contain classes and/or *.jar files that contain classes:
    .;%CATALINA_HOME%\common\lib\servlet.jar;c:\jdom-b8\build\jdom.jar;c:\jdom-b8\lib\xerces.jar;c:\hsqldb\lib\hsqldb.jar
    I don't know why Libary.java is there in your original post because it is a source file and not a class yet; and you don't point directly at a class, only the folder or JAR it is in.
    This is your system PATH and points to directories that contain programs:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;c:\jdk1.4.0_02\bin;
    With XP the environment is split into two parts:
    1/ the system environment variables and will prepend to:
    2/ your user environment variables may have the same name and will append to variables in 1/. So there is no need for the %path% bit.
    Make sure that CATALINA_HOME is set to the base folder of the CATALINA(TOMCAT) installation, if you are planning to use it.
    You shouldn't need to set PATH or CLASSPATH for your user ID unless you only want that user id to have access.
    My advice (if it is your machine) is to uninstall Apache/Tomcat and anything else (such as JDOM) that isn't basic Java until you have learned the language. Then delete the CLASSPATH variable and remove the \system32\WBEM; part of the the PATH variable.
    Regards,
    Hugh.

  • Problem while running client program in Netbeans4.0

    Hi,
    I am facing the following problem while running a client program in Nebeans4.0.
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7C9012B4
    Function=RtlInitAnsiString+0x1B
    Library=C:\WINDOWS\system32\ntdll.dll
    Current Java thread:
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:770)
    at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1059)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1009)
    at java.net.InetAddress.getAllByName0(InetAddress.java:981)
    at java.net.InetAddress.getAllByName(InetAddress.java:975)
    at weblogic.rjvm.RJVMFinder.getDnsEntries(RJVMFinder.java:370)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:181)
    - locked <0x1007ff78> (a weblogic.rjvm.RJVMFinder)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:125)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:291)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at AcfClient.getHomeRef(AcfClient.java:73)
    at AcfClient.forceSession(AcfClient.java:43)
    at AcfClient.main(AcfClient.java:34)
    Dynamic libraries:
    0x00400000 - 0x00406000      C:\Data\j2sdk1.4.2_04\jre\bin\java.exe
    0x7C900000 - 0x7C9B0000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C8F4000      C:\WINDOWS\system32\kernel32.dll
    0x77DD0000 - 0x77E6B000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E70000 - 0x77F01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77C10000 - 0x77C68000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x08138000      C:\Data\j2sdk1.4.2_04\jre\bin\client\jvm.dll
    0x77D40000 - 0x77DD0000      C:\WINDOWS\system32\USER32.dll
    0x77F10000 - 0x77F56000      C:\WINDOWS\system32\GDI32.dll
    0x76B40000 - 0x76B6D000      C:\WINDOWS\system32\WINMM.dll
    0x6BD00000 - 0x6BD0D000      C:\WINDOWS\system32\SYNCOR11.DLL
    0x10000000 - 0x10007000      C:\Data\j2sdk1.4.2_04\jre\bin\hpi.dll
    0x00390000 - 0x0039E000      C:\Data\j2sdk1.4.2_04\jre\bin\verify.dll
    0x003B0000 - 0x003C9000      C:\Data\j2sdk1.4.2_04\jre\bin\java.dll
    0x003D0000 - 0x003DD000      C:\Data\j2sdk1.4.2_04\jre\bin\zip.dll
    0x02DA0000 - 0x02DAF000      C:\Data\j2sdk1.4.2_04\jre\bin\net.dll
    0x71AB0000 - 0x71AC7000      C:\WINDOWS\system32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71A50000 - 0x71A8F000      C:\WINDOWS\System32\mswsock.dll
    0x76F20000 - 0x76F47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76FB0000 - 0x76FB8000      C:\WINDOWS\System32\winrnr.dll
    0x76F60000 - 0x76F8C000      C:\WINDOWS\system32\WLDAP32.dll
    0x66210000 - 0x66219000      C:\WINDOWS\system32\netware\NWWS2NDS.DLL
    0x50D50000 - 0x50D95000      C:\WINDOWS\system32\NETWIN32.DLL
    0x50D00000 - 0x50D15000      C:\WINDOWS\system32\CLNWIN32.DLL
    0x50DF0000 - 0x50E10000      C:\WINDOWS\system32\LOCWIN32.DLL
    0x50DB0000 - 0x50DD9000      C:\WINDOWS\system32\NCPWIN32.dll
    0x71AD0000 - 0x71AD9000      C:\WINDOWS\system32\WSOCK32.dll
    0x66220000 - 0x6622C000      C:\WINDOWS\system32\netware\NWWS2SLP.DLL
    0x1C000000 - 0x1C007000      C:\WINDOWS\system32\NWSRVLOC.dll
    0x76C90000 - 0x76CB8000      C:\WINDOWS\system32\imagehlp.dll
    0x59A60000 - 0x59B01000      C:\WINDOWS\system32\DBGHELP.dll
    0x77C00000 - 0x77C08000      C:\WINDOWS\system32\VERSION.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 497K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 89% used [0x10010000, 0x10083158, 0x10090000)
    from space 64K, 57% used [0x100a0000, 0x100a9478, 0x100b0000)
    to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
    tenured generation total 1408K, used 129K [0x104f0000, 0x10650000, 0x14010000)
    the space 1408K, 9% used [0x104f0000, 0x10510438, 0x10510600, 0x10650000)
    compacting perm gen total 4096K, used 2122K [0x14010000, 0x14410000, 0x18010000)
    the space 4096K, 51% used [0x14010000, 0x14222828, 0x14222a00, 0x14410000)
    Local Time = Fri Aug 26 10:26:03 2005
    Elapsed Time = 2
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode)
    # An error report file has been saved as hs_err_pid1280.log.
    # Please refer to the file for further information.
    Can anyone pls let me know what could be the problem.
    Thanks in adv.

    Hi,
    This type of error
    java.lang.NoClassDefFoundError: javax/naming/Context
    will occur when the client program could not able to locate lib/j2EE.jar file.
    So set the classpath correctly and make sure that you have correctly defined the JAVA_HOME environment variable in .bat script.
    Hope this will help you.
    Regards,
    Anil.
    Technical Support Engineer.

  • Problem while executing simple java program

    Hi
    while trying to execute a simple java program,i am getting the following exception...
    please help me in this
    java program :import java.util.*;
    import java.util.logging.*;
    public class Jump implements Runnable{
        Hashtable activeQueues = new Hashtable();
        String dbURL, dbuser, dbpasswd, loggerDir;   
        int idleSleep;
        static Logger logger = Logger.getAnonymousLogger();      
        Thread myThread = null;
        JumpQueueManager manager = null;
        private final static String VERSION = "2.92";
          public Jump(String jdbcURL, String user, String pwd, int idleSleep, String logDir) {
            dbURL = jdbcURL;
            dbuser = user;
            dbpasswd = pwd;
            this.idleSleep = idleSleep;
            manager = new JumpQueueManager(dbURL, dbuser, dbpasswd);
            loggerDir = logDir;
            //preparing logger
            prepareLogger();
          private void prepareLogger(){      
            Handler hndl = new pl.com.sony.utils.SimpleLoggerHandler();
            try{
                String logFilePattern = loggerDir + java.io.File.separator + "jumplog%g.log";
                Handler filehndl = new java.util.logging.FileHandler(logFilePattern, JumpConstants.MAX_LOG_SIZE, JumpConstants.MAX_LOG_FILE_NUM);
                filehndl.setEncoding("UTF-8");
                filehndl.setLevel(Level.INFO);
                logger.addHandler(filehndl);
            catch(Exception e){
            logger.setLevel(Level.ALL);
            logger.setUseParentHandlers(false);
            logger.addHandler(hndl);
            logger.setLevel(Level.FINE);
            logger.info("LOGGING FACILITY IS READY !");
          private void processTask(QueueTask task){
            JumpProcessor proc = JumpProcessorGenerator.getProcessor(task);       
            if(proc==null){
                logger.severe("Unknown task type: " + task.getType());           
                return;
            proc.setJumpThread(myThread);
            proc.setLogger(logger);       
            proc.setJumpRef(this);
            task.setProcStart(new java.util.Date());
            setExecution(task, true);       
            new Thread(proc).start();       
         private void processQueue(){       
            //Endles loop for processing tasks from queue       
            QueueTask task = null;
            while(true){
                    try{
                        //null argument means: take first free, no matters which queue
                        do{
                            task = manager.getTask(activeQueues);
                            if(task!=null)
                                processTask(task);               
                        while(task!=null);
                    catch(Exception e){
                        logger.severe(e.getMessage());
                logger.fine("-------->Sleeping for " + idleSleep + " minutes...hzzzzzz (Active queues:"+ activeQueues.size()+")");
                try{
                    if(!myThread.interrupted())
                        myThread.sleep(60*1000*idleSleep);
                catch(InterruptedException e){
                    logger.fine("-------->Wakeing up !!!");
            }//while       
        public void setMyThread(Thread t){
            myThread = t;
        /** This method is only used to start Jump as a separate thread this is
         *usefull to allow jump to access its own thread to sleep wait and synchronize
         *If you just start ProcessQueue from main method it is not possible to
         *use methods like Thread.sleep becouse object is not owner of current thread.
        public void run() {
            processQueue();
        /** This is just another facade to hide database access from another classes*/
        public void updateOraTaskStatus(QueueTask task, boolean success){
            try{         
                manager.updateOraTaskStatus(task, success);
            catch(Exception e){
                logger.severe("Cannot update status of task table for task:" + task.getID() +  "\nReason: " + e.getMessage());       
        /** This is facade to JumpQueueManager method with same name to hide
         *existance of database and SQLExceptions from processor classes
         *Processor class calls this method to execute stored proc and it doesn't
         *take care about any SQL related issues including exceptions
        public void executeStoredProc(String proc) throws Exception{
            try{
                manager.executeStoredProc(proc);
            catch(Exception e){
                //logger.severe("Cannot execute stored procedure:"+ proc + "\nReason: " + e.getMessage());       
                throw e;
         *This method is only to hide QueueManager object from access from JumpProcessors
         *It handles exceptions and datbase connecting/disconnecting and is called from
         *JumpProceesor thread.
        public  void updateTaskStatus(int taskID, int status){       
            try{
                manager.updateTaskStatus(taskID, status);
            catch(Exception e){
                logger.severe("Cannot update status of task: " + taskID + " to " + status + "\nReason: " + e.getMessage());
        public java.sql.Connection getDBConnection(){
            try{
                return manager.getNewConnection();
            catch(Exception e){
                logger.severe("Cannot acquire new database connection: " + e.getMessage());
                return null;
        protected synchronized void setExecution(QueueTask task, boolean active){
            if(active){
                activeQueues.put(new Integer(task.getQueueNum()), JumpConstants.TH_STAT_BUSY);
            else{
                activeQueues.remove(new Integer(task.getQueueNum()));
        public static void main(String[] args){
                 try{
             System.out.println("The length-->"+args.length);
            System.out.println("It's " + new java.util.Date() + " now, have a good time.");
            if(args.length<5){
                System.out.println("More parameters needed:");
                System.out.println("1 - JDBC strign, 2 - DB User, 3 - DB Password, 4 - sleeping time (minutes), 5 - log file dir");
                return;
            Jump jump = new Jump(args[0], args[1], args[2], Integer.parseInt(args[3]), args[4]);
            Thread t1= new Thread(jump);
            jump.setMyThread(t1);      
            t1.start();}
                 catch(Exception e){
                      e.printStackTrace();
    } The exception i am getting is
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe
    Exception in thread "main" ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
    JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820] Please help me.....
    Thanks in advance.....sathya

    I am not willing to wade through the code, but this portion makes me conjecture your using an Oracle connect string instead of a class name.
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe

Maybe you are looking for

  • Problem on running sample application: Versioning

    Hi, I have downloaded the sample application (Building Versioning Applications with the Oracle Internet File System) and installed step by step as said from the installation guide. I use AIX 4.3.3, JDK 1.2.2, Oracle DB 8.1.7.1 and IFS 1.1.9. When I t

  • My CameraRGB profile is gone.  how do I get a new one ?

    Took some bad online advice and now I can't get it back. photos are bizarre same problem with iMAC/Tiger until I was able to load the Canon 7D ICC profile directly from the camera but apparantly the firmware on the camera hadn't been updated and I co

  • How do I add plugin to my android?

    trying to watch a movie website that was working a couple of days ago now I can't add a plugin at all to play. I have a galaxy s4

  • Double Click to expand - Black Screen

    Last Thursday the hard drive crashed on my mini. Took it to Apple Authorized repair and installed new hard drive plus installed Snow Leopard again and supposedly installed iPhoto 9. Started first boot and told unit to update data from Time Machine. A

  • Sorted order of returned pictures from Apple

    Hi, Everytime I order prints (4x6) from Apple - via iPhoto - they are shipped to me in random order. For example, I upload 50 prints of a baseball game. When the 50 prints come back, the are not sorted in the same order I upload them (it is completel