Problem on agents access (bea weblogic) JMS server

i’am using an agent to access weblogic JMS server, here is the fragment of the code.String mfName = “MyJMSConnectionFactory”;

    QueueConnection qc = null;

    try {

        Properties props = new Properties();

        String url = "t3://202.206.215.16:7001";

        

        props.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");

        props.put(Context.PROVIDER_URL, url);

        

        System.out.println("System properties set ok!");

        Context ctx = new InitialContext(props);

        System.out.println("context set ok.");

        QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup(

            mfName);

        System.out.println("QueueConnectionFactory set ok.");

        

        qc = qcf.createQueueConnection();

        System.out.println("connection set ok");

        QueueSession qs = qc.createQueueSession(false,

            javax.jms.Session.AUTO_ACKNOWLEDGE);

        System.out.println("session set ok");

        Queue q = (Queue) ctx.lookup("MyJMSQueue");

        System.out.println("Queue initialed");

        QueueSender qsnd = qs.createSender(q);

	  System.out.println("sender set ok.");

        TextMessage tm = qs.createTextMessage();

        tm.setText("Hello");

        qsnd.send(tm);

	  System.out.println("send ok");

	  if(qc != null){

            qc.close();

        }

    }

    catch (Exception e) {

    	  if(qc != null){

            qc.close();

        }

        e.printStackTrace();

    }

when i have put weblogic.jar’s path to the notes.ini, here is the debug errors:

System properties set ok!

java.lang.NoClassDefFoundError: weblogic/rmi/internal/StubGenerator

at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:59)



at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:483)



at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:446)



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(NamingManager.java:671)



at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)



at javax.naming.InitialContext.init(InitialContext.java:218)



at javax.naming.InitialContext.<init>(InitialContext.java:194)



at JavaAgent.NotesMain(JavaAgent.java:25)



at lotus.domino.AgentBase.runNotes(Unknown Source)



at lotus.domino.NotesThread.run(NotesThread.java:215)

When i “Edit project”, and add weblogic.jar to my agent files, error is:

Agent log is:

Started running agent ‘testJMSinLocalDB’ on 2004-09-08 12:32:31

ERROR: JVM: Attempt to retrieve Java agent attachments failed.

Ran Java Agent Class

Done running agent ‘testJMSinLocalDB’ on 2004-09-08 12:32:39

And java console tells me:

java.lang.OutOfMemoryError

Wish your helps.