Help with signing applets

Hi everybody. How do I sign an applet so that the applet is granted file access? I want the applet to request file access only and nothing else. From the applet signing tutorial it seems like signing an applet will grant all or nothing security! But I only want file access and I want the popup window which users receive to say file permissions only.

I also developed an applet where I only want socket permission but not file permission. It is a chat applet which can connect to multiple servers and so I don't want it to be limited to the domain where it is hosted. I overcome that by signing it. But my customers will not run the applet because they do not trust the applet because they say it is requesting unlimited access to their files. They say they don't want the applet messing up the computer. How can I request socket permission only and nothing else?

Similar Messages

  • Need help with signing applets

    I'm trying to have an applet write a file on the client system, but I'm having issues signing my applet. I think I'm missing something and would appreciate any help. Here are the steps I am taking...
    1) keytool -genkey -alias blah
    2) answer all the questiosn
    3) jar -cvf Applet.jar *
    4) jarsigner Applet.jar blah
    5) applet code in the html file is:
    <applet code=Applet.class archive=Applet.jar width="900" height="600">
    6) run applet: appletviewer Applet.html
    I then get an AccessControlException. What am I missing? Also, why do I still get the AccessControlException when I run my applet through appletviewer? I was under the impression appletviewer automagically gave permissions, and the AccessControlExceptions were only when you tried to run the applet off a server.
    Some test code I'm using (AccessControlException at the System.getProperty line):
                        File out = new File(System.getProperty("user.dir") + "test.txt");
                        FileWriter writer = new FileWriter(out);
                        writer.write("blah");
                        writer.flush();
                        writer.close();

    It works now in my browser, after rebuilding jar and resigning. But it still doesn't work in Appletviewer...

  • Wanted: Help with Signed Applet Tutorial

    I'm trying to follow this tutorial and I'm confused about the file name of the policy file.
    [http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html|http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html]
    Below is the code that goes into the policy file (from the above URL). Now where do I put it on a windows machine? %HOMEDRIVE%%HOMEPATH%? What do I specify as the keystore?
    How do I edit it for a windows machine running cygwin?
    Thanks,
    Siegfried
    {keystore "/home/ray/raystore";  
    // A sample policy file that lets a program   
    // create demo.ini in user's home directory  
    // Satya N Dodda  
    grant SignedBy "company" {  
      permission java.util.PropertyPermission   
        "user.home", "read";  
      permission java.io.FilePermission   
        "${user.home}/demo.ini", "write";  
    code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I believe that you can find the necessary details in this tutorial:
    [http://java.sun.com/docs/books/tutorial/deployment/jar/signindex.html]

  • Security Problems with Signed Applet

    Hello All,
    I need help with signed applets.
    I have an applet pkged in a jar that uses other jars. I have signed the jar containing applet and all the other jars being used. However, when I try to run the applet in IE 6.0.xx, I get the following error
    java.lang.ExceptionInInitializerError
         at aaa.aaa.somemethod(xxx.java:192)
         at aaa.aaa.aaa.access$000(xxx.java:27)
         at aaa.aaa.aaa.$1.run(xxx.java:467)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         ... 3 moreMy application is using Java 1.4.2.xx.
    Any help or pointers would be greatly appreciated.
    Thanks.

    Thanks harmmeijer and mjparme for your responses.
    I made some changes to my application and it does not now require the system property information. But now I am getting another exception related to class loader.
    I made the changes to the console as suggested by harmmeijer, and here is the stack trace. Also, I am not using any JavaScript explicitly.
    Registered modality listener
    Invoking JS method: document
    Invoking JS method: URL
    Referencing classloader: sun.plugin.ClassLoaderInfo@e0a386, refcount=1
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
         at xxx.xxx.a...<init>(a.java:39)
         at  xxx.xxx.b...<init>(b.java:42)
         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 sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
    java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
         at xxx.xxx.a...ToolBus.<init>(a.java:39)
         at xxx.xxx.b....<init>(b.java:42)
         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 sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Modality pushed
    Modality poppedmjparme as to your second point, the action is taking place in the same jar only. No other jar is involved at the stage where I am getting exception.
    Thankyou again and will appreciate your help.
    AC

  • Problem with signed applet

    HI All,
    I am writing a small applet to draw a line graph by setting the parameters from the html pages .It came up beutifully .There are two problems here .
    1)When i try to print the applet it prints only black coloroued rectangle in place of applet(graph) .I read lot of articles only to find out that the applet need to be signed for printed .I tried all ways and means but could not succedd in printing an applet .
    2)When i try to access the applet from other computer with out copying it says that applet can not be acceessed due to security failure .It throws exception.
    I need your help on how to sign applets to access from other computer and also how to print applet content .
    Can any one help me on this
    Thanks in advance .

    i am not sure of that , but having experience with drawing images ,graphs and the like and with no experience in printing, i can share u my experience.
    using setBackground(Color.white) of the applet/panel wouldnot work since i believe it is something that is got to do with the graphics class .U have to draw a full white rectangle as a background before u start drawing lines.
    like
    g.setColor(color.white);
    g.drawfullrect(0,0,width,height); /// draw a white background
    g.setColot(Color.black);
    g.drawline(0,0);
    etc.....
    Have fun dude.

  • Help with signing in to account please! :-)

    i have been a paying skype subscription customer since 2006 - 2008 with a world subscription at every three months.
    there are a few things i'd like to tackle.
    i cannot remember my skype password, i cannot reset it, it alwasy directs me to use microsoft account but i cannot use that to sign in to skype. =S i have used up all my tokens and have to wait 24 hours but i need to access my account NOW.
    I am wondering if my account has been hacked...?
    some months back when I restart my computer (mac osx 7.5) it started asking me upon start up if i want to allow skype to allow incoming data or something like that. I have NEVER had that happen before. so sometimes i allow and sometimes i deny. i thought maybe it is something new maybe with an update i don't know...
    is this normal?
    so since i cannot remember my password i went to keychain access and i select show password and put in my admin password and it will not show it but under the account field in keychain access it says .token.0.
    a couple few years back somehow there was a malicious charge made to my bank account adn i had to get a new bank account it was a nightmare and i happend to notice this right a couple days before flying overseas to be gone for several months. anyway, i was going through my records and saw taht at 10 dollar charge was made 23 may 2013. i dont recall purchasing skype credit and since my 26.95 charge was done just a couple days after this why would i need more credit? i dont know it is STRANGE. this was something similar to what happend a while back.
    it says that with the world subscription i am supposed to be given a small amount of credit but over the years i have never seen this why not? and where can i get it?
    it was so frustrating to try to get help, i wanted so much to do chat support but i cannot sign in because I cannot remember my password. =S fortuantly i still have my skype set to sign in automatically so i can still chat and call via there but i need to access my account to find payment history.
    i am looking forward so very much to hear from anyone as soon as possible. I have sent this request to personal people here on this webpage and have heard NOTHING... which on the help page for skype is says it is a helpful community. I am starting to wonder about that. Please help anyone.
    thank you very kindly for your valuable time.

    I have attached a file below to show that i am just getting noWHERE with this apparent help to sign in. in the second to last picture you will notice it says reset microsoft password. BUT I DONT NEED TO. the very last photo showes that there is a distinct individual option to reset just the skype password and i cannot do that using the code that they have emailed me. i just want to reset my skype account.
    PLEASE SOMEONE HELP.
    i have been asking help since thrusday.
    Attachments:
    skype help.pdf ‏501 KB

  • Problems with signed Applet for File Download under JRE 1.4 (works with 1.3

    Dear all,
    i encountered a very strange behaviour with JRE 1.4x. A signed applet used for file download worked on all platforms (Windows NT, 2000 and XP wth/wthout SP...) until I installed JRE 1.4.x (1.4.1 or 1.4.2)
    I get an EOFException when downloading binary files (for ASCII it works fine) when trying to readByte() from a DataInputStream. But not immideately, but after x bytes in the while-loop. Security is fine (I know there have been changes to that in jre 1.4, the applet itself can be started an runs with ASCII files for transfer)
    Does anyone know, what has changed in jre1.4.
    As I said, it works fine under jre 1.3.x
    The relevant code is below: byte bt = dis.readByte(); causes the error
    try{
    // Get URL from Server
    URL uFile = new URL(sFilename);
    sThisURLFile = uFile.getFile();
    Integer inte = new Integer(i);
    //open input stream for the file on server
    DataInputStream dis = new DataInputStream(new BufferedInputStream
    (uFile.openConnection().getInputStream()));
    //open output stream for the file on local drive
    String sFilenameOnly = sThisURLFile.substring(sThisURLFile.lastIndexOf('/')+1);
    int iDotPos = sFilenameOnly.lastIndexOf(".");
    String sExt;
    if (iDotPos > 0) {
    sExt= sFilenameOnly.substring(iDotPos);
    } else {
    sExt = "";
    File fileOut = new File(sDownloadDir + sThisURLFile.substring(sThisURLFile.lastIndexOf('/')+1) );
    DataOutputStream dos = new DataOutputStream(new
    BufferedOutputStream(new FileOutputStream(fileOut)));
    //read one byte from input stream, and write that byte to output stream
    long nByte = 0;
    int iCnt = 0;
    iFilesizeDone ++;
    while (nByte < iFilesize){
    String sErrPs = new String();
    try{
    sErrPs = "00";
    byte bt = dis.readByte();
    sErrPs = "01";
    dos.writeByte(bt);
    } catch (EOFException ee)
    System.err.println("internal EOFException: " + ee.getMessage());
    System.out.println("Error Filesize is " nByte " of " iFilesize "---" + sErrPs);
    break;
    nByte++;
    iFilesizeDone ++;
    iCnt ++;
    if(iCnt >= 10240) {
    ShowProgress(nByte, iFilesize, iFilesizeDone, iFilesizeTotal); // repaint does not work during init-procedure
    iCnt = 0;
    line = "Progress: Total: " + ((iFilesizeDone*100)/iFilesizeTotal) + " perc, " + iFilesizeTotal/1024 +" kbytes" ;
    labLine.setText(line);
    //dos.flush(); // improves Client performance (Agent-Call!)
    dis.close();
    dos.close();
    }// End try
    catch (EOFException ee)
    System.err.println("EOFException: " + ee.getMessage()e);
    catch (SecurityException se)
    System.err.println("SecurityException: " + se.getMessage());
    catch (IOException ioe)
    System.err.println("IOException: " + ioe.getMessage());

    perhaps they've changed something with the file blocking.
    btw, you should try to use something like this
    DataInputStream dis = new DataInputStream(is);
    byte[] buffer=new byte[8192];
    int numBytesRead;
    while ( dis.available()>0 ) {
         numBytesRead = dis.read(buffer);
    }               

  • Need help with advanced applet

    I need help with designing an applet as follows. Can someone give me a basic layout of code and material so i can fill in the rest or at leats give me some hints so i can get started since i am like no good at applets.
    Design and implement an applet that graphically displays the processing
    of a selection sort. Use bars of various heights to represent
    the values being sorted. Display the set of bars after each swap. Put
    a delay in the processing of the sort to give the human observer a
    chance to see how the order of the values changes.
    heres a website that does something similar
    http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

    elasolova wrote:
    i will not help you this time. but if you buy me a candy maybe i can reconsider the issue. :PI suggest an all-day sucker.

  • Write file with signed applet

    Hi!
    I have a signed applet which has to write a file to the server, but i still get permission exceptions. I guess I still have to add permissions to the applet but I realy can't find how to do that. Can anyone give me a short tutorial on how to add permissions to the applet?
    greetings

    As stated, applets are only able to write files in the machine that the applet is running on. They can't write files to other machines. They can communicate to the machine that they originate from (its host) - but not other, random machines.
    To place a file on its host, the applet sends the file contents to its host (typically using sockets for this) which receives the data with a server program. Then another program on the host writes the data to a file. If you want the file on another, random machine then it can be transferred using the same approach (sockets, etc.)
    There are alternatives, but this is the least complicated approach. This tutorial walks you through creating an applet and the host it communicates with.
    [http://java.sun.com/docs/books/tutorial/deployment/applet/server.html]
    Note that the tutorial also has a link to a more detailed tutorial, the Custom Networking Trail.

  • Plz help with deploying applet that uses SSL

    Hi, maybe this is not the adecuate forum but ive already tried in others and i got no answer.
    Im trying to use a certificate with my applet ( tha sends a lot of info to the server and also connects to another hibernate db) but im getting this error:
    Server side:
    username is: Panda
    Registered the SSLServerSocket on port 6969
    Listening ....
    ---- Got a connection from a client
         this is an unknown client
    !!!!!!Error in reading or writing from/to the client:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
         at sun.nio.cs.StreamDecoder.read(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at PaqueteServidor.Server$handleRequest.run(Server.java:130)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
         at PaqueteServidor.Server.printClientCerts(Server.java:47)
         at PaqueteServidor.Server.run(Server.java:100)
    Client side:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:89)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
         ... 14 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 19 more
    19:40:34,444 INFO Environment:464 - Hibernate 3.0.5
    19:40:34,444 INFO Environment:477 - hibernate.properties not found
    19:40:34,444 INFO Environment:510 - using CGLIB reflection optimizer
    19:40:34,454 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
    19:40:34,645 INFO Configuration:1110 - configuring from resource: /bd/hibernate/hibernate.cfg.xml
    19:40:34,645 INFO Configuration:1081 - Configuration resource: /bd/hibernate/hibernate.cfg.xml
    19:40:35,045 ERROR XMLHelper:59 - Error parsing XML: /bd/hibernate/hibernate.cfg.xml(21) The content of elements must consist of well-formed character data or markup.
    19:40:35,045 ERROR Configuration:1172 - problem parsing configuration/bd/hibernate/hibernate.cfg.xml
    org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Nested exception:
    org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:465)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    %%%% Error Creating SessionFactory %%%%
    org.hibernate.HibernateException: problem parsing configuration/bd/hibernate/hibernate.cfg.xml
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1173)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
         ... 6 more
    java.lang.NullPointerException
         at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:59)
         at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
         at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Plz help and thx in advance.

    I know I didn't get round to replying but no need to post it so many times.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669965
    http://forum.java.sun.com/profile.jspa?userID=543817
    http://forum.java.sun.com/thread.jspa?threadID=669975
    http://forum.java.sun.com/thread.jspa?threadID=669973
    Could it be that the server and client need to open different keystores?
    http://forums.java.sun.com/thread.jspa?threadID=573918&messageID=3272683
    reply 7
    My example given before should work on different machines, try to export the server key and import it into the
    client keystore. Export the client key and import in the server keystore if you want the server to authenticate
    the client.
    http://forum.java.sun.com/thread.jspa?threadID=666870
    reply 4
    Check the method getSSLSocketFactory in the applet, that will open a keystore for you.

  • Help with simpleeeee applet

    hi
    i need a simple applet that just has a input field and a enter button.
    i want the applet to say like "Enter Email Address" then input field then "Save" button. i want these to be saved in a .txt is this very easy ?
    the computer which will use this program will not be online so i want it to save it like at c:\mail.txt

    i need a simple applet that just has a input field and a enter button.Good for you.
    i want the applet to say like "Enter Email Address" then input field then "Save"
    button. Just a moment ago you wanted enter button, now you want a "save" button? Make up your mind.
    i want these to be saved in a .txt So we save the input field and button to a text file? Tricky stuff.
    is this very easy ?There are some complications. Particularly that applets don't normally have access to save a file to disk. You would need to have a trusted/signed applet in order to do that.
    the computer which will use this program will not be online so i want it to save it
    like at c:\mail.txt Would you like fries with that as well?

  • Help with java applets

    Ok i know i haven't read the applet tutorial or had much experience with applets but just hear me out and see if you can help me.
    BACKGROUND
    Ok...so i have previously viewed an applet on windows viewing an html file on my computer. I am trying to view just the most simple applet (helloworld) on linux. I'm using Ubuntu linux, the latest version as of February 23, 2006.I created an applet file and an html file in the same directory with the html file having an <applet> tag in it linking to the HelloWorldApp. I have tried viewing the html file and the java applet won't load. Everything other than the applet worked and I'm just stuck.
    So my plea is would somebody please just paste the bare minimum html file and applet file that you can see an applet with? I want to learn about applets and will do the tutorial but I would really like to just see one.
    Please help,
    A frustrated applet noob
    p.s.
    According to java.com I have installed JRE 5.0 and i have compiled a java application so I'm pretty sure I have successfully installed JDK 5.0.

    Bob, what web browser are you using?
    Make sure that the browser supports Java applets.
    If you want just to debug your applet try appletviewer utility
    from JDK first.

  • Help with simple applet - dragging box

    Hi I need help with a simple applet concept.
    I have a picture drawn in the background, but I need to draw a square and resize it when I drag.
    So with the picture in the background I click, drag the mouse, and it draws a rectangle from the starting point to where the mouse is while the mouse is clicked.
    The only problem is I can't figure out how to do this without redrawing the whole picture. If I don't repaint, it just keeps stretching around rectangles and leaving them there.
    I don't really need exact code, just an idea on how to do this without repainting the background every time the mouse is moved (because the picture in the background is complicated to draw and takes like a second).
    Thanks
    [nvm, found out about xormode]
    Edited by: BugMenOTdhzj on Nov 30, 2009 4:47 PM

    BugMenOTdhzj wrote:
    ..the picture in the background is complicated to draw and takes like a second).Paint the 'picture in the background' to a BufferedImage, then when it comes to paint()/paintComponent(), draw the BI to the Graphics object (clipped, if necessary (1)), then draw the rectangle to the Graphics object. This would be further optimised at time of rendering, by drawing both the 'picture in the background' BI and rectangle to a second BI, and finally writing that 2nd BI to the Graphics object.
    1) There are potentially other improvements that can be made, particularly with clipping, but I suspect if you try as I suggested, the rendering will be very quick and responsive. I have 40 FPS sound trace animations that do a great deal more on each call to paintComponent(), before bursting the final BI to screen.

  • IE Crashes with signed applet.

    I've been having problems in the last few days where my signed applet will crash on one server, and will not on the other.
    The server it doesn't crash on never crashes, where as the one it does crash on, will always crash. The certificate is currently my own and I have not yet purchased a Verisign cert.
    The applet uses 1.3.1_04 and I'm not sure what else to do.
    Any suggestions?

    Maybe some bug on 1.3.1_04 plugin version, uninstall it and
    try to install the version 1.3.1_01 from sun archive:
    http://java.sun.com/products/archive/index.html
    I had the same problem running that 1.3.1_04 version!
    When I get installed the 1.3.1_01 version I had not problems
    anymore.
    crt

  • -- Help for signing Applets --

    Good Morning Friends,
    I have completed one Java project. I need to put it to work. But I need to get the applet signed for it to work perfectly.
    I did subscribe yesterday with Verisign/Thawte. But they need to e-mail me which I don't know how much time they take.
    If anyone of you have got registered with VeriSign/Thawte, can you please help me in getting the applet signed. I would appreciate your help. Please.
    Bye.

    If you do not get an answer here, why not try [url http://forum.java.sun.com/forum.jspa?forumID=63]this specific forum?

Maybe you are looking for

  • Help needed regarding use of BAPIPAREX

    Hi everyone, I am using the bapi: BAPI_0035_CREATE to create GM grant master data. But I need to populate an additional field (ZZISCCALC) present in structure BAPI_TE_GMGR which has following format: CLIENT               3 GRANT_NBR          20 .INCL

  • Parse TEXT File??

    Hi, I am using CF 8 I have a text file (mylog.txt) that currently stores login information for our users. I need to parse and extract some basic information from the file and I am having a hard time. I need to know the following 1. A list of all UNIQ

  • SQL script runs under SQL Devoper, will not run under UNIX, SQLPlus

    I have a sql program I developed under the SQL Developer tool and it runs fine. I have ftp'd the sql to the Unix server and I am trying to run the same program under SQL Plus in unix. The program echo's back the line number that is the last line numb

  • Dynamically expand/shrink a JFrame

    I am trying to create a GUI, which is built on a JFrame, and has two Panels, one at the top, and one at the bottom. What I want to be able to do programmatically is to expand the size of the frame by some set amount, and so open a space up between th

  • Random Vertical red lines and banding

    happy new year everyone, I have recently bumped into as very annoying problem with my photoshop. It will randomly show red vertical lines on top of the image (see pic attached). This lines will sometimes dissapear when I zoom in/out or they will stay