Help: I'm sure it is a Bug in JNI calling WebLogic EJB

Help me! I'm using jni to call weblogic EJB from a Com+ component,here is the code:
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#pragma unmanaged
#include <windows.h>
#include <jni.h>
#include <process.h>
#include <stdio.h>
#define USER_CLASSPATH "C:\\myClasses;C:\\j2sdk1.4.0\\lib\\tools.jar;Z:\\wlserver6.1\\lib\\weblogic.jar;"
/* where Prog.class is */
JavaVM *jvm;
* Function GetJNIEnv(void) returns the java environment pointer
* in case we are executing on a thread other than the one the
* jvm was created on.
JNIEnv* GetJNIEnv(void){
     JNIEnv *env = NULL;
     jint nRet = jvm->GetEnv((void **)&env, JNI_VERSION_1_2);
     if(nRet == JNI_EDETACHED){
          jvm->AttachCurrentThread((void **)&env, NULL);
     return env;
* Function DoJNDI(void *arg) uses the Java Invocation API to
* execute the following Java code:
* Hashtable prop = new Hashtable();
* prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"
* prop.put( Context.PROVIDER_URL, "t3://192.168.40.137:7001" );
* ctxInitial = new InitialDirContext( prop );
void DoJNDI(void *arg){
     jclass clsHash, clsInitDirCx;
     jmethodID mHashInit, mHashPut, mInitDirCxInit;
     jobject objHash, objInitDirCx;
     JNIEnv *env = GetJNIEnv(); // Get the environment if on a different thread
     clsHash = env->FindClass("java/util/Hashtable");
     mHashInit = env->GetMethodID(clsHash, "<init>", "()V");
     objHash = env->NewObject(clsHash, mHashInit);
     mHashPut = env->GetMethodID(clsHash, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
     jstring jstrICxFactoryPut = env->NewStringUTF("java.naming.factory.initial");
     jstring jstrICxFactoryVal = env->NewStringUTF("weblogic.jndi.WLInitialContextFactory");
     env->CallObjectMethod(objHash, mHashPut, jstrICxFactoryPut,jstrICxFactoryVal);
     jstring jstrProviderUrlPut = env->NewStringUTF("java.naming.provider.url");
     jstring jstrProviderUrlVal = env->NewStringUTF("t3://192.168.40.137:7001");
     env->CallObjectMethod(objHash, mHashPut, jstrProviderUrlPut,jstrProviderUrlVal);
     clsInitDirCx = env->FindClass("javax/naming/InitialContext");
     mInitDirCxInit = env->GetMethodID(clsInitDirCx, "<init>", "(Ljava/util/Hashtable;)V");
     objInitDirCx = env->NewObject(clsInitDirCx, mInitDirCxInit, objHash);
     if(objInitDirCx == NULL){
          printf("%s test FAILED:\n\n", (char*)arg);
     else{
          printf("%s test PASSED\n\n", (char*)arg);
     jvm->DetachCurrentThread();
* Function main(void) creates a JVM, and calls DoJNDI twice:
* Once as a regular function call, and once as a spun off thread.
void main() {
JavaVMInitArgs vm_args;
JavaVMOption options[5];
     options[0].optionString = "-client";
options[1].optionString =
"-cp " USER_CLASSPATH;
options[2].optionString =
"-Djava.class.path=" USER_CLASSPATH;
     //options[3].optionString =
     //     "-Xbootclasspath:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;z:\\wlserver6.1\\lib\\weblogic.jar;";
     options[3].optionString =
          "-Xbootclasspath/a:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;";
     options[4].optionString =
          "-Xbootclasspath/p:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;";
vm_args.version = 0x00010002;
vm_args.options = options;
vm_args.nOptions = 5;
vm_args.ignoreUnrecognized = JNI_TRUE;
     JNIEnv *env;
     jint res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
     // *** Make the magic calls! (Both lines should do the same thing) ***
     DoJNDI((void*)"Function call");
     _beginthread(DoJNDI,0,(void *)"Thread call");
     /* wait for thread(s) to finish */
     Sleep(5000);
     jvm->DestroyJavaVM();
But it always send me a Exception like below:
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory.
Root exception is java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
when I search this problem in java.sun.com,an article announce that it is a bug that
JNDI not support multi-threads call,and it is fixed is JDK1.4 beta. The link is:
http://developer.java.sun.com/developer/bugParade/bugs/4307751.html
It seems that weblogic's JNDI is not support multi-thread call. what can i do?

Try adding the following code before instantiating your initial context:
Thread.currentThread().setContextClassLoader( ClassLoader.getSystemClassLoader()
This fixed the problem for me.
-Brian
"Edward Lu" <[email protected]> wrote:
>
Help me! I'm using jni to call weblogic EJB from a Com+ component,here is
the code:
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#pragma unmanaged
#include <windows.h>
#include <jni.h>
#include <process.h>
#include <stdio.h>
#define USER_CLASSPATH "C:\\myClasses;C:\\j2sdk1.4.0\\lib\\tools.jar;Z:\\wlserver6.1\\lib\\weblogic.jar;"
/* where Prog.class is */
JavaVM *jvm;
* Function GetJNIEnv(void) returns the java environment pointer
* in case we are executing on a thread other than the one the
* jvm was created on.
JNIEnv* GetJNIEnv(void){
     JNIEnv *env = NULL;
     jint nRet = jvm->GetEnv((void **)&env, JNI_VERSION_1_2);
     if(nRet == JNI_EDETACHED){
          jvm->AttachCurrentThread((void **)&env, NULL);
     return env;
* Function DoJNDI(void *arg) uses the Java Invocation API to
* execute the following Java code:
* Hashtable prop = new Hashtable();
* prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"
* prop.put( Context.PROVIDER_URL, "t3://192.168.40.137:7001" );
* ctxInitial = new InitialDirContext( prop );
void DoJNDI(void *arg){
     jclass clsHash, clsInitDirCx;
     jmethodID mHashInit, mHashPut, mInitDirCxInit;
     jobject objHash, objInitDirCx;
     JNIEnv *env = GetJNIEnv(); // Get the environment if on a different thread
     clsHash = env->FindClass("java/util/Hashtable");
     mHashInit = env->GetMethodID(clsHash, "<init>", "()V");
     objHash = env->NewObject(clsHash, mHashInit);
     mHashPut = env->GetMethodID(clsHash, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
     jstring jstrICxFactoryPut = env->NewStringUTF("java.naming.factory.initial");
     jstring jstrICxFactoryVal = env->NewStringUTF("weblogic.jndi.WLInitialContextFactory");
     env->CallObjectMethod(objHash, mHashPut, jstrICxFactoryPut,jstrICxFactoryVal);
     jstring jstrProviderUrlPut = env->NewStringUTF("java.naming.provider.url");
     jstring jstrProviderUrlVal = env->NewStringUTF("t3://192.168.40.137:7001");
     env->CallObjectMethod(objHash, mHashPut, jstrProviderUrlPut,jstrProviderUrlVal);
     clsInitDirCx = env->FindClass("javax/naming/InitialContext");
     mInitDirCxInit = env->GetMethodID(clsInitDirCx, "<init>", "(Ljava/util/Hashtable;)V");
     objInitDirCx = env->NewObject(clsInitDirCx, mInitDirCxInit, objHash);
     if(objInitDirCx == NULL){
          printf("%s test FAILED:\n\n", (char*)arg);
     else{
          printf("%s test PASSED\n\n", (char*)arg);
     jvm->DetachCurrentThread();
* Function main(void) creates a JVM, and calls DoJNDI twice:
* Once as a regular function call, and once as a spun off thread.
void main() {
JavaVMInitArgs vm_args;
JavaVMOption options[5];
     options[0].optionString = "-client";
options[1].optionString =
"-cp " USER_CLASSPATH;
options[2].optionString =
"-Djava.class.path=" USER_CLASSPATH;
     //options[3].optionString =
     //     "-Xbootclasspath:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;z:\\wlserver6.1\\lib\\weblogic.jar;";
     options[3].optionString =
          "-Xbootclasspath/a:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;";
     options[4].optionString =
          "-Xbootclasspath/p:c:\\j2sdk1.4.0\\lib\\tools.jar;z:\\wlserver6.1\\lib\\weblogic_sp.jar;";
vm_args.version = 0x00010002;
vm_args.options = options;
vm_args.nOptions = 5;
vm_args.ignoreUnrecognized = JNI_TRUE;
     JNIEnv *env;
     jint res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
     // *** Make the magic calls! (Both lines should do the same thing) ***
     DoJNDI((void*)"Function call");
     _beginthread(DoJNDI,0,(void *)"Thread call");
     /* wait for thread(s) to finish */
     Sleep(5000);
     jvm->DestroyJavaVM();
But it always send me a Exception like below:
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory.
Root exception is java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
when I search this problem in java.sun.com,an article announce that it is
a bug that
JNDI not support multi-threads call,and it is fixed is JDK1.4 beta. The
link is:
http://developer.java.sun.com/developer/bugParade/bugs/4307751.html
It seems that weblogic's JNDI is not support multi-thread call. what can
i do?

Similar Messages

  • HT1222 I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be..

    I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be...
    I never updated anything until now...I want o update my iPhone to the newest version, but i do not want ot loose all that I have on this phone. I was told I needed to update the operating systems so i can put things into the cloud for transport to new phone, but I am just not sure how to do this..Can you help out here??

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • How to transfer music from pc 10.6.1.7 v to MAC 11.0.1 v. Help! Not sure how to do it

    how to transfer music from pc 10.6.1.7 v to MAC 11.0.1 v. Help! Not sure how to do it

    Hi blkstg,
    Here is a link to a thread where roaminggnome provided two great links for moving your library:
    https://discussions.apple.com/message/15294284#15294284
    Hope this helps!
    Cheers,
    GB

  • When extending my wifi network using an Extreme as my main and an Express to extend.. does it help to make sure that both devices are on the same channel or does it even make a difference if they are on different channels?

    when extending my wifi network using an Extreme as my main and an Express to extend.. does it help to make sure that both devices are on the same channel or does it even make a difference if they are on different channels?

    Have you even tried the process in which i have described in my previous post?
    Yes, many times.  If you are setup to "extend a wireless network, the screen looks like this:
    If you click the Wireless Options button, the screen looks like this:
    Where is it on this screen that you see a setting to adjust the channel?  It sounds like you are confusing "create a wireless network"....which does allow you to adjust channels.....with "exend a wireless network" which does not.
    Normally, when you extend a wireless network, AirPort Utility used to always assign the same channel to the extending device. That is no longer the case. It might be the same, or it might be different.  You have no control over this, so you have to accept what AirPort Utility thinks is best.

  • HT1430 Help! Not sure what my iphone 4 problem is... voice now tells me what to do ... slide to turn on.... make phone call,,, everything. Just want it to go back to being normal! What should I do?

    Help! Not sure what my iphone 4 problem is... voice now tells me what to do ... slide to turn on.... make phone call,,, everything. Just want it to go back to being normal! What should I do?

    This explains how to turn it off using iTunes:  http://support.apple.com/kb/ts3129

  • Weblogic.ejb.extensions.LockTimeOutException HELP!

    Hi,
    We're seeing weblogic.ejb.extensions.LockTimeOutException when we try
    to access some Entity Bean's data member. I'm wondering someone could
    help us?
    There is some background:
    WL server 5.1, SP10 (almost sure:)
    Running in Solaris w/ Oracle 8i
    The sequence of calls is:
    IWorkspaceRemote workspace = (IWorkspaceRemote)
    getEntityBean(EJBConstants.JNDI_NAME_WORKSPACE, new
    Long(workspaceID));
    WorkspaceDetailData wsData = workspace.getWorkspaceDetailData();
    ( the EJB home is cached in memory ***)
    Inside ejbLoad() we're using the Composite Entity EJB pattern (for
    lazy loading) and looks something like this:
    void ejbLoad() {
    m_baseData = loadBaseData();
    if (m_detailData != null) {
    m_detailData = loadDetailData();
    DetailData getWorkspaceDetailData() {
    if (m_detailData == null) {
    m_detailData = loadDetailData();
    THe stack trace I get is:
    weblogic.ejb.extensions.LockTimedOutException: Lock for
    primaryKey:21071 timed out after 60000 ms.
    at weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
    at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
    at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:162)
    at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
    at com.intralinks.wsadmin.entity.WorkspaceBeanEOImpl.getWorkspaceDetailData(WorkspaceBeanEOImpl.java:155)
    at com.intralinks.util.IntralinksServlet.setWorkspaceIDNoEventLogging(Unknown
    Source)
    at com.intralinks.util.IntralinksServlet.setWorkspaceID(Unknown
    Source)
    at com.intralinks.servlets.html.workspaces.EnterWorkspaceServlet.process(Unknown
    Source)
    Any ideas?
    Thanks,
    - Roberto

    Hi Roberto,
    Check CP, data sources (if they are available in 5.1) etc for oracle instance
    parameters like servers, user ids, passwords, urls etc.
    S
    [email protected] (Roberto) wrote:
    Hi,
    We're seeing weblogic.ejb.extensions.LockTimeOutException when we try
    to access some Entity Bean's data member. I'm wondering someone could
    help us?
    There is some background:
    WL server 5.1, SP10 (almost sure:)
    Running in Solaris w/ Oracle 8i
    The sequence of calls is:
    IWorkspaceRemote workspace = (IWorkspaceRemote)
    getEntityBean(EJBConstants.JNDI_NAME_WORKSPACE, new
    Long(workspaceID));
    WorkspaceDetailData wsData = workspace.getWorkspaceDetailData();
    ( the EJB home is cached in memory ***)
    Inside ejbLoad() we're using the Composite Entity EJB pattern (for
    lazy loading) and looks something like this:
    void ejbLoad() {
    m_baseData = loadBaseData();
    if (m_detailData != null) {
    m_detailData = loadDetailData();
    DetailData getWorkspaceDetailData() {
    if (m_detailData == null) {
    m_detailData = loadDetailData();
    THe stack trace I get is:
    weblogic.ejb.extensions.LockTimedOutException: Lock for
    primaryKey:21071 timed out after 60000 ms.
    at weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
    at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
    at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:162)
    at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
    at com.intralinks.wsadmin.entity.WorkspaceBeanEOImpl.getWorkspaceDetailData(WorkspaceBeanEOImpl.java:155)
    at com.intralinks.util.IntralinksServlet.setWorkspaceIDNoEventLogging(Unknown
    Source)
    at com.intralinks.util.IntralinksServlet.setWorkspaceID(Unknown
    Source)
    at com.intralinks.servlets.html.workspaces.EnterWorkspaceServlet.process(Unknown
    Source)
    Any ideas?
    Thanks,
    - Roberto

  • Is it a bug in JNI...CallVoidMethod(..) giving runtime error??

    Hi
    I have invoked jvm using C++. I called the main method of my application and it is running fine.
    When I try to invoke another method of the same class that is not static by GetMethodID(..) and then CallVoidMethod(..), the ID is coming out fine but the call to the method is giving a runtime error.
    When I make this method static in java, it runs fine.
    Is it a bug in JNI that we cannot call nonstatic void methods?

    I have declared the jclass cls object in global space in C++ file. I use the FindClass(..) function to find it. Everything is turning out to be fine till I call the main() function of the java class.
    Now when I get the Id using the GetMethod(..) function of JNI, it comes out fine and gives no errors. It is only when I call the CallVoidMethod(...), it gives me a runtime error. I have tried to use this method in java without C++ and it gives no error.
    Any idea .. what may be wrong?

  • HELP!!! How I can call to EJB from another EJB??

    I have two EJBs, for each EJB I have a jar, how I can call to EJB jar to another???
    I have tried the following, in the first EJB I have import the second EJB jar and call it with context, lookup, PortableRemoteObject etc.. but the instruction lookup not find the second EJB reference.
    The name in the lookup instruction is the JNDI name of the second EJB but not find a reference to it.
    Please help me!!! Thanks!!
    The error is:
    javax.naming.NameNotFoundException: Missing node. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
         at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
         at com.inprise.j2ee.jndi.java.CorbaContext.resolveName(CorbaContext.java:242)
         at com.inprise.j2ee.jndi.java.CorbaContext.lookup(CorbaContext.java:261)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:483)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
         at com.inprise.j2ee.jndi.java.javaContext.internal_lookup(javaContext.java:493)
         at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:937)
         at com.inprise.j2ee.jndi.java.javaContext.lookup(javaContext.java:942)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at ejbclient.EnterpriseClientBean.addition(EnterpriseClientBean.java:115)
         at ejbclient.EnterpriseClientBean.actionPerformed(EnterpriseClientBean.java:97)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
         at avax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstr

    ok.. Here it goes.. I am writing a sample code..
    public class EJB1LogBean implements SessionBean {
    // test is a method of stateless session beam
    public void test ( TestVal val )
    throws RemoteException{
    try {
    EJB2LogHome ejb2Home= (EJB2LogHome)getHome("java:comp/env/ejb/EJB2LogHome",1);
    EJB2Log ejb2Log = ejb2LogHome.create ( val );
    } catch ( CreateException e ) {
         System.out.println("Create Exception occurred ");
         e.printStackTrace();
         } catch ( RemoteException e ) {
         System.out.println( "RemoteException Occured");
    e.printStackTrace();
         throw new RemoteException () ;
         } catch(Exception ee) {
    ee.printStackTrace();
    private EJBHome getHome(String jndiName,int type) {
    try {
    Context context = new InitialContext();
    Object ref = context.lookup( jndiName );
    switch(type)
    case 1:
    EJB2LogHome ejb2LogHome = ( EJB2LogHome )
    PortableRemoteObject.narrow( ref, EJB2LogHome.class );
    return ejb2LogHome;
    } catch ( Exception e ) {
    e.printStackTrace();
    return null;
    }//EJB1LogBean ends
    Here as you can see, EJB1LogBean(session bean) is calling a second EJB, EJB2LogBean (entity bean). TestVal is a sample value object passed. It is plain java class and can vary from app to app and it has got nothing to do with ejbs.
    "java:comp/env/ejb" is a J2EE standard and while getting a home interface, you have to append the home interface class name to "java:comp/env/ejb". Here I am passing "java:comp/env/ejb/EJB2LogHome" and "1" to getHome method, whose job is to get a reference to a home interface. getHome method is a local method. "1" is passed just to give a flexibility to getHome method as you can have more ejbs to invoked. In that case, you can go on adding different case statements for 2, 3 etc.
    The only thing you have to keep in mind is that your deployment descriptor for EJB1LogBean will contain the entires for both the beans i.e. for EJB1LogBean and EJB2LogBean. This is because EJB2LogBean is wrapped by EJB1LogBean.
    Hope this helps.
    Please let me know if you need anything more.
    - Amit

  • Help: weblogic.ejb.extensions.LockTimedOutException

    Dear All:
              I got this exception in our EJB app:
              weblogic.ejb.extensions.LockTimedOutException. Please see attached error
              message below. It is not happening every time you call the bean. It is
              reproducable with patience.
              Have you had this kind of problem and more importantly, how to avoid it?
              Our env is: Wl51 with sp 10, jdk1.3.02, Sun Solaris Unix, a cluster contains
              2 wl instance
              Thanks.
              Wed Jun 19 14:26:53 EDT 2002:<I> <TX> Transaction (TxC (5488304, xid =
              1024502557372_6636, timeout = 300, txState = Marked Rollback, root = null)
              rolled back after 300 sec.
              [GC 99080K->85533K(130688K), 0.0227977 secs]
              Wed Jun 19 14:26:54 EDT 2002:<I> <EJB JAR deployment
              /webapp/dtshc/dts/nmc/ejb/nmcejb.jar> Transaction: '1024502557372_6636'
              rolled back due to EJB exception:
              weblogic.ejb.extensions.LockTimedOutException: Lock for
              primaryKey:com.mm.nmc.entity.ProducerOneYearPlanPK@1700fc timed out after
              300000 ms.
              at
              weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
              at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
              at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
              at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
              at
              weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObjec
              t.java:162)
              at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
              at
              com.mm.nmc.entity.ProducerOneYearPlanEJBEOImpl.getData(ProducerOneYearPlanEJ
              BEOImpl.java:979)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getTacticalPlanGoals(PersonalT
              acticalSessionEJB.java:200)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              alTacticalSessionEJB.java:165)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              alTacticalSessionEJB.java:155)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl.getPersonalTacticalPlan(
              PersonalTacticalSessionEJBEOImpl.java:340)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl_WLSkel.invoke(PersonalTa
              cticalSessionEJBEOImpl_WLSkel.java:167)
              at
              weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda
              pter.java:347)
              at
              weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle
              r.java:86)
              at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
              5)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              Jiancai He
              http://www.hefamily.com
              

    Thanks for your message:
              In our case, it is entity EJB. The problem only happens in clustered env,
              and only happens in one of the servers.
              Question: can wl51 use database to manage the concurrent access of entity
              EJBs?
              Thanks.
              Jiancai
              Jiancai He
              http://www.hefamily.com
              "ludovic le goff" <[email protected]> wrote in message
              news:[email protected]...
              > Hello,
              >
              > Basically, it means two (or more) different threads are trying to get an
              > exclusive lock on the same entity bean or stateful session bean at the
              same
              > time. One of the locks eventually times out and this exception is thrown.
              >
              > There are several things that could cause this, for instance:
              >
              > - Two threads trying to invoke a method on the same stateful session bean
              at
              > the same time. The EJB 1.1 spec states that the server must detect this
              > condition and throw a RemoteException to all subsequent callers.
              > LockTimedOutException is a sub-class of java.rmi.RemoteException.
              >
              > - Two threads are trying to access the same entity bean instance inside a
              > single server in the cluster, and the caller holding the lock does not
              > finish fast enough.
              >
              > You might want to check if you have declared the Remote and home interface
              > in your jsp/servlet as global variable. And since it's global, instance
              > getting overridden every time. That's why both the two request end up in
              > using the same EJBObject.
              >
              > You should changed your code and make the remote/home interface variable
              > declaration as local i.e. within the scope of a single request.
              > Then you should not see any problem. Both the threads will use different
              > EJBObjects and hence you should not see any exceptions.
              >
              > You need to code in such a way as to avoid deadlocks. For instance, if
              > more than one client accesses the EJBs in different order, a deadlock may
              > occur. This deadlock is detected and after a certain timeout (5 minutes by
              > default), the deadlock is removed and one of the clients gets a
              > LockTimedOutException. For example, if one request in your application has
              > entity Account 1 (by doing an ejbFindByPrimaryKey) and is then about to
              get
              > Customer 1, and if at the same time another request in another business
              > method has got Customer 1 and is waiting for Account 1, you'll get a
              > deadlock and a LockTimedOutException after 5 minutes. You could avoid
              this
              > by include the code in a synchronized block. You could also get a
              deadlock
              > if you're making a reentrant call, e.g., A calls B which calls back to A.
              >
              > If you haven't already seen this, here's a blurb from "Locking Model for
              > Entity EJBs" at
              >
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#108796
              > 7 that you might find interesting:
              >
              > The EJB 1.1 container in WebLogic Server Version 5.1 uses a pessimistic
              > locking mechanism for entity EJB instances. As clients enlist an EJB or
              EJB
              > method in a transaction, WebLogic Server places an exclusive lock on the
              EJB
              > instance or method for the duration of the transaction. Other clients
              > requesting the same EJB or method block until the current transaction
              > completes.
              >
              > This method of locking provides reliable access to EJB data, and avoids
              > unnecessary calls to ejbLoad() to refresh the EJB instance's persistent
              > fields. However, in certain circumstances pessimistic locking may not
              > provide the best model for concurrent access to the EJB's data. Once a
              > client has locked an EJB instance, other clients are blocked from the
              EJB's
              > data even if they intend only to read the persistent fields.
              >
              > In a Nutshell the first exception is a consequence of the second.
              >
              > Hope this helps,
              > Ludovic.
              > Developer Relations Engineer
              > BEA Customer Support
              > "newsgroups.bea.com" <[email protected]> a écrit dans le message news:
              > [email protected]...
              > > Dear All:
              > >
              > > I got this exception in our EJB app:
              > > weblogic.ejb.extensions.LockTimedOutException. Please see attached error
              > > message below. It is not happening every time you call the bean. It is
              > > reproducable with patience.
              > >
              > > Have you had this kind of problem and more importantly, how to avoid it?
              > >
              > > Our env is: Wl51 with sp 10, jdk1.3.02, Sun Solaris Unix, a cluster
              > contains
              > > 2 wl instance
              > >
              > > Thanks.
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > > Wed Jun 19 14:26:53 EDT 2002:<I> <TX> Transaction (TxC (5488304, xid =
              > > 1024502557372_6636, timeout = 300, txState = Marked Rollback, root =
              null)
              > > rolled back after 300 sec.
              > >
              > > [GC 99080K->85533K(130688K), 0.0227977 secs]
              > >
              > > Wed Jun 19 14:26:54 EDT 2002:<I> <EJB JAR deployment
              > > /webapp/dtshc/dts/nmc/ejb/nmcejb.jar> Transaction: '1024502557372_6636'
              > > rolled back due to EJB exception:
              > >
              > > weblogic.ejb.extensions.LockTimedOutException: Lock for
              > > primaryKey:com.mm.nmc.entity.ProducerOneYearPlanPK@1700fc timed out
              after
              > > 300000 ms.
              > >
              > > at
              > >
              weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
              > >
              > > at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
              > >
              > > at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
              > >
              > > at
              weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
              > >
              > > at
              > >
              >
              weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObjec
              > > t.java:162)
              > >
              > > at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
              > >
              > > at
              > >
              >
              com.mm.nmc.entity.ProducerOneYearPlanEJBEOImpl.getData(ProducerOneYearPlanEJ
              > > BEOImpl.java:979)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getTacticalPlanGoals(PersonalT
              > > acticalSessionEJB.java:200)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              > > alTacticalSessionEJB.java:165)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              > > alTacticalSessionEJB.java:155)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl.getPersonalTacticalPlan(
              > > PersonalTacticalSessionEJBEOImpl.java:340)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl_WLSkel.invoke(PersonalTa
              > > cticalSessionEJBEOImpl_WLSkel.java:167)
              > >
              > > at
              > >
              >
              weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda
              > > pter.java:347)
              > >
              > > at
              > >
              >
              weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle
              > > r.java:86)
              > >
              > > at
              > >
              >
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
              > > 5)
              > >
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              > >
              > >
              > >
              > >
              > >
              > >
              > > --
              > > Jiancai He
              > > http://www.hefamily.com
              > >
              > >
              >
              >
              

  • [svn:osmf:] 11877: Fix bug FM-194: Calling seek consecutively doesn' t respect the last seek.

    Revision: 11877
    Revision: 11877
    Author:   [email protected]
    Date:     2009-11-16 17:21:29 -0800 (Mon, 16 Nov 2009)
    Log Message:
    Fix bug FM-194: Calling seek consecutively doesn't respect the last seek.  The fix is to let each subsequent seek through (previously we blocked a seek attempt if another seek attempt was underway).  Update base unit tests.  Modify ExamplePlayer's scrub bar to seek while you scrub, this is a good way to demo/test this behavior.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-194
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/view/MainWindow.as
        osmf/trunk/framework/MediaFramework/org/osmf/net/NetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/ISeekable.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestISeekable.as

  • HT1355 If I am playing a song from my phone on speakers, how can I make sure that there are no interruptions like calls or notifications?

    If I am playing a song from my phone on speakers, how can I make sure that there are no interruptions like calls or notifications? My students are performing and it would be terrible if there was to be an interruption.

    You could turn on Do Not Disturb. This would block all notifications and incoming calls.
    Or just turn you're phone's Airplane Mode on if you're not streaming the music

  • Documentation bug- -Djava.security.policy==weblogic.policy?

    All,
    According to the documentation, an example of invoking weblogic server
    from the command line for JDK1.2 is as follows:
    JDK 1.2 (Java 2) example
    $ java -ms64m -mx64m -classpath c:/weblogic/classes/boot
    -Dweblogic.class.path=c:/weblogic/classes;
    c:/weblogic/license;c:/weblogic/lib/weblogicaux.jar;
    c:/weblogic/myserver/serverclasses
    -Djava.security.manager
    -Djava.security.policy==c:/weblogic/weblogic.policy
    weblogic.Server
    Is the property
    -Djava.security.policy==C:/weblogic/weblogic.policy
    correct in that there are 2 equals signs? Should this be rather:
    -Djava.security.policy=C:/weblogic/weblogic.policy?
    It seems as if either works, I just wanted to clarify, as I've noticed
    our startup scripts use the former and not the latter.
    Thanks,
    Ben

    Hi Ben,
    the doc is correct, there is a semantic difference between '==' and '=',
    check
    http://java.sun.com/j2se/1.3/docs/guide/security/spec/security-spec.doc3
    .html for details.
    Daniel
    -----Ursprüngliche Nachricht-----
    Von: Benjamin D. Engelsma [mailto:bengelsm@NO_SPAM.gfs.com]
    Bereitgestellt: Mittwoch, 4. April 2001 16:30
    Bereitgestellt in: environment
    Unterhaltung: Documentation bug->
    -Djava.security.policy==weblogic.policy?
    Betreff: Documentation bug-> -Djava.security.policy==weblogic.policy?
    All,
    According to the documentation, an example of invoking weblogic server
    from the command line for JDK1.2 is as follows:
    JDK 1.2 (Java 2) example
    $ java -ms64m -mx64m -classpath c:/weblogic/classes/boot
    -Dweblogic.class.path=c:/weblogic/classes;
    c:/weblogic/license;c:/weblogic/lib/weblogicaux.jar;
    c:/weblogic/myserver/serverclasses
    -Djava.security.manager
    -Djava.security.policy==c:/weblogic/weblogic.policy
    weblogic.Server
    Is the property
    -Djava.security.policy==C:/weblogic/weblogic.policy
    correct in that there are 2 equals signs? Should this be rather:
    -Djava.security.policy=C:/weblogic/weblogic.policy?
    It seems as if either works, I just wanted to clarify, as I've noticed
    our startup scripts use the former and not the latter.
    Thanks,
    Ben

  • Deploy ejb on wls7.0 weblogic.ejb.jar.xml ! help

    Morning !
    i'm try to deploy a EJB on wls7.0
    my descriptor is like this and i don't really undestand what's go wrong.
    thanks you to help
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 7.0.0
    EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <entity>
    <ejb-name>Compte</ejb-name>
    <bean-home-name>Compte</bean-home-name>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <jndi-name>DataSource</jndi-name>
    </resource-ref>
    <cmp-info>
    <database-map>
    <table>"Compte"</table>
    <column-map>
    <field-name>id</field-name>
    <column-name>"id"</column-name>
    </column-map>
    <column-map>
    <field-name>nomSte</field-name>
    <column-name>"nomSte"</column-name>
    </column-map>
    <column-map>
    <field-name>dateCreation</field-name>
    <column-name>"dateCreation"</column-name>
    </column-map>
    <column-map>
    <field-name>nbEmployes</field-name>
    <column-name>"nbEmployes"</column-name>
    </column-map>
    <column-map>
    <field-name>caSte</field-name>
    <column-name>"caSte"</column-name>
    </column-map>
    <column-map>
    <field-name>descSte</field-name>
    <column-name>"descSte"</column-name>
    </column-map>
    <column-map>
    <field-name>logo</field-name>
    <column-name>"logo"</column-name>
    </column-map>
    <column-map>
    <field-name>id_commercial</field-name>
    <column-name>"id_commercial"</column-name>
    </column-map>
    </database-map>
    <finder>
    <method-signature>findAll()</method-signature>
    <where-clause />
    <load-state>True</load-state>
    </finder>
    </cmp-info>
    </entity>
    <datasource-definitions>
    <datasource>
    <jndi-name>DataSource</jndi-name>
    <url>jdbc:odbc:dev_java</url>
    <username>sa</username>
    <password>lnx.sully</password>
    <driver-class-name>sun.jdbc.odbc.JdbcOdbcDriver</driver-class-name>
    </datasource>
    </datasource-definitions>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    the EXception is !
    Exception
    weblogic.management.ApplicationException: No deployment found at
    E:\bea70\weblogic700\server\bin\GRPEJB.jar.
    at
    weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEAppli
    cationContainerFactory.java:350)
    at
    weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRunti
    me.java:350)
    at
    weblogic.management.deploy.DeployerRuntime.access$0(DeployerRuntime.java:282
    at
    weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:947)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:721)
    at
    weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(De
    ployerRuntime.java:941)
    at
    weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:279
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:717)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
    99)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerI
    mpl.java:921)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
    at $Proxy48.activate(Unknown Source)
    at
    weblogic.management.console.actions.mbean.ConfigureAppWizardAction.commit(Co
    nfigureAppWizardAction.java:248)
    at
    weblogic.management.console.actions.mbean.ConfigureAppWizardAction.perform(C
    onfigureAppWizardAction.java:100)
    at
    weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
    rvlet.java:171)
    at
    weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
    let.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:945)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :332)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :242)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:5360)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:721)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3043)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2468)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    tahnks you !
    Unimon Thierry
    CGBI- CET-E-services
    69, Blvd Galliéni
    91 Issy les Mlx
    tele :01/55/95/54/22 Poste:5422
    Port :06/61/81/78/59
    Prof : mailto:[email protected]
    Pers : mailto:[email protected]

    oops! Pls ignore my previous mail. It was for a different problem.
    FOr the original problem of "couldn ot locate the bean with the ejb-name XZY in weblogic-ejb-jar.xml":
    This happens if you don't have the below files defined
    for a JAR/EAR file:
    weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml (needed if you have any Datasource mapped)
    These two are basic files required for any JAR/EAR file.
    If you dont' have it already you can generate them using
    $WLS_HOME/bin/startWLBuilder.sh GUI tool bundled along
    with WLS (I used 8.1 SP4) to generate these files ! This tool is really helpful.
    - Mouli

  • Hi - HELP PLEASE - I have had a bad bug, now fixed, But Have Lost the Library in iTunes - how can I transfer the music and artwork content of my iPone back to iTunes so that I have a base library again

    Hello - can someone help me please - I am not really well versed in modern electronics
    So, as I mentioned in my heading which is rather long (sorry lol) I have had a bad computer virus, now fixed, which has lost me a lot of information. This includes the content of ,my iTunes Library and my ability to access it.
    So, can someone help me by telling me how I can gethte music currently in my iPhone back in to the Music Library in my new version of iTunes. Aslo hiow do I now get Album Artwork in to iTunes as well - iI recall that it was really easy when I set it up but this new version is causing me all sorts of heartache when I tried just now - hence my plea for help.
    I hope you can help and that I can hear fromoyuvery soon
    Thanks guys 
    Keith

    iDevices are not backup devices.
    Use the backup of the computer to put the content back on the computer.
    If not backup exists and the content was purchased via iTunes, connect the device and select File > Transfer purchases.  This will not restore playlists, playcounts or any other library specific data.
    If the media was not purchased via iTunes, search google for ways to extract it from the iPhone.
    Whatever you do, going forward make sure you back up your media and other important files regularly.

  • HELP - mouse click no longer working - Tiger bug?

    Hi Guys,
    I had a weird issue with Tiger (10.4.10) on my PowerBook G4 this evening. I was dragging a file to the trash, and "dropped" it onto the dock by mistake, just missing the trash. I was slightly to the left of the trashcan. I expected the icon to jump back to the desktop, as the place I had dropped it was invalid, but to my surprise, as I moved the pointer across the screen with the mouse button unclicked, a ghost version of the icon was still attached to the mouse pointer.
    I was unable to click on anything, as the OS still believed for some reason that I was dragging this icon around. I used the keyboard to reboot the laptop, and when it came back up, the mouse click was not working - I can drag around, but can't click on anything. This is with the on board trackpad. I also have a bluetooth apple mouse, which exhibits exactly the same behaviour.
    I've rebooted several times (and shutdown and removed the battery), zapped the PRAM. Nothing has helped. I've tried logging in as a different user, but the click still doesn't work with the on-board or external mouse. It's like something within the OS has been corrupted, but I don't know what I can do. I have loads of data on the laptop, so I am not rebuilding. There is something on the help pages about resetting my PowerBook PMU, but I don't think this should be required.
    This is a major, urgent issue for me, as I can't use the laptop until I figure out how to resolve this.
    Anyone - please help
    Thanks,
    Robin

    Thanks for the feedback. Since resetting the PMU fixed the problem, it's not a bug but some conflict in the original setup.
    If you want to report this to Apple, either send Feedback or send bug reports and enhancement requests to Apple via its Bug Reporter system. Join the Apple Developer Connection (ADC)—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report/enhancement request. The nice thing with this procedure is that you get a response and a follow-up number; thus, starting a dialog with engineering.

Maybe you are looking for