Forum Stats

  • 3,828,128 Users
  • 2,260,865 Discussions
  • 7,897,487 Comments

Discussions

Java applet problem

818249
818249 Member Posts: 2
edited Nov 30, 2010 1:58AM in Java Applet Development
I have an applet which has three modes.It opens the wanted mode according to parameter given.The applet opens in a jquery popup on the web site.The problem is
when I opened browser and call the related mode from the menu, the applet opens well and after closing popup the applet is destroyed but when I call it again from the menu it freezes.The related logs on the java console are like below:

In the first call


Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator

----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value null
security: property package.definition new value com.sun.javaws
security: property package.definition value com.sun.javaws
security: property package.definition new value com.sun.javaws,com.sun.deploy
security: property package.definition value com.sun.javaws,com.sun.deploy
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
basic: Added progress listener: [email protected]
basic: Plugin2ClassLoader.addURL parent called for http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar
network: Cache entry not found [url: http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar, version: null]
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Downloading resource: http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar
Content-Length: 662.972
Content-Encoding: null
network: CleanupThread used 123316 us
network: Wrote URL http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar to File C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\cache\6.0\23\2804c017-52c1a5a2-temp
security: Blacklist revocation check is enabled
security: Trusted libraries list check is enabled
network: CleanupThread used 5 us
security: Accessing keys and certificate in Mozilla user profile: null
security: Loading Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
security: Loading Deployment certificates from C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\security\trusted.certs
security: Loaded Deployment certificates from C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\security\trusted.certs
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Validate the certificate chain using CertPath API
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: Start to check whether root CA is replaced
security: The root CA hasnt been replaced
security: No timestamping info available
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is disabled
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
basic: updateValidationResultsForApplet update
cache: Mark prevalidated: http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar true tm=1290597359281 cert=1295963101000
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 342550 us, pluginInit dt 3404349 us, TotalTime: 3746899 us
network: Connecting http://192.168.15.110/dev/plugins/create_message/load_message.php?q=getVmsInfo with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/load_message.php?q=getVmsInfo with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
Applet initalized...
basic: Applet initialized
basic: Removed progress listener: [email protected]
basic: Applet made visible
basic: Starting applet
basic: completed perf rollup
Applet starting...
basic: Applet started
basic: Told clients applet is started


After closing popup

Applet stoping...
Applet being destroyed...
basic: Finished applet teardown

but JVM process still work until browser closed.


After calling the applet again:


basic: Added progress listener: [email protected]
basic: Plugin2ClassLoader.addURL parent called for http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 342550 us, pluginInit dt 89413963 us, TotalTime: 89756513 us
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=sep5ppgqhgd96kuavq85upuph3"
.
.
.

the applet freezes


The javascript code that I call applet is below:

$('#create_message_main').children().remove();

$('#create_message_main').append( '<applet name ="ortanaApplet" code="com.ortana.editor.Editor.class" width="512" height="400" archive="plugins/create_message/ortana_applet.jar">'+
'<PARAM NAME=par0 VALUE='+create_message_parameter+'>'+
'<PARAM NAME="cache_option" VALUE="Yes"> '+
'</applet>');


I remove the code in the create_message_main div when mode changes then add the applet code into div again with changed parameter.If the calling type is the reasen for problem how can update applet with changing parameters.Thanks for your replies.
Tagged:

Answers

  • 818249
    818249 Member Posts: 2
    After my tests I realized that my applet is stuck when I call second time my applet it reads the image sources from the jar very very slow.In the first call I printed the resource path that I give with "getClass.getResource(adress)" It is like below:



    network: Cache entry found [url: http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar, version: null] prevalidated=false/0
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    network: ResponseCode for http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar : 200
    network: Encoding for http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar : null
    network: Disconnect connection to http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    network: CleanupThread used 5 us
    network: Downloading resource: http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar
    Content-Length: 641.216
    Content-Encoding: null
    network: Wrote URL http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar to File C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\cache\6.0\23\2804c017-475292d5-temp
    network: CleanupThread used 4 us
    cache: Replacing MemoryCache entry (cnt=0) for http://192.168.15.110/dev/plugins/create_message/ortana_applet.jarwas=com.sun.deploy.cache.CacheEntry (30303478) now=com.sun.deploy.cache.CacheEntry (21388450)
    basic: Plugin2ClassLoader.isTrustedByPolicy called
    basic: Plugin2ClassLoader.isTrustedByPolicy returns false
    basic: Applet loaded.
    basic: Applet resized and added to parent container
    basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 707484 us, pluginInit dt 4358196 us, TotalTime: 5065680 us
    Applet initialization started...
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/0.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/1.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/2.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/3.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/4.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/5.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/6.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/7.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/8.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/9.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/10.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/11.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/12.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/13.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/14.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/15.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/16.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/17.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/18.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/19.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/20.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/21.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/22.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/23.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/24.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/25.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/26.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/27.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/28.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/29.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/30.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/31.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/32.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/33.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/34.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/35.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/36.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/37.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/38.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/39.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/40.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/41.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/42.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/43.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/44.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/45.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/46.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/47.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/48.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/49.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/50.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/51.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/52.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/53.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/54.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/55.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/56.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/57.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/58.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/59.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/60.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/61.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/62.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/63.bmp
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/64.bmp


    In the second applet call it reads images very slowly.I think it requests the applet jar and downloads it for every image.How can I prevent tihs problem.Is there a way to get the read resources from cached applet jar on the disk.

    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/1.bmp
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/2.bmp
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/3.bmp
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/4.bmp
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
    The resource path is :http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar!/images/sign/5.bmp
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with proxy=DIRECT
    network: Connecting http://192.168.15.110:80/ with proxy=DIRECT
    network: Connecting http://192.168.15.110/dev/plugins/create_message/ortana_applet.jar with cookie "PHPSESSID=7sd38k0qp1q1l82qb85dbuok57"
This discussion has been closed.