Writing a simple EJB client

Hi,
I'm facing a little problem: trying to implement a plain Java client for acessing an CMP Entity Bean I keep getting
the following error:
javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
     at javax.naming.InitialContext.init(InitialContext.java:219)
     at javax.naming.InitialContext.<init>(InitialContext.java:195)
     at com.test.SimpleEarClient.main(SimpleEarClient.java:65)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
As I am not a very experienced developer, I don't quite understand what exactly can be the reason
for this. (Maybe there is some additional reference missing?)
The code for it:
private static String userName = "userName";
     private static String password = "password";
     private static String hostUrl = "localhost:port";
     private static String initContextFactory = "com.sap.engine.services.jndi.InitialContextFactoryImpl";
     private static final String BIKECMP_LOOKUP_STRING = "sap.com/SimpleEAR/BikeCMPBean";
     public static void main(String[] args) {
          //Build the InitialContext environment properties
          Properties ctxProp = new Properties();
          ctxProp.put(Context.INITIAL_CONTEXT_FACTORY,initContextFactory);
          ctxProp.put(Context.PROVIDER_URL, hostUrl);
          ctxProp.put(Context.SECURITY_PRINCIPAL, userName);
          ctxProp.put(Context.SECURITY_CREDENTIALS, password);
          BikeCMP bean = null;
         String xmlTest;
       try{
                       Context ctx = new InitialContext(ctxProp);
                       BikeCMPHome home = (BikeCMPHome) ctx.lookup(BIKECMP_LOOKUP_STRING);
                       bean = home.findByPrimaryKey(new Integer(1));
                       xmlTest = bean.getXml();
                     System.out.println("Printing the result of the query: " + xmlTest);
Maybe you can help me on that.
Thanks!
Beata

Hi all
I am facing  a "NoInitialContextException" problem while ejb lookup.
I want to lookup a ejb in the same server as of my java client.
I have added all the required jars and followed each step as in the forums.Is there any other way out.
<u>Error:</u>
<i>javax.naming.NoInitialContextException: Cannot instantiate class: com.sap.engine.services.jndi.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl]
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
     at javax.naming.InitialContext.init(InitialContext.java:219)
     at javax.naming.InitialContext.<init>(InitialContext.java:195)
     at com.chevron.ccs.mapping.Mapping.main(Mapping.java:96)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.services.jndi.InitialContextFactoryImpl
     at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:219)
     at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
     ... 4 more</i>
Thanks in Advance
DhanyaR Nair

Similar Messages

  • Help: Problem in running a simple EJB client

    Hi All,
    I have just started learning EJB and I am facing an issue in running a client for the EJB I developed (a "Hello World" EJB)
    I have deployed my application in Sun's reference implementation of j2ee server. I have the following client code through which I intend to access EJB methods
    // EJB client code in main()
    Context ctx = new InitialContext();
    Object hwobj = ctx.lookup("HelloWorldApp");
    HelloWorldHome hworldHome = (HelloWorldHome)
    PortableRemoteObject.narrow(hwobj,HelloWorldHome.class); // exception here
    HelloWorld hworld = hworldHome.create();
    String msg = hworld.sayHelloWorld();
    System.out.println(msg);
    When I am running my client I am getting the following exception. Can anyone tell me why ?
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at HelloWorldClient.main(HelloWorldClient.java:13)
    Thanks
    Ratheesh

    * I found the solution for this . Add j2ee.jar and Client jar returned by deploytool [ if we check return client jar ] to classpath when running client .
    * Then I got CORBA_NO_PERMISSION error . After searching in forum , I found the solution. Posting
    Forum Home > Enterprise JavaBeans
    Topic: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Welcome ratheeshpai!
    Search Forum
    Not watching this topic.
    This topic has 4 replies on 1 page (Most recent message: Nov 19, 2002 7:59 AM)
    [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: NicholasHsiao Oct 28, 2001 5:51 AM
    Hi,
    I was trying to deploy one simple session bean into J2EE RI Server. It works fine. And I wrote one client to access this session bean, it show me
    java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
    org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
    Context ic = null;
    try
    ic = new InitialContext();
    catch(Exception e)
    System.out.println("1: "+e.toString());
    This exception is happend when I try to lookup the jndi name
    This error message is happend only on J2EE 1.3 (1.3_01) . If I downgrade to J2EE 1.3Beta or even 1.2, everything would be okay. Any one know how to solve such problem ??
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: cdunn5
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Oct 31, 2001 10:04 PM
    Reply 1 of 4
    hi,
    I don't know the solution but I have the exact same problem. I see your message was posted in October, have you found any solutions yet?
    Re: [ J2EE RI Server ] CORBA NO_PERMISSION 0
    Author: scottiep
    In Reply To: [ J2EE RI Server ] CORBA NO_PERMISSION 0 Nov 22, 2001 11:21 AM
    Reply 2 of 4
    Da:Frederik Hansen ([email protected])
    Message 2 in thread
    Soggetto:Re: J2EE - NO_PERMISSION
    Newsgroups:dk.edb.programmering.java
    View this article only
    Data:2001-11-10 03:32:12 PST
    For at svare p� mit eget sp�rgsm�l: Access and Security Issues Q1: Some applications that ran under J2EE SDK 1.3
    beta 2 stop running under the 1.3 FCS release with the
    following message: java.rmi.AccessException: CORBA
    NO_PERMISSION 0 No. Why does this happen and what
    can be done about it? When your application ran under the 1.3 beta 2
    version of the reference implementation (RI), security permissions may
    not have
    been checked. For example, the beta 2 RI allowed
    calls to enterprise beans that required username-password permission,
    even
    when the client provided no username-password
    information. With 1.3 FCS release, the J2EE SDK became strict
    about checking adherence to the security policies of J2EE components. How can you make your application run under the
    FCS release? 1.If you don't want security checks, do the
    following: Use the deploytool to build a deployment
    descriptor that does not require a strict security policy: Under the Security screen of the EJB wizard
    or the Security tab of the EJB inspector in deploytool, click
    "Deployment
    Settings..". Under the box "Client
    Authentication", make sure "Support Client Choice" is checked instead of
    "Certificate"
    or "Password". 2.To require the application pass security
    checks to run, do the following: When an enterprise bean specifies
    "Certificate" or "Password" as the method of Client Authentication, use
    a J2EE
    application client, instead of a stand-alone
    Java application, to access the bean. You will need to login as a valid
    J2EE
    user.
    By : scottiep
    Thanks
    Ratheesh

  • EJB Client Access From JDeveloper9iR2

    I seem to be running into a lot of problems when trying to get a simple EJB client to talk to an EJB on our 9IAS platform. I have developed a simple session bean (just to test) which simply returns a string. When I create the default client code this works fine using the embedded OC4J server in Jdeveloper but I can't run a similar client against 9IAS when I deploy the code. When I go through the client wizard it seems to produce the same code as the standalone EJB OC4J client. I simply changed the name of the server (Context.PROVIDER_URL, "ormi://pe2500/). This is the parameter code I use:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.PROVIDER_URL, "ormi://pe2500:23891/MyEJBs");
    This is the output I receive:
    D:\jdeveloper9ir2\jdk\bin\javaw.exe -ojvm -classpath D:\javadev\ejbservlet\ejbservlet\WEB-INF\classes;D:\jdeveloper9ir2\jdev\lib\jdev-rt.jar;D:\jdeveloper9ir2\j2ee\home\lib\ojsp.jar;D:\jdeveloper9ir2\j2ee\home\jsp\lib\taglib\ojsputil.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar;D:\jdeveloper9ir2\jdev\lib\ojc.jar;D:\jdeveloper9ir2\j2ee\home\lib\activation.jar;D:\jdeveloper9ir2\j2ee\home\lib\ejb.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaas.jar;D:\jdeveloper9ir2\j2ee\home\lib\jaxp.jar;D:\jdeveloper9ir2\j2ee\home\lib\jcert.jar;D:\jdeveloper9ir2\j2ee\home\lib\jdbc.jar;D:\jdeveloper9ir2\j2ee\home\lib\jms.jar;D:\jdeveloper9ir2\j2ee\home\lib\jndi.jar;D:\jdeveloper9ir2\j2ee\home\lib\jnet.jar;D:\jdeveloper9ir2\j2ee\home\lib\jsse.jar;D:\jdeveloper9ir2\j2ee\home\lib\jta.jar;D:\jdeveloper9ir2\j2ee\home\lib\mail.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\lib\xmlparserv2.jar;D:\jdeveloper9ir2\lib\xmlcomp.jar;D:\jdeveloper9ir2\j2ee\home\oc4j.jar;D:\jdeveloper9ir2\j2ee\home\lib\servlet.jar Samplemypackage6.ctejb1Client3
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
         java.net.ConnectException: Connection refused: connect
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:350
         void Samplemypackage6.ctejb1Client3.main(java.lang.String[])
              ctejb1Client3.java:18
    Process exited with exit code 0.
    Can anyone tell me if this is the correct communication method for client EJB's talking to the 9IAS server?
    Any help really appreciated.
    Chris Taylor

    hi Chris Taylor, did you find the solution for this error. i too get this error and i am looking for the answer. if you find any answer please share with me too. if i get any answer for this i will reply you too.

  • EJB Client - basic programming principles

    Hello,
    I'm new to the EJB world, can someone please give me some giudelines on basic programming principles on how to write a simple EJB client ?
    Thanx people!
    Son

    We have some very simple "hello, world" examples here :
    https://glassfish.dev.java.net/javaee5/ejb/EJB30.html
    There is also an EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    Another resource is the Java EE 5 Tutorial :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • Always fail to deploy to server when (Create a Simple EJB Session Bean )

    Hi,
    I'm trying the "Oracle JDeveloper 11g Tutorials" - "Create a Simple EJB Session Bean", I just follow the instructions in that page. But when I tried to run it, it always failed. Can anyone help me to have a look. I paste the log below. thank you.
    There's an error in the log "java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener". but I don't know what's that meaning.
    E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m
    WLS Start Mode=Development
    CLASSPATH=;e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;e:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;e:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.0.0.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;e:\Oracle\MIDDLE~1\modules\ORGAPA~1.5/lib/ant-all.jar;e:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;E:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;;
    PATH=e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\native;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\native;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;e:\Oracle\MIDDLE~1\modules\ORGAPA~1.5\bin;e:\Oracle\MIDDLE~1\JDK160~1\jre\bin;e:\Oracle\MIDDLE~1\JDK160~1\bin;C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;G:\D\JACKYH\Installed\apache-ant-1.7.1\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CollabNet Subversion;U:.;V:.;E:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    Starting WLS with line:
    e:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -DproxySet=false -Djbo.34010=false -Xverify:none -da -Dplatform.home=E:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=e:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sysext_manifest_classpath;e:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;e:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sysext_manifest_classpath -Dweblogic.Name=DefaultServer -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy weblogic.Server
    <12/11/2008 10:54:31 AM EST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    E:\Oracle\Middleware\patch_wls1030\profiles\default\sysext_manifest_classpath\weblogic_ext_patch.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;E:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar>
    <12/11/2008 10:54:32 AM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 10.0-b19 from Sun Microsystems Inc.>
    <12/11/2008 10:54:32 AM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR380042 Thu Sep 11 13:33:40 PDT 2008
    WebLogic Server Temporary Patch for 7372756 Fri Sep 12 17:05:44 EDT 2008
    WebLogic Server 10.3 Mon Aug 18 22:39:18 EDT 2008 1142987 >
    <12/11/2008 10:54:33 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <12/11/2008 10:54:33 AM EST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <12/11/2008 10:54:34 AM EST> <Notice> <Log Management> <BEA-170019> <The server log file E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <12/11/2008 10:54:36 AM EST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <12/11/2008 10:54:38 AM EST> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddi was not deployed. Error: [Deployer:149158]No application files exist at 'E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddi.war'.>
    <12/11/2008 10:54:38 AM EST> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddiexplorer was not deployed. Error: [Deployer:149158]No application files exist at 'E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddiexplorer.war'.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <12/11/2008 10:54:39 AM EST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <12/11/2008 10:54:39 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <12/11/2008 10:54:39 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.12.54:7101 for protocols iiop, t3, ldap, snmp, http.>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <12/11/2008 10:54:39 AM EST> <Warning> <Server> <BEA-002611> <Hostname "jackyh.dst.com.au", maps to multiple IP addresses: 192.168.12.54, 127.0.0.1>
    <12/11/2008 10:54:39 AM EST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 192.168.12.54, 127.0.0.1>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <12/11/2008 10:54:39 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    DefaultServer startup time: 13829 ms.
    DefaultServer started.
    [Running application SessionEJB on Server Instance DefaultServer...]
    ---- Deployment started. ---- 12/11/2008 10:54:43
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2008-11-12 10:54:43.882: Writing EJB JAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB\SessionEJB-Project1-ejb
    2008-11-12 10:54:43.914: Wrote EJB JAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB\SessionEJB-Project1-ejb
    2008-11-12 10:54:44.148: Writing EAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB
    2008-11-12 10:54:44.164: Wrote EAR file to E:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.56\o.j2ee\drs\SessionEJB
    Deploying Application...
    <12/11/2008 10:54:46 AM EST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1226447686226' for task '0'. Error is: 'weblogic.management.DeploymentException: '
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:171)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:99)
         at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
         Truncated. see log file for complete stacktrace
    >
    <12/11/2008 10:54:46 AM EST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'SessionEJB'.>
    <12/11/2008 10:54:46 AM EST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:171)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:99)
         at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
         Truncated. see log file for complete stacktrace
    >
    [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application SessionEJB on DefaultServer.: .
    weblogic.management.DeploymentException:
    #### Deployment incomplete. #### 12/11/2008 10:54:46
    oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$4$1.run(AdrsStarter.java:1316)
    Caused by: oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
         ... 12 more
    #### Cannot run application SessionEJB due to error deploying to DefaultServer.
    [Application SessionEJB stopped and undeployed from Server Instance DefaultServer]

    Steve,
    I'm facing the same issue as user#####.
    Your workaround does not work ; when I deploy manuelly the ear file, with a new weblogic-application.xml, I get the same error.
    Does that happen a lot ? :p
    Edit :
    my web.xml :
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
      <description>Empty web.xml file for Web Application</description>
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
      </context-param>
      <context-param>
        <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
        <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
        <param-value>false</param-value>
      </context-param>
      <filter>
        <filter-name>JpsFilter</filter-name>
        <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
      </filter>
      <filter>
        <filter-name>trinidad</filter-name>
        <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
      </filter>
      <filter>
        <filter-name>adfBindings</filter-name>
        <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>JpsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
      <filter-mapping>
        <filter-name>trinidad</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
      <filter-mapping>
        <filter-name>adfBindings</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>REQUEST</dispatcher>
      </filter-mapping>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>resources</servlet-name>
        <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/afr/*</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>35</session-timeout>
      </session-config>
      <mime-mapping>
        <extension>html</extension>
        <mime-type>text/html</mime-type>
      </mime-mapping>
      <mime-mapping>
        <extension>txt</extension>
        <mime-type>text/plain</mime-type>
      </mime-mapping>
    </web-app>Luc-
    Edited by: Lucas Ismag on 4 déc. 2008 05:33

  • Java EJB client "Can't connect to ORB" errors...

    I'm writing an application that is a Java EJB client application (no web
    stuff at all). Needless to say there are no examples of such an app in
    the samples dir, they are all web-based.
    My problem is that when I try to run my application (client calls a
    stateless session bean on the server and gets a "hello world" string
    back) I get a "Could not create the TestService bean:
    javax.naming.CommunicationException: Cannot connect to ORB [Root
    exception is org.omg.CORBA.COMM_FAILURE:   minor code: 1 completed:
    Maybe]" error.
    This is a very simple test, and I'm getting quite frustrated in trying
    to figure out what's actually wrong.
    Here's the client code (the bean on the server has been deployed into a
    module called achptestEjb, the bean name is TestService)
    TestService service = null;
    TestServiceHome home=null;
    String host = "localhost";
    String port = "12345";
    try {
    Properties env = new Properties();
    Context context=null;
    String jndiName="ejb/achptestEjb/TestService";
    System.out.println("JNDI name is "+jndiName);
    env.put
    ("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://"+host+":"+port);
    context = new InitialContext(env);
    The error comes when the new InitialContext is set with the properties
    in the env object.
    Any ideas what I'm doing wrong?
    It would be a BIG help if iPlanet included one simple pure EJB client
    example. There are some of us out here who feel HTML is too limiting
    for complicated applications.
    Douglas Bullard

    I finally found the answer to my problem.... in the Ant script I had
    copied from another example, the "-iiop" was lacking in the ejbc
    arguments - almost all of the examples assume you'll be calling EJBs
    from within the container, instead of a stand-alone client, so they
    don't use that flag.
    Putting that "-iiop" flag into the ejbc arguments fixed everything.
    Thanks, Shivani, for pointing out what is now obvious but was
    mysterious.
    Douglas Bullard
    In article <[email protected]>,
    [email protected] says...
    I'm writing an application that is a Java EJB client application (no web
    stuff at all). Needless to say there are no examples of such an app in
    the samples dir, they are all web-based.
    My problem is that when I try to run my application (client calls a
    stateless session bean on the server and gets a "hello world" string
    back) I get a "Could not create the TestService bean:
    javax.naming.CommunicationException: Cannot connect to ORB [Root
    exception is org.omg.CORBA.COMM_FAILURE:   minor code: 1 completed:
    Maybe]" error.
    This is a very simple test, and I'm getting quite frustrated in trying
    to figure out what's actually wrong.
    Here's the client code (the bean on the server has been deployed into a
    module called achptestEjb, the bean name is TestService)
    TestService service = null;
    TestServiceHome home=null;
    String host = "localhost";
    String port = "12345";
    try {
    Properties env = new Properties();
    Context context=null;
    String jndiName="ejb/achptestEjb/TestService";
    System.out.println("JNDI name is "+jndiName);
    env.put
    ("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://"+host+":"+port);
    context = new InitialContext(env);
    The error comes when the new InitialContext is set with the properties
    in the env object.
    Any ideas what I'm doing wrong?
    It would be a BIG help if iPlanet included one simple pure EJB client
    example. There are some of us out here who feel HTML is too limiting
    for complicated applications.
    Douglas Bullard

  • Very simple EJB 3.0 MDB but I get NullPointerException

    I tried to create a very simple EJB 3.0 Message Driven Bean in JDeveloper 10.1.3.2 as follows:
    Message Driven Bean Class:
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    @MessageDriven(mappedName="MDBQueue")
    public class MDB implements MessageListener {
    public void onMessage(Message message) {
    System.out.println("Got message!");
    Application Client:
    import javax.annotation.Resource;
    import javax.jms.*;
    public class MDBAppClient {
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;
    public static void main(String args[]) {
    try {
    QueueConnection queueCon = queueCF.createQueueConnection();
    QueueSession queueSession = queueCon.createQueueSession
    (false, Session.AUTO_ACKNOWLEDGE);
    QueueSender queueSender = queueSession.createSender(null);
    TextMessage msg = queueSession.createTextMessage("hello");
    queueSender.send(mdbQueue, msg);
    System.out.println("Sent message to MDB");
    queueCon.close();
    } catch(Exception e) {
    e.printStackTrace();
    But I get the following error:
    java.lang.NullPointerException
         at model.MDBAppClient.main(MDBAppClient.java:17)
    I read similar problem in the this thread:
    Re: message driven bean on ejb 3.0 does not work
    some one said that the version in ejb-jar.xml must be changed from 2.1 to 3.0
    but in this case there is no ejb-jar.xml.
    ( I have other cases with ejb-jar.xml file but I can't change the version in ejb-jar.xml)
    the version in web.xml is 2.4 but it not accept any value except 2.4 and an error occur when I tried to change it to 3.0
    please can you tell me why I get NullPointerException and how can I allow EJB 3.0 MDB and JMS to work in JDeveloper

    Note that you can't run MDBs in the embedded OC4J in JDeveloper - try deploying to a stand-alone install of OC4J and see if it works there.

  • Steps to deploy an ejb application and running an ejb client in weblogic server6.1

    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet

    Hi.
    Check out the beanManaged example that ships with WLS and read the accompanying docs. This
    is a simple EJB with a servlet that invokes it.
    Michael
    shekhar sachdev wrote:
    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • How to set SSL from an Webservice EJB client

    I want to invoke a web service from a stateless session EJB. How do I
    configure Weblogic 9.0/8.1 so that the transport uses SSL? I have a set of
    SSL related properties that I want to set e.g. Client Authentication
    Enabled, Private Key file, Client Certifiicate file etc.
    Note that I am NOT using weblogic native programming (i.e.e jws
    files/controls and annotations) to create the web service client. It is a
    simple EJB that was developed outiside weblogic and runs in the weblogic
    container.
    How do I set the SSL related properties in this case?
    Thanks for any help.
    Shantanu Sen

    You configuring both the server and client side? And how exactly is you're client implemented?
    A bit difficult but basic way to do this is with SSLSocket and giving that the necessary keystore which holds you're client certificate (key) and the server CA.
    Then push you're soap envelope with http-headers up the socket?

  • Multiple EJB clients blocking

    I tried to ask this question a few months ago, but I must not have given enough
    details
    for anyone to even guess what my problem might be. So I created a simple example
    to
    demonstrate what's happening.
    I have a cluster of 2 WL servers (7.0) running on Linux. When I call an EJB multiple
    times at once from different threads in a client application, sometimes all the
    threads
    finish in a few milliseconds, but other times at least one of the threads will
    pause
    for 60 seconds before finishing. There are no error or warning indicators in any
    server
    log files. I'm trying to do something very simple: add one to a number in a database
    table without letting any two clients get the same number.
    I'm using DB2 as my database and COM.ibm.db2.jdbc.app.Driver as my driver. I have
    a
    JDBC connection pool and a DataSource, which I'm using in a stateless session
    bean.
    I lock the table in exclusive mode, query the current number, and add one to it.
    I'm
    using container-managed transactions, so I'm relying on the container to commit
    the
    update when the method ends. (I tried using a bean-managed transaction, and I
    got the
    same results.)
    For a long time I believed the problem must be with DB2, but when I put the exact
    same
    code in a JSP, it works just fine. So I know that DB2 can do what I'm asking it
    to do.
    I also tried it on a Windows NT server, and it behaves exactly the same. Comparing
    thread dumps of the two servers in the cluster taken during one of these 60 second
    wait periods doesn't show any obvious problems: the two servers both have exactly
    the
    same threads going, and they all seem pretty reasonable to me.
    Here is the code for my EJB:
    package com.davisvision.cv;
    import java.sql.*;
    import javax.ejb.*;
    public class SimpleBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() {
    public void ejbPostCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext c) {
    ctx = c;
    public int nextNumber() {
    String tableName = "TEST.PROVIDER_SPAWN";
    Connection con = null;
    int num = 0;
    try {
    con = CvDatabase.getConnection();
    con.setAutoCommit(false);
    Statement stmt = con.createStatement();
    stmt.executeUpdate("LOCK TABLE " + tableName + " IN EXCLUSIVE MODE");
    ResultSet rs = stmt.executeQuery("SELECT NEXT_OFFICE_NUM FROM "
    + tableName + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    if (rs.next()) {
    num = rs.getInt(1);
    num++;
    int updated = stmt.executeUpdate("UPDATE " + tableName
    + " SET NEXT_OFFICE_NUM = " + num
    + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    catch(Exception e) {
    num = -1;
    Logger.writeDated(Logger.FATAL, "SimpleBean.nextNumber: " + e);
    finally {
    CvDatabase.close(con);
    return num;
    And here is my client application:
    package test;
    import com.davisvision.cv.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    public class TestSimpleBean implements Runnable {
    static InitialContext ctx;
    public int taskNum;
    static void getContext() {
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://weblogictest:7055");
    try {
    ctx = new InitialContext(env);
    catch(NamingException e) {
    System.out.println("Unable to obtain an initial JNDI context:
    " + e);
    public void run() {
    System.out.println("Thread " + taskNum + " started.");
    try {
    Object obj = ctx.lookup("ejb-cv-Simple");
    SimpleHome h = (SimpleHome) PortableRemoteObject.narrow(obj, SimpleHome.class);
    SimpleRemote r = h.create();
    int n = r.nextNumber();
    System.out.println("Thread " + taskNum + " next number = " + n);
    catch(Exception e) {
    System.out.println("Error in thread " + taskNum + ": " + e);
    System.out.println("Thread " + taskNum + " ended.");
    public static void main(String[] args) {
    getContext();
    int n = 3;
    TestSimpleBean x = null;
    Thread t = null;
    // start each thread
    for (int i = 0; i < n; i++) {
    x = new TestSimpleBean();
    x.taskNum = i;
    t = new Thread(x);
    t.start();
    System.out.println("" + n + " threads started.");
    My deployment descriptors are as simple as I could make them:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Simple</ejb-name>
    <home>com.davisvision.cv.SimpleHome</home>
    <remote>com.davisvision.cv.SimpleRemote</remote>
    <ejb-class>com.davisvision.cv.SimpleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Simple</ejb-name>
    <method-name>
    </method-name>
    </method>
    <trans-attribute>
    Required
    </trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Simple</ejb-name>
    <jndi-name>ejb-cv-Simple</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    This is from part of a production application, so to make sure our users aren't
    getting
    random 60-second pauses, I have the production bean deployed on just one server
    in the
    cluster with just one bean in the pool. But I really need to find the solution
    to this
    problem before development goes much further. Any guesses, sugestions, or conjectures
    would be most welcome.
    - gary

    Oops, I didn't notice that I only attached one file last time. The thread dump
    from the other server in the cluster is attached.
    My (off-topic) Linux problem must be something else: Signaling the parent
    java process was one of the first things I tried. It may have to do with the
    way that we start WL (in the background with nohup).
    - gary
    Rob Woollen <[email protected]> wrote:
    Gary Bradshaw wrote:
    Thanks for your response, Rob. I've attached the thread dumps, hopingthat they
    will be easier to read that way. They are from a Windows NT system:Thanks. Are you sure this is the right dump? The server looks
    completely idle in this dump.
    I haven't
    yet found a way to get a thread dump on my Linux system. (I know Ishould say
    "kill -3 <processId>", but each WLS has at least 72 process IDs. MaybeI just
    haven't found the right one yet.)Try ps -ef --forest  .  It'll show you graphically with a little ascii
    art the parent process/thread.
    -- Rob
    Your suggestion to do the update first would work for this particularexample
    since I know I always want to add 1 to the number, but in other similarsituations
    I will want to vary the update based on the values I find in the row.I'm looking
    for a clean way to safely do multi-user updates with JDBC. (For larger,more important
    tables I'm using entity beans).
    - gary
    Rob Woollen <[email protected]> wrote:
    Can you post the thread dumps?
    Also usually people do something like this:
    update mytable set count = count + 1
    select count from mytable
    -- Rob
    Gary Bradshaw wrote:
    I tried to ask this question a few months ago, but I must not havegiven enough
    details
    for anyone to even guess what my problem might be. So I created a
    simple
    example
    to
    demonstrate what's happening.
    I have a cluster of 2 WL servers (7.0) running on Linux. When I callan EJB multiple
    times at once from different threads in a client application, sometimesall the
    threads
    finish in a few milliseconds, but other times at least one of the
    threads
    will
    pause
    for 60 seconds before finishing. There are no error or warning indicatorsin any
    server
    log files. I'm trying to do something very simple: add one to a numberin a database
    table without letting any two clients get the same number.
    I'm using DB2 as my database and COM.ibm.db2.jdbc.app.Driver as mydriver. I have
    a
    JDBC connection pool and a DataSource, which I'm using in a statelesssession
    bean.
    I lock the table in exclusive mode, query the current number, and
    add
    one to it.
    I'm
    using container-managed transactions, so I'm relying on the containerto commit
    the
    update when the method ends. (I tried using a bean-managed transaction,and I
    got the
    same results.)
    For a long time I believed the problem must be with DB2, but when
    I
    put the exact
    same
    code in a JSP, it works just fine. So I know that DB2 can do what
    I'm
    asking it
    to do.
    I also tried it on a Windows NT server, and it behaves exactly thesame. Comparing
    thread dumps of the two servers in the cluster taken during one ofthese 60 second
    wait periods doesn't show any obvious problems: the two servers bothhave exactly
    the
    same threads going, and they all seem pretty reasonable to me.
    Here is the code for my EJB:
    package com.davisvision.cv;
    import java.sql.*;
    import javax.ejb.*;
    public class SimpleBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() {
    public void ejbPostCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext c) {
    ctx = c;
    public int nextNumber() {
    String tableName = "TEST.PROVIDER_SPAWN";
    Connection con = null;
    int num = 0;
    try {
    con = CvDatabase.getConnection();
    con.setAutoCommit(false);
    Statement stmt = con.createStatement();
    stmt.executeUpdate("LOCK TABLE " + tableName + " IN EXCLUSIVEMODE");
    ResultSet rs = stmt.executeQuery("SELECT NEXT_OFFICE_NUM
    FROM "
    + tableName + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    if (rs.next()) {
    num = rs.getInt(1);
    num++;
    int updated = stmt.executeUpdate("UPDATE " + tableName
    + " SET NEXT_OFFICE_NUM = " + num
    + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    catch(Exception e) {
    num = -1;
    Logger.writeDated(Logger.FATAL, "SimpleBean.nextNumber:" + e);
    finally {
    CvDatabase.close(con);
    return num;
    And here is my client application:
    package test;
    import com.davisvision.cv.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    public class TestSimpleBean implements Runnable {
    static InitialContext ctx;
    public int taskNum;
    static void getContext() {
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://weblogictest:7055");
    try {
    ctx = new InitialContext(env);
    catch(NamingException e) {
    System.out.println("Unable to obtain an initial JNDIcontext:
    " + e);
    public void run() {
    System.out.println("Thread " + taskNum + " started.");
    try {
    Object obj = ctx.lookup("ejb-cv-Simple");
    SimpleHome h = (SimpleHome) PortableRemoteObject.narrow(obj,SimpleHome.class);
    SimpleRemote r = h.create();
    int n = r.nextNumber();
    System.out.println("Thread " + taskNum + " next number= " + n);
    catch(Exception e) {
    System.out.println("Error in thread " + taskNum +
    " + e);
    System.out.println("Thread " + taskNum + " ended.");
    public static void main(String[] args) {
    getContext();
    int n = 3;
    TestSimpleBean x = null;
    Thread t = null;
    // start each thread
    for (int i = 0; i < n; i++) {
    x = new TestSimpleBean();
    x.taskNum = i;
    t = new Thread(x);
    t.start();
    System.out.println("" + n + " threads started.");
    My deployment descriptors are as simple as I could make them:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Simple</ejb-name>
    <home>com.davisvision.cv.SimpleHome</home>
    <remote>com.davisvision.cv.SimpleRemote</remote>
    <ejb-class>com.davisvision.cv.SimpleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Simple</ejb-name>
    <method-name>
    </method-name>
    </method>
    <trans-attribute>
    Required
    </trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Simple</ejb-name>
    <jndi-name>ejb-cv-Simple</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    This is from part of a production application, so to make sure ourusers aren't
    getting
    random 60-second pauses, I have the production bean deployed on justone server
    in the
    cluster with just one bean in the pool. But I really need to find
    the
    solution
    to this
    problem before development goes much further. Any guesses, sugestions,or conjectures
    would be most welcome.
    - gary------------------------------------------------------------------------
    Full thread dump:
    "Thread-7" daemon prio=5 tid=0x868400 nid=0x1f8 waiting on monitor[0x136ff000..0x136ffdc0]
         at java.lang.Thread.sleep(Native Method)
         at com.davisvision.cv.CvProperties.run(CvProperties.java:153)
         at java.lang.Thread.run(Thread.java:479)
    "ListenThread.Default" prio=5 tid=0x8647d0 nid=0x1f0 runnable [0x136bf000..0x136bfdc0]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:463)
         at java.net.ServerSocket.implAccept(ServerSocket.java:238)
         at java.net.ServerSocket.accept(ServerSocket.java:217)
         at weblogic.socket.WeblogicServerSocket.accept(WeblogicServerSocket.java:26)
         at weblogic.t3.srvr.ListenThread.run(ListenThread.java:263)
    "ExecuteThread: '0' for queue: 'JMS.TimerTreePool'" daemon prio=5 tid=0x84d220nid=0x1e9 waiting on monitor [0x1312f000..0x1312fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '3' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84c040 nid=0x1e8 waiting on monitor [0x130ef000..0x130efdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84c580 nid=0x1e7 waiting on monitor [0x130af000..0x130afdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84cec0 nid=0x1a1 waiting on monitor [0x1306f000..0x1306fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84b370 nid=0x1a0 waiting on monitor [0x1302f000..0x1302fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "CoreHealthMonitor" daemon prio=5 tid=0x829e30 nid=0x1e6 waiting onmonitor [0x12fef000..0x12fefdc0]
         at java.lang.Thread.sleep(Native Method)
         at weblogic.t3.srvr.CoreHealthMonitorThread.run(CoreHealthMonitorThread.java:114)
    "ExecuteThread: '14' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x820420nid=0x1e5 waiting on monitor [0x12faf000..0x12fafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '13' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81f2d0nid=0x1e4 waiting on monitor [0x12f6f000..0x12f6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '12' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81fec0nid=0x1e3 waiting on monitor [0x12f2f000..0x12f2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '11' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81eac0nid=0x1e2 waiting on monitor [0x12eef000..0x12eefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '10' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81d6c0nid=0x1e1 waiting on monitor [0x12eaf000..0x12eafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '9' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81c2d0nid=0x1e0 waiting on monitor [0x12e6f000..0x12e6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '8' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81cec0nid=0x1df waiting on monitor [0x12e2f000..0x12e2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '7' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81bac0nid=0x1de waiting on monitor [0x12def000..0x12defdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '6' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81a6c0nid=0x1dd waiting on monitor [0x12daf000..0x12dafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '5' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x8192d0nid=0x1dc waiting on monitor [0x12d6f000..0x12d6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '4' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x819ec0nid=0x1db waiting on monitor [0x12d2f000..0x12d2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '3' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x818990nid=0x1da waiting on monitor [0x12cef000..0x12cefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x817630nid=0x1d9 waiting on monitor [0x12caf000..0x12cafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x816150nid=0x1d8 waiting on monitor [0x12c6f000..0x12c6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x816690nid=0x1d7 waiting on monitor [0x12c2f000..0x12c2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x811cc0 nid=0x1d6 waiting on monitor [0x12bef000..0x12befdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x8104c0 nid=0x1d5 waiting on monitor [0x12baf000..0x12bafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x80f020 nid=0x1d4 waiting on monitor [0x12b6f000..0x12b6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "Thread-4" prio=5 tid=0x80e440 nid=0x1d3 waiting on monitor [0x12b2f000..0x12b2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.util.TimerThread.mainLoop(Timer.java:427)
         at java.util.TimerThread.run(Timer.java:380)
    "ExecuteThread: '1' for queue: 'DRS'" daemon prio=5 tid=0x80d700 nid=0x1d2waiting on monitor [0x12aef000..0x12aefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'DRS'" daemon prio=5 tid=0x80b160 nid=0x1d1waiting on monitor [0x12aaf000..0x12aafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'Multicast'" daemon prio=5 tid=0x80a8b0nid=0x1d0 waiting on monitor [0x12a6f000..0x12a6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'Replication'" daemon prio=5 tid=0x8072f0nid=0x1cf waiting on monitor [0x12a2f000..0x12a2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'Replication'" daemon prio=5 tid=0x807430nid=0x1c9 waiting on monitor [0x129ef000..0x129efdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7f56c0 nid=0x1cdrunnable [0x1296f000..0x1296fdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7f35c0 nid=0x1cbrunnable [0x128ef000..0x128efdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7edc70 nid=0x1carunnable [0x128af000..0x128afdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "VDE Transaction Processor Thread" prio=2 tid=0x7e21c0 nid=0x1c5 waitingon monitor [0x1282f000..0x1282fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at com.octetstring.vde.backend.standard.TransactionProcessor.waitChange(TransactionProcessor.java:306)
         at com.octetstring.vde.backend.standard.TransactionProcessor.run(TransactionProcessor.java:192)
    "ExecuteThread: '1' for queue: '__weblogic_admin_rmi_queue'" daemonprio=5 tid=0x7a7020 nid=0x1c4 waiting on monitor [0x127df000..0x127dfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '__weblogic_admin_rmi_queue'" daemonprio=5 tid=0x7d7750 nid=0x1c3 waiting on monitor [0x1279f000..0x1279fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'" daemonprio=5 tid=0x7c26b0 nid=0x1c2 waiting on monitor [0x1273f000..0x1273fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '__weblogic_admin_html_queue'" daemonprio=5 tid=0x7c2bf0 nid=0x1c1 waiting on monitor [0x126ff000..0x126ffdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "TimeEventGenerator" daemon prio=5 tid=0x7c00d0 nid=0x1c0 waiting onmonitor [0x126bf000..0x126bfdc0]
         at java.lang.Object.wait(Native Method)
         at weblogic.time.common.internal.TimeTable.snooze(TimeTable.java:272)
         at weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:139)
         at java.lang.Thread.run(Thread.java:479)
    "ExecuteThread: '1' for queue: '_weblogic_dgc_queue'" daemon prio=5tid=0x7bfac0 nid=0x1bf waiting on monitor [0x1267f000..0x1267fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '_weblogic_dgc_queue'" daemon prio=5tid=0x7be5c0 nid=0x1be waiting on monitor [0x1263f000..0x1263fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "HighPriority TimeEventGenerator" daemon prio=9 tid=0x7bee10 nid=0x1bdwaiting on monitor [0x125ff000..0x125ffdc0]
         at java.lang.Object.wait(Native Method)
         at weblogic.time.common.internal.TimeTable.snooze(TimeTable.java:272)
         at weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:139)
         at java.lang.Thread.run(Thread.java:479)
    "SpinnerRandomSource" daemon prio=5 tid=0x7bc270 nid=0x1bc waitingon monitor [0x125bf000..0x125bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.security.SpinnerRandomBitsSource.run(SpinnerRandomBitsSource.java:60)
         at java.lang.Thread.run(Thread.java:479)
    "ExecuteThread: '14' for queue: 'default'" daemon prio=5 tid=0x7b9050nid=0x1bb runnable [0x1257f000..0x1257fdc0]
         at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:534)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '13' for queue: 'default'" daemon prio=5 tid=0x7b8050nid=0x1ba runnable [0x1253f000..0x1253fdc0]
         at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:534)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '12' for queue: 'default'" daemon prio=5 tid=0x7b8840nid=0x1b9 runnable [0x124ff000..0x124ffdc0]
         at java.net.PlainDatagramSocketImpl.receive(Native Method)
         at java.net.DatagramSocket.receive(DatagramSocket.java:387)
         at weblogic.cluster.FragmentSocket.receive(FragmentSocket.java:158)
         at weblogic.cluster.MulticastManager.execute(MulticastManager.java:336)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '11' for queue: 'default'" daemon prio=5 tid=0x7b7360nid=0x1b8 waiting on monitor [0x124bf000..0x124bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '10' for queue: 'default'" daemon prio=5 tid=0x7b7ec0nid=0x1b7 waiting on monitor [0x1247f000..0x1247fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '9' for queue: 'default'" daemon prio=5 tid=0x7b6ac0nid=0x1b6 waiting on monitor [0x1243f000..0x1243fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '8' for queue: 'default'" daemon prio=5 tid=0x7b56c0nid=0x1b5 waiting on monitor [0x123ff000..0x123ffdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '7' for queue: 'default'" daemon prio=5 tid=0x7b4360nid=0x1b4 waiting on monitor [0x123bf000..0x123bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '6' for queue: 'default'" daemon prio=5 tid=0x7b4ec0nid=0x1b3 waiting on monitor [0x1237f000..0x1237fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.

  • URGENT : ejb client in Oracle 8

    We developed a EJB client. This client should be called from an Oracle Database 8.1 (ejb compliant). But, each time we tried to load weblogic.jar, we have several errors into Oracle (ie : ORA-29534 NamingContext could not be resolved)
    Do you have an idea why ? Someone already developed an ejb client into Oracle 8.1 ?

    They are reccomended because the next step going from your simple single EJB
    to anything interesting, like adding more EJB's adding web-apps, adding
    web-services etc etc involves ears. If the setup and overhead for an EAR is
    easy, then just start there.
    But no if you just doing helloworld you of course dont have to ears.
    cheers
    mbg
    "Christopher R. Gardner" <[email protected]> wrote in message
    news:3fc0560e$[email protected]..
    >
    "Mark Griffith" <[email protected]> wrote:
    You can still run ejbc from the command line its still there. And you
    can
    still run weblogic.Deployer. (I dont ever reccomend jaring up in dev,
    it
    just takes longer, do exploded its easier and faster).
    But ear's are easy, see:So ears are recommended even if you're just doing EJBs (e.g., a simpleHello World)
    and no web apps (none needed for the Hello World or a PC client)?
    http://www.niffgurd.com/mark/work/blog/
    Cheers
    mbg
    "Christopher R. Gardner" <[email protected]> wrote in message
    news:3fbfd6c6$[email protected]..
    My understanding is ejbc has been deprecated and replaced with appc.Moreover,
    BEA is encourgaging developers to deploy ear files. All I want todo is
    to use
    ant to deploy a jar file with a single EJB in it. I'm not findingthe WL
    documentation
    very helpful. Hopefully, you'll have better luck than I.
    "skmurali" <[email protected]> wrote:
    Hi
    In order deploy EJB application in Weblogic 8.1, is it necessary
    to compile
    the application in WebLogic.ejbc. I did not find such files in
    WebLogic
    8.1
    In weblogic 7.0 versiion has such files.
    The present procedure is as follows.
    1. Create a jar file contains all class files.
    2. Create a jar file contains class jar files, plus .xml files
    3. Deploy into weblogic 8.1 server EJB Deployment utility.
    ==================
    Please help me.
    Murali

  • EJB Client timing out with PeerGoneException

    Environment: WLS 6.1 SP4 on WIn2K.
    We have an ejb client calling a StatelessSession bean on the server. From
    time to time, if there's a large amount of data
    coming across (eg. 5 Meg and above ) the call, invariably we'd get a
    PeerGone Exception.
    eg.. mySessionEJB.logHistory( String logMsg)
    Is there a way to increase the timeout on the call?

    Hello
    1) The web app is JSP based portal , which sends requests to another server using SOAP as a protocol.
    2) The test client in this case , has been developed by us, which just sends requests to the using simple urls . In other words the client simulates a user accessing a JSP page, and requesting information.
    3) The request being sent by the client , are to get the data stored on the Back end server. Each request has a specified timeout , configurbel using the web.xml file. In this case we have specified a very large value 0f about 3 hours ( which should be sufficient in most cases ). If the client does not get back the data within the specified time there are two causes
    1) The request has not been sent to the back end server
    2) The Back end server has not responded within the specified time
    But on comparing the CPU usages, the back end server seems to be almost idle. whereas the Application server is consuming close to 100% CPU continuously.
    thanks
    -Aniruddha

  • Building an EJB Client

    I'm completely confused on how to build an EJB client automagically using Ant.
    I have a simple EJB, which I compile using the wlwBuild Ant task. If I set the "ejbgen.jar-settings.ejb-client-jar" property in the project's build.properties, the client jar gets built, but it then ends up in the application EAR file. Worse yet, the generated application.xml descriptor includes the client module. Deploying the ear file fails since WebLogic tries to deploy both modules, and it blows up on NamingExceptions.
    I've kludged the process by using wlwBuild and then 'fixing' the resulting EAR file, but that's far from ideal. It works for simple projects, but not Integration projects with the auto-generated very ugly EJB names.
    I've looked at wlappc, but the documentation is so scarce I can't tell if this is the tool to use, or how to make it work. Trial and error has gotten me nowhere...:(
    So the question is: how can I build the EJB client through Ant without having it end up in the application EAR?
    thanks
    mike

    I'm looking for too and there isn't any.
    Here is an example. I hope it could be helpful.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page import="javax.naming.*" %>
    <%@ page import="javax.rmi.*" %>
    <%@ page import="java.rmi.*" %>
    <%@ page import="javax.ejb.*" %>
    <%@ page import="modelo.ejb.*" %>
    <%@ page
    language="java"
    contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    %>
    <%!
    Fachada sbFachada = null;
    public void jspInit() {
         String sJNDI = "ejb/modelo/ejb/FachadaHome";
         try{          
              Context ejbCtx = (Context) new InitialContext();
              System.out.println("Obteniendo la referencia JNDI: " + sJNDI);
              Object oRef = ejbCtx.lookup(sJNDI);
              FachadaHome home = (FachadaHome) PortableRemoteObject.narrow(oRef, FachadaHome.class);
              try {     
                   sbFachada = home.create();
              } catch (CreateException ce){
                   System.out.println("Error en la creaci�n");          
              } catch (RemoteException re) {
                   System.out.println("Error remoto en creaci�n");
         } catch (NamingException ne){
              System.out.println("NamingException " + ne.toString());
    %>
    <TITLE>InvocarEJB2.jsp</TITLE>
    </HEAD>
    <BODY>
    <%
         out.println(sbFachada.contador());
    %>
    </BODY>
    </HTML>
    Salu2.
    V�ctor.

  • EJB Client classes

    Hi All,
    I wrote a simple EJB which just replies "Hello,World" string to the client when the method is called. The client creates an initial context and then obtains the home , then creates remote object and then queries the session bean. All is well here.
    When I try to execute the client without having the EJB remote interface and the home interface in it's class path, it doesn't execute. I believe these required classes should be downloaded from the application server as and when required, right? Or is it mandatory that I should include these class files in the client classpath as well?
    Any light on this would be greatly appreciated.
    Thanks,
    Kalyan.

    Danny,
    For a class to resolve another class it's using (in fact, it should be "for a class loader to resolve a class"), it need not use just CLASSPATH. Classpath is a concept of the boostrap classloader, app classloader, etc. which only looks up classes in the classpath. Something like URLClassloader can lookup classes anywhere, provided you give the appropriate URL.
    So, I can potentially set the context class loader to be the URLClassLoader with the appropriate URL and then load the classes from that URL and get my app working, even when the classpath doesn't have these classes.
    Thanks,
    Kalyan.

Maybe you are looking for

  • IMovie 10.0.6 Text Editing

    Hi, I have now updated to Yosemite and the latest version of iMovie. When I try to edit titles it seems that they have taken out many of the options including drop-shadow etc. Can anyone else confirm this or point me in the right direction? Cheers Be

  • HT201342 I have set up my iCloud email address on my iPhone and iMac but it does not appear on my iPad.  Dies anyone else have the same problem?

    I have set up my iCloud email address on my iPhone and iMac but it does not appear in my iPad?  Any suggestions?

  • Abstract Class Problem

    HI, I have 4 classes and the hierarchy of those classes is as follows: DBCachedRecord | ServiceHeader | ServiceHeader22, ServiceHeader25 I made ServiceHeader abstract and ServiceHeader22 and ServiceHeader25 need to call constructors of DBCachedRecord

  • Dynamic table control in module pool screen

    Hi  All         I have got a requirement that in the module pool program i need to create a table control which is going to be dynamic i.e number of columns to be displayed in the screen is going to vary based on the one of the table entries. for exa

  • Trying to convert to wmv using "share"

    i'm trying to convert avi files in i movie to wmv using share. I have limited success e.g have a 30 second clip which when converted using share comes out edited to 15 secs! Anyone got any ideas? If not any free avi to wmv converters around? Thanks!