This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes EJB running at client, weblogic security problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "EJB running at client, weblogic security problem" Watch "EJB running at client, weblogic security problem" New topic

EJB running at client, weblogic security problem

jin xiuqi

Joined: Jul 25, 2004
Posts: 2
I have a problem. I run EJB client by webstart at web, when initialized the context of properties, the exception is thrown, detail is:


at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at weblogic.jndi.WLInitialContextFactory.getInitialContext(

at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

at javax.naming.InitialContext.init(Unknown Source)

at javax.naming.InitialContext.<init>(Unknown Source)

at ownertest.OwnerClient.getInitialContext(

at ownertest.OwnerClient.initialize(

at ownertest.OwnerClient.<init>(

at ownertest.OwnerTest.testButton_actionPerformed(

at ownertest.OwnerTest_testButton_actionAdapter.actionPerformed(

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at Source)

Caused by: access denied (java.lang.RuntimePermission getClassLoader)

at Source)

at Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)

at weblogic.rmi.internal.ClientRuntimeDescriptor.computeInterfaces(

at weblogic.rmi.internal.ClientRuntimeDescriptor.intern(

at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(

... 35 more

Application server is:weblogic7.0, ejb and client is generated by Jbuilder9, the code of initialized the context is:

String url = "t3://jin:7001";
String user = "admin";
String password = "123";
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);

return new InitialContext(properties);
catch(Exception e) {
log("Unable to connect to WebLogic server at " + url);
log("Please make sure that the server is running.");
throw e;

My jnlp file is:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:7001" href="webSt.jnlp">
<homepage href="webSt.html" />
<offline-allowed />
<j2se version="1.4" />
<jar href="OwnerTest.jar" />
<jar href="Weblogic.jar" />
<jar href="WebServices.jar" />
<application-desc main-class="ownertest.OwnerTest" />

It is a security of problem, but I don't know how to resolve it.

I agree. Here's the link:
subject: EJB running at client, weblogic security problem
It's not a secret anymore!