How to configure initial-context-factory and provider_url on Websphere MQ

I have a few questions about WebSphere MQ. Currently, my application is able work well with other JMS provider. But I would like to move to use WebSphere instead.
Can anyone suggest me how to configure the application connecting WebSphere?
�     I�m using the Initial java naming factory as bellows: com.sun.jndi.fscontext.RefFSContextFactoryIs it the correct class?
�     About the java-naming-factory-url, How do I know what object that I should use? I found this example in JMSAdmin.config � iiop://localhost:7555� What�s iiop ?
�     What jar file that I should add in my classpath?

Hi,
You have a few options...
1. Use WebSphere Application Server as the JNDI provider
2. Don't use JNDI
3. Use the File System Context as the JNDI provider
Exploring these options in a bit more detail...
1. Use WebSphere Application Server as the JNDI provider
Assuming you have WAS, the best way of obtaining your queue is to define the Queue and Queue Connection Factory objects in WAS using the admin console, then obtain them from the Initial Context as per the following article
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rnam_example_prop2.html
If you prefer not to do JNDI lookups in your code a great alternative is to use Spring (www.springframework.org). If you haven't come across spring before it's well worth a look. One of it's many features is a bean factory for creating your objects. There is lots of support for retrieving JMS objects from JNDI, so in the main all you have to do is write some XML similar to the following...
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
       <property name="environment">
              <props>
                     <prop key="java.naming.factory.initial">${jndi.initialContextFactory}</prop>
                     <prop key="java.naming.provider.url">${jndi.providerUrl}</prop>
              </props>
       </property>
</bean>
<bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiTemplate" ref="jndiTemplate"/>
       <property name="jndiName" value="${jndi.queueConnectionFactory}"/>
</bean>
<bean id="queueName" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiTemplate" ref="jndiTemplate"/>
       <property name="jndiName" value="${jndi.queueName}"/>
</bean>There's a bit more to it than this, but not much. I've been meaning to write a tutorial on this for a while so if you're interested let me know.
2. Don't use JNDI
This approach involves using the creating the native MQ Queue Connection Factory and Queue classes. You can hard code this, but it's much better to abstract it from your application. Again you can use Spring. The definition would look something like the following...
<bean id="MQJMS_TP_CLIENT_MQ_TCPIP"
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
       <property name="staticField">
              <value>com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP</value>
       </property>
</bean>
<bean id="queueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
       <property name="transportType" ref="MQJMS_TP_CLIENT_MQ_TCPIP" />
       <property name="queueManager" value="${mq.queueManager}" />
       <property name="hostName" value="${mq.host}" />
       <property name="port" value="${mq.port}" />
       <property name="channel" value="${mq.channel}" />
</bean>
<bean id="publishInvoiceQ" class="com.ibm.mq.jms.MQQueue">
       <constructor-arg value="${mq.queueName}" />
</bean>
3. Use the File System Context
The file system context is just like a JNDI context, but instead of using a url like iiop://host:port you have to specify a file system url. Because FSContext is just another JNDI context you can still use the spring configuration from option 1, but just change the relevant parameters.
In order to define you queues and queue connection factory using the File System Context, you need to download a swing application called JMS Admin. Get it here
http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24004691&loc=en_US&cs=utf-8&lang=en
With regards your specific questions...
IIOP is just another communication protocol. If you want more details I'm sure typing "what is iiop" into google will provide plenty of hits.
I'll do my best to answer the remain two tomorrow - I wrote an application a few months ago which used the File System Context, but don't have the details to hand.

Similar Messages

  • ClassNotFoundException for initial-context-factory using foreign JMS p.

    Hi,
    I am currently working on migrating an application from weblogic 9 to weblogic 10 and I bumped into this issue while MDB connecting to JMS.
    [Loaded cz.jaksky.riskscenario.beans.RiskScenarioServiceLocalHome from file:/C:/SVN/app-WLS10-FRESH/app-deploy/servers/myserver/tmp/_WL_user/performance/nyubkw/point-interfaces.jar]
    <17-Sep-2012 11:01:27 o'clock CEST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PerformanceAsyncRequestBean is unable to connect to the JMS destination: wls.AsyncQueue. The Error was:
    javax.naming.NoInitialContextException: Cannot instantiate class: cz.jaksky.common.jms.JMSInitialContextFactory [Root exception is java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:182)
    at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
    at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
    at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at weblogic.jms.common.CDS$2.run(CDS.java:486)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
    at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
    at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
    at weblogic.jms.common.CDS.access$100(CDS.java:41)
    at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
    at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
    ... 23 more
    I am using foreign JMS provider with provided mapping. Config follows:
    ejb-jar.xml:
    <enterprise-beans>
              <message-driven>
                   <ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
                   <ejb-class>cz.jaksky.common.async.AsynchronousRequestMessageBean</ejb-class>
                   <transaction-type>Bean</transaction-type>
                   <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
                   <message-driven-destination>
                        <destination-type>javax.jms.Queue</destination-type>
                        <subscription-durability>Durable</subscription-durability>
                   </message-driven-destination>
                   <message-selector>
                        <![CDATA[ Service IN ('PortfolioRetriever')
                      AND MessageType = 'request'
                      AND BigBox = FALSE
                    ]]>
                   </message-selector>
              </message-driven>
         </enterprise-beans>
    weblogic-ejb-jar.xml:
    <weblogic-enterprise-bean>
              <ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
              <message-driven-descriptor>
                   <pool>
                        <max-beans-in-free-pool>64</max-beans-in-free-pool>
                        <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
                   </pool>
                   <destination-jndi-name>wls.AsyncQueue</destination-jndi-name>
                   <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
                   <connection-factory-jndi-name>ServiceLocatorAsyncQueueFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              <dispatch-policy>PortfolioAsyncQueueWorkManager</dispatch-policy>
         </weblogic-enterprise-bean>
    jmsconfig-jms.xml
    <foreign-server name="TibjmsAsyncServer">
    <default-targeting-enabled>true</default-targeting-enabled>
    <foreign-destination name="AsyncQueue.LOCAL.prgdwm355410.7001">
    <local-jndi-name>wls.AsyncQueue</local-jndi-name>
    <remote-jndi-name>AsyncQueue.LOCAL.prgdwm355410.7001</remote-jndi-name>
    </foreign-destination>
    <foreign-connection-factory name="FTQueueConnectionFactory">
    <local-jndi-name>ServiceLocatorAsyncQueueFactory</local-jndi-name>
    <remote-jndi-name>FTQueueConnectionFactory</remote-jndi-name>
    </foreign-connection-factory>
    <initial-context-factory>cz.jaksky.common.jms.JMSInitialContextFactory</initial-context-factory>
    <connection-url>tcp://JUSD-FTPOIA.jaksky.com:22542,tcp://JUSD-FTPOB.jaksky.com:22543</connection-url>
    </foreign-server>
    Module containing this MDB is packed as an ear file with following structure:
    APP-INF/lib/modules.jar - contains AsynchronousRequestMessageBean class
    APP-INF/lib/interface.jar - contains JMSInitialContextFactory (class used for initial-context-factory)
    portfolio-async.jar
    META-INF/ejb-jar.xml content pasted above
    META-INF/webogic-ejb-jar.xml content pasted above
    Weblogic system classpath doesn't contain any application sepcific libraries.
    This set up was working for weblogic 9 without any problem. I am just wondering what the problem is whether I am faceing class loading issue or JMS configuration issue and how to resolve it.
    Edited by: user13047709 on 18-Sep-2012 07:15
    Edited by: user13047709 on 18-Sep-2012 07:16

    Hi,
    When working with a non-WebLogic JNDI provider (or a non-WebLogic JMS provider), the non-WebLogic client classes must be made available to the classloader of the calling application in WebLogic Server. This is usually accomplished by adding them to the system classpath.
    In your case, WebLogic is looking for a proprietary/foreign JNDI Context Factory class named "cz.jaksky.common.jms.JMSInitialContextFactory", which means you need to make sure that a jar/dir that contains the non-WebLogic class "JMSInitialContextFactory.class" is in the classpath.
    The configuration for this should be similar in WL9 and WL10. It could be that your classpath is already setup to reference the foreign class, but it refers to a directory/jar that you haven't setup yet on your WL10 host.
    HTH,
    Tom

  • Initial Context Factory

    Hi
    I am trying to develop a EJB Project and trying to call the EAR depployed on the server using JNDI.
    I am writing the code using Java Client
    Can i have the name of Initial Context Factory for WAS 6.40.
    Its Urgent
    With Wishes
    Krishna Kanth

    Hi,
    the Initial context factory on Web AS 6.40 is
    com.sap.engine.services.jndi.InitialContextFactoryImpl

  • How to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    how to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    Hi ,
     Have you got any additional public IP Address from your service provider , If yes on router you can have static route for those additional IP Address pointing to your ASA  outside interface . 
    Accordingly you can configure NAT 
    HTH
    Sandy . 

  • How to configure SingleSignOn between GRC and BOBJ 4.1

    How to configure SingleSignOn between GRC and BOBJ 4.1?
    We have configured the System entitlement in BOBJ CMC. But didn't do anything on the GRC system.
    User can login from BOBJ to GRC with password but not with SSO.
    We haven't configured SNC . I don't this for this simple flow, we need to have SNC.
    We haven't set up the Trust certificate exchange as well between BOBJ and GRC.
    Please help us to know what are the mandatory settings need to be done to create a Relational connection for a ERP/GRC system  from BOBJ client tool IDT?
    thanks,
    Tilak

    How to configure SingleSignOn between GRC and BOBJ 4.1?
    We have configured the System entitlement in BOBJ CMC. But didn't do anything on the GRC system.
    User can login from BOBJ to GRC with password but not with SSO.
    We haven't configured SNC . I don't this for this simple flow, we need to have SNC.
    We haven't set up the Trust certificate exchange as well between BOBJ and GRC.
    Please help us to know what are the mandatory settings need to be done to create a Relational connection for a ERP/GRC system  from BOBJ client tool IDT?
    thanks,
    Tilak

  • How OSB pass Initial Context parameters to EJB

    For security reasons I have to pass a ticket (through initial context) to legacy system from OSB for calling EJB, below is a code
    Hashtable env = new Hashtable(2);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, connectionUrl);
    env.put(javax.naming.Context.SECURITY_PRINCIPAL, ticket);
    env.put(javax.naming.Context.SECURITY_CREDENTIALS, "");
    InitialContext ctx = new InitialContext(env);
    Object homeRef = ctx.lookup("com.cih.services.contact.interfaces.IContactServiceRemote");
    IContactServiceRemoteHome home = (IContactServiceRemoteHome) javax.rmi.PortableRemoteObject
    .narrow(homeRef, IContactServiceRemoteHome.class);
    IContactServiceRemote ejb = home.create();
    Please let me know how we can pass Initial context parameter from Business service or proxy service to legacy system.
    Thanks

    Hi Russ
    Yes, I've done this too. Basic SQL though will not allow the updating of a table inside a function, so we have to get clever. The trick is to use the PRAGMA AUTONOMOUS TRANSACTION command. Here's an example:
    FUNCTION UPDATE_MYTABLE(P_VALUE IN NUMBER)
    RETURN VARCHAR2 IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    UPDATE SCHEMA_OWNER.MY_TABLE SET MY_VALUE = P_VALUE;
    COMMIT;
    RETURN('Done');
    END UPDATE_TABLE;
    When the update has been completed the Discoverer worksheet will respond with 'Done'.
    Everyone: don't forget to grant EXECUTE on this function to all of the necessary users, including the EUL owner, and also don't forget to import the function using the Admin edition so that it is available for the users. You will also need to make sure that all necessary users have been granted the UPDATE privilege on the table.
    I hope this helps
    Regards
    Michael

  • How to get Initial context of Local Interface in weblogic 8.1

    I have developed a local entity bean but i wouldnt able to initial context of that bean
    CAN ANYBODY HELP ME
    bean deployment descriptor
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!--
    ** This file was automatically generated by EJBGen 2.16
    ** Build: 20031001-1049
    -->
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CabinBean</ejb-name>
    <home>my.CabinRemoteHome</home>
    <remote>my.CabinRemote</remote>
    <ejb-class>my.CabinBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinBean</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    <entity>
    <ejb-name>CabinLocal</ejb-name>
    <local-home>my.CabinLocalHome</local-home>
    <local>my.CabinLocalLocal</local>
    <ejb-class>my.CabinLocal</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinLocal</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>LocalCabin</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>CabinLocalHome</local-home>
    <local>CabinLocal</local>
    <ejb-link>LocalCabin</ejb-link>
    </ejb-local-ref>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>CabinLocal</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>CabinBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    <ejb-client-jar>EjbClient</ejb-client-jar>
    </ejb-jar>
    ************************************** Client Code****************
    package com;
    import my.CabinBean;
    import my.CabinRemoteHome;
    import my.CabinRemote;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import weblogic.jndi.Environment;
    public class Test
        public static void main(String args[])
            try{
                 Context context = getInitialContext();
                          Object cab = context.lookup("CabinLocalHome");
                ///**********-- Exception is thrown at this point -******************
                System.out.println("============ done====");
                Context ct = getInitialContext();
                Object ref = ct.lookup("CabinHomeRemote");
                CabinRemoteHome home = (CabinRemoteHome)PortableRemoteObject.narrow(ref,CabinRemoteHome.class);
                //CabinRemote cab = home.create(new Integer(1));
                //cab.setName("Master Suite");
                //cab.setDeckLevel(new Integer(1));
                //cab.setShipId(new Integer(1));
                //cab.setBedCount(new Integer(1));
                Integer pk = new Integer(1);
                CabinRemote cab1 = home.findByPrimaryKey(pk);
                System.out.println("--->>>>>>>> "+cab1.getName());
                System.out.println("--->>>>>>>>  "+cab1.getShipId());
                System.out.println("--->>>>>>>>"+cab1.getBedCount());
                System.out.println("--->>>>>>>>"+cab1.getDeckLevel());
                System.out.println("---");  
          }catch(java.rmi.RemoteException e){e.printStackTrace();}
           catch(javax.naming.NamingException e){e.printStackTrace();}
           //catch(javax.ejb.CreateException e){e.printStackTrace();}
           catch(javax.ejb.FinderException e){e.printStackTrace();}
        public static Context getInitialContext() throws javax.naming.NamingException
           Properties p = new Properties();
           p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
           p.put(Context.PROVIDER_URL,"t3://localhost:7001");
           return new javax.naming.InitialContext(p);
    } ************************************** Error ***********************
    javax.naming.LinkException: [Root exception is javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null']; Link Remaining Name: 'java:app/ejb/myejb.jar#CabinLocal/local-home'
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.Test.main(Test.java:27)
    Caused by: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null'
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:98)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:771)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
         at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)

    Hi,
    from what I gather, u have two jars
    1. EJBClient - this will have remote and home interfaces and will be used by the client
    2. myEJB - this iwll have all the classes - remote & home interfaces, the bean class and all the other classes required by the bean.
    Now, the question is, who is acting as the client of your EJB ? There are 3 possibilities
    1. A servlet
    2. Another EJB
    3. a simple java program.
    In the first 2 cases, you can go for Local Interfaces (more so in the second case than the first). The reason being that the the client and server will be in the same JVM. Thus, in the first case, if the Web container and the ejb container are in the same app server, EJBs can be local.
    However, in the third case, it is unlikey that you will have the client runnng and the same jvm as the server, because the server is using the jvm provided by weblogic.
    Thus, you cannot use local interfaces in this 3rd case. I have a feeling that this is what you are doing. If so, change the local interfaces to remote.
    See if this helps. Else, I will mail you some sample code. But I am afraid, sample code wont be of much help bcoz this seems to be a design problem.
    regards

  • How to configure link between 2921 and SM-D-ES3G-48-P EtherSwitch Service Module

    hi,
    I can't do that like the procedure given by Cisco.
    http://www.cisco.com/en/US/partner/docs/routers/access/interfaces/software/feature/guide/eesm_sw.html#wp1942894
    Cisco Procedure :
    interface gi10/0
    ip address x.x.x.x x.x.x.x
    service-module gigabitethernet 1/0 session
    My result :
    R2921-8CPITR-1(config)#int gi 1/1
    R2921-8CPITR-1(config-if)#ip address 2.2.2.2 255.255.255.192
    % IP addresses may not be configured on L2 links.
    R2921-8CPITR-1(config-if)
    R2921-8CPITR-1(config)#interface gigabitEthernet 1/1.1 ?
    % Unrecognized command
    R2921-8CPITR-1(config)#interface gigabitEthernet 1/1 ?
      <cr>
    R2921-8CPITR-1(config)#
    the session is not possible also ?
    R2921-8CPITR-1#service-module gigabitEthernet 1/1 sess
                                                      ^
    % Invalid input detected at '^' marker.
    R2921-8CPITR-1#
    The routeur said that it's not a L3 port, so how to configure it to allow communication between the 2921 and the card ?
    Is there a bug with that version I'm in 15.1(4)M4 ????
    R2921-8CPITR-1#sh ver
    Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2012 by Cisco Systems, Inc.
    Compiled Tue 20-Mar-12 18:57 by prod_rel_team
    ROM: System Bootstrap, Version 15.0(1r)M15, RELEASE SOFTWARE (fc1)
    R2921-8CPITR-1 uptime is 19 hours, 21 minutes
    System returned to ROM by power-on
    System restarted at 16:00:45 GAB Fri Sep 14 2012
    System image file is "flash0:c2900-universalk9-mz.SPA.151-4.M4.bin"
    Last reload type: Normal Reload
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected].
    Cisco CISCO2921/K9 (revision 1.0) with 479232K/45056K bytes of memory.
    Processor board ID FGL1618119E
    6 Gigabit Ethernet interfaces
    2 terminal lines
    DRAM configuration is 64 bits wide with parity enabled.
    255K bytes of non-volatile configuration memory.
    250880K bytes of ATA System CompactFlash 0 (Read/Write)
    License Info:
    License UDI:
    Device#   PID                   SN
    *0        CISCO2921/K9          FGL1618119E
    Technology Package License Information for Module:'c2900'
    Technology    Technology-package           Technology-package
                  Current       Type           Next reboot
    ipbase        ipbasek9      Permanent      ipbasek9
    security      None          None           None
    uc            None          None           None
    data          None          None           None
    Configuration register is 0x2102
    R2921-8CPITR-1#

    Same issue here.
    I just waited a few minutes and the interface went down and back up, this time it was a L3 interface.
    My guess is that it was booting the switch module IOS, and it detected it until it was fully booted:
    Apr 11 05:26:52.091: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to down
    Apr 11 05:26:52.091: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to down
    Apr 11 05:26:52.091: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to down
    Apr 11 05:26:52.091: %LINK-3-UPDOWN: Interface GigabitEthernet1/0, changed state to up
    Apr 11 05:26:52.795: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
    Apr 11 05:26:53.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down
    Apr 11 05:26:53.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
    Apr 11 05:26:53.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
    Apr 11 05:26:53.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0, changed state to up
    Apr 11 05:27:46.895: %LINK-5-CHANGED: Interface Embedded-Service-Engine0/0, changed state to administratively down
    Apr 11 05:27:46.895: %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down
    Apr 11 05:27:46.947: %LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to administratively down
    Apr 11 05:27:47.031: %LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down
    Apr 11 05:27:47.083: %LINK-5-CHANGED: Interface GigabitEthernet1/0, changed state to administratively down
    Apr 11 05:27:47.895: %LINEPROTO-5-UPDOWN: Line protocol on Interface Embedded-Service-Engine0/0, changed state to down
    Apr 11 05:27:48.083: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0, changed state to down
    Apr 11 05:27:49.283: %IP-5-WEBINST_KILL: Terminating DNS process
    Apr 11 05:27:52.499: %LINK-3-UPDOWN: Interface GigabitEthernet1/1, changed state to up
    Apr 11 05:27:53.087: %SYS-5-RESTART: System restarted --
    Cisco IOS Software, C2951 Software (C2951-UNIVERSALK9-M), Version 15.1(4)M5, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2012 by Cisco Systems, Inc.
    Compiled Tue 04-Sep-12 16:50 by prod_rel_team
    Apr 11 05:27:53.255: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing a cold start
    Apr 11 05:27:53.499: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up
    Apr 11 05:28:21.435: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
    Apr 11 05:29:22.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
    Apr 11 05:29:22.095: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
    Router>en
    Router#sh ip int brief
    Interface                  IP-Address      OK? Method Status                Protocol
    Embedded-Service-Engine0/0 unassigned      YES unset  administratively down down
    GigabitEthernet0/0         unassigned      YES unset  administratively down down
    GigabitEthernet0/1         unassigned      YES unset  administratively down down
    GigabitEthernet0/2         unassigned      YES unset  administratively down down
    GigabitEthernet1/0         unassigned      YES unset  administratively down down
    GigabitEthernet1/1         unassigned      YES unset  up                    down
    Vlan1                      unassigned      YES unset  down                  down
    Router#
    Apr 11 05:29:46.106: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to upconf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#int g1/0
    Router(config-if)#ip add 1.1.1.1 255.255.255.0
    Router(config-if)#no shut
    Router(config-if)#
    Apr 11 05:30:09.046: %LINK-3-UPDOWN: Interface GigabitEthernet1/0, changed state to up
    Apr 11 05:30:10.046: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0, changed state to up
    Router(config-if)#end

  • How to  configur hibernate in NetWeaver and how to use   in NETWEAVER

    Hi,
    Now i am useing Ejb's for my application in NetWeaver .
    Can i use hibernate instead of Ejb's in NetWeaver.
    if Ok,please tell me the procedure for how to configur hibernate and how to use.
    Thanqqqqqqq
    Guru

    You should read this documents first:
    Using Hibernate on SAP WAS - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2ae0614a-0601-0010-a491-a9a635f06613
    Hibernate on SAP NetWeaver - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/14f55178-0801-0010-0bac-974ed17e51d3
    and then considering integration of your app with DAO design pattern proposed by Spring Framework. More on this is available here:
    Spring Integration on SAP NetWeaver - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/73af6078-0801-0010-8fa1-deaa9647c5dd
    and here: http://static.springframework.org/spring/docs/1.2.x/reference/orm.html#orm-hibernate
    Regards,
      Marcin Zduniak

  • How to configure itune to speaker and other sounds effect to internal speak

    as subject, how to configure itune to speaker while other sound effects to internal speaker, i done it before, but cannot remember how to configure it, thanks.

    after upgrading to 10.5.6, it work by setting sound effect plays on "internal speaker" while sound plays on "line-out"
    thanks everyone.

  • App client can't instantiate the initial context factory

    hi
    i wrote an application client and a stateless session bean that i deployed with the deploytool from sun to the j2ee application server. now when i start my application client i get the following message:
    NoInitialContextException: Cannot instantiate class: COM.sun.enterprise.naming.SerialInitContextFactory. Root exception is java.lang.ClassNotFoundException: COM.sun.enterprise.naming.SerialInitContextFactory
    at java.net.URLClassLoader$1.run
    my jndi.properties looks like this:
    java.naming.factory.initial=COM.sun.enterprise.naming.SerialInitContextFactory
    java.naming.factory.url.pkgs=COM.sun.enterprise.naming
    and my server runs on the same computer as the client. the classpath variable is set to the j2ee.jar file ( and this file contains the selected initial factory ). i could not understand why i get this errormessage. has anyone a idea?

    thanks to all
    now i got it working. i'm using the orion application server and to get access from a remote computer ( outside the application server ) i have to set the environment properties in the following way:
    Properties prop = new Properties();
                        prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
                        prop.put(Context.PROVIDER_URL,"ormi://localhost/TestBean02");
                        prop.put(Context.SECURITY_PRINCIPAL,"admin");
                        prop.put(Context.SECURITY_CREDENTIALS,"123");
    InitialContext initial = new InitialContext(prop);
    Object objref = initial.lookup("MyBeanel");
    home = (TestBeanHome)PortableRemoteObject.narrow(objref, TestBeanHome.class);
    this works, the client needs only the j2ee.jar and the orion.jar in the classpath.

  • How to configure Goto context menu function on the web?

    We are running a web template on IE browser.  After the report run successfully, left click on any key figure column, we can see Goto context menu, from here, we can go to detailed report (e.g. from the current Cube level to more detailed ODS level).  However we find this jump from cube level to ODS level (Goto context manu) works on our QA system other than DEV system.  
    These stuff were configured by SAP consultants who left our company one year ago, if anyone knows how to make the Goto context menu works by drilling down from cube level to ODS level, please let us know and we are really appreciated!

    dear Bhanu,
    We figured out the problem, it is because we click Goto then select "Display Documents" which yields a 400 error, then go back to click Goto, pick up the target link we want and it yield the error.  After we hit F5 to reload the URL link, then directly select Goto our target, then it works fine!
    But one more question, under Goto context menu, we find four menu context items:
    1. Display Documents
    2. Documents for Navigation Status
    3. Our application target1
    4. Our application target2
    Select option 1 yields an error like mentioned above.
    Select option 2 pops up a new window with Key Figure selection box and a button called "Additional Functions", but seems go nowhere.
    Option 3 is setup in our system by using RSBBS like you suggested.
    Option 4 is not in RSBBS.
    Then our questions are for option 1, 2, and 4.  What are the functionalities of option 1 and 2, are these two standard web functionalities of BW web reports? and these two options always show up on the web no matter whether they work or not, right?  We are confused with option 4, it's not listed in RSBBS, then how come it show up?

  • How to configure Crystal Reports 2008 and IIS7 and Windows Server 2008?

    I have downloaded and installed the trial for Crystal Reports 2008 on our Windows 2008 server.  I can open Crystal Reports on the server just fine, but I get HTTP 500 errors when I attempt to view a report hosted on that server via the web.
    As far as I can tell, the handler mappings in IIS7 are not configured properly, although I confirmed that the Crystal Reports 2008 install did add several handlers.  I read that I must configure the application pool to enable 32-bit applications.  I did that and am still getting the same error.  Documentation seems sparse and I've spent the better part of the day searching the forum here with no luck.  What am I missing?

    Don,
    Thank you for the quick response!
    We will ultimately be using ASPX/C#, but this simple case has a very basic report with no databind, just a single text label that reads "test succeeded" and I'm attempting to access it by direct URL (i.e. "http://192.168.99.21/crystalreportviewers12/test.rpt").  This works on our Windows 2000 server running Crystal Reports 8.
    I've also tested with a simple test.aspx file with only the line "Response.Write(System.DateTime.Now.ToString())" and that works just fine.  This file is in the same folder as the test.rpt file.
    If I leave the Application Pool set for the "Integrated" managed pipeline mode, I continue to get a rather generic "500 - Internal server error".  If I switch it to "Classic", I get the following error:
    Failed to Execute URL.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.HttpException: Failed to Execute URL.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
    Stack Trace:
    [HttpException (0x80004005): Failed to Execute URL.]
       System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) +2004965
       System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +390
       System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +223
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8674594
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

  • How to configure ODI for server and client correct?

    Hi forum,
    this is my first post and i hope you guys can help me out ...
    i
    am new to ODI and WLS and in my case ODI need to run on a server where a couple of clients can connect to, work on the same project with their own workspaces and accounts.
    The database will be located on the same server.
    As far as i understood, i need to install the the ODI Java EE type (not the standalone type) with a WLS ?!
    iI already nstalled
    JDK 6u41 (x64),
    ODI 11g (11.1.1.6, generic),
    Oracle DB 11g R2 enterprise and
    WebLogic 11g (10.3.6, generic)
    on the Server and now i am trying to connect to the ODI repositories from a client with an ODI standalone installation.
    I am now trying to insert a Data Source into the physical agemt (not even sure if i need to do this in my case).
    Following these instructions (http://docs.oracle.com/cd/E17904_01/integrate.1111/e12643/setup_topology.htm#CHDHJBAD) i get an ODI-26029 error.
    Below are some configuration information of the software i installed.
    h3. ODI
    Installation:
    Installationtype: full
    Oracle home directory: Oracle_ODI1
    Agent name: odi_agent
    Agent port: 1987
    Repositories/connection:
    Master repository user = odim
    Work repository user = odiw
    Work repository name = WORKREP1
    JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
    *odim and odiw have been created manually with grant options on connect and resource
    Physical agent (with no datasource defined):
    Name = OracleDIAgent
    Host = localhost
    Webapplicationcontext = oraclediagent
    Port = 8001
    Protocol = http
    Physical data server:
    Name = oracle_db_11gr2
    User = odiw
    JDBC connection string = jdbc:oracle:thin:@localhost:1521:orcl
    Physical schema:
    Schema (schema) = ODIW
    Schema (work schema) = ODIW
    Context = aMIS_dev
    Logical schema = oracle_db_11gr2
    Logiacal schema
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Context:
    Name = aMIS_dev
    Logical agent = OracleDIAgent
    Physical agent = OracleDIAgent
    Logical schema = oracle_db_11gr2
    Physical schema = oracle_db_11gr2.ODIW
    Logical schema:
    Name = oracle_db_11gr2
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Logical agent
    Name = OracleDIAgent
    Context = aMIS_dev
    Physical Agent = OracleDIAgent
    h3. Oracle DB 11g R2
    Installation
    Global database name = orcl.otera.local
    SID = orcl
    h3. WebLogic 11g:
    +1. generate new basic WebLogic Server domain+
    Domainname = ODI-DOMAIN
    Admin name = weblogic
    Admin server name = AdminServer
    Listening port = 7001
    Managed server name = odi_server1
    Managed server port = 8001
    +2. extend an existing WebLogic domain+
    Choose extension source: ODI - Agent, ODI - Agent Libraries, Oracle JRF
    Window: Configure JDBC compontent schema:
    Driver = Oracle's Driver (Thin) for Instance connection; Versions: 9.0.1 and higher
    Schema owner = odim
    DBMS/Service = orcl
    Hostname = localhost
    Port = 1521
    Client name = LocalODIMachine
    Listening address of the accountmanager = localhost
    Listening port of the accountmanager = 5556
    Really hope you guys can help me quick.
    Thanks in advance

    Hi DecaXD,
    thank you for quick response :)
    on the client site i tried to establish the connection to the work repository with the following connection information:
    Login information*:
    Oracle Data Integrator Connection
    Login name = odi_server
    User = SUPERVISOR
    Database connection (Master Repository):
    User = odim
    URL = jdbc:oracle:thin:@<server ip>:1521:orcl
    A work repository could be found, but the connection failed! (?!)
    " ODI-26130: Connection to the repository failed.
    oracle.odi.core.config.NotWorkRepositorySchemaException: ODI-10147: Repository type mismatches.     
    Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Invalid SQL-Query for validating the connection (+translated from german into english+) "
    my ODI configuration on the server site (loged in as: odiw):
    topology tab*:
    Physical architecture:
    Technology:
    Definition:
    Dataserver name = oracle_db_11gr2
    User = odiw
    JDBC-URL = jdbc:oracle:thin:@10.168.178.131:1521:orcl
    Datasource:
    Agent = OracleDIAgent
    JNDI-Name = [DataSourceName]
    Agents:
    Definition:
    Name = OracleDIAgent
    Host = <IP of the server>
    Port = 8001
    Webapplicationcontext = oraclediagent
    Datasources:
    Dataserver = oracle_db_11gr2
    JNDI-Name = [DataSourceName]
    Logical architecture:
    Technology:
    Defintion:
    Name = oracle_db_11gr2
    Context = aMIS_dev
    Physical schema = oracle_db_11gr2.ODIW
    Agent:
    Name = OracleDIAgent
    Context = aMIS_dev
    Physical agent = OracleDIAgent
    when i test the connection of the data server (topology>physical architecture>technology>oracle>oracle_db_11gr2) with the OracleDIAgent i receive the
    " ODI-26039: Connection failed.
    oracle.odi.runtime.agent.invocation.InvocationException: javax.naming.NameNotFoundException: Unable to resolve '[DataSourceName]'. Resolved ''; remaining name '[DataSourceName]' "
    since testing the connection on the server site failed in first place, i couldn't test the connection on the client site.

  • How to configure SSL in tomcat and transfer data through HTTPS.

    Hi all,
    I hav an urgent requirement for transfering data through HTTPS.But hav no idea how to achieve that,using SSL.
    For that i have to configure tomcat.What and all i hav to do
    download and which and all files i hav to alter for configuring the tomcat.
    seeking for ur help,
    thank you

    Multi-posted.
    http://forum.java.sun.com/thread.jspa?threadID=591116&messageID=3079266#3079266
    http://forum.java.sun.com/thread.jspa?threadID=591062&messageID=3078566#3078566
    http://forum.java.sun.com/thread.jspa?threadID=590987&messageID=3077736#3077736

Maybe you are looking for

  • Historical data download to flash file

    Hi , I have a program that I wish to have access stock market data on demand. I am not sure as to how to go about coding the request to get the data(say from Yahoo). At the moment I have MIME format Text files that I access through Flash.(after cut a

  • How can I uninstall an app from my iPad?

    How can I uninstall a game app from my iPad?

  • Apples earphones - stereo or mono??

    I got the standard apple earphones with my iPod but am just starting to experiment with brand earphones. It seems to me that the apple ones are really producing in mono and not stereo. Can anyone confirm that? or is the quality just not very good.

  • N8 Can I set a time duration on Profiles?

    Is there a way to set the duration of a Profile? Whenever I put it on Silent, I usually forget to set it back to General! 

  • SAPinst using root dir whec sapcar extracting files - hp-ux

    I've been doing lots of hp.ux+oracle installations, but I'm facing a new problem. Im running sapinst and using and x-server for it.   The thing is that i'm receiving this error in step 4 of installation:  SAPCAR: error writing to /usr/sap/DEV/SYS/exe