Exception: access denied (java.net.SocketPermission courseware.plateausyste

hi all,

i'm basically a flash programmer ..so dont know much about java.

i've a course which is built using java script and flash. Now I've to launch this course from a server. For this i;m using a existing mehod whihc is to communcate with applet. but when i launch this course i get the following exception:

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

Exception: access denied (java.net.SocketPermission courseware.plateausystems.com:80 connect,resolve)

for one course where as for a different course launched from same page no exception is being thrown. it works perfectly:

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with cookie "JSESSIONID=GQpFL2146LgnJ0Y9J02xtdcXZ1KCY1GDwRq0hhcjyZ5Z9QpC0yP2!-923201975; PSA_STUD_ID=maxLearning2; PSA_CURRENT_STUD_ID=maxLearning2; PSA_STUD_NAME=Student%20Test%20; PSA_WEBROOT=/plateau; PSA_CPNT_TYPE_ID=ONLINE; PSA_CPNT_ID=maxLearn%20AICC%20april%2023%5f07; PSA_CPNT_REV_DATE=04%2f23%2f2007%2014%3a14%3a00%20Eastern%20Standard%20Time; PSA_STUD_CPNT_ID=2834; PSA_STUD_CPNT_MOD_ID=3005; PSA_STUD_CPNT_MOD_NAME=Introduction; ia_targetPage"

i've searched the forums and found out that u've to change the security policy file to grant all persmissions. i did that on my machine but of no use. is this need to be done on both the client and server machines or just the client machine coz when i use the same applet, it's working for one course and not working for another.

can somebody please help me with this?

following is the log for the two course

FOR WORKING COURSE

liveconnect: Invoking JS method: document

liveconnect: Invoking JS method: URL

basic: Referencing classloader: sun.plugin.ClassLoaderInfo@44ffb2, refcount=1

basic: Added progress listener: sun.plugin.util.GrayBoxPainter@26dfcc

basic: Loading applet ...

basic: Initializing applet ...

basic: Starting applet ...

basic: completed perf rollup

network: Cache entry found [url: http://courseware.plateausystems.com/content/ftproot/users/maximizeLearning/Record_on_Demand_WBT/include/alaicc_sun.jar, version: null]

network: No certificate info for unsigned JAR file: http://courseware.plateausystems.com/content/ftproot/users/maximizeLearning/Record_on_Demand_WBT/include/alaicc_sun.jar

liveconnect: Invoking method: public boolean java.applet.Applet.isActive()

liveconnect: Invoking method: public void alaicc.setAiccUrl(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setAiccSid(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.CallFunction(java.lang.String,java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Needs conversion: java.lang.String --> java.lang.String

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with cookie "JSESSIONID=GQpFL2146LgnJ0Y9J02xtdcXZ1KCY1GDwRq0hhcjyZ5Z9QpC0yP2!-923201975; PSA_STUD_ID=maxLearning2; PSA_CURRENT_STUD_ID=maxLearning2; PSA_STUD_NAME=Student%20Test%20; PSA_WEBROOT=/plateau; PSA_CPNT_TYPE_ID=ONLINE; PSA_CPNT_ID=maxLearn%20AICC%20april%2023%5f07; PSA_CPNT_REV_DATE=04%2f23%2f2007%2014%3a14%3a00%20Eastern%20Standard%20Time; PSA_STUD_CPNT_ID=2834; PSA_STUD_CPNT_MOD_ID=3005; PSA_STUD_CPNT_MOD_NAME=Introduction; ia_targetPage"

liveconnect: Invoking method: public java.lang.String alaicc.getLessonStatus()

liveconnect: Invoking method: public java.lang.String alaicc.getError()

liveconnect: Invoking method: public java.lang.String alaicc.getLessonLocation()

liveconnect: Invoking method: public java.lang.String alaicc.getError()

liveconnect: Invoking method: public void alaicc.setAiccUrl(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setAiccSid(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.CallFunction(java.lang.String,java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Needs conversion: java.lang.String --> java.lang.String

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with cookie "JSESSIONID=GQpFL2146LgnJ0Y9J02xtdcXZ1KCY1GDwRq0hhcjyZ5Z9QpC0yP2!-923201975; PSA_STUD_ID=maxLearning2; PSA_CURRENT_STUD_ID=maxLearning2; PSA_STUD_NAME=Student%20Test%20; PSA_WEBROOT=/plateau; PSA_CPNT_TYPE_ID=ONLINE; PSA_CPNT_ID=maxLearn%20AICC%20april%2023%5f07; PSA_CPNT_REV_DATE=04%2f23%2f2007%2014%3a14%3a00%20Eastern%20Standard%20Time; PSA_STUD_CPNT_ID=2834; PSA_STUD_CPNT_MOD_ID=3005; PSA_STUD_CPNT_MOD_NAME=Introduction; ia_targetPage"

liveconnect: Invoking method: public java.lang.String alaicc.getLessonStatus()

liveconnect: Invoking method: public java.lang.String alaicc.getError()

liveconnect: Invoking method: public java.lang.String alaicc.getLessonLocation()

liveconnect: Invoking method: public java.lang.String alaicc.getError()

For THE COURSE WHICH IS NOT WORKING:

liveconnect: Invoking JS method: document

liveconnect: Invoking JS method: URL

basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1a220e6, refcount=1

basic: Added progress listener: sun.plugin.util.GrayBoxPainter@d0deb5

basic: Loading applet ...

basic: Initializing applet ...

basic: Starting applet ...

basic: completed perf rollup

liveconnect: Invoking method: public boolean jvmproperties.isMSJVM()

liveconnect: Invoking method: public boolean jvmproperties.isMSJVM()

liveconnect: Invoking method: public boolean jvmproperties.isSunJVM()

basic: Stopping applet ...

basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@d0deb5

basic: Finding information ...

basic: Releasing classloader: sun.plugin.ClassLoaderInfo@1a220e6, refcount=0

basic: Caching classloader: sun.plugin.ClassLoaderInfo@1a220e6

basic: Current classloader cache size: 3

basic: Done ...

basic: Joining applet thread ...

basic: Destroying applet ...

basic: Disposing applet ...

basic: Joined applet thread ...

basic: Quiting applet ...

liveconnect: Invoking JS method: document

liveconnect: Invoking JS method: URL

basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1d1c3cd, refcount=1

basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1cdfd19

basic: Loading applet ...

basic: Initializing applet ...

basic: Starting applet ...

basic: completed perf rollup

init()

Start

liveconnect: Invoking method: public boolean java.applet.Applet.isActive()

liveconnect: Invoking method: public boolean java.applet.Applet.isActive()

liveconnect: Invoking method: public boolean java.applet.Applet.isActive()

liveconnect: Invoking method: public java.lang.String alaicc.setAiccUrl(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setAiccSid(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.CallFunction(java.lang.String,java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Needs conversion: java.lang.String --> java.lang.String

CallFunctionEx being called from CallFunction

xmitMethod: FORM

query string: http://courseware.plateausystems.com/plateau/PwsAicc?command=GetParam&Version=2.0&session_id=C2528M1122S&AICC_Data=

URL: http://courseware.plateausystems.com/plateau/PwsAicc

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

Exception: access denied (java.net.SocketPermission courseware.plateausystems.com:80 connect,resolve)

liveconnect: Invoking method: public boolean java.applet.Applet.isActive()

liveconnect: Invoking method: public java.lang.String alaicc.getLessonStatus()

liveconnect: Invoking method: public java.lang.String alaicc.getStudentId()

liveconnect: Invoking method: public java.lang.String alaicc.getStudentName()

liveconnect: Invoking method: public java.lang.String alaicc.getScore()

liveconnect: Invoking method: public java.lang.String alaicc.getLessonLocation()

liveconnect: Invoking method: public void alaicc.setTime(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setScore(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setLessonLocation(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.setLessonStatus(java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Invoking method: public void alaicc.CallFunction(java.lang.String,java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Needs conversion: java.lang.String --> java.lang.String

CallFunctionEx being called from CallFunction

xmitMethod: FORM

query string: http://courseware.plateausystems.com/plateau/PwsAicc?command=PutParam&version=2.0&session_id=C2528M1122S&aicc_data=%5Bcore%5D%0D%0Alesson_location%3D1_1_1%0D%0Alesson_status%3DI%0D%0Ascore%3D%0D%0Atime%3D00%3A00%3A08%0D%0A

URL: http://courseware.plateausystems.com/plateau/PwsAicc

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

Exception: access denied (java.net.SocketPermission courseware.plateausystems.com:80 connect,resolve)

liveconnect: Invoking method: public void alaicc.CallFunction(java.lang.String,java.lang.String)

liveconnect: Needs conversion: java.lang.String --> java.lang.String

liveconnect: Needs conversion: java.lang.String --> java.lang.String

CallFunctionEx being called from CallFunction

xmitMethod: FORM

query string: http://courseware.plateausystems.com/plateau/PwsAicc?command=exitAU&version=2.0&session_id=C2528M1122S

URL: http://courseware.plateausystems.com/plateau/PwsAicc

network: Connecting http://courseware.plateausystems.com/plateau/PwsAicc with proxy=DIRECT

Exception: access denied (java.net.SocketPermission courseware.plateausystems.com:80 connect,resolve)

basic: Stopping applet ...

basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@1cdfd19

basic: Finding information ...

basic: Releasing classloader: sun.plugin.ClassLoaderInfo@1d1c3cd, refcount=0

basic: Caching classloader: sun.plugin.ClassLoaderInfo@1d1c3cd

basic: Current classloader cache size: 3

basic: Done ...

basic: Joining applet thread ...

basic: Destroying applet ...

basic: Disposing applet ...

basic: Joined applet thread ...

basic: Quiting applet ...

[11912 byte] By [flywithoutwingsa] at [2007-11-27 3:56:34]
# 1

Applets can only communicate with the server that originated the applet (must be same name not just resolve to same name).

Or the applet must be signed or the applet VM properties must have been altered to allow it to proceed (and that probably isn't a good idea.)

Failing the above a permissions error will result.

jschella at 2007-7-12 9:00:48 > top of Java-index,Core,Core APIs...
# 2

thanks for the reply...

can you please explain a bit more on this:

Applets can only communicate with the server that originated the applet (must be same name not just resolve to same name).

currenly the method how the course launches is:

a link on the server opens the launch page of our course, which will detect the flash version of the user...from there the user has to click the open course button to open the actual course page..which will detect the VM type(sun/MS) and launches the applet if it is SUN VM...is there any thing wrong in this method which will break the comm. with the server?

as i already said...i'm new to the server communcation..so please help me on this...

flywithoutwingsa at 2007-7-12 9:00:48 > top of Java-index,Core,Core APIs...
# 3

Applets originate with a server.

I couldn't tell you which server originated yours.

That is the server that the applet is allowed to talk to.

The most common cause of the problem

- Diliberately attempting to connect to a server which is not the origination.

- Using a 'name' for the originating server (like a DNS name) which is not how the original connection was created, thus a name difference.

jschella at 2007-7-12 9:00:48 > top of Java-index,Core,Core APIs...