Session facade lookup fails occasionally

Hey all,
Since a few weeks we're having some problems with our weblogic server. We're running a number of ears and wars which communicate with each other using a BusinessDelegate and Session Facade. The InitialContext lookup which is done, suddenly seems to fail at random occasions (today I counted around 20 failed lookups of the facade of one application and > 800 succesful transactions.
is there anyone who has seen this behaviour before? I'm kindof running out of ideas. Maybe something with the garbage collector?
Caused by: javax.naming.NameNotFoundException: Unable
to resolve 'XXXFacadeBean' Resolved ; remaining
name 'XXXFacadeBean'Regards,
Rein

Hey all,
Since a few weeks we're having some problems with our weblogic server. We're running a number of ears and wars which communicate with each other using a BusinessDelegate and Session Facade. The InitialContext lookup which is done, suddenly seems to fail at random occasions (today I counted around 20 failed lookups of the facade of one application and > 800 succesful transactions.
is there anyone who has seen this behaviour before? I'm kindof running out of ideas. Maybe something with the garbage collector?
Caused by: javax.naming.NameNotFoundException: Unable
to resolve 'XXXFacadeBean' Resolved ; remaining
name 'XXXFacadeBean'Regards,
Rein

Similar Messages

  • Ejb3 session bean lookup

    Hello, I have following problem with the ejb3 and session bean lookup:
    For example, I have a session bean with some dummy method, i.e. getInfo() :
    @Stateless
    public class MySessionBean implements MySessionLocal {
    public String getInfo() {return "Hello from Session bean";}
    When I lookup and use this bean in servlet in the following way, everything is OK:
    public class MyServlet extends HttpServlet {
    @EJB() MySessionLocal mySession;
    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
    out.println(mySession.getInfo());
    On the other side, when I create some java bean object as a facade, import and use it in servlet , it doesn't work:
    public class Facade {
    @EJB() MySessionLocal mySession;
    public String getInfo() { return mySession.getInfo();}
    public class MyServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) {
    Facade myFacade = new Facade();
    out.println(myFacade.getInfo());
    When servlet runs and gets to the command myFacade.getInfo(), NullPointerException is thrown, because mySession object in myFacade is null (ejb lookup method probably fails to perform...)
    I'm trying to use Facade to be able to use my Session Bean in JSP pages, i.e. to do something like <jsp:useBean id="myFacade" class="Facade" ...>
    Could someone clarify why lookup doesn't work in javabean object, despite the fact that it works in servlets?
    P.S. I'm running the latest promoted build (b31) of GlassFish (maybe this is the cause) and NetBeans IDE...

    Hi,
    Please try this ... http://weblogic-wonders.com/weblogic/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/ (Lookup from JSP)
    and
    http://weblogic-wonders.com/weblogic/2009/08/15/hello-world-2/  (Lookup/Injection from Servlet)
    Thanks
    Jay SenSharma

  • Local session bean lookup in another local session bean in EJB 3.0

    Hi,
    I am doing JNDI lookup of a local session bean in a session bean. ( I do not want to use EJB dependency injection).
    Lookup of local interface from session bean is successful. But, when the calling session bean is a local session in another session bean, the lookup fails.
    Here is an example:
    @Stateless
    @EJBs({@EJB(name="EJB2Local", beanInterface=EJB2Local.class),
    @EJB(name="EJB3Local", beanInterface=EJB3Local.class)})
    public class EJB1 implements EJB1Remote, EJB1Local{
    public void findEJB3Local(){
    //1. JNDI lookup for EJB3Local ----
    //2. EJB3Local.someFunction()
    @Stateless
    @EJB(name="EJB1Local", beanInterface=EJB1Local.class)
    public class EJB2 implements EJB2Remote, EJB2Local{
    public void findEJB1Local(){
    //1. JNDI lookup EJB1Local
    // 2. Call EJB1Local.findEJB1Local method
    //THIS METHOD CALL WILL FAIL.
    public void findEJB1Remote(){
    //1. JNDI lookup EJB1
    / 2. Call EJB1Local.findEJB1 method
    @Stateless
    public class EJB3 implements EJB3Remote, EJB3Local{
    public void someFunction(){}
    This setup was working in EJB 2.1, as we had clear ejb-local-ref definitions in our ejb-jar.xml file.
    I am suspecting that EJB 3.0 has special annotation to use when lookup is made from another local session bean.
    Any comments will be appreciated.
    Thanks,
    Mohan

    From a private component environment perspective, declaring @EJB in a bean class is equivalent
    to using ejb-ref or ejb-local-ref for that same bean in ejb-jar.xml. In each case, the EJB dependency
    is declared for that bean. Each EJB component has its own private component environment, so
    code running within invocations on different EJBs can not see the component environment of the
    components that made the invocations.
    What exact error are you getting? Please post the stack trace if possible.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Service Locator and session facade pattern

    What are differences between Service Locator and session facade pattern?
    For me it seems one and the same.
    Please explain me in detail. Expecting kind help.
    Thanks,
    Rahul
    Edited by: rahulb1 on Feb 26, 2008 5:07 PM

    rdoekes wrote:
    The ServiceLocator Pattern is a singleton which hold a map of used DataSources. The idea is that you perform a lookup once and use the cache afterwards. The session facade is just one DataSource lookup.huh? Those J2EE patterns are not really reduced to datasources and the SessionFacade has actually nothing to do with datasources.
    Session Facade
    It has Facade in it and a Facade is usually used to give a simple entrypoint by providing a standartized interface. The same is now with the Session Facade. You have a Session bean that represents a high-level business component that interacts and calls lower-level business components.
    Imagine having client a accessing 5 business objects with the remote calls, which is not an efficient way (network latency) or accessing the SessionFace and the session face is doing all the work through local access.
    Service Locator
    As J2EE components are using JDNI to lookup for ejb interfaces,DataSources, JMS components, connections etc. isntead of writing all the lookup in many code piecess across the project, you write a service locator that gives you a centralized place to handle the lookup's. It's easier to maintain and to control such a setup.
    As you can see there's quite a big difference ;-)
    cya,
    Nail

  • Diferences between Business Delegate and Session Facade

    Hi, I've been programming with java for a long time now, but recently decided to formally studing the J2EE patterns. By now I have the intuition of many of them but in paper looks a little confusing. Let me ask you what is a clear diference between Business Delegate and Session Facade.
    For me, exposing interfaces, hiding implementations and masking the complex interactions in the back are common factors in these patterns, could you please help me to identify diferences?

    There are more subtle differences, but the basic gyst is that the Business Delegate is used on the client/presentation tier. The Session Facade is used on the server/service tier. The Business Delegate typically performs a lookup of the SessionFacade which in turn fronts a service method (EJB or otherwise). The Business Delegate pattern is typically associated with J2EE remoting and its shortcomings.
    - Saish

  • Business Delegate & Session Facade

    1 What is the need of Business delegate? For controlling the interactions between the presentation tier and business tier, session facade pattern can be used.
    2 Can a session facade have all the facade related methods. (i.e. entire application has only one session facade). In the pattern documentation, it is stated as this stratergy inefficient. Why is so?

    1 What is the need of Business delegate? The delegate provides a client-side business abstraction and acts as a proxy for the business service. Note that it is a proxy, not a facade. In other words, it is a "stand-in" for the biz service, but it is not aggregating several method invocations into one and controlling the processing flow. So, the delegate is not providing a higher-level interface to some underlying system, as would a facade.
    So what's the need, if it's just a proxy? Obviously, it adds a layer, so one must consider its benefits versus the drawback of writing, maintaining, and interacting with this extra layer. In a sophisticated system, the benefits are many and will usually outweigh the drawbacks. Following are some of the benefits of using a delegate in the web container as an access point for invocations to the business tier:
    - It hides the underlying implementation details of the business service (ie: lookup, creation, access details of EJB...The delegate may use the Service Locator pattern to achieve this goal).
    - The delegate translates exceptions as necessary. Service-level exceptions, such as java.rmi.Remote can be intercepted by the delegate and translated into application exceptions. This also helps shield web container clients, for example, from EJB and network-related implementation details, which they should not need to worry about.
    - The delegate can attempt retries/recovery efforts transparent to its clients, such that this code can be localized and reused, instead of being duplicated in numerous clients.
    - The delegate can also manage a cache of resources/results, limiting unecessary remote roundtrips
    - The delegate can be used as a control point for multi-threaded access into the business tier. For example, stateful beans are not to be invoked by multiple client threads simultaneously. The delegate can serialize access, or, as mentioned above, handle exceptions/retries, as necessary.
    For
    controlling the interactions between the presentation
    tier and business tier, session facade pattern can be
    used.If you decide to use a delegate in your system, based on considering its benefits, as described above, then you'll typically create a one-to-one mapping between a delegate and a session facade. The delegate is not controlling the processing flow per se, but rather serving as a single access point and proxy as described above. The facade acts as a controller, though, aggregating the interfaces of underlying components and subsystems into a higher-level interface. If you find that your using the delegate more as a facade, we recommend pushing this control code from the web container (where the delegate lives) back to the session bean in the ejb container, so that the logic can be reused across clients.
    >
    2 Can a session facade have all the facade related
    methods. (i.e. entire application has only one session
    facade). In the pattern documentation, it is stated
    as this stratergy inefficient. Why is so?Having a single facade for the entire system would prove to be quite a maintenance and manageability headache for a non-trivial application. Imagine that every time something changes in any subsystem of the service layer, developers are all making changes to the same file and the same class...Not desirable and not very elegant. At the same time, one does not want to go the other way and create too many facades by having a one-to-one mapping of session facades to use cases, for example. We recommend aggregating a group of related interactions into a session facade, so that it provides highly course-grained access and control to underlying components.
    Thanks,
    Dan

  • Flex and ColdFusion and session facade?

    I want to deploy a flex application on an existing ColdFusion
    server. This server is already in production and uses a root
    Application.cfc to set session variables as well as authenticate
    the user to AD with getAuthUser. When I deploy my flex application,
    it fails because of the OnRequestStart cfcomponent within
    Application.cfc. I am wondering if this would be proper use of
    session facade? How do I best encapsulate session variables from
    the root Application.cfc within my new flex application? Basically
    I will need to follow the same authentication and cfset session
    guidelines that all of my other CF applications use, and my flex
    app needs to have theses session variables available to it, but I
    am not sure the best approach. Any insight is welcome.

    Did you enable session management in the Application.cfc or
    Application.cfm?

  • Bussiness Delegate vs Session Facade.

    Hi,
    Please any one tell me what are the differences between Bussiness Delegate and Session Facade.
    I read some documentation in online but not clear in above two design patterns.
    Any help I will appricate.
    Thanks,
    CDulla.

    A business delegate is generally thought of as a plug-in that is given to the client developer. This "plug-in" can do service lookups and searches on behalf of the client developer. Very smart if you have a Swing or Servlet Developer that doesn't know ejbs.
    A session facade is a session bean that is much like the delegate but resides on the server and is used to encapsulate course services so that network can be held to a minimum.
    A business-delegate can call a session facade which in turn can call an entity bean

  • Session bean lookup during MBean registration

    1 Timer Session bean is created but not started.
    1 static MBean is declared in orion-application.xml
    In the MBean constructor, a JNDI lookup is done on the timer session bean to start the timer (method from the Timer session bean)
    The JNDI lookup fails !!
    Is it possible to call a session bean from an MBean constructor ??
    It seems to be the same pb when i try to access a JNDI ressource (db) from any MBean constructor.
    Is there a way (post construct) to access JNDI or session bean after MBean registration ?

    javax.naming.Context c = new
    text c = new javax.naming.InitialContext();
    ejb.ejbCustomerDbLocalHome rv =
    calHome rv = (ejb.ejbCustomerDbLocalHome)
    c.lookup("ejb/ejbCustomerDbBean");
    ejb.ejbCustomerDbLocalHome rv = (ejb.ejbCustomerDbLocalHome)c.lookup("java:/comp/env/ejb/ejbCustomerDbBean");

  • Confusion: Session Facade Bean

    Hi all,
    I have confusion regarding the Sessin Facade. I am not getting that.
    I read http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html
    but still not clear...
    Anybody can explain with example?
    Thanks in advance.
    Rahul

    HI..
    It's very simple. For example u r writing a simple client to transfer money frm one account to another.
    A typical sequence of calls involves, ( without Session Facade ).
    In client code ( It could b a servelt, or jsp or anything...)
    1.Get AccountHome - 1 remote call
    2.lookup account1 bean - 1 remote call
    3.lookup account2 bean - 1 remote call
    4.withdraw money from account1 - 1 remote call
    5.deposit money into account2 - 1 remote call
    So you end up in making 5 remote calls and also wat if somthing goes wrong in step 5?? how will you roll back???
    To avoid that we introduce a session bean called Session Fascade.. It is a simple session bean containing methods which actually performs all such operations.
    U create a session bean say AccountHandlerSessionBean with a method
    withdraw(String frmAccountNo, String toAccountNo){
    //here u lookup and update entiry beans.
    Now from the client perspective you need to do only one thing.. lookup this session bean and call withdraw() method.. simple..

  • JNDI lookup failing

    I have a small test program that gets a Context to our server and does a
    lookup for an EJB. The lookup fails with the following client-side
    trace...
    javax.naming.CommunicationException. Root exception is
    java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found
    at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
    at
    weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
    at
    weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
    at
    weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.java:34)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
    at
    weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
    at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:342)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.rmi.UnmarshalException: Unmarshalling return
    - with nested exception:
    [java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found]
    at
    weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.java:256)
    at
    weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at
    com.prismadata.appserv.session.series.test.Client.main(Client.java:73)
    However, when I perform the same lookup in a servlet (admittedly running
    in the same JVM) I successfully get the home interface object back.
    Any ideas why ?
    Thanks,
    Gino

    In order to get a reference to you EJB Home interface from JNDI, your
    application has to have an access to the stub of this interface. This stub
    is generated by WL tools when you deploy your EJB. Because your servlet runs
    inside the server's VM, it has an access to this stub by default. So just
    include these stubs in CLASSPATH of your test program and you will see the
    difference.
    kesha
    "Gino Coccia" <[email protected]> wrote in message
    news:[email protected]...
    I have a small test program that gets a Context to our server and does a
    lookup for an EJB. The lookup fails with the following client-side
    trace...
    javax.naming.CommunicationException. Root exception is
    java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found
    at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
    at
    weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
    at
    weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
    at
    weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
    a:34)
    >
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
    at
    weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
    at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:342)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.rmi.UnmarshalException: Unmarshalling return
    - with nested exception:
    [java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found]
    at
    weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.jav
    a:256)
    >
    at
    weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at
    com.prismadata.appserv.session.series.test.Client.main(Client.java:73)
    However, when I perform the same lookup in a servlet (admittedly running
    in the same JVM) I successfully get the home interface object back.
    Any ideas why ?
    Thanks,
    Gino

  • Session facade samples

    hi,all
    I am new to j2ee.any experts here could give me an sample code of session facade?in my case.I have a passwordbean (CMP entity) where stores userinfo. and a useradminbean( session bean) with remote interface.I want to write two methods createauser() and removeauser() in my SB;
    the two beans are assumed to be bundled in a same jar file.so Do I have to use InitalContext.look method to call my CMP entity in SB�Hor directly call the two interfaces of my entity bean?I was lost how to write a getuserinfo() in SB which I think should call entity bean's find method.

    Hi,
    Your session bean is like a pojo client for lookup method.
    However, it's recomended to use local interface (LocalHome, Local) between Session and Entity. (available from EJB 2.0).
    I've code at home, if you need it, tell me.
    Regards,
    Sebastien Degardin.

  • Default gateway arp lookup failed

    Hi there
    On a 5500 series WLC I see I have an issue where peap clients get randomly disconnected with these errors
    MAX_EAPOL_KEY_RETRANS: 1x_ptsm.c:444 Max EAPOL-key M1 retransmissions exceeded for client 24:77:03:35:79:34
    AAA-6-ARP_LOOKUP_FAIL: radius_db.c:3232 Default gateway arp lookup failed.
    aaaQueueReader: Aug 31 19:12:14.938: %AAA-4-RADIUSMSG_SEND_FAILED: radius_db.c:3567 Unable to send RADIUS message to
    Any ideas?
    Thanks
    Naresh
    Sent from Cisco Technical Support iPhone App

    (Cisco Controller) >show wlan 1
    WLAN Identifier.................................. 1
    Profile Name..................................... SSID1
    Network Name (SSID).............................. SSID1
    Status........................................... Enabled
    MAC Filtering.................................... Disabled
    Broadcast SSID................................... Enabled
    AAA Policy Override.............................. Enabled
    Network Admission Control
      Radius-NAC State............................... Disabled
      SNMP-NAC State................................. Disabled
      Quarantine VLAN................................ 0
    Maximum number of Associated Clients............. 0
    Number of Active Clients......................... 0
    Exclusionlist Timeout............................ 60 seconds
    Session Timeout.................................. 1800 seconds
    CHD per WLAN..................................... Enabled
    Webauth DHCP exclusion........................... Disabled
    Interface........................................ i_wifi
    Multicast Interface.............................. Not Configured
    WLAN ACL......................................... unconfigured
    DHCP Server...................................... Default
    DHCP Address Assignment Required................. Enabled
    Static IP client tunneling....................... Disabled
    Quality of Service............................... Silver (best effort)
    Scan Defer Priority.............................. 4,5,6
    Scan Defer Time.................................. 100 milliseconds
    WMM.............................................. Allowed
    WMM UAPSD Compliant Client Support............... Disabled
    Media Stream Multicast-direct.................... Disabled
    CCX - AironetIe Support.......................... Enabled
    CCX - Gratuitous ProbeResponse (GPR)............. Disabled
    CCX - Diagnostics Channel Capability............. Disabled
    Dot11-Phone Mode (7920).......................... Disabled
    Wired Protocol................................... None
    IPv6 Support..................................... Disabled
    Passive Client Feature........................... Disabled
    Peer-to-Peer Blocking Action..................... Drop
    Radio Policy..................................... All
    DTIM period for 802.11a radio.................... 1
    DTIM period for 802.11b radio.................... 1
    Radius Servers
       Authentication................................ 1.1.1.1 1812
       Authentication................................ 1.2.1.1 1812
       Accounting.................................... 1.1.1.1 1813
       Accounting.................................... 1.2.1.1 1813
       Dynamic Interface............................. Enabled
    Local EAP Authentication......................... Disabled
    Security
       802.11 Authentication:........................ Open System
       Static WEP Keys............................... Disabled
       802.1X........................................ Disabled
       Wi-Fi Protected Access (WPA/WPA2)............. Enabled
          WPA (SSN IE)............................... Disabled
          WPA2 (RSN IE).............................. Enabled
             TKIP Cipher............................. Disabled
             AES Cipher.............................. Enabled
          Auth Key Management
             802.1x.................................. Enabled
             PSK..................................... Disabled
             CCKM.................................... Enabled
             FT(802.11r)............................. Disabled
             FT-PSK(802.11r)......................... Disabled
    FT Reassociation Timeout......................... 20
    FT Over-The-Air mode............................. Enabled
    FT Over-The-Ds mode.............................. Enabled
    CCKM tsf Tolerance............................... 1000
       CKIP ......................................... Disabled
       Web Based Authentication...................... Disabled
       Web-Passthrough............................... Disabled
       Conditional Web Redirect...................... Disabled
       Splash-Page Web Redirect...................... Disabled
       Auto Anchor................................... Disabled
       H-REAP Local Switching........................ Disabled
       H-REAP Local Authentication................... Disabled
       H-REAP Learn IP Address....................... Enabled
       Client MFP.................................... Optional
       Tkip MIC Countermeasure Hold-down Timer....... 60
    Call Snooping.................................... Disabled
    Roamed Call Re-Anchor Policy..................... Disabled
    SIP CAC Fail Send-486-Busy Policy................ Enabled
    SIP CAC Fail Send Dis-Association Policy......... Disabled
    Band Select...................................... Disabled
    Load Balancing................................... Disabled
    Mobility Anchor List
    WLAN ID     IP Address            Status

  • WSA error DNS lookup failed

    hi,
    When i try to download a file from let say xyz.com i am not able to do so.Policy trace show below result
    User Information
    User Name: r5893
    Group Membership: NBKDOM\r5893, NBKDOM\Limit_Login_Single, NBKDOM\MMS_Access Group, NBKDOM\Screen Saver, NBKDOM\Domain Users, NBKDOM\MMSGroup, NBKDOM\Purchasing&GS-Kuwait, NBKDOM\AllUsers, NBKDOM\Outlook Users, NBKDOM\Administration-Kuwai, NBKDOM\BOUsers, NBKDOM\MYNBKUSERS, NBKDOM\Purchasing Requests - Administration, NBKDOM\EVGROUP001
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
    Custom URL Category: Allow sites
    Policy Match
    Cisco IronPort Data Security policy: None
    Decryption policy: None
    Routing policy: Global Routing Policy
    Identity policy: Users
    Access policy: NBK_Users
    Final Result
    Request blocked
    Details: DNS lookup failed
    Trace session complete

    Hi Asim,
    I would investigate the DNS by establishing an SSH session to the M1 interface.  Do an 'nslookup xyz.com' and see if it resolves.  If it does not resolve, you may want to check your DNS server.
    -Vance

  • Registry's EnumKey Lookup Failing When Called By MSBuild?

    A MS-DOS script executes the VBScript below and it works fine. However, when using a MS Build master deployment file which calls the aforementioned MS-DOS script, the 2nd location lookup ("SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\")
    fails with a result code of 2. I have spent countless hours trying to figure out why the difference. Any ideas?
    Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
    Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & node & "/root/default:StdRegProv")
    REM 1st location: "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
    sBaseKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
    iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)
    If iRC <> 0 THEN
    WScript.Echo "Registry lookup failed for " & sBaseKey
    ELSE
    For Each sKey In arSubKeys
    iRC = oRegistry.GetStringValue(HKLM, sBaseKey & sKey, "DisplayName", sValue)
    If sValue = Wscript.Arguments.Item(1) Then
    oRegistry.GetStringValue HKLM, sBaseKey & sKey, "UninstallString", sValue
    InstalledApplications = Replace(sValue, "/I{", "/X{")
    IF LEN(InstalledApplications) > 0 THEN
    InstalledApplications = InstalledApplications & " /qn /l*vx """ & sFile & ".Log"""  & Chr(13) & Chr(10) 
    END IF
    END IF
    NEXT
    END IF
    REM 2nd location: "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<GUID>\InstallProperties"
    arProducts = NULL
    sBaseKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\"
    iRC = oRegistry.EnumKey(HKLM, sBaseKey, arProducts)
    If iRC <> 0 THEN
    WScript.Echo "Registry lookup failed for " & sBaseKey
    ELSE
    For Each guid In arProducts
    sInnerKey = sBaseKey & guid & "\InstallProperties\"
    iRC = oRegistry.GetStringValue(HKLM, sInnerKey, "DisplayName", sValue)
    If sValue = Wscript.Arguments.Item(1) Then
    oRegistry.GetStringValue HKLM, sInnerKey, "UninstallString", sValue
    InstalledApplications = Replace(sValue, "/I{", "/X{")
    IF LEN(InstalledApplications) > 0 THEN
    InstalledApplications = InstalledApplications & " /qn /l*vx """ & sFile & ".Log""" & Chr(13) & Chr(10) 
    END IF
    END IF
    NEXT
    InstalledApplications = InstalledApplications & "GOTO:EOF"
    END IF
    Shawn ([email protected])

    Or try sysnative:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa384187%28v=vs.85%29.aspx
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)
    But that is not a portable solution.  it does not apply to 32 bit platforms and will only work from a 64 bit session when calling intp a 32 bit session.
    If we are in a 32 bit session running VBScript then we cannot see the 64 bit registry without the help of WMI.  The correct solution is to build in the correct environment.  If you want to run in both environments then you will need to test the
    32 bit version on a 32 bit system assuming the applications being enumerated use the same keys on both architectures.
    ¯\_(ツ)_/¯
    This is correct. I totally forgot there are 32 bit and 64 bit versions of MSBuild. I made no changes except to execute the main deployment script with the 64 bit version of MS Build. Thank you for all of your help.
    -Shawn
    Shawn ([email protected])

Maybe you are looking for