Weblogic JNDI lookup in Applet

Hi
We are facing problem in JNDI lookup inside the applet
here is the scenario
We have two weblogic servers(port 7001)
one server is main server where the Applet1 , weblogic.jar and app.htm
are in C:\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver
and another is proxy server where HTTPProxyServlet is running and one
web.xml file ( wall these files are provided by weblogic and the port
of proxy server is 448)
Both the servers are running on different machines
and when we run the client browser and put the folloing url
http://proxyServer IP Address:448/app.htm
we get the following exception
Java(TM) Plug-in: Version 1.3.0-C
Using JRE version 1.3.0 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\kkumar
Proxy Configuration: no proxy
JAR cache enabled.
In Init.1..:
In Init.after ..doClassLoaderWorkaround
In Init.after setText:
In Init.before initjms:
In initjms begin
In initjms hostName...:10.1.10.211
In initjms before initialcontext...:
In initjms after initialcontext...:
javax.naming.ConfigurationException. Root exception is
java.rmi.MarshalException: failed to marshal public abstract
java.lang.Object
weblogic.jndi.internal.NamingNode.lookup(java.lang.String,java.util.Hashtable)
throws javax.naming.NamingException,java.rmi.RemoteException; nested
exception is:
java.io.NotSerializableException: javax.naming.InitialContext
java.io.NotSerializableException: javax.naming.InitialContext
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.io.ObjectOutputStream.outputClassFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.Hashtable.writeObject(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(Unknown Source)
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:102)
at
weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:108)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
at
weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:246)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
at
weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(ServerNamingNode_WLStub.java:121)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at javax.naming.InitialContext.lookup(Unknown Source)
at Applet1.initJMS(Applet1.java:128)
at Applet1.init(Applet1.java:46)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Initialization failed
In Init.end of initjms:
the files are here
app.htm
               <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                    width="650" height="300" align="baseline"
                    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"
>
               <PARAM NAME="code" VALUE="Applet1">
               <PARAM NAME="codebase" VALUE=".">
               <PARAM NAME="AppletName" VALUE="Applet1">
               <PARAM NAME="archive" VALUE="weblogic.jar">
               <PARAM NAME="MAYSCRIPT" VALUE="true">
               <PARAM NAME="type"
VALUE="application/x-java-applet;version=1.2.2">
               <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
               <PARAM NAME="scriptable" VALUE="true">
               <!--
               <COMMENT>
                    <EMBED type="application/x-java-applet;version=1.2.2" width="650"
height="300" align="baseline"
                              code="ANZPopupApplet.class" codebase="../"
model="models/HyaluronicAcid.xyz"
                         pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"
MAYSCRIPT="true">
                    <NOEMBED>
               </COMMENT>
               -->
                              No JDK 1.2 support for APPLET!!
                    </NOEMBED>
                    </EMBED>
               </OBJECT>
</html>
Applet1.java
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.util.*;
import javax.naming.*;
import javax.jms.*;
import java.lang.reflect.*;
public class Applet1 extends Applet implements MessageListener {
private boolean started = false;
// JMS Stuff
private InitialContext jmsContext = null;
private QueueConnectionFactory jmsConnFactory = null;
private QueueConnection jmsConnection = null;
private Queue jmsQueue = null;
private QueueSession jmsSession = null;
private QueueSender jmsSender = null;
private QueueReceiver jmsReceiver = null;
// init - called to inform this applet that it has been
// loaded into the system
public void init() {
//{{INIT_CONTROLS
System.out.println("In Init.1..:");
     //doClassLoaderWorkaround();
System.out.println("In Init.after ..doClassLoaderWorkaround");
setLayout(null);
setSize(426,266);
jmslabel.setText("JMS Applet");
System.out.println("In Init.after setText:");
add(jmslabel);
jmslabel.setBounds(144,12,148,24);
textArea1.setEnabled(false);
add(textArea1);
textArea1.setBounds(24,36,375,100);
jmsleaveButton.setLabel("Leave");
add(jmsleaveButton);
jmsleaveButton.setBackground(java.awt.Color.lightGray);
jmsleaveButton.setBounds(312,240,78,20);
add(jmsMessageField);
jmsMessageField.setBounds(24,168,367,38);
System.out.println("In Init.before initjms:");
initJMS();
System.out.println("In Init.end of initjms:");
//{{DECLARE_CONTROLS
     java.awt.Label jmslabel = new java.awt.Label();
     java.awt.TextArea textArea1 = new java.awt.TextArea();
     java.awt.Button jmsleaveButton = new java.awt.Button();
     java.awt.TextField jmsMessageField = new java.awt.TextField();
// getAppletInfo - Returns information about this applet.
public String getAppletInfo() {
return "JMS Applet\r\n";
// destroy - called to inform this applet that it is being
// reclaimed and that it should destroy any resources that
// it has allocated.
public void destroy() {
try {
if(started) {
if (jmsConnection != null) {
jmsConnection.stop();
jmsConnection = null;
started = false;
stop();
catch(Exception e) {
// start - called to inform this applet that it should start its
execution
public void start() {
if(!started) {
started = true;
// stop - Called to inform this applet that it should stop its
execution
public void stop() {
textArea1.setEnabled(false);
jmsMessageField.setEnabled(false);
// action - handles entering message, Leave button clicked
public boolean action(Event evt, Object obj) {
System.out.println("In action begin:");
if(evt.id == Event.ACTION_EVENT) {
if(obj.equals(jmsMessageField.getText())) {
System.out.println("In action before sendData:");
sendData(jmsMessageField.getText());
System.out.println("In action after sendData:");
jmsMessageField.setText("");
return true;
if(obj.equals(jmsleaveButton.getLabel())) {
destroy();
return true;
// initJMS - initialize all of the JMS stuff
private void initJMS() {
try {
System.out.println("In initjms begin");
String hostName = this.getCodeBase().getHost();
System.out.println("In initjms hostName...:"+hostName);
Hashtable env = new Hashtable();
env.put(Context.APPLET,this);
env.put(Context.PROVIDER_URL,
"t3://" + hostName + ":448");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
System.out.println("In initjms before initialcontext...:");
jmsContext = new InitialContext(env);
System.out.println("In initjms after initialcontext...:");
jmsConnFactory
=(QueueConnectionFactory)jmsContext.lookup("javax.jms.QueueConnectionFactory");
System.out.println("In initjms after initialcontext..lookup.:");
jmsConnection = jmsConnFactory.createQueueConnection();
System.out.println("In initjms after initialcontext..lookup1.:");
jmsSession = jmsConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
System.out.println("In initjms before lookup...:");
jmsQueue =(Queue)jmsContext.lookup("jms.queue.TestQueue1");
jmsConnection.start();
jmsSender = jmsSession.createSender(jmsQueue);
jmsReceiver = jmsSession.createReceiver(jmsQueue);
jmsReceiver.setMessageListener(this);
System.out.println("In initjms before setMessageListener...end of the
const:");
catch(Exception e) {
e.printStackTrace();
System.out.println("Initialization failed");
// sendData - sends a message
void sendData(String data) {
try {
System.out.println("In sendData before createTextMessage:");
TextMessage message = jmsSession.createTextMessage();
message.setText(data);
jmsSender.send(message);
System.out.println("In sendData end data:"+data);
catch(Exception e) {
System.out.println("Failed to send message");
// onMessage - asynchronously receives a message
public void onMessage(Message message) {
String data;
try {
System.out.println("In onMessage:");
data = ((TextMessage)message).getText();
System.out.println("In onMessage data:"+data);
textArea1.append(data + "\n");
repaint();
System.out.println("In onMessage end:");
catch(Exception e) {
System.out.println("Failed to receive message");
private void doClassLoaderWorkaround(){
boolean didit = false;
// Get the ClassLoader of this applet:
ClassLoader cloader = this.getClass().getClassLoader();
if (cloader == null){
System.out.println("### getClassLoader() returned null");
else
// We might call this handy utility routine:
// boolean didit =
Thread.currentThread().setContextClassLoader(cloader);
     Method setContextClassLoaderMeth = null;
     try {
          Method [] allMethods = Thread.class.getMethods();
          for ( int i = 0; i < allMethods.length; i++ ) {
               if (allMethods.getName().equals("setContextClassLoader")) {
                    setContextClassLoaderMeth = allMethods[i];
                    break;
     catch(Exception e) {
          System.out.println("---Exception " + e);
// but we don't because we need more visibility about what goes
wrong.
// Rather, reproduce that logic here, with extra error messages:
//Method setContextClassLoaderMeth = null;
try{
// Class params = ClassLoader.class ;
// setContextClassLoaderMeth =
//Thread.class.getMethod("setContextClassLoader", params);
catch (NoSuchMethodException ne) {
setContextClassLoaderMeth = null;
System.out.println("--- This java version does not have the
method 'setContextClassLoader'. Not a problem.");
return;
catch (Exception ae){
setContextClassLoaderMeth = null;
System.out.println("### Thread.class.getMethod() threw
unexpected exception: " + ae.getMessage());
if (setContextClassLoaderMeth != null){
Object[] args = { cloader };
try{
setContextClassLoaderMeth.invoke(Thread.currentThread(),
args);
didit = true;
catch (InvocationTargetException ite){
Throwable be = ite.getTargetException();
System.out.println("### Thread.setContextClassLoader() failed:
InvocationTargetException: " + be.getMessage());
catch (Exception ie){
System.out.println("### Thread.setContextClassLoader() threw
unexpected exception: " + ie.getMessage());
if (didit){
System.out.println("--- Succeeded in setting the
ContextClassLoader of this thread to be this applet's own
ClassLoader");
else{
System.out.println("### Could not set ContextClassLoader,
additional threads may not be able");
System.out.println("### to get a JNDI Context in java 122 or
greater.");
any clue or thought. please help
regards
mohan

It looks like the object that you have placed into the JNDO tree is not serializable or doesnt implement exernalizable!
java.io.NotSerializableException
0rrc
On 26 Jul 2001 16:10:35 -0700, [email protected] (Mohan Raj) wrote:
Hi
We are facing problem in JNDI lookup inside the applet
here is the scenario
We have two weblogic servers(port 7001)
one server is main server where the Applet1 , weblogic.jar and app.htm
are in C:\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver
and another is proxy server where HTTPProxyServlet is running and one
web.xml file ( wall these files are provided by weblogic and the port
of proxy server is 448)
Both the servers are running on different machines
and when we run the client browser and put the folloing url
http://proxyServer IP Address:448/app.htm
we get the following exception
Java(TM) Plug-in: Version 1.3.0-C
Using JRE version 1.3.0 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\kkumar
Proxy Configuration: no proxy
JAR cache enabled.
In Init.1..:
In Init.after ..doClassLoaderWorkaround
In Init.after setText:
In Init.before initjms:
In initjms begin
In initjms hostName...:10.1.10.211
In initjms before initialcontext...:
In initjms after initialcontext...:
javax.naming.ConfigurationException. Root exception is
java.rmi.MarshalException: failed to marshal public abstract
java.lang.Object
weblogic.jndi.internal.NamingNode.lookup(java.lang.String,java.util.Hashtable)
throws javax.naming.NamingException,java.rmi.RemoteException; nested
exception is:
java.io.NotSerializableException: javax.naming.InitialContext
java.io.NotSerializableException: javax.naming.InitialContext
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.io.ObjectOutputStream.outputClassFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.Hashtable.writeObject(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(Unknown Source)
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:102)
at
weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:108)
at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
at
weblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:246)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
at
weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(ServerNamingNode_WLStub.java:121)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at javax.naming.InitialContext.lookup(Unknown Source)
at Applet1.initJMS(Applet1.java:128)
at Applet1.init(Applet1.java:46)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Initialization failed
In Init.end of initjms:
the files are here
app.htm
               <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                    width="650" height="300" align="baseline"
                    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"
>
               <PARAM NAME="code" VALUE="Applet1">
               <PARAM NAME="codebase" VALUE=".">
               <PARAM NAME="AppletName" VALUE="Applet1">
               <PARAM NAME="archive" VALUE="weblogic.jar">
               <PARAM NAME="MAYSCRIPT" VALUE="true">
               <PARAM NAME="type"
VALUE="application/x-java-applet;version=1.2.2">
               <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
               <PARAM NAME="scriptable" VALUE="true">
               <!--
               <COMMENT>
                    <EMBED type="application/x-java-applet;version=1.2.2" width="650"
height="300" align="baseline"
                              code="ANZPopupApplet.class" codebase="../"
model="models/HyaluronicAcid.xyz"
                         pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"
MAYSCRIPT="true">
                    <NOEMBED>
               </COMMENT>
               -->
                              No JDK 1.2 support for APPLET!!
                    </NOEMBED>
                    </EMBED>
               </OBJECT>
</html>
Applet1.java
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.util.*;
import javax.naming.*;
import javax.jms.*;
import java.lang.reflect.*;
public class Applet1 extends Applet implements MessageListener {
private boolean started = false;
// JMS Stuff
private InitialContext jmsContext = null;
private QueueConnectionFactory jmsConnFactory = null;
private QueueConnection jmsConnection = null;
private Queue jmsQueue = null;
private QueueSession jmsSession = null;
private QueueSender jmsSender = null;
private QueueReceiver jmsReceiver = null;
// init - called to inform this applet that it has been
// loaded into the system
public void init() {
//{{INIT_CONTROLS
System.out.println("In Init.1..:");
     //doClassLoaderWorkaround();
System.out.println("In Init.after ..doClassLoaderWorkaround");
setLayout(null);
setSize(426,266);
jmslabel.setText("JMS Applet");
System.out.println("In Init.after setText:");
add(jmslabel);
jmslabel.setBounds(144,12,148,24);
textArea1.setEnabled(false);
add(textArea1);
textArea1.setBounds(24,36,375,100);
jmsleaveButton.setLabel("Leave");
add(jmsleaveButton);
jmsleaveButton.setBackground(java.awt.Color.lightGray);
jmsleaveButton.setBounds(312,240,78,20);
add(jmsMessageField);
jmsMessageField.setBounds(24,168,367,38);
System.out.println("In Init.before initjms:");
initJMS();
System.out.println("In Init.end of initjms:");
//{{DECLARE_CONTROLS
     java.awt.Label jmslabel = new java.awt.Label();
     java.awt.TextArea textArea1 = new java.awt.TextArea();
     java.awt.Button jmsleaveButton = new java.awt.Button();
     java.awt.TextField jmsMessageField = new java.awt.TextField();
// getAppletInfo - Returns information about this applet.
public String getAppletInfo() {
return "JMS Applet\r\n";
// destroy - called to inform this applet that it is being
// reclaimed and that it should destroy any resources that
// it has allocated.
public void destroy() {
try {
if(started) {
if (jmsConnection != null) {
jmsConnection.stop();
jmsConnection = null;
started = false;
stop();
catch(Exception e) {
// start - called to inform this applet that it should start its
execution
public void start() {
if(!started) {
started = true;
// stop - Called to inform this applet that it should stop its
execution
public void stop() {
textArea1.setEnabled(false);
jmsMessageField.setEnabled(false);
// action - handles entering message, Leave button clicked
public boolean action(Event evt, Object obj) {
System.out.println("In action begin:");
if(evt.id == Event.ACTION_EVENT) {
if(obj.equals(jmsMessageField.getText())) {
System.out.println("In action before sendData:");
sendData(jmsMessageField.getText());
System.out.println("In action after sendData:");
jmsMessageField.setText("");
return true;
if(obj.equals(jmsleaveButton.getLabel())) {
destroy();
return true;
// initJMS - initialize all of the JMS stuff
private void initJMS() {
try {
System.out.println("In initjms begin");
String hostName = this.getCodeBase().getHost();
System.out.println("In initjms hostName...:"+hostName);
Hashtable env = new Hashtable();
env.put(Context.APPLET,this);
env.put(Context.PROVIDER_URL,
"t3://" + hostName + ":448");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
System.out.println("In initjms before initialcontext...:");
jmsContext = new InitialContext(env);
System.out.println("In initjms after initialcontext...:");
jmsConnFactory
=(QueueConnectionFactory)jmsContext.lookup("javax.jms.QueueConnectionFactory");
System.out.println("In initjms after initialcontext..lookup.:");
jmsConnection = jmsConnFactory.createQueueConnection();
System.out.println("In initjms after initialcontext..lookup1.:");
jmsSession = jmsConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
System.out.println("In initjms before lookup...:");
jmsQueue =(Queue)jmsContext.lookup("jms.queue.TestQueue1");
jmsConnection.start();
jmsSender = jmsSession.createSender(jmsQueue);
jmsReceiver = jmsSession.createReceiver(jmsQueue);
jmsReceiver.setMessageListener(this);
System.out.println("In initjms before setMessageListener...end of the
const:");
catch(Exception e) {
e.printStackTrace();
System.out.println("Initialization failed");
// sendData - sends a message
void sendData(String data) {
try {
System.out.println("In sendData before createTextMessage:");
TextMessage message = jmsSession.createTextMessage();
message.setText(data);
jmsSender.send(message);
System.out.println("In sendData end data:"+data);
catch(Exception e) {
System.out.println("Failed to send message");
// onMessage - asynchronously receives a message
public void onMessage(Message message) {
String data;
try {
System.out.println("In onMessage:");
data = ((TextMessage)message).getText();
System.out.println("In onMessage data:"+data);
textArea1.append(data + "\n");
repaint();
System.out.println("In onMessage end:");
catch(Exception e) {
System.out.println("Failed to receive message");
private void doClassLoaderWorkaround(){
boolean didit = false;
// Get the ClassLoader of this applet:
ClassLoader cloader = this.getClass().getClassLoader();
if (cloader == null){
System.out.println("### getClassLoader() returned null");
else
// We might call this handy utility routine:
// boolean didit =
Thread.currentThread().setContextClassLoader(cloader);
     Method setContextClassLoaderMeth = null;
     try {
          Method [] allMethods = Thread.class.getMethods();
          for ( int i = 0; i < allMethods.length; i++ ) {
               if (allMethods.getName().equals("setContextClassLoader")) {
                    setContextClassLoaderMeth = allMethods[i];
                    break;
     catch(Exception e) {
          System.out.println("---Exception " + e);
// but we don't because we need more visibility about what goes
wrong.
// Rather, reproduce that logic here, with extra error messages:
//Method setContextClassLoaderMeth = null;
try{
// Class params = ClassLoader.class ;
// setContextClassLoaderMeth =
//Thread.class.getMethod("setContextClassLoader", params);
catch (NoSuchMethodException ne) {
setContextClassLoaderMeth = null;
System.out.println("--- This java version does not have the
method 'setContextClassLoader'. Not a problem.");
return;
catch (Exception ae){
setContextClassLoaderMeth = null;
System.out.println("### Thread.class.getMethod() threw
unexpected exception: " + ae.getMessage());
if (setContextClassLoaderMeth != null){
Object[] args = { cloader };
try{
setContextClassLoaderMeth.invoke(Thread.currentThread(),
args);
didit = true;
catch (InvocationTargetException ite){
Throwable be = ite.getTargetException();
System.out.println("### Thread.setContextClassLoader() failed:
InvocationTargetException: " + be.getMessage());
catch (Exception ie){
System.out.println("### Thread.setContextClassLoader() threw
unexpected exception: " + ie.getMessage());
if (didit){
System.out.println("--- Succeeded in setting the
ContextClassLoader of this thread to be this applet's own
ClassLoader");
else{
System.out.println("### Could not set ContextClassLoader,
additional threads may not be able");
System.out.println("### to get a JNDI Context in java 122 or
greater.");
any clue or thought. please help
regards
mohan

Similar Messages

  • Weblogic JNDI lookup with JDK1.2

    Hi,
    I've written JMS client that sends message to weblogic 8.1,
    and I use "weblogic.jndi.WLInitialContextFactory" to get access to resources.
    Now the problem is that my client can run only on JDK 1.2 and
    so when I send message I get exceptions about some security classes which
    webligic's JNDI is implementing looks like:
    java.lang.NoClassDefFoundError: javax/security/auth/callback/CallbackHandler
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
    I was wondering if there is any way to a client running on JDK 1.2
    to get access to weblogic's JNDI, other than using WLInitialContextFactory,
    or I have to go to Weblogic 6?
    Any help is appreciated!
    Thanks,
    Ann

    Hi,
    I've written JMS client that sends message to weblogic 8.1,
    and I use "weblogic.jndi.WLInitialContextFactory" to get access to resources.
    Now the problem is that my client can run only on JDK 1.2 and
    so when I send message I get exceptions about some security classes which
    webligic's JNDI is implementing looks like:
    java.lang.NoClassDefFoundError: javax/security/auth/callback/CallbackHandler
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
    I was wondering if there is any way to a client running on JDK 1.2
    to get access to weblogic's JNDI, other than using WLInitialContextFactory,
    or I have to go to Weblogic 6?
    Any help is appreciated!
    Thanks,
    Ann

  • JNDI Lookups Taking Forever on Browser Rentry of an applet

    I have an session ejb that I am accessing from a client applet.
    The first time I access the applet that does a jndi lookup it
    works fine, speed is acceptable. But If I leave the page and go
    into another applet the first jndi lookup can take about 5
    minutes. Then I can leave the page an go into another applet and
    lookup times are back to normal again. I dont think the server
    is the problem because other clients can be brought up and
    locate ejbs no problem. It must be something in the client
    weblogic classes. Has anyone else encountered this and maybe has
    a solution. Any ideas would be appreciated. Thanks
    Alex Jeannopoulos

    On the slowness issue, could you try these two diagnostic steps:
    (1) Run Firefox in its Safe Mode.
    Firefox Safe Mode is a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    ''If Firefox is not running:'' Hold down the Shift key while launching Firefox.
    ''If Firefox is running:'' Either --
    * "3-bar" menu button > "?" button > Restart with Add-ons Disabled
    * Help menu > Restart with Add-ons Disabled
    -- then OK the action.
    In both scenarios, a small dialog should appear. Click "Start in Safe Mode" (''not'' Refresh).
    Any difference?
    (2) Disable the Flash plugin
    Since Flash is used so pervasively on the web in the background or for menus, it can be difficult to disentangle Flash issues from other issues. So... here's one way.
    Open the Add-ons page using either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Plugins. Then on the right find "Shockwave Flash" and set the permission selector to "Never Activate".
    Notice any difference?

  • JNDI lookup issue in weblogic 10 server

    Hi all,
    I have a serious problem in getting the datasource lookup. My application uses EJB3 and JPA and it is deployed in weblogic10. I configured datasource in the domain (ex:mydomain) using weblogic 10 admin console. Now when i try to call from a client program, it is giving me javax.naming.NameNotFoundException. I use eclipse IDE to deploy the application. From the IDE, i can start the oracle 10.3 server and it automatically deploys the application into the server in mydomain. The admin console shows that the application deployed fine. And i can see the webcontent WAR file and EJB jar deployed. Coming back to the issue.... I verified user_projects\domains\mydomain\config\jdbc\datasource-jdbc.xml and user_projects\domains\mydomain\config\config.xml file enteries. My entries are present in those files.
    When i start the server i am getting below error...
    << Stacktrace >>
    javax.naming.NameNotFoundException: While trying to look up jdbc in /app.; remaining name 'jdbc'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
         at weblogic.deployment.PersistenceUnitInfoImpl.lookUpAppScopedDataSource(PersistenceUnitInfoImpl.java:529)
         at weblogic.deployment.PersistenceUnitInfoImpl.reconfig(PersistenceUnitInfoImpl.java:549)
         at weblogic.ejb.container.deployer.EJBModule.reconfigPersistenceUnits(EJBModule.java:529)
         at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:515)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:66)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    << Client program snippet >>
    Hashtable ht = new Hashtable();
                   ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   ht.put(Context.PROVIDER_URL, "t3://10.237.76.132:7001");
                   InitialContext ctx = null;
                   ctx = new InitialContext(ht);
                   Object obj = (Object)ctx.lookup(EmployeeBean.RemoteJNDIName);
                   EmployeeRemote empRemote = (EmployeeRemote)PortableRemoteObject.narrow(obj,com.acs.test.emp.EmployeeRemote.class);
                   List empList = empRemote.getEmployeeDetails(1);
                   System.out.println("SUCCESS"+empList.size());
    << Persistence.xml >>
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Persistence deployment descriptor for dev profile -->
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="cmsepool">
    <jta-data-source>java:/mydatasource</jta-data-source>
              <class>com.acs.test.emp.EmployeeVO</class>
              <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
              <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
    </properties>
    </persistence-unit>
    </persistence>

    Make sure that this Datasource you created is Targetted to Admin Server and full Cluster (incase of cluster domain). From Admin Console, select your datasource and check for the Targets tab. Since its JNDI lookup error, most probably it may not be deployed properly.
    HTH
    Ravi Jegga

  • JNDI lookup from OC4J to weblogic throws javax.naming.NameNotFoundException

    Hi All,
    We have the below setup in our production environment.
    EJB application is deployed in the Weblogic 10.3.4.0 Server on Sun Solaris. The EJB version is 3.0
    OC4J 10.2.0 is running on another Sun Solaris machine.
    There are 2 webservice applications WEBSERV1 & TestSoapEJB running on this OC4J container.
    We need to do lookup the EJBs deployed on the Weblogic server. For this we used the below logic in the web service's Stateless session bean:
    String weblogicURL = "";
    Properties props = new Properties();
    try
    props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("wl.properties"));
    weblogicURL     = props.getProperty("weblogicURL");     
    catch (FileNotFoundException e)
    e.printStackTrace();
    catch (IOException e)
    e.printStackTrace();
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.SECURITY_PRINCIPAL,"weblogic");
    ht.put(Context.SECURITY_CREDENTIALS,"weblogic654");
    ht.put(Context.PROVIDER_URL, weblogicURL);
    ctx = NamingManager.getInitialContext(ht) ;
    // tried using //ctx = new InitialContext(ht); same behavior.
    TestEJB.AdministratorEJB ejb = (TestEJB.AdministratorEJB) ctx.lookup("TestEJB#TestEJB.AdministratorEJB");
    ctx.close();
    When we first test first WEBSER1, the lookup is fine.
    But when we test the second webservice WEBSER2, the webservice name itself not able to lookup: It gives the below error:
    javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB
    Below is the stack throws thrown on browser:
    500 Internal Server Error
    javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB     
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)     
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)     
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)     
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)     
    at javax.naming.InitialContext.lookup(InitialContext.java:392)     
    at oracle.j2ee.ws.SessionBeanRpcWebService.init(SessionBeanRpcWebService.java:65)     
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.loadServlet(HttpApplication.java:2354)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.findServlet(HttpApplication.java:4795)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     
    at java.lang.Thread.run(Thread.java:662)
    It seems that, the OC4J is looking in Weblogic context. But it should be looking in its own context. How to resolve this issue.
    The same case happens if i restart the OC4J and first test the TestSoapEJB the lookup is fine . But if i test the WEBSERV1 , it throws the same error as above. In short, if one of the webservices lookup is working fine, the other webservice is not working. At the same time only one webservice's lookup is working.
    Kindly help me to resolve this issue.
    regards,
    Zia
    Edited by: PT Expert on Sep 9, 2012 3:16 AM

    I work now more that two days on this error!!!
    -> I remade my complete jdev project, it did not work!
    -> I deleted the jdev/system/j2ee/oc4j/workspace dir
    -> I search for some .lock files
    -> and many more tries!!! But without success...
    Is there a way to reset the Embedded OC4J?

  • JNDI lookup for weblogic.management.MBeanHome

    Tried to do JNDI lookup for MBeanHome. It could resolve
    weblogic.management, but not MBeanHome.
    Any idea? Thank you
    T. Pei
    PS
    The statement and the error message:
    MBeanHome mBeanHome = (MBeanHome) initialContext.lookup
    ("weblogic.management.MBeanHome.JNDI_NAME.MyServer");
    javax.naming.NameNotFoundException:
    Unable to resolve weblogic.management.MBeanHome.JNDI_NAME.MyServer
    Resolved: 'weblogic.management'
    Unresolved:'MBeanHome' ; remaining name 'JNDI_NAME.MyServer'

    I answered this in my last post, but to clarify your attempt below.
    you can access MBeanHome through JNDI in any of three ways that I
    currently know...
    MBeanHome mBeanHome =
    (MBeanHome)ctx.lookup("weblogic.management.adminhome");
    MBeanHome mBeanHome =
    (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    MBeanHome mBeanHome =
    (MBeanHome)ctx.lookup(MBeanHome.JNDI_NAME+"."+yourservername);
    typically yourservername = "myserver"
    when I print MBeanHome.ADMIN_JNDI_NAME I get
    "weblogic.management.adminhome"
    when I print MBeanHome.JNDI_NAME I get
    "weblogic.management.home"
    so using MBeanHome.JNDI_NAME+"."+yourservername is the same as
    "weblogic.management.home.myserver", if the server you are trying to access
    is called myserver.
    may be more information than you want.
    "T. Pei" <[email protected]> wrote in message
    news:3a7a1562$[email protected]..
    >
    Tried to do JNDI lookup for MBeanHome. It could resolve
    weblogic.management, but not MBeanHome.
    Any idea? Thank you
    T. Pei
    PS
    The statement and the error message:
    MBeanHome mBeanHome = (MBeanHome) initialContext.lookup
    ("weblogic.management.MBeanHome.JNDI_NAME.MyServer");
    javax.naming.NameNotFoundException:
    Unable to resolve weblogic.management.MBeanHome.JNDI_NAME.MyServer
    Resolved: 'weblogic.management'
    Unresolved:'MBeanHome' ; remaining name 'JNDI_NAME.MyServer'

  • JNDI-lookup without weblogic.jar?

    Is it possible to do a JNDI lookup to the remove weblogic server (using the WLInitialcontextfactory)
    without using the whole weblogic.jar in the classpath? It's about 30 megs which
    is far too much. I tried using only few classes from the weblogic.jar, but there
    were so many dependencies that I gave up. Any workarounds?

    Hi,
    Weblogic provides you a way to create client jar files so that the complete weblogic.jar
    doesn't need to be downloaded to the client. See
    http://e-docs.bea.com/wls/docs70/adminguide/utils.html#1117405
    hope this helps,
    pat
    "Janne" <[email protected]> wrote:
    >
    Is it possible to do a JNDI lookup to the remove weblogic server (using
    the WLInitialcontextfactory)
    without using the whole weblogic.jar in the classpath? It's about 30
    megs which
    is far too much. I tried using only few classes from the weblogic.jar,
    but there
    were so many dependencies that I gave up. Any workarounds?

  • JMS+Applet+weblogic+java.lang.ClassNotFoundException: weblogic.jndi.interna

    Hi, I have a problem with JMS, I wrote an applet with JBuilder 9. This applet receive a message from a topic on weblogic 7.01 Application Server.
    When I run this applet in jbuilder, all of thing is Ok but in browser (I.E) it didn�t work and show this message!!
    java.lang.ClassNotFoundException: weblogic.jndi.internal.ServerNamingNode_WLStub
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:479)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:452)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:372)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:339)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:221)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)
         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 jms.RescueJMSApplet.setContext(RescueJMSApplet.java:207)
         at jms.RescueJMSApplet.initJMS(RescueJMSApplet.java:117)
         at jms.RescueJMSApplet.init(RescueJMSApplet.java:56)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: D:\project\jms\classes\weblogic\jndi\internal\ServerNamingNode_WLStub.class (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 23 more
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exception:
    [java.lang.ClassNotFoundException: weblogic.jndi.internal.ServerNamingNode_WLStub]
         at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:483)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:452)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:372)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:339)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:221)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)
         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 jms.RescueJMSApplet.setContext(RescueJMSApplet.java:207)
         at jms.RescueJMSApplet.initJMS(RescueJMSApplet.java:117)
         at jms.RescueJMSApplet.init(RescueJMSApplet.java:56)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I was install j2re-1_4_05_windows_i586_i.exe and copy weblogic.jar file in true directory .I set the archive attribute of the applet tag to weblogic.jar path.
    Can any body help me!
    Thank a lot

    Hi Famoniri,
    I guess you have used weblogic specific libraries for looking up. IE does not know about this class and hence java.lang.ClassNotFoundException.
    If the above is the cause of the problem, try packaging the weblogic jar files with the applet(not a good idea!) or use the standard javax.naming packages(may be a good idea!).
    The problem causer is weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub which is trying to load classes which are not prsent in its viscinity.
    Let me know if this helps.
    Regards,
    Rajesh

  • Jndi lookup problem between weblogic 6.1 and 8.1

    Hello,
    I have a portal application running in weblogic 6.1(sp2). It needs to lookup a
    Stateless Session Bean which is deployed in Weblogic 8.1.
    I have the 8.1 version ejb client jar in my WEB-INF/lib
    Here is my code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://server1.abc.com:port);
    ctx = new InitialContext(env);
    Object objref = ctx.lookup(EJBJNDI_NAME);
    mEJBHome = (EJBServiceHome)PortableRemoteObject.narrow(objref, EJBServiceHome.class);
    mEJBService=mEJBHome.create();
    An exception occurred during the ctx.lookup call:
    javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalException:
    Problem finding error class; nested exception is:
    java.lang.ClassNotFoundException: java.lang.StackTraceElement
    java.lang.ClassNotFoundException: java.lang.StackTraceElement
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
    Loader.java:180)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
    areClassLoader.java:68)
    What troubles me is that the exact same code worked for a regular web application
    (web1.war), but not the portal application (portal1.war). Both web1.war and portal1.war
    are inside app.ear
    Please help!! Any guess/suggestions are welcome.
    Thank you!
    Ellen

    Hi,
    All I can say is Weblogic6.1 doesnot use JDK1.4 compared to Weblogic8.1, hence the class java.lang.StackTraceElement is not found when the object is executed in 6.1.
    This is clue which you may like to take forward for debugging your application.
    Thanks.

  • Unable to do JNDI lookup in JDeveloper-Weblogic server

    Dear All,
    I'm getting the below error when i try to call stateless EJB which is deployed in Weblogic 10.3 from the java stand alone class.
    javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7101: Destination unreachable; nested exception is:
         java.io.IOException: Empty server reply; No available router to destination]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:366)
         at weblogic.jndi.Environment.getContext(Environment.java:315)
         at weblogic.jndi.Environment.getContext(Environment.java:285)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at HelloWorldClient.main(HelloWorldClient.java:21)
    Caused by: java.net.ConnectException: t3://localhost:7101: Destination unreachable; nested exception is:
         java.io.IOException: Empty server reply; No available router to destination
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
         at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340)
         ... 8 more
    Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
         java.io.IOException: Empty server reply; No available router to destination
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:470)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:321)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:316)
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:205)
         ... 14 more
    The Client code is :
    Hashtable<String, String> env = new Hashtable<String, String>();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL,"weblogic");
    env.put(Context.SECURITY_CREDENTIALS,"weblogic123");
    env.put(Context.PROVIDER_URL,"t3://localhost:7101");
    Context ctx = new InitialContext(env); // Error throws here.
    System.out.println("Initial Context created");
    I'm able to login localhost as admin console and see the JNDI name binding. But dont know why it throws this error.
    Kindly help me out to resolve this issue.

    Sir,
    First of all pls try giving jdeveloper version...
    can you try other combinations
    like instead of 127.0.0.1, use localhost, actual ip of PC. Because when you are using 11.1.2.x.x version then before creating default domain jdeveloper asks the IP address to bind and make server accessible from that IP...
    At-Last if problem is not solved then
    Try this:
    1) start integrated weblogic server from jdeveloper by selecting Run -> Start Server Instance
    2) when weblogic is up go to http://localhost:7101/console
    3) login (username weblogic password weblogic1), go to services, go to jdbc and create your datasource
    4) shut weblogic down
    5) goto C:\Documents and Settings\<your username>\Application Data\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\bin the path may be different depending on your version of jdeveloper
    6) edit setDomainEnv.cmd and change "set WLS_JDBC_REMOTE_ENABLED=-Dweblogic.jdbc.remoteEnabled=true"
    7) go back to jdev and start weblogic as above

  • JNDI lookup using a proxy server

    Hi,
    I'm trying to use a weblogic server as a proxy server for a cluster of
    weblogic servers. The static and dynamic content delivery works fine but
    when I try to do a JNDI lookup from an applet client, I get a name not
    resolved exception. I guess, it happens because the proxy server tries to
    resolve the name from it's JNDI tree, whereas I expect it to forward this
    request to one of the servers in the cluster. Is this possible? If it is, do
    I need to set up some parameters in the proxy server? If not, can I do this
    myself by writing a name resolution class which in turn will forward the
    request to one of the servers in the cluster?
    Any help would be greatly appreciated.
    thanks
    - sanjay

    when u say "cluster of weblogic servers"..u mean the weblogic`s inbuilt
    cluster..
    the reason i ask is weblogic`s cluster do provide JNDI clustering too by using
    cluster-wide naming tree..
    Sanjay Aggarwal wrote:
    Hi,
    I'm trying to use a weblogic server as a proxy server for a cluster of
    weblogic servers. The static and dynamic content delivery works fine but
    when I try to do a JNDI lookup from an applet client, I get a name not
    resolved exception. I guess, it happens because the proxy server tries to
    resolve the name from it's JNDI tree, whereas I expect it to forward this
    request to one of the servers in the cluster. Is this possible? If it is, do
    I need to set up some parameters in the proxy server? If not, can I do this
    myself by writing a name resolution class which in turn will forward the
    request to one of the servers in the cluster?
    Any help would be greatly appreciated.
    thanks
    - sanjay

  • EJB 3.0 and jndi lookup (simple question)

    hi all,
    i am newbie on Weblogic Application Server and i have some issues,
    i have weblogic application server 10.0, also i have oracle timesten in-memory database, i have configured datasource and deploy my ejb 3.0 application, but i could not done jndi lookup?
    here is my example:
    1. one stateless session bean :
    import javax.ejb.Remote;
    @Remote
    public interface InsertSubscriber {
         public void insertSubscriber(SubscriberT subscriberT);
    } 2. here is it's implementation :
    @Remote(InsertSubscriber.class)
    @Stateless
    public class InsertSubscriberBean implements InsertSubscriber {
         @PersistenceContext(unitName = "TimesTenDS")
         private EntityManager oracleManager;
         public void insertSubscriber(SubscriberT subscriber)
              try {
                   System.out.println("started");
                   oracleManager.persist(subscriber);
                   System.out.println("end");
              } catch (Exception e) {
                   e.printStackTrace();
    }3 and my test client :
    public class Client {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
              try {
                   ctx = new InitialContext(ht);
                   InsertSubscriber usagefasade = (InsertSubscriber) ctx
                             .lookup("ejb.InsertSubscriberBean");               
              } catch (NamingException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        ctx.close();
                   } catch (Exception e) {
                        e.printStackTrace();
    }what i did incorrect ???
    i got error like this : Name not fount exception
    when i tried to view jndi tree on weblogic server application console i found this :
         Binding Name:     
    TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber     
         Class:     
    test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub     
         Hash Code:     
    286     
         toString Results:     
    weblogic.rmi.internal.CollocatedRemoteRef - hostID: '2929168367193491522S::billing_domain:AdminServer', oid: '286', channel: 'null'what does it mean how i can done lookup to jndi ?
    Regards,
    Paata Lominadze,
    Magticom LTD.
    Georgia.

    Hi All,
    I am using the weblogic cluster with session replication and EJB 2.0 with Local entity beans.
    for fail-over session should be replicated to another server so we can achive the same session if 1st server fails.
    Suppose i m using two managed server(server1,server2) in the cluster.I am storing the object of class ABC into session and object contains the instance of Local-EntityBean home but i put that as a transient.I have also override the readObject and write object method.
    when write object is called on 1st server,readObject method should be called on second server so we will be sure that session is replicating properly.
    pleaase find the code below : -
    public IssuerPageBean() {
    initEJB();
    private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    initEJB();
    initializeCommonObject();
    private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    private void initEJB() {
    try {
    ic = new InitialContext();
    issuerHome = (LocalIssuerHome) ic.lookup("java:comp/env/Issuer");
    } catch (NamingException e) {
    e.printStackTrace();
    in my case if i am calling the constructor IssuerPageBean(),it calls the initEJB() method and lookeup the entity local home properly but when readObject method is called on another server only initEJB() method is called directly and getting the exception below :
    WARNING: Error during create -
    javax.naming.NameNotFoundException: remaining name: env/ejb/Client
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;Z)Ljavax/naming/Context;(SimpleContext.java:35)
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;)Ljavax/naming/Context;(SimpleContext.java:39)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(SimpleContext.java:62)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyCont
    extWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.jav
    a:130)
    at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.initEJB()V(ClientPageBean.java:218)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.readObject(Ljava/io/ObjectInputStream;)V(ClientPageB
    ean.java:191)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at java.util.HashMap.readObject(Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at weblogic.common.internal.ChunkedObjectInputStream.readObject()Ljava/lang/Object;(ChunkedObjectInputStream.jav
    a:120)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(Ljava/lang/Class;)Ljava/lang/Object;(MsgAbbrevInputStream.java:
    121)
    at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi
    /spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic
    /rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
    Please help .
    Thanks in Advance.
    Edited by hforever at 03/04/2008 7:28 AM

  • How to look up a TxDataSource bound in weblogic JNDI

    HI,
    How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
    javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
    ..it gives me classcast exception.
    and if i lookup it using javax.sql.DataSource like below
    javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
    then while executing my sql on the connection object it throws some other excepiton
    like below
    java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
    [weblogic.rjvm.PeerGoneException: ; nested exception is:
    java.io.EOFException]
    at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
    at TestTransactionMgr.main(TestTransactionMgr.java:46)
    How can i solve this problem.. Actually my application needs to handle distributed transactions so i need to implement XADataSource.
    can somebody help me iin this.
    Thanks & Regards
    Akhil Nagpla

    Hi Akhil did u get the solution for distributed database /
    I am also working on same but i dint get the solution yet. Please if u have any solution for the same do mail me to [email protected] and [email protected]
    here goes my problem !
    we have 2 oracle databases.
    I am using Stateless EJB and container managed transaction !
    And inside a ejb method i am getting 2 different connection from 2 different datasources ok !
    Since am using container managed transaction it starts transaction automatically when the method begins,
    and the transaction ends when the method exit out ok !
    Now i insert into 2 databases and when the method exits it gives an error listed below !
    i am using NON emulated datasource with class name "com.evermindsql.DriverManagerDataSource"
    and looking up this datasource in the EJB with name specified in location attribute of datasource !
    "com.evermind.server.rmi.OrionRemoteExcepttion: Transaction was rolled back: javax.transaction.SystemException: could not commit: error code 29540- for additional error code check the oracle log file"
    For distributed database we configured DBLINK also !
    If u can give more info regarding DBlink it will be better ! Even after we set DBlink we are getting error !
    Please tell us how to configure the database !
    Oracle 9iAS
    Oracle 9i DB
    regards
    Sreenath.V

  • How can i look up a TxDataSource bound in Weblogic JNDI

              HI,
              How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
              javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
              .it gives me classcast exception.
              and if i lookup it using javax.sql.DataSource like below
              javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
              then while executing my sql on the connection object it throws some other excepiton
              like below
              java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
              Exception - with nested exception:
              [weblogic.rjvm.PeerGoneException: ; nested exception is:
                      java.io.EOFException]
              at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
              at TestTransactionMgr.main(TestTransactionMgr.java:46)
              How can i solve this problem.. Actually my application needs to handle distributed
              transactions so i need to implement XADataSource.
              can somebody help me iin this.
              Thanks & Regards
              Akhil Nagpla
              

              HI,
              How can i look up a TxDataSource bound in weblogic JNDI. When i access it using
              javax.sql.XADataSourse ds = (XADataSourse)context.lookUp(jndiName)
              .it gives me classcast exception.
              and if i lookup it using javax.sql.DataSource like below
              javax.sql.DataSourse ds = (DataSourse)context.lookUp(jndiName)
              then while executing my sql on the connection object it throws some other excepiton
              like below
              java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected
              Exception - with nested exception:
              [weblogic.rjvm.PeerGoneException: ; nested exception is:
                      java.io.EOFException]
              at weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:92)
              at TestTransactionMgr.main(TestTransactionMgr.java:46)
              How can i solve this problem.. Actually my application needs to handle distributed
              transactions so i need to implement XADataSource.
              can somebody help me iin this.
              Thanks & Regards
              Akhil Nagpla
              

  • JNDI lookup in a cluster

    Hi,
              The WL documentation contains the following:
              "When clients obtain an initial JNDI context by supplying the cluster DNS
              name, weblogic.jndi.WLInitialContextFactory obtains the list of all
              addresses that are mapped to the DNS name"
              Should clients (e.g. an EJB) be concerned about retrying the call to get the
              Initial Context. In other words, can this call fail if one of the servers in
              the cluster fails?
              After the intital contect is obtained, it seems that the lookup should
              always work (since WL will take care of individual server failures and retry
              the lookup in needed).
              Not clear whether the call to get the initial context is guaranteed to
              succeed (as long as one server in the cluster is up, of course)... Any
              information would be appreciated.
              Thanks,
              Philippe
              

              Hello Philippe,
              I had posted a similar question but now can't find it...got lost I suppose. Anyway,
              I wanted to add in my findings on this. I have a stateful session object running
              in a clustered setup. This stateful object has Home references to multiple stateless
              beans. When I create a failover my stateful object does its failover properly.
              But, if I don't perform a new Home lookup for the stateless objects needed I receive
              the following error:
              ####<Nov 9, 2001 2:00:06 PM CST> <Error> <> <gwiz> <testServer1> <ExecuteThread:
              '9' for queue: 'default'> <> <> <000000> <<TestDeliveryActionHandler>Problem occured
              when trying to do a save and goto. java.rmi.NoSuchObjectException: Activation
              failed with: java.rmi.NoSuchObjectException: Unable to locate EJBHome: 'GBTestManagerHome'
              on server: 't3://10.1.17.3:7001
              When I perform a lookup during the ejbactivate() method to get a new Home reference
              all seems to work OK. My question though is, is this correct? From what I have
              read I had the same impression that the unserialized Home reference should be
              able to locate a new reference in the cluster without having to perform a lookup
              again.
              Any advice from anyone is greatly appreciated,
              Rich
              "Philippe Fajeau" <[email protected]> wrote:
              >Hi,
              >
              >The WL documentation contains the following:
              >
              >"When clients obtain an initial JNDI context by supplying the cluster
              >DNS
              >name, weblogic.jndi.WLInitialContextFactory obtains the list of all
              >addresses that are mapped to the DNS name"
              >
              >Should clients (e.g. an EJB) be concerned about retrying the call to
              >get the
              >Initial Context. In other words, can this call fail if one of the servers
              >in
              >the cluster fails?
              >
              >After the intital contect is obtained, it seems that the lookup should
              >always work (since WL will take care of individual server failures and
              >retry
              >the lookup in needed).
              >
              >Not clear whether the call to get the initial context is guaranteed to
              >succeed (as long as one server in the cluster is up, of course)... Any
              >information would be appreciated.
              >
              >Thanks,
              >
              >Philippe
              >
              >
              

Maybe you are looking for

  • My power/sleep/wake button not working.. please help

    Hi guys, my power/sleep/wake button not working what should i do. I went to apple store and they said i will be charge £100 as im no longer on warranty. is there another way, or app that i can use as substitute for that button? Your advise and help w

  • HT1727 ipod is synced with another library, but i only have one library???

    have two old , but reliable nanos i haven't synced either in two years or more today i opened account # 5 my limit, sadly i've gotten rid of the previous 4 laptops without deleting them from my list anywho, after i synced black ipod nano, i tried to

  • Creating control area,Company codes and Cost centres

    Hello experts, I want to create a new controlling area,company code and cost centres for a new client. I know the transaction codes/menu path, but I would like to get an exact guidance for creating these. Experts pls comments on this, I want exact pr

  • Scheduling maintenace order

    HI fds while creating maintenance work order. scheduling is not carried out it is giving the following msg. Scheduling log does not contain any entries Message no. C7119 i have maintain all the scheduling parameters , so scheduling should be carried

  • Connecting Counter hardware to DAQCard-AI​-16E-4

    I am dealing with a pulse train signal produced by our hardware with varying period, and am looking to obtain the time between each lo-hi transition. I have looked at the Count Time - Easy (DAQ-STC).vi within Labview 6 and this seems to give me what