JMS + Applet

Hello all,
I am trying to use jms via an applet and i am facing some problems....
1st of all, from a browser window I get an ecxeption
"java.lang.NoClassDefFoundError: javax/jms/JMSException" . I guess that it is related to the path of the applet code and the path to j2ee.jar. But this problem still exists when I copy j2ee.jar in the same dir as the applet code .
When I am using the appletviewer, the previous problem is overcome. But then I get the following exception:
Could not create JNDI context: javax.naming.NoInitialContextException: Cannot in
stantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root except
ion is java.security.AccessControlException: access denied (java.util.PropertyPe
rmission javax.rmi.CORBA.UtilClass read)]
java.security.AccessControlException: access denied (java.lang.RuntimePermission
exitVM)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkExit(SecurityManager.java:765)Could no
t create JNDI context: javax.naming.NoInitialContextException: Cannot instantiat
e class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is j
ava.security.AccessControlException: access denied (java.util.PropertyPermission
javax.rmi.CORBA.UtilClass read)]
at java.lang.Runtime.exit(Runtime.java:91)
at java.lang.System.exit(System.java:701)
at MyApplet.init(MyApplet.java:63)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
java.security.AccessControlException: access denied (java.lang.RuntimePermission
exitVM)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkExit(SecurityManager.java:765)
at java.lang.Runtime.exit(Runtime.java:91)
at java.lang.System.exit(System.java:701)
at MyApplet.init(MyApplet.java:63)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
I guess that this is related to the Security Manager, and the restrictions it applies. (btw how do we pass the properties needed for the jms queue to function
"jms.properties=%J2EE_HOME%\config\jms_client.properties" ? )
A simple example would be very helpfull.
Thanks,
Manos

U need to use the j2re-1_3_0_02-win (install it ,its a java plug in tool).
write a file called java.policy
which containes code as follows
grant {
permission java.security.AllPermission;
save the above file as java.policy in c:/
then open the java-plug in console (go to control panel there u will find the plug in double click it)
select all check boxes,and give the startup parameters as
-Djava.security.policy=c:/java.policy
then
in the html code where applet gets loaded write this code
<OBJECT name = "appletTalk" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="300" height="300" align="baseline" NAME="plg"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME="code" VALUE="ClientApplet">
<PARAM NAME="archive" VALUE="http://earth:8001/sekhar-jsp/weblogic.jar">
<PARAM NAME="codebase" VALUE="/sekhar-jsp/">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="server" value="earth:8001">
<PARAM NAME="servlet" value="autexfi/push">
<PARAM NAME="connection" value="t3http">
<PARAM NAME="scriptable" VALUE="true">
<PARAM NAME="mayscript" VALUE="true">
<PARAM NAME="nclients" VALUE="1000">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3" width="400"
height="300" align="baseline" code="ClientApplet"
codebase="/sekhar-jsp/"
archive="http://earth:8001/sekhar-jsp/weblogic.jar"
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"
scriptable="true"
mayscript="true"
>
<NOEMBED>
</COMMENT>
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</NOEMBED>
     </EMBED>
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</OBJECT>
use appropriate names where ever u fing necessary

Similar Messages

  • 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

  • Tom Help needed again!!!!!!!!JMS Failure Applet

    Hi Tom,
              In my application applet is basically the client and it basically does the following
              1)Creates an initial context with the provider url
              2)Looks up for the Topic connection factory
              3)Then using the TopicConnection Factory creates the Topic
              Now the problem is in some of the PC's it gives the following error. at the first step while creating the initial context,pls note that the provider url is correct and we use http protocol with http tunneling enabled.
              javax.naming.NamingException: Couldn't connect to any host [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No]
              at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:81)
              When i placed a .java.policy file with grant {
              permission java.security.AllPermission;
              }; in the c:\documents.settings\<username> folder.After doing this it seems to work in some of machines where the above mentioned error is
              occurring.Pls note that my applet is a signed one, and the network does not have any firewall
              My query is do we have to place this .java.policy file in every client machine and why is that it is not working in all the machine where the above mentioned error is coming.
              Pls help me in solving this problem.
              Pls also note that we have admin rights also on all these machines.

    I don't know the answer. The best I can think of is to read the JMS applet white-paper if you haven't already:
              http://dev2dev.bea.com/pub/a/2004/05/WLS_81_jms_applets.html
              Tom

  • 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

  • MQSERIES 2009 - The connection to the queue manager was lost

    Hi, I use MQSERIES 5.3 with java 1.4.
    I tried to connect to any queue managers (in a connect phase) using the example code JMS/applet to test simple jobs but everytime I got :
    Reason: 2009 - The connection to the queue manager was lost.\n\
    Action: Verify that the channel name is valid\n\
    \tand that the queue manager is running and retry.
    I checked the name of QM (I know it's case sensitive), I tried to write the server channel name instead of the system default server channel constant... I checked if it was running... I checked the classpath (I known about the properties files MQ try to load - there are in a mqseries/java/lib jar file) well nothing happened.
    I read a reply to a similar question posted some time ago, but I didn't understand why the problem highlighted was to use new session before old one wasn't closed yet (or somethig else) , after that another solution was to use MQSERIES BINDING TCP CONNECTION instead the CLIENT one. I tried but I got other errors...
    I tried to run the mqseries/tools/java/base code with the parameters but I got the same error.
    Any idea about? Please forgot my english...!! ;)
    thanx in advance..
    Alex

    Just a thought....
    If you use connection pooling and you aren't closing connections properly, the 2009 reason code gets reported. The default max for pool connections is 100 on the SOLARIS implementation of WebSphere MQ. I am guessing it is something similar on other OS versions.
    It appears you are being very thorough, so I would guess you've considered this already.
    MPV

  • Error in Applet reading a JMS topic

    I have an applet trying to read a JMS topic. It connects fine, but as
              soon as a message is written into the topic (that the applet is
              subscribed to), I get the following error on the server:
              <Apr 26, 2002 2:46:39 PM PDT> <Error> <RJVM> <Unsolicited error
              response for: '-1'>
              The applet shows the following stacktrace:
              <Apr 26, 2002 2:40:26 PM PDT> <Warning> <Dispatcher> <Error thrown by
              rmi server: 'weblogic.rmi.internal.BasicServerRef@101 - jvmid:
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              oid: '257', implementation:
              'weblogic.jms.dispatcher.DispatcherImpl@2c3327''
              weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              generate the Skeleton on the server for:
              weblogic.jms.dispatcher.DispatcherImpl_WLSkel ]
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDescriptor.java:296)
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescriptor.java:309)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              <Apr 26, 2002 2:40:39 PM PDT> <Warning> <Dispatcher> <Error thrown by
              rmi server: 'weblogic.rmi.internal.BasicServerRef@2 - jvmid:
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              oid: '2', implementation:
              'weblogic.rmi.internal.dgc.DGCServerImpl@4d7745''
              weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              generate the Skeleton on the server for:
              weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel ]
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDescriptor.java:296)
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescriptor.java:309)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.Kernel.execute(Kernel.java:235)
                   at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:169)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
                   at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
                   at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
                   at weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.java:42)
                   at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
                   at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
                   at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:319)
                   at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
                   at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              <Apr 26, 2002 2:41:39 PM PDT> <Warning> <Dispatcher> <Error thrown by
              rmi server: 'weblogic.rmi.internal.BasicServerRef@2 - jvmid:
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              oid: '2', implementation:
              'weblogic.rmi.internal.dgc.DGCServerImpl@4d7745''
              weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              generate the Skeleton on the server for:
              weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel ]
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDescriptor.java:296)
                   at weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescriptor.java:309)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
                   at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
                   at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.Kernel.execute(Kernel.java:235)
                   at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:169)
                   at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
                   at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
                   at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
                   at weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.java:42)
                   at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
                   at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
                   at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:319)
                   at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
                   at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              Thanks in advance for suggestions/help.
              Raj
              

    Is it with 7.0 GA or beta?
              Do you know whether the classpath servlet is open or not?
              Can you run this url from a browser and update this issue please.
              http://host:port/bea_wls_internal/classes/weblogic/jms/dispatcher/Dispatcher
              Impl_WLSkel.class
              You should get a downloaded file to be saved. Otherwise your server need to
              open the classpathservlet.
              use -Dweblogic.servlet.ClasspathServlet.disableStrictCheck=true to open the
              classpath servlet.
              Attach the applet code, so that it will help us to nail down the issue.
              Cheers,
              ..maruthi
              "theist" <[email protected]> wrote in message
              news:[email protected]...
              > I have an applet trying to read a JMS topic. It connects fine, but as
              > soon as a message is written into the topic (that the applet is
              > subscribed to), I get the following error on the server:
              >
              > <Apr 26, 2002 2:46:39 PM PDT> <Error> <RJVM> <Unsolicited error
              > response for: '-1'>
              >
              >
              > The applet shows the following stacktrace:
              >
              > <Apr 26, 2002 2:40:26 PM PDT> <Warning> <Dispatcher> <Error thrown by
              > rmi server: 'weblogic.rmi.internal.BasicServerRef@101 - jvmid:
              >
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,
              7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              > oid: '257', implementation:
              > 'weblogic.jms.dispatcher.DispatcherImpl@2c3327''
              > weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              > generate the Skeleton on the server for:
              > weblogic.jms.dispatcher.DispatcherImpl_WLSkel ]
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDe
              scriptor.java:296)
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescrip
              tor.java:309)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              > at
              weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
              > at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
              2)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              > >
              > <Apr 26, 2002 2:40:39 PM PDT> <Warning> <Dispatcher> <Error thrown by
              > rmi server: 'weblogic.rmi.internal.BasicServerRef@2 - jvmid:
              >
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,
              7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              > oid: '2', implementation:
              > 'weblogic.rmi.internal.dgc.DGCServerImpl@4d7745''
              > weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              > generate the Skeleton on the server for:
              > weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel ]
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDe
              scriptor.java:296)
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescrip
              tor.java:309)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              > at
              weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
              > at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
              2)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.Kernel.execute(Kernel.java:235)
              > at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:169)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
              > at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
              > at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
              > at
              weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
              a:42)
              > at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
              > at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
              > at
              weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:319)
              > at
              weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
              > at
              weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              > >
              > <Apr 26, 2002 2:41:39 PM PDT> <Warning> <Dispatcher> <Error thrown by
              > rmi server: 'weblogic.rmi.internal.BasicServerRef@2 - jvmid:
              >
              '-8904810875822286436C:127.0.0.1R:1187444208533444527S:192.103.129.38:[7001,
              7001,7002,7002,7001,7002,-1]:mydomain:myserver',
              > oid: '2', implementation:
              > 'weblogic.rmi.internal.dgc.DGCServerImpl@4d7745''
              > weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not
              > generate the Skeleton on the server for:
              > weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel ]
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeletonClass(BasicRuntimeDe
              scriptor.java:296)
              > at
              weblogic.rmi.internal.BasicRuntimeDescriptor.getSkeleton(BasicRuntimeDescrip
              tor.java:309)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              > at
              weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
              > at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
              2)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.Kernel.execute(Kernel.java:235)
              > at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:169)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
              > at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
              > at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
              > at
              weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
              a:42)
              > at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
              > at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
              > at
              weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:319)
              > at
              weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
              > at
              weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              > >
              >
              >
              > Thanks in advance for suggestions/help.
              > Raj
              

  • Jms signed applet with SP3

    Hi,
              I am using a thin client version of weblogic client & jms jars for my signed applet.I am getting an exception when I try to initialize the applet without closing the browser window. This was an issue in SP2 and was reportedly fixed in SP3 but for some reason I dont see it working.
              I am using 1.4.2_05 as the jre for my java plugin and 8.1 SP3 for my weblogic. I see the messages these messages being printed in the logs
              +++ <Warining> Don't have permissions to access ThreadGroup. We strongly recommend to use signed applet.
              +++ <Warining> Proceed further without creating ThreadGroup.
              +++ <Warining> Don't have permissions to access ThreadGroup. We strongly recommend to use signed applet.
              +++ <Warining> Proceed further without creating ThreadGroup
              This is the exception that gets thrown when you try to start the applet again without closing the browser window.
              javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 208 completed: Maybe]
                   at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:81)
                   at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:237)
                   at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:171)
                   at javax.naming.InitialContext.lookup(Unknown Source)
                   at com.vz.inms.client.applet.MyApplet.init(MyApplet.java:84)
                   at sun.applet.AppletPanel.run(Unknown Source)
                   at java.lang.Thread.run(Unknown Source)
              Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe
                   at com.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown Source)
                   at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)
              But in my case, the applet is signed and I can see it in the trace as well as I get a prompt whether I want to accept the signed applet when the applet is about to be invoked. I have signed the applet using my own certificate instead of one from verisign or other CA's. I dont think it should matter.
              Does anyone know if this was really fixed in SP3?
              This is what documentation for resolved issues for 8.1 SP3 says :
              CR120811
              When using the WebLogic thin client with an applet, concurrentModificationExceptions and JMSExceptions were thrown. Investigation showed that there were two problems:
              There was a problem with the Sun ORB implementation. An applet's virtual machine released AppletContext upon a browser refresh and stopped all threads in the applet context's thread group. When an ORB was initialized as part of an applet context, the reader threads were created in the applet context's thread group. When the browser was refreshed, the ORB reader threads were also stopped.
              The WebLogic thin client created two threads in the applet context group: a HeartbeatMonitor thread and a RequestTimer thread. When the browser was refreshed, these threads were stopped with others in the applet context group.
              The problems were solved with the following changes:
              The Sun ORB implementation changed in JDK 1.4.2_04 so that it creates the reader threads on a child thread group of the system thread group but not to the applet's context thread group. This change ensures the reader thread stays alive as long as the orb is alive or applet's JVM is alive.
              The WebLogic thin client TunnelResponse and HeartbeatMonitor threads are now created on a child thread group of the system thread group but not to the applet's context thread group. This change ensures these threads stay alive as long as applet's JVM is alive. The fix is provided only for signed applets.
              I would really appreciate if someone could give any insight to this problem.
              Thanks,
              Jatinder

    I am also getting this error.
              BEA...is it possible to use an applet with JMS without signing it?

  • Getting following error when running eg. Applet + JMS. Why?

              Im trying to run the example Applet provided in the bea documentation in Weblogic
              8.1, but im getting the following error. Can someone shed some light on the matter.
              Thank you all for
              your time
              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:476)
              at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
              at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
              at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
              at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
              at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
              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 Applet1.initJMS(Applet1.java:110)      
              at Applet1.init(Applet1.java:40)
              

    This is a known issue and is fixed in SP1. Please contact support for a
              patch.
              Tom Barnes wrote:
              > Not sure. I suggest first posting to the "rmi-iiop" newsgroup
              > if you are using the 8.1 thin-client, as JMS is not involved
              > yet. You can also try the "rmi" and "jndi" newsgroups.
              >
              > Tom, BEA
              >
              > john mattucci wrote:
              >
              >> Im trying to run the example Applet provided in the bea documentation
              >> in Weblogic
              >> 8.1, but im getting the following error. Can someone shed some light
              >> on the matter.
              >> Thank you all for your time
              >>
              >> 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:476)
              >>
              >>
              >> at
              >> weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
              >>
              >>
              >> at
              >> weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
              >>
              >>
              >> at
              >> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
              >>
              >>
              >> at
              >> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
              >>
              >>
              >> at
              >> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
              >>
              >>
              >> 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 Applet1.initJMS(Applet1.java:110)
              >> at Applet1.init(Applet1.java:40)
              >
              >
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support
              

  • JMS Support in Applet

    Can JMS be used in Applets send and recieve messages from EJB ?.
    I have read in JMS tutorial that
    Applets, however, are not required to support the JMS APIhttp://java.sun.com/products/jms/tutorial/1_3-fcs/doc/overview.html#1027335

    From what I know applets can indeed be JMS clients but it is not mandatory that they be supported. Its probably vendor specific so check out the JMS provider you intend to use (Looked at Sonic and BEA and both seem to support applets fine).
    cheers,
    mairt

  • Looking up JMS Server from an applet

    Hi!!
    I am trying to lookup a JMS server via an applet using Oracle9i
    Application Server. It's giving Security Access Exception. Can
    anybody help.

    hi,
    if the security exception is coming from the applet side, then you should consider the following:
    Normally for an applet to run in any web server, the database and theweb server should reside in the same machine to avoid a security exception being thrown. If you have the web server residing in different machine than the database then you can either use signed applet or you can use oracle connection manager to make it as a medium between the web server and the database. The connection manager will have to be installed in the same machine where the database resides. For more information on applet security with oracle products, please refer to oracle connection manager reference guide.
    If the security issue is thrown from the JMS side, then you might conside granting your user Advance queing and some java security permissions.
    hope this helps.

  • Looking UP JMS services From an Applet!!

    Hi!!
    1>I am trying to lookup JMS services from my applet. Actually I would like my applet to send JMS messages and recieve messages as well. When I am trying to do lookup it is giving Access Control Exception
    a> java.util.PropertyPermission "user.dir", "read";
    b>java.util.PropertyPermission "java.version", "read";
    c>java.util.PropertyPermission "line.separator", "read";
    It works fine if I give
    "grant {permission java.security.AllPermission;};"
    How can I avoid giving Grant All to my applet.
    2>If I have my Weblogic web server and my Applet Client sitting behind a firewall.How will I take care of lookup as the lookup occurs through 7001 port. If I use tunnellling at the appplication server side.I would be able to lookup using http over port 80 but JMS messaging won't be over port 80. How to take care of Server Side and CLient Side firewalls.
    Can anybody help.
    thanks
    aditya.

    hi,
    if the security exception is coming from the applet side, then you should consider the following:
    Normally for an applet to run in any web server, the database and theweb server should reside in the same machine to avoid a security exception being thrown. If you have the web server residing in different machine than the database then you can either use signed applet or you can use oracle connection manager to make it as a medium between the web server and the database. The connection manager will have to be installed in the same machine where the database resides. For more information on applet security with oracle products, please refer to oracle connection manager reference guide.
    If the security issue is thrown from the JMS side, then you might conside granting your user Advance queing and some java security permissions.
    hope this helps.

  • Error with connecting to WL 8.1 jms server in an applet

              Hi all
              i tried to follow below technical article to enable my applet to subscribe to
              a JMS topic setup on the WL server 8.1
              http://dev2dev.bea.com/products/wlserver81/whitepapers/WLS_81_jms_applets.jsp
              However, my applet always threw below error msg as initialize the JNDI context.
              

              Hi all
              i tried to follow below technical article to enable my applet to subscribe to
              a JMS topic setup on the WL server 8.1
              http://dev2dev.bea.com/products/wlserver81/whitepapers/WLS_81_jms_applets.jsp
              However, my applet always threw below error msg as initialize the JNDI context.
              

  • Applet and JMS

    Hello, i have a problem with an Applet. I want to connect to the JMS on a the J2EE server that is packaged with the jsdkee(SunOne?).
    I use the following code
        env = new Hashtable();
        env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
        env.put(Context.PROVIDER_URL,           "iiop://localhost:3700");
        try
          ic = new InitialContext(env);
          jmsFactory = (TopicConnectionFactory)ic.lookup("jms/PS/playerTopicFactory");
        catch(NamingException ne) {System.err.println("NamingException in LocalAccount.initMyConnectionFactory(): "+ne);}I get the following error
    NamingException in LocalAccount.initMyConnectionFactory(): javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]Does that mean that he can't access the Class? But i dont want to put rt.jar (including CNCtxFactory) into the applet! Maybe I misunderstand something...
    Please help me I can't figure this out

    8.1 provides a "thin client" jar. See the "new JMS features" in the
              8.1 release notes.
              For previous WL versions, check out the
              "Small Footprint Client Options for BEA WebLogic Server" white-paper
              available on dev2dev.bea.com.
              Note that if you choose not to use JMS, you can use the JDK's
              built-in IIOP client, where 0 (zero, nada, no) WebLogic classes
              are required in the client. (rmi-iiop newsgroup for details).
              Tom, BEA
              yag wrote:
              > I am a newbie in applet and jms,I think it's possible to use the applet as the
              > jms receiver client,however,I have the following quesitons need your helps:
              > 1.need i configure a webapplication including the applet?which jars I need to
              > package(the whole weblogic.jar) ?and how can I deploy it?
              > 2.how can I specify the jndi parameters the applet need to use,such as the "weblogic.jndi.WLInitialContextFactory"
              > and so on
              > where and how?
              >
              > thanks ahead
              

  • In applet,how can i got the thin client jar for JMS from weblogic.jar?

    who can give it to me?
    and,when i used the weblogic.jar coming from weblogic 7sp2 for linux advance server
    2.1 as the client jar,i still got a error message that Class (.....Stub.class)is
    not found,why?What should i do?

    That approach is a hack and an absolute nightmare. It never worked
    completely. I could not get any support for durable subscriptions etc. You
    can add this (Thin JMS client) as a request for new feature (but it should
    have been available long time ago).
    -- Vish Magapu
    "Bruce Stephens" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    You might want to take a look at the JMS white paper and asociated
    discussion for supporting thin clients: check the reference on:
    http://e-docs.bea.com/wls/docs70/faq/jms.html#252418
    HTHs,
    Bruce
    jerry8006 wrote:
    who can give it to me?
    and,when i used the weblogic.jar coming from weblogic 7sp2 for linux advance
    server
    2.1 as the client jar,i still got a error message that Class
    (.....Stub.class)is
    not found,why?What should i do?

  • Calling a WebService from Java Applet

    Hi all,
    In my application I have 3 projects:
    1. server - for all the business logic.
    2. view - for web app.
    3. swing - for applet.
    In the view project I wrote a WS, and I want to call it from my applet. So I created a WS using the Jdev (10.1.3.2) wizard in the view project (I tested it and it worked fine), and in the swing project I created a proxy for this WS, tested it and it worked fine. Then I created a JAR containing the swing project with the WS proxy classes, opened the Applet and find out that I have some classes missing, so I started adding all the relevant Jars and ended with a ~13MB JAR containing all the swing project jars that in the class path for a simple Applet.
    I know that I'm missing something but I dont know what. Do I really need all those Jars. Is there a simple way to call to a WS via Applet?
    This is the list of all the Jars:
    activation.jar
    commons-logging-api.jar
    commons-logging.jar
    ejb.jar
    http_client.jar
    jaxb-api.jar
    jaxb-impl.jar
    jaxen.jar
    jaxr-api.jar
    jaxrpc-api.jar
    jazncore.jar
    jdom.jar
    jms.jar
    jta.jar
    mail.jar
    mdds.jar
    oc4jclient.jar
    ojdl2.jar
    ojmisc.jar
    ojpse.jar
    oraclepki.jar
    orajaxr.jar
    orasaaj.jar
    orawsdl.jar
    orawsrm.jar
    osdt_cert.jar
    osdt_core.jar
    osdt_saml.jar
    osdt_wss.jar
    osdt_xmlsec.jar
    relaxngDatatype.jar
    saaj-api.jar
    saaj-impl.jar_old
    servlet.jar
    wsclient.jar
    wsdl.jar
    wssecurity.jar
    wsserver.jar
    xdb.jar
    xml.jar
    xmlparserv2.jar
    xsdlib.jar
    By the way at the end of all this annoying process I got the next exception:
    [failed to localize] typemapping.nested.exception.initialization(javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found)
         at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService.java:282)
         at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(BasicService.java:244)
         at com.tm.view.ws.misc.runtime.WSMisc_Service_SerializerRegistry.getRegistry(WSMisc_Service_SerializerRegistry.java:26)
         at com.tm.view.ws.misc.runtime.WSMisc_Service_Impl.<init>(WSMisc_Service_Impl.java:26)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:92)
         at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryImpl.java:121)
         at com.tm.view.ws.misc.WSMiscSoap12HttpPortClient.<init>(WSMiscSoap12HttpPortClient.java:20)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at client.base.connectivity.ClientRequestAgent.runWS(ClientRequestAgent.java:135)
         at client.base.connectivity.ClientRequestAgent.run(ClientRequestAgent.java:44)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Shachar

    Try this:
    1. open the webService data controll in the Data Controls section and drag the method from the webService onto the method call activity in your task flow. This will overwrite the current method property (the one which pints to your bean, make a copy of this entry if you can't reproduce it by hand). This too will create an entry in the pageDef of the method call activity.
    2. reenter (or paste) the original value in the method property, so that it again points to your bean. The entry in the pageDef will remain!
    3. now in the bean method you can access the method via its binding like you access any other method from the binding:
    // GET A METHOD FROM PAGEDEF AND EXECUTE IT
    // get the binding container
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    // get an Action or MethodAction
    OperationBinding method = bindings.getOperationBinding("YourMethodActionNAME");
    if (method == null)
    // handle method not found error...
    // if there are parameters to set...
    Map paramsMap = method.getParamsMap();
    paramsMap.put("param","value")  ;    
    // execute the method
    method.execute();
    List errors = method.getErrors();
    if (!errors.isEmpty())
       // handle errors here errors is a list of exceptions!
    // no error resume normal workTimo

Maybe you are looking for

  • Best Practice for Organizing Enterprise Models

    We need to migrate our Oracle Designer models (almost 10 years in the works) into OSDM to stay with current design tools. We do not have the option of staying with Designer. I need to know of any best practices or other documents that describe a way

  • DLA doesn't work, Win XP

    I had DLA vs 4.97 installed, downloaded vs 5.21.  Followed installation instructions, saw no activity indicatiing the older version was uninstalled but received notice 5.21 installed.  It won't work.  Any attempt to drag a file in explorer onto CD-RW

  • How do I prevent Firefox from opening all tabs in seperater windows?

    Every single time I open Firefox it not only opens all of my previous tabs in one window but it also opens each and every one of them is it's own separate window. As I normally work with over 60 tabs it takes several minutes for them to complete open

  • Samrtform  : how to inlarge width of line

    i have letter that the header is the person detail  . the header divide to 2 part  "from" and  "to" ,  that Surrounded by Rectangle in the bottom line of this header I write the mail address  , The problem is that the address not show , I just see  :

  • Find table with wbs element list

    Hi experts, i have the wbs element id number (i found it from a function) but i dont know how can i find the wbs element description table. any help will be appreciated. Michal.