Get NameNotFoundException while trying to get the timer to start cl

Hi all
I'm NameNotFoundException while trying to watch the stopwatch of the startup class.

Commonj.timers.TimerManager, I have it configured in the ejb - jar file. My MDB XML. I use the statrtup class to initialize some static immidiate of components to the active state of the MDB. I have to initialize the timer Manager object immidiate active state of the MDB that is configured in the file ejb - jar.Xml. I wrote this search logic in the postStart() of the ApplicationLifecycleListener method, the called method but the search fail logic, the same logical aspect works in class MDB (MDBTimer.java). I tried different ways, I don't find a solution, finally, I write the problem here.


Could a WebLogic experts you can help on this?

Here I give you my code.


WebLogic - application.Xml


<? XML version = "1.0" encoding = "UTF - 8"? >
< weblogic application
xmlns = "http://www.bea.com/ns/weblogic/weblogic-application" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
xsi: schemaLocation = "http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd" >
<>earpiece
my.examples.mdb.timer.TestApplicationListener <-listener class > < / listener class >
< / earphone >
< / weblogic application >


EJB - jar. XML

< ejb - jar xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee."
http://Java.Sun.com/XML/NS/J2EE/EJB-jar_3_0.xsd ".
version = "3.0" >
< some enterprise beans - >
> by message <
MyTimerMDB < ejb-name > < / ejb-name >
my.examples.mdb.timer.MDBTimer < the ejb class >-
< / ejb-class >
< resource-ref >
< description > my default timer Manager < / description >
Timer/MyDefaultTimer < res-ref-name > < / res-ref-name >
commonj.timers.TimerManager < res-type > < / res-type >
Container < res-auth > < / res-auth >
< res-sharing-scope > shared < / res-sharing-scope >
< / resource-ref >
< / message-driven >
< / enterprise beans >
< / ejb - jar >


MDBTimer.java


package my.examples.mdb.timer;

Import javax.ejb.MessageDriven;
Import javax.ejb.TransactionAttribute;
Import javax.ejb.TransactionAttributeType;
Import javax.jms.Message;
to import javax.jms.MessageListener;
Import javax.jms.ObjectMessage;

Import commonj.timers.Timer;
Import commonj.timers.TimerManager;

@MessageDriven (mappedName = "TEST_Q" name = "MyTimerMDB", activationConfig = {}
@javax.ejb.ActivationConfigProperty (propertyName = "acknowledgeMode", propertyValue = "Auto-reconnaître").
@javax.ejb.ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue").
({@javax.ejb.ActivationConfigProperty (propertyName = "transactionType", propertyValue = "Container")})
@TransactionAttribute (TransactionAttributeType.REQUIRED)
/ public class MDBTimer implements MessageListener {}

public static TimerManager Manager = null;

@Override
{} public void onMessage (Message arg0)
System.out.println ("onMessage () method called...\n\n");

If (arg0 instanceof ObjectMessage) {}

ObjectMessage msg = (ObjectMessage) arg0;
try {}

If (msg.getObject instanceof String ()) {}
Thread.Sleep (1000);
System.out
.println ("received message > >" + msg.getObject ());
}
} catch (Exception e) {}
e.printStackTrace ();
}
}
System.out.println ("onMessage () method returned...\n\n");
{if(Manager==null)}
Manager = MyUtil.getTimerManager ();
}
}

}


TestApplicationListener.java

package my.examples.mdb.timer;

Import commonj.timers.TimerManager;

Import weblogic.application.ApplicationException;
Import weblogic.application.ApplicationLifecycleEvent;
Import weblogic.application.ApplicationLifecycleListener;

SerializableAttribute public class TestApplicationListener extends ApplicationLifecycleListener {}
Public Sub preStart (ApplicationLifecycleEvent evt) throws ApplicationException {}
String logStr = "> > > > () TestApplicationListener.preStart > > > >";
System.out.println (logStr + "entered...");
super.preStart (evt);
System.out.println (logStr + "leveaing...");
}

Public Sub postStart (ApplicationLifecycleEvent evt) throws ApplicationException {}
String logStr = "> > > > () TestApplicationListener.postStart > > > >";
System.out.println (logStr + "entered...");
super.postStart (evt);
TimerManager timerManager = MyUtil.getTimerManager ();
System.out.println (logStr + "timer Got Manager == >" + timerManager);
System.out.println (logStr + "leveaing...");
}
Public Sub preStop (ApplicationLifecycleEvent evt) throws ApplicationException {}
String logStr = "> > > > () TestApplicationListener.preStop > > > >";
System.out.println (logStr + "entered...");
TimerManager timerManager = MyUtil.getTimerManager ();
System.out.println (logStr + "timer Got Manager == >" + timerManager);
super.preStop (evt);
System.out.println (logStr + "leveaing...");
}

Public Sub postStop (ApplicationLifecycleEvent evt) throws ApplicationException {}
String logStr = "> > > > () TestApplicationListener.postStop > > > >";
System.out.println (logStr + "entered...");
super.preStop (evt);
System.out.println (logStr + "leveaing...");
}

}


MyUtil.java

package my.examples.mdb.timer;

Import javax.naming.InitialContext;
Import javax.naming.NamingException;

Import commonj.timers.TimerManager;

public class MyUtil {}

public static TimerManager getTimerManager() {}
TimerManager timerManager = null;
try {}
InitialContext ctx = new world;
timerManager = ctx (TimerManager)
. Lookup("Java:COMP/env/Timer/MyDefaultTimer");
System.out
.println ("@@@Looked - up using java: comp/env/timer/MyDefaultTimer:")
(+ timerManager);
} catch (NamingException e) {}
e.printStackTrace ();
}
Return timerManager;
}



}

Podie salvation,

I tested your program as long as your have posted in the forums. And I got the same error NameNotFoundException. After debugging some more on what I find pre-departure that until the ApplicationLifecycleListener) (as well as the postStart() method runs correctly the EJB Module isn't really gets activated laugh.. why the resource-ref <>which we specified in the file "ejb - jar.xml" doesn't get nvoked so until that time, there is no such Timer available on the server while we get NameNotFoundException.)

If somehow we can do search for "timer/MyDefaultTimer' after the preStart() and postStart() method is executed successfully, then we have no problem.

.
.
Thank you
Jay SenSharma

Tags: Fusion Middleware

Similar Questions

  • Help - LI running, but get Apache2 Ubuntu default page while trying to access the Web interface of log insight

    Hello

    I installed the Log Insight 2.5 VM via vCenter Server ESXi 5, 5. I was able to deploy the virtual computer successfully and you can see the network through VAPP Options settings. (Attached picture - TIME settings).

    Question:

    Unable to access LI web Interface. While trying to access the Web interface, I get 'Apache2 Ubuntu by default Page' (img attachment). Insight of the newspaper runs and opens the web application on port 80.

    Newspapers, controlled far-

    status of /etc/init.d/loginsight

    Open a session running Insight

    Attached image Loginsight2-DURATION - file /storage/core/loginsight/var/runtime.log

    # sh li - cassandra.sh - status

    SH: li-cassandra-sh: not found

    Check if the tcp 80 port is open through the netstat command. Yes, it is open.

    Telnet on port 80, it says connection and crashes. Image attached - telnet-LI

    Able to ping the IP address successfully.

    How can I check http logs on console LI?

    I would really appreciate response to this soon. I'm working on installation LI for more than a week and struggling to get through this way.

    Thank you

    Radhika

    I believe that you with the configuration, but I tell you that the configured IP address and the IP you hit in your browser are not still the same IP, Log Insight does not work on Ubuntu, so you hit another system. To prove this, connect you to the console of the Insight newspaper and run:

    # cat/etc/SuSE - release

    SUSE Linux Enterprise Server 11 (x86_64)

    VERSION = 11

    PATCHLEVEL = 2

    You will see that you are running SuSE to see a Ubuntu screen tells me that you have an IP address duplicate in your environment and you hit a node that is not an Insight newspaper. I hope this helps!

  • I get an error code 646 while trying to download the updates

    I get an error code 646 while trying to download the updates, update security for Microsoft Works 9 (KB2431831)

    Download size: 2.1 MB

    Help, please

    See this thread:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/thread/0c397230-26c6-4214-a5d1-3c99d2b2ef47

  • I have reset my system without disabling the acrobat 8.0 writer. Now when I am trying to activate I get message 'Maximum Activations exceeded', while trying to activate the software, please suggest what to do to activate...

    I have reset my system without disabling the acrobat 8.0 writer. Now when I am trying to activate I get message 'Maximum Activations exceeded', while trying to activate the software, please suggest what to do to activate...

    Contact adobe support by clicking on this link then "still need help" as soon as it appears, https://helpx.adobe.com/contact.html . request a reset of count of activation.

  • I am getting error #1328 in acrobat XI while trying to install the update.

    I get the #1328 error while trying to install the update to acrobat XI. The error that says that it has not applied the patch for C:\config.msi\PTFBD7.tmp I uninstalled and re-installed acrobat as the help page, told to do, but it will not yet installed the update.

    Sometimes, the questions are about disabling antivirus and be logged in as an administrator. Another tactic is to download updates directly from Adobe at http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows and install manually.

  • get the "Connection to the MDEX error" error while trying to open the micro browser

    Hello

    I use short tools and Framework 3.1.0 and MDEX 6.3.0.

    While trying to open the Workbench UI browser mic to create configurations of page template, I get message drop-down according to:

    Connection to the MDEX error. The data service associated with this editor is not properly configured.

    Please guide the if you have the slightest idea.

    Thank you
    Ben Milot

    I set up different RecordSpotlight editor to use a short instance successfully. What I did is to change apps\ [your app name]\config\editors_config\services\dataservice.json with search short configuration file updated, save the file and run apps\ [your app name]\control\set_editros_config.bat to apply the change.

    To check, you can run apps\ [your order of name]\control\export_site.bat app to export the configuration of your site, updated data service configuration should manifest in the XML of the exported site.

    It will be useful,

    Michelle

  • How can I get the time to a server in JavaScript? Thank you

    Hello I have implemented a JavaScript from Adobe that expire after a certain date. However, the script asks both on the computer that can be changed. I thought that maybe I could get the time from a server NTP, NIST, which cannot be changed. However, I can't understand how to call and get the time server using JavaScript. I heard that JavaScript is client-side, but there is also a side server as well. Is it possible to code in Adobe Acrobat DC? I heard also that time of the OS is different maybe through Microsoft server. Could I get the OS somehow time?

    I've tried ActiveXObject which doesn't seem to work and in a desperate trial of windows.open ("Internet address"). Other thoughts on attempts? Thank you very much!!!

    Other strategies are also welcome having the exact time of the real.

    -Christmas

    The main problem with anything that is based on JavaScript is that it can be turned off easily, in order to place you in the document code will not work. Or a PDF Viewer that can't stand not JavaScript can be used. A form can submit to a server that can return a response that could include the current time.

  • Get the timer

    I'm trying to hide an image using the Freehand tool, and whenever I have to zoom in or out, I get the timer. Is this a known problem or is there something I can do to avoid this?

    Richard, it is the price to pay for the large images in combination with several layers. And, as far as I know, other applications have no layers... memory is really tight on these devices.

    Heiner

  • Flex Mobile Application and get the time zone

    Hello

    I need to know the time in a Mobile application in order to perform some calculations.

    The problem is that I need to know the time from the GMT.

    Is there anyway to zone set by the user to detect or somehow get the time?

    not tried but it's any help

    Date

    timezoneOffset : number

    [read-only] The difference, in minutes, between the time universal (UTC) and the local time of the computer.
  • How to get the time based on the time zone?

    Hi all

    I try to get timestamp based on the time zone I assign in the computer... for example right now I m CA, if I change the time zone of the computer IS, and use time get Sec.vi, I always get time to CA.

    and not the ACC at EST time... How can I get the time according to the time on my laptop?

    Think I remember vaguely that LV reads this parameter when loading, then try to restart LV after changing the time zone and see if that helps.

  • five out of six times (approximately) to start outlook express 6, it crashes while trying to access the first message

    five out of six times (approximately) to start outlook express 6, it crashes while trying to access the first message. This happens several times, and each time the first message (even) appears in the Inbox, even if the process is not complete. sometimes clear the cache, or cleaning IE temp. the files seems to help - but not always.

    It's VERY frustrating!

    Do a household.
     
    1: do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095
     
    2: after you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    3: disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the processors and causes a multitude of problems such as time-outs and account setting changes. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3
     
    For some programs, turning it off is not enough. You may need to uninstall and reinstall in custom Mode and remove the analysis when e-mail messages.
  • ETA App should help to get the time and date feature HELP!

    Hi everyone, I'm doing an application where I need to get the time and date of the antone device can help, I know there is a function such as getDate or getTime but im not to know how to use it.

    As far as I know,

    I use this to get the time system (it returns long type)

    System.currentTimeMillis();
    

    After that, you can use SimpleDateFormat to convert date and time

    SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy, HH:mm");
    String time = sdf.format(new Date(System.currentTimeMilis()));
    
  • do not get the time zone on the basis of the city.

    Hello guys, I'm getting the time zone based on the region,

    As America/LosAngelies(-8);

    But I want that on the basis of the town as London(-7) and Adeleid (+ 5);

    How can I achieve this. Help, please.

    Resolved.

    Use the method of getDisplayNames (0). For time zones the device all.

  • How to get the time since January 1, 1970 in chain November 19, 2011 21:30

    I need to get the time from 1 jan 1970.I needs time in milliseconds of the chain (November 19, 2011 21:30). This string, I'm the webservice.i need to convert milliseconds to the requirement of the application. Is it possible to do so. Please help me

    Thank you

    splits the string to create a calendar and set its fields to the values of the substring.

    httpdateparser is very particular about the format. and internal it does the same thing as a manual scan would do, I suppose.

  • need to get the time host was put in the annotation and maintenance mode

    Hi - it is possible to get the time that a host has been in maintenance mode and also seize any annotation is attached to the ESX host in VC?

    Thank you

    ~ Sai

    Also, by using "get-vmhost" twice is redundant since you have channeled from get-vmhost: "E = { get-vmhost $_ |}". Get-vievent ".

    However, your order will be to return the entire event object and look like:

    Name                                    Event

    ----                                    -----

    host {VMware.Vim.EnteredMaintenanceModeEv...

    You can try below instead:

    Get-VMHost |? {$_. ConnectionState-match 'Maintenance'} | Select Name, @{N = 'Time put in MaintMode'; E={($_ | Get-VIEvent |? {$_. FullFormattedMessage-like"* entered maintenance mode *"} (). " Createduserid}}

    But it can still recover multiple events, so a way to get only the last event and time is below:

    Get-VMHost |? {$_. ConnectionState-match 'Maintenance'} | Select Name, @{N = 'Time put in MaintMode'; E={($_ | Get-VIEvent |? {$_. {"FullFormattedMessage-like" * entered maintenance mode * "} | toplayer-last 1). Createduserid}}

Maybe you are looking for

  • Watch for the education shop

    I want to buy watch education channel. But I don't have a reduction, what is right, what should I do to receive cheaper?

  • Pavilion dv6-2140ei. Missing driver problems and blue screen.

    Hi, I'm florent I have problem devices on my PC which I think might have caused the blue screen issue. Base system device: PCI\VEN_197B & DEV_2383 & SUBSYS_3659103C & REV_00\4 & 91078216 & 0 & 03E4PCI\VEN_197B & DEV_2383 & SUBSYS_3659103C & REV_00\4

  • I tried to install jk1351 plotter cutter drivers but just can't make it work.

    Original title: jk1351 cutter plotter usb drivers can someone helo I tried to install readers, but just can't make it work no matter what idears

  • HP dv6 6140tx: Ram compatibility

    My laptop have received 2 slots and is expandable up to 16 GB. The laptop came with Ramaxel 4 GB ddr3 1333 mhz ram (rmt3020ec58e9f-1333) in 1 location. Now, I want to add a 4 GB stick in the second slot to improve it to 8 GB. The same ram brand is no

  • I need a new product key...

    Im trying to reinstall Windows xp home edition 2002 and he said that I need a product key, over the years I lost some of this information. I have no idea where he is. Help, please.