Client Side applet connection

I have a server-side applet (ThreadedLoanCalcServer) and want my applet (LoanCalcClient) connects on the same port from the client side. All CLASSes are in the same location.
java ThreadedLoanCalcServer 8080
8080 is port number I chose.
How do you make the connection?
tia

I think I got a majority of them.
public void init(){
try {
socket = new Socket("myhostxyz",8765);
catch (UnknownHostException e){
MPLabel.setText("Unknown Host");
catch (IOException e){
MPLabel.setText("IO Exception: socket connection");
return;
bla ...
public void actionPerformed(ActionEvent ae) {
DecimalFormat money = new DecimalFormat("$###,###.00"); // $ format
String aString = null;
BufferedReader fromServer = null;
PrintWriter toServer = null;
bla ....
String str =
"INTEREST="+txtRat.getText()+"&"+"AMOUNT="+txtAmo.getText()+"&"+
"PERIOD="+txtTerm.getText()+"&"+"FREQUENCY="+Freq;
// send my str to the server
try {
toServer = new PrintWriter(socket.getOutputStream(), true);
catch (IOException ex){
MPLabel.setText("IO Exception: PrintWriter");
toServer.println(str);
try {
fromServer = new BufferedReader(
new InputStreamReader(socket.getInputStream()));
catch (IOException ex){
MPLabel.setText("IO Exception:BufferedReader");
// Receive the line from the server
String aString;
try {
aString = fromServer.readLine();
catch (IOException ex){
MPLabel.setText("IO Exception");
     StringTokenizer parser = new StringTokenizer(aString, "ERROR&");
bla ...
Thank you,
Daniel

Similar Messages

  • Client-side-applet

    Hi i'm new in this forum an would like some advice on a subject. I'm currently working on an online applet based tutorial teaching swing. I have created my tutorial and in the process of creating my website in which the tutorial will be embedded. This is a project I am doing to help other students to learn about swing using visual examples, hence applet based. I am going to be providing applets so people can see the different swing components and the code it takes to create one. Now heres the part I would like some advise about, I want to create an interactive part. I would like to place a textarea or box where they can enter java code to create an applet. After they click submit the server will then take the code as a query and create the applet and display it back on the clients browser. I have researched into JSP and servlets and even thought about using PHP to do this but am in a dilemma of what will be best. I know that servlets and jsp can take queries in the form of single lines of data in html and display it back, is it possible for it to take java coding as a whole and create an applet? Some advice or general pointers would be most appreciated. Thankyou.

    Its an interesting idea. but I think it would be better if your students download Eclipse Europa IDE (or similiar IDE) and learn how to work with it. The vendor spent over 20,000,000 dollors on creating it and your application is attempting to create an on-line IDE that will not have nearly as much functionality. I don't want to discurage you, but I suggest a different project. Alternatively, If you want, you can create a tutorial on setting up the IDE and how to create a simple project in it and launch it. Then again, there are probably a lot of other on-line examples already on this this. On the other hand, your application is great practice on updating your java skills.

  • Applet without JMF installation at client side

    hello,
    I am trying developing an applet SIP phone based on Jain Sip Applet Phone( which originally can only deal with audio signal). But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.
    In application, I can run it without JMF installation by copying all the dlls to system32 directory and add some related JMF source code into my own project. Or just simply put the jmf.property to the "lib" directory, which also works.
    However, as for the applet, it dosen't that simple for the security thing. Here is the output in cosole:
    @mediaManager.detectSupportedCodes- number of capture devices: 2
    - name of the capture device: JavaSound audio capture
    - format accepted by this AUDIO device: LINEAR, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 44100.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 22050.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 22050.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 11025.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 11025.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 8000.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 8000.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - name of the capture device: vfw:Microsoft WDM Image Capture (Win32):0
    - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=352,height=288] MaxDataLength = 202752 DataType = class [B yuvType = 32 StrideY = 704 StrideUV = 704 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=160,height=120] MaxDataLength = 38400 DataType = class [B yuvType = 32 StrideY = 320 StrideUV = 320 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=176,height=144] MaxDataLength = 50688 DataType = class [B yuvType = 32 StrideY = 352 StrideUV = 352 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLength = 153600 DataType = class [B yuvType = 32 StrideY = 640 StrideUV = 640 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=640,height=480] MaxDataLength = 614400 DataType = class [B yuvType = 32 StrideY = 1280 StrideUV = 1280 OffsetY = 0 OffsetU = 1 OffsetV = 3
    java.lang.RuntimeException: No permission to capture from applets
    -> Couldn't connect to audio capture device
    java.lang.RuntimeException: No permission to capture from applets
    -> Couldn't connect to video capture device
          I found that my applet can detect two device which is correct but has "no permission to capture from applets".
          In the progress of installation the JMF, and option is "permit recording from an applet". I read the source code, and found it dose the following works:
          if I choose "permit recording from an applet",  then "allowCapture=1", and in "settingPanel.java" it dose:
         "boolean allowCapture = checkAllowCapture.getState();
          Registry.set("secure.allowCaptureFromApplets", new Boolean(allowCapture));"
          I want to do what the installation progress did to give permition to applet, however, when I do the following:
           private static final String PROP_ALLOW_CAPTURE_FROM_APPLETS
            = "secure.allowCaptureFromApplets";
           Registry.set(PROP_ALLOW_CAPTURE_FROM_APPLETS, new Boolean(true));
           Registry.commit();
          in my project , it throws exception like this: "Failed to initially commit JMFRegistry. Ignoring err.java.lang.SecurityException: commit: Permission denied"
          The code which i thought could give applet the rights is denied.
          Till now, I have also read some similar questions in different forums, but there is no good answer.
          Can you help me? Is there any possibility to run the applet without installation on the client side ? Is my method right? If not, how should I do?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    xljiayuan wrote:
    ..I am trying developing an applet SIP phone based on Jain Sip Applet Phone( which originally can only deal with audio signal). If this is pure audio, can it be done using JavaSound?
    ..But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.To run an applet, the applet needs to be 'installed' on the user machine. Same with anything else.
    BTW - have you investigated JavaFX? It is effectively the replacement for JMF, and possibly has a better end-user experience than trying to install JMF.
    However, as for the applet, it dosen't that simple for the security thing. Here is the output in cosole:
    in my project , it throws exception like this: "Failed to initially commit JMFRegistry. Ignoring err.java.lang.SecurityException: commit: Permission denied"Is your applet digitally signed? If not, it has no hope of intercepting sound on the client. It is that simple.
    Imagine if you visited a web page with a 1px x 1px applet (effectively invisible) that could hear everything you say, and transmit it back to the server. Sun is not about to allow that, unless the end-user has granted the applet extended permissions.

  • How can an client-applet connect to server-DB?

    as the subject.
    I want the applet@client-side connect to DataBase@server-side,
    I am using Tomcat as engine & JDBC-mysql as tools
    where should the jdbc class placed in? WEB-INF/classes ? WEB-INF/lib ?? or others?
    now i am facing the problem that the applet seems cannot access WEB-INF and cannot locate the jdbc driver.
    could anybody give me some hints?
    thank you very much

    Hello
    I don't know the answer, sorry. This is the jdb (java debugger) tool forum.
    You might want to post your question over on the JDBC forum.
    Try this link:
    http://forum.java.sun.com/forum.jsp?forum=48

  • Java Stored Procedure / connection JDBC / Server Side / Client Side

    Hi,
    I would like to know if we can know at the runtime with a JDBC api if the stored procedure is running in client side or in server side ?
    THANKS

    You wrote
    "Java stored procedures -- by definition - are stored in the 8i rdbms. !!"
    From the Oracle8i Java Stored Procedures Developer's Guide
    Release 8.1.5
    A64686-01
    "If you create Java class files on the client side, you can use loadjava to upload them into the RDBMS. Alternatively, you can upload Java source files and let the Aurora JVM compile them. In most cases, it is best to compile and debug programs on the client side, then upload the class files for final testing within the RDBMS"
    This means that you can create shared classes that are used on both the client and server side. The source does not need to reside within the server (according to their documentation). Please also note the following from the Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 for using the getConnection() method on the server:
    "If you connect to the database with the DriverManager.getConnection() method, then use the connect string jdbc:oracle:kprb:. For example:
    DriverManager.getConnection("jdbc:oracle:kprb:");
    Note that you could include a user name and password in the string, but because you are connecting from the server, they would be ignored."
    So if you're coding a shared class that is to run on both the client and server side, you might do something like this:
    Connection conn =
    DriverManager.getConnection(
    System.getProperty("oracle.server.version") == null
    ? "jdbc:oracle:thin:@hostname:1521:ORCL"
    : "jdbc:oracle:kprb:"),
    "youruserid","yourpassword");
    As stated earlier, the userid and password are supposedly ignored for server connections retrieved in this manner. I haven't tried this yet, but it is documented by Oracle.
    Regards,
    Steve
    null

  • Java Stored Procedure / Server Side / Client Side / connection

    Hi,
    I would like to know if we can know at the runtime with a JDBC api if the stored procedure is running in client side or in server side ?
    THANKS

    You wrote
    "Java stored procedures -- by definition - are stored in the 8i rdbms. !!"
    From the Oracle8i Java Stored Procedures Developer's Guide
    Release 8.1.5
    A64686-01
    "If you create Java class files on the client side, you can use loadjava to upload them into the RDBMS. Alternatively, you can upload Java source files and let the Aurora JVM compile them. In most cases, it is best to compile and debug programs on the client side, then upload the class files for final testing within the RDBMS"
    This means that you can create shared classes that are used on both the client and server side. The source does not need to reside within the server (according to their documentation). Please also note the following from the Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 for using the getConnection() method on the server:
    "If you connect to the database with the DriverManager.getConnection() method, then use the connect string jdbc:oracle:kprb:. For example:
    DriverManager.getConnection("jdbc:oracle:kprb:");
    Note that you could include a user name and password in the string, but because you are connecting from the server, they would be ignored."
    So if you're coding a shared class that is to run on both the client and server side, you might do something like this:
    Connection conn =
    DriverManager.getConnection(
    System.getProperty("oracle.server.version") == null
    ? "jdbc:oracle:thin:@hostname:1521:ORCL"
    : "jdbc:oracle:kprb:"),
    "youruserid","yourpassword");
    As stated earlier, the userid and password are supposedly ignored for server connections retrieved in this manner. I haven't tried this yet, but it is documented by Oracle.
    Regards,
    Steve
    null

  • Could not create client side connection for PDBORCL

    Dear all,
    we are using oracle database 12c enterprise edition on widows server 2012 standard edition 64bits.
    we cannot make a connection from client to the PDBORCL using Net Configuration Assistant.
    TNSNAMES.ORA
    # tnsnames.ora Network Configuration File: C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    ORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.hct.org)
    PDBORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = HP426-ORATEST)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PDBORCL.hct.org)
    LISTNER.ORA
    # listener.ora Network Configuration File: C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    On my client side, i open NET CONFIGURATION ASSISTAN,
    click on LOCAL NET SERVICE NAME CONFIGURATION,
    select ADD and click next
    on the service name type PDBORCL
    select TCP and click next
    on the hostname, put the name of the server which is HP426-ORATEST and click next
    when i click on YES PERFORM TEST, it give the following error
    Connecting...ORA-12170: TNS:Connect timeout occurred
    The test did not succeed.
    Some of the information you provided may be incorrect.
    Click Back to review the information provided for net service name, or Change Login to change username.
    we could ping the HP426-ORATEST using cmd on my client.
    kindly guide us.
    Thank you.

    LSNRCTL SERVICES
    C:\Users\Administrator>LSNRCTL SERVICES
    LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 23-APR-2014 23:23
    :39
    Copyright (c) 1991, 2013, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.153.103.202)(PORT=152
    1)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
      Handler(s):
      "DEDICATED" established:0 refused:0
      LOCAL SERVER
    Service "orcl.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
      Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
      LOCAL SERVER
    Service "orclXDB.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
      Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
      DISPATCHER <machine: HP426-ORATEST, pid: 3088>
      (ADDRESS=(PROTOCOL=tcp)(HOST=HP426-ORATEST.hct.org)(PORT=59070))
    Service "pdborcl.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
      Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
      LOCAL SERVER
    The command completed successfully
    LSNRCTL STATUS
    C:\Users\Administrator>LSNRCTL STATUS
    LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 23-APR-2014 23:24
    :38
    Copyright (c) 1991, 2013, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.153.103.202)(PORT=152
    1)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 12.1.0.1.0 - Produ
    ction
    Start Date 23-APR-2014 03:44:26
    Uptime 0 days 19 hr. 40 min. 16 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\app\Administrator\product\12.1.0\dbhome_1\network\a
    dmin\listener.ora
    Listener Log File C:\app\Administrator\diag\tnslsnr\HP426-ORATEST\listen
    er\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HP426-ORATEST.hct.org)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=HP426-ORATEST.hct.org)(PORT=5500))(
    Security=(my_wallet_directory=C:\APP\ADMINISTRATOR\admin\orcl\xdb_wallet))(Prese
    ntation=HTTP)(Session=RAW))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "pdborcl.hct.org" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • Register dll on client side through applet

    hi
    can any on e tell how to register a dll on client side from a signed applet.
    thanx

    I am not very sure. But you can try this:
    public class Dialup {
    public static void main(String[] args) throws Exception {
    Process p = Runtime.getRuntime().exec("register_dll.bat");
    p.waitFor();
    System.out.println("Done.");
    where register_dll.bat is your dll registration (regsvr x.dll)
    Let me know if this works
    Adina

  • How to implement a persistent HTTP connection on client side...

    Sorry for the inconvenience everyone, but I could really use some help here since I am a total newbie to Java programming
    I am trying to implement a persistent HTTP connection on the client side with request pipelining. The way I understand it is that client requests will be sent to the server, which will reply to them back to back, and then the client will read them accordingly. But when I read the server responses, I get only the reply for the first request, and nothing further, when I actually expect it to give me as many responses as the number of requests I ussued. Here is a sample code illustrating what I am trying to do.
    ====================
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class HttpClient {
    public static String host = "www.somehost.com";
    public static int port = 80;
    public static String pathname = "/download.asp";
    public static String protocol = "http";
    public static ArrayList list;
    public static void main(String[] args) {
    Parser parser = new Parser();
    list = parser.getIDs();
    try {
    Socket socket = new Socket(host, port);
    InputStream from_server = socket.getInputStream();
    PrintWriter to_server = new PrintWriter(socket.getOutputStream());
    OutputStream to_file;
    to_file = new FileOutputStream("HTTP_response.txt", true);
    for(int i = 0; i < 3; i++)
    String s = (String)parser.getIDs().get(i);
    String filename = "/download.asp?id=" + s;
    to_server.print("GET " + filename + "\n\n");
    to_server.flush(); // Send it right now!
    //This response gives only  only the response to the first
    //request,....
    byte[] buffer = new byte[4096];
    int bytes_read;
    while((bytes_read = from_server.read(buffer)) != -1)
    to_file.write(buffer, 0, bytes_read);
    to_file.close();
    socket.close();
    catch (Exception e) {
    System.err.println(e);
    System.err.println("Usage: java HttpClient <URL> [<filename>]");
    }

    There are many things wrong with your code. Learn the HTTP protocol and you'll know what I mean.
    Here's a hint - you'r missing headers in your code.
    Some servers do not support keep-alive connections, nor do you request a keep-alive connection.
    Connection: keep-alive
    Use that header field and see what happends. Also, in your while-loop, you actually close the output file and the socket. Don't you think it may be hard for the server to respond to a client that closed the connection on it?
    1. You don't know HTTP
    2. You don't seem to know Java
    3. You don't seem to understand basic programming logic

  • DataInputStream with slow client side connection

    I need to stream some data to client. server pushes all messages once connection is established over internet.
    but when internet connection is slow (like wireless). i see lot more messages in receive Queue on client side. then for a brief period of time, server stops sending messages (may be due to socket channel is full or something)
    so it looks like application is stealth mode. then all of sudden application starts consuming messages (may be when that channel gets empty)
    any idea how to fix this slow connection issue? i don't care if client drops certain messages. how can i flush or empty out that socket channel ?
    below is the code snippet that i am using...
    try {
           InputStream is = new URL(streamerUrl).openStream();
           ds = new DataInputStream(new BufferedInputStream(is));
           parseBody(ds);
        } catch (IOException ex) {
                        logger.error(ex.getMessage());
        }

    My decision was to send acknowledge and if server side can't get to acknowledge it will skip all new messages.If the server can't get an acknowledgment it can only mean that the connection has failed, which will manifest itself to the server as an IOException: 'connection reset' on a write. The acknowledgement adds nothing except latency and more bandwidth usage.
    So why not skip message while network lacking.I agree, but why not use what the network is already telling you, rather than adding more messages and more failure modes? Now it's the client that has to look out for connection resets. You've just moved the problem.

  • JMS Exception at Client Side

    Hi All
    We have application consisting of applets
    a) We have signed the Application JAR (CA ) and put in the below attributes in the manifest file
    Codebase: <<CodebasePath>>
    Application-Library-Allowable-Codebase: <<CodebasePath>>
    permissions: all-permissions
    b) We use the wlclient.jar and wljmsclient.jar as well. For these JARS we have added the below attribute in the manifest file
    Permissions: all-permissions
    c) We are getting exceptions at the client side while launching the application ( JRE is 1.6.0_51)
    Exception in initJMS()>>>>>>>>>>>>>>>
    javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No]
      at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:83)
      at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:232)
      at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:168)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.orbitreasury.moneymarket.presentation.util.MessagingServiceFactory.initJMS(MessagingServiceFactory.java:142)
      at com.orbitreasury.moneymarket.presentation.util.MessagingServiceFactory.<init>(MessagingServiceFactory.java:102)
      at com.orbitreasury.moneymarket.presentation.util.MessagingServiceFactory.getInstance(MessagingServiceFactory.java:94)
      at com.orbitreasury.moneymarket.presentation.applet.FrontOfficeDesk.init(FrontOfficeDesk.java:328)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    Caused by: org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
      at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
      at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
      at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
      at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
      at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
      at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
      at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:80)
      at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:208)

    Hi Amitava,
    This error may happen when creating foreign JMS server and user credentials (principal name) is not provided. As a result, Weblogic is unable to create the required JNDI name.
    To rectify the error you can provide principal name in the JMS Configuration and restart Weblogic. See the following for sample configuration required:
    <foreign-server name="ForeignServer">
    <sub-deployment-name>subDep</sub-deployment-name>
    <foreign-destination name="ForeignDestination">
    <local-jndi-name>localQueue</local-jndi-name>
    <remote-jndi-name>remoteQueue</remote-jndi-name>
    </foreign-destination>
    <foreign-connection-factory name="ForeignConnectionFactory-0">
    <local-jndi-name>localJNDI</local-jndi-name>
    <remote-jndi-name>remoteJNDI</remote-jndi-name>
    </foreign-connection-factory>
    <connection-url>t3://localhost:7010</connection-url>
    <jndi-properties-credential-encrypted>{3DES}yK0ERotSucIGRVFORfS4Kw==</jndi-properties-credential-encrypted>
    <jndi-property>
    <key>java.naming.security.principal</key>
    <value>weblogic</value>
    </jndi-property>
    </foreign-server>
    Refer to documentation below for more details:
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms_admin/advance_config.html#wp1075917
    Hope it helps.
    Thanks,
    Cris

  • Applet connecting to Mysql on serverside?problem

    hi all
    i am having some problem in Applet
    The problem is i am drawing on an applet.
    which is taking input from database(Mysql)
    it is running fine on konsol in appletviewer,
    but when i run in Browser(NetScape 4.*) it is giving error
    Applet not started , code is as follows
    /*<applet code="AppletSql" width=100 height=100></applet>*/
    import java.sql.*;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import org.gjt.mm.mysql.Driver;
    public class AppletSql extends Applet{
    Exception e1;
    Button b ;
    public void init(){
    try{
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    }catch(Exception e){}
    b= new Button("Hi");
    add(b);
    i am using Tomcat as my server, now i am keeping my this applet in my /usr/local/jakarta..../weapps/examples/jsp .is it the problem of my server, do i have to configure my server for mysql-connector..
    or is it like this as appets are running on client side,so u cannot
    connect to Drivers on Server,or i have to write socket prog.. for
    connecting to Applet can i do the same thing swings or beans,or can i draw graphics with beans
    Thanking you
    sunil

    In your html page, you need to have the applet tag e.g
    <applet code="classname" codebase="serverurl" height="" width="">
    </applet>

  • Applet connect Databse

    First of all, Thanks for everyone's getting into my question page.
    and now, I would like to simplify my question.
    I am using Tomcat as engine, and now i would like to let my applet@client-side to access DataBase@server-side.
    When i run in tomcat, it returns to me that the jdbc (connectorj) cannot be found.
    I am wondering why the applet can be run properly in local but not through internet?
    what can i do to solve the problem?
    should the applet classes and jdbc place in the WEB-INF/classes folder?

    The applet running in the client has nothing to do with Tomcat. You could be using a plain HTML page served from IIS to run the applet, and it won't matter. The applet should work fine to connect to a database providing for the following conditions:
    1) The jar file for the DB driver is included in the list of jar files in the applet's archive list.
    2) For non-signed applets, the database is on the same machine the applet was served from. For signed applets, it really doesn't matter.
    Whatever Tomcat is complaining above has no effect whatsoever on the applet's ability to do anything.

  • Applet connection with a servlet.

    hi all.
    i need to send data from an applet in the client side to a servlet on the server.
    i want to send this data via http so i won't have to get around firewalls and other problems that might come up if i'll use sockets.
    i'm sending objects, like this: (applet side)URL url = new URL("http://localhost:8080/examples/servlet/ImportListener.Listener");
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    OutputStream out = con.getOutputStream();
    ObjectOutputStream objStream = new ObjectOutputStream(out);
    objStream.writeObject(record);i have two questions:
    (1) how do i get this object data in the servlet??? will it be in the doGet() method?
    (2) how can i send a confirm message back to the applet?
    thanks!

    Hi!
    I have implemented such case, and I thought it might be so helpful for all to post the solution over here, I will provide two cases in one example, first, the applet will send parameters within the posted URL, and in this case you can retrieve them in doGet method, another case is to write objects over output streams, and in this case it will be sent to the servlet using POST method, because the GET method does not have a body which must be exist to handle the streams, so, the whole request will be sent over POST method, and to get it, fill up your Java doPost():
    NOTE: Any object you want to send/retrieve over a network MUST be serializable, which means, the class must implement java.io.Serializable.
    The Applet - CLIENT
    ================
    public boolean getSomeInformation(Object myObject)  {
            // Get a backend connection, see the connect() method below
            URLConnection connection = connect("/myAliasServlet?myname=nabieh&myage=28");
            BufferedReader servletResponse = null;
            ObjectOutputStream oos = null;
            try {
                oos = new ObjectOutputStream(connection.getOutputStream());
                // serialize the object
                oos.writeObject(myObject);
                oos.flush();
                // Read the response from the servlet:
                servletResponse = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String response;
                String s = "";
                while (null != ((response = servletResponse.readLine()))) {
                    s += response;
                if (s != null) {
                    if (s.equals("SUCCESS")) {
                        executed = true;
                    } else {
                         // s = "null"!
                        JOptionPane.showMessageDialog(myForm, s, "Error", JOptionPane.ERROR_MESSAGE);
                        executed = false;
            } catch (IOException ioe) {
                ioe.printStackTrace();
            } finally {
                try {
                    if (oos != null) {
                        oos.close();
                    if (servletResponse != null) {
                        servletResponse.close();
                } catch (IOException ioe) {
                    ioe.printStackTrace();
            return executed;
    public URLConnection connect(String alias) {
            URLConnection connection = null;
            String serverContext = "http://192.168.0.2:8888/MyApp";
            // Connecting to the server:
            try {
                String s = serverContext + alias;
                URL url = new URL(s);
                connection = url.openConnection();
                connection.setDoInput(true);
                connection.setDoOutput(true);
                connection.setUseCaches(false);
                connection.setRequestProperty("Content-Type", "application/octet-stream");
            } catch (MalformedURLException murle) {
                murle.printStackTrace();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            return connection;
        }The servlet, server side:
    ===================
    Here, the servlet reads the object, do some process whatever it is, pass back a String to the client, the applet.
    protected void doPost(HttpServletRequest request,
                   HttpServletResponse response) throws ServletException, IOException {
                    // Get both passed parameters, myname and myage
                     String name = request.getParameter("myname");
              String age = request.getParameter("myage");
                   // Get the seializable object
              ObjectInputStream ois = new ObjectInputStream(request.getInputStream());
              MyObject mo = null;
              try {
                   mo = (MyObject ) ois.readObject();
              } catch (IOException ioe) {
                   System.out.println(ioe.getMessage());
              } catch (ClassNotFoundException cnfe) {
                   System.out.println(cnfe.getMessage());
              // Do whatever you want over here...
                    String found = doSomeThing(mo); // This method gonna return a string, "SUCCESS" or "null".
                    PrintWriter pw = response.getWriter();
              pw.write(found);
              pw.flush();
              pw.close();
         }Good luck.

  • Applet connection with DB

    Hi Guys,
    I have designed an applet and have placed in the htdocs of Apache server that comes with Oracle 9iAS when I can login to the db within my Lan it works fine but when I try to login from outside LAN through a dialup modem I get following error:
    Error in Connecting to the Database java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    I know applets can only communicate with the server they are downloaded from, I have the DB on this same server where I am downloading applet from!
    I am using a router to connect the server to the internet and have opened ports 7777, 4443 and 1521.
    Any1 Any ideas??????????????
    Thanx!

    The error you are getting is a client side error, you will find no log in the listener. The applet demo was tested. The only thing I can think of is the classpath, please make sure your HTML code is pointing to the right ones. Also, you may want to make sure your browser is compatible with the version of the classes you are using, I thought browsers today support jdk 1.1.
    -Soulaiman
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by kibito:
    Since two weeks we are trying to get
    a connection working within an applet with our db.
    Plattform: Linux RedHat 6.1
    Database: oracle8i
    jdk: 1.02 (the classes102.zip)
    webserver: Apache 1.3
    browser: netscape 4.6
    We have always the no suitable driver exception!
    We worked thought different tries:
    - with the JdbcApplet.java Sample from Oracle
    - with the DriverManager.registerDriver
    (new oracle.jdbc.dnlddriver.OracleDriver()); approach
    - with the Class.forName( "oracle.jdbc.dnlddriver.OracleDriver" ); approach
    - with the driver = new oracle.jdbc.dnlddriver.OracleDriver(); approach
    - we tried every possible kind of
    getConnection method
    Questions:
    1. Is it possible to connect from an applet (jdk1.02) to an oracle8i database running under redhat 6.1?
    2. The No suitable driver means for me,
    that the listener has not found a
    driver handling the TCP request for our
    connection. Is this correct?
    3. The listener works like the inetd.
    It gets a connection forks the
    requested process to handle the connection.
    Is this correct?
    4. Even if I check the listeners logs and
    traces, there is never a request arriving
    from my applet. What am I missing?
    Help would be great!
    <HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • Printer Queue Settings Mysteriously Reverting Back to Default Settings on 2008 R2 print servers

    Printer Queue Settings Mysteriously Reverting Back to Default Settings on 2008 R2 print servers We have 4 Windows Server 2008 R2 print servers, all of which has the same printer queues installed on them that are utilized by a 3rd party printing progr

  • Overlapping icons in Applications Folder Dock icon

    I recently upgraded to a MBP Retina running 10.8.3 Mountain Lion. Deciding to re-install apps and cleanup old unused stuff, I didn't use the Migration Assistant. I opened Finder and dragged the Applications folder to the Dock.  When I did so, the pre

  • QUESTIONS ABOUT E61i??

    I'd like to know what is the processor and available RAM for the e61i? Secondly, can i playback high video quality movies on this device? Thanks...

  • Distributed systems in java

    I have to make a projet for distributed systems. what are the advatages of using java over other technologies.

  • How to get solve below code & comment reply

    For Each (Sources [Proposed Sources] (ESRC_1)){ If (Is this a Roth Source (ESRC_8)) = 'Yes' {           //if at least one proposed source is 'Yes' for 'Is this a Roth Source' then display section below, else do not display how to create a XML for thi