dcsimg
get a security error when i want to new Initial Context in a applet
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jacky_zhong
Posted On:   Friday, January 25, 2002 11:29 PM

The code is following: Hashtable prop = new Hashtable(); prop.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); prop.put("java.naming.factory.url.pkgs","org.jnp.interfaces"); prop.put("java.naming.provider.url","zhongqing:1099"); jndiContext = new InitialContext(prop); but i get a error in client browser: com.ms.security.SecurityExceptionEx java/lang/ref/Reference. ]: Illegal ThreadGroup access. at com/ms/security/permissions/ThreadPermission.checkThreadGroup (ThreadPermission.java) at com/ms/security/permissions/ThreadPermission.check (ThreadPermission.java) at com/ms/sec   More>>

The code is following:
Hashtable prop = new Hashtable();
prop.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");

prop.put("java.naming.factory.url.pkgs","org.jnp.interfaces");

prop.put("java.naming.provider.url","zhongqing:1099");

jndiContext = new InitialContext(prop);

but i get a error in client browser:
com.ms.security.SecurityExceptionEx java/lang/ref/Reference. ]: Illegal ThreadGroup access.

at com/ms/security/permissions/ThreadPermission.checkThreadGroup (ThreadPermission.java)
at com/ms/security/permissions/ThreadPermission.check (ThreadPermission.java)
at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
at com/ms/security/StandardSecurityManager.checkAccess (StandardSecurityManager.java)
at java/lang/ThreadGroup.checkAccess (ThreadGroup.java)
at java/lang/Thread.getThreadGroup (Thread.java)
at java/lang/ref/Reference. (Reference.java:123)
at com/sun/naming/internal/ResourceManager. (ResourceManager.java:98)
at com/sun/naming/internal/ResourceManager.getInitialEnvironment (ResourceManager.java)
at javax/naming/InitialContext.init (InitialContext.java:218)
at javax/naming/InitialContext. (InitialContext.java:199)
at SimpleTopicSubscriber. (SimpleTopicSubscriber.java:75)
at JMSApplet5.paint (JMSApplet5.java:10)
at com/ms/awt/WComponentPeer.doClearAndPaint (WComponentPeer.java)
at com/ms/awt/WComponentPeer.paintNode (WComponentPeer.java)
at com/ms/ui/windowmanager/PaintRequest.run (PaintRequest.java)
at com/ms/ui/windowmanager/RunnableMessage.run (RunnableMessage.java)
at com/ms/awt/WSystemQueue.getMessage (WSystemQueue.java)
at com/ms/awt/WEventQueue.getNextEvent (WEventQueue.java)
at java/awt/EventDispatchThread.run (EventDispatchThread.java)

   <<Less
About | Sitemap | Contact