ClasCastException looking up ConnectionFactory

Hi
I am using WebSphere Application Server 6 and configured the default message queue and tested the JNDI entries using dumpNameSpace.
While executing the following code.
Hashtable env=new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"iiop://localhost:2809");
InitialContext jndiContext = new InitialContext(env);
Object obj=jndiContext.lookup("jms/ConnectionFactory");ConnectionFactory factory =(ConnectionFactory)PortableRemoteObject.narrow(obj,ConnectionFactory.class);
I am getting the following exception in the Connectionfactory lookup
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:294)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:373)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
Caused by: java.lang.ClassCastException
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:82)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:97)
at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:73)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:285)
Can anybody say what is the problem ?

What is your client envrionment configuration ? I mean are you trying to access the queue from outside WAS server ? If yes which JDK , is it Sun ?
If answers to above is yes, you need to include certain IBM jars, ones that come with IBM pluggable client.
The exception that you are facing, comes when clients runs under non IBM JDK environment(or your classpath is not setup correctly). You need to specify the ORB class property to point to IBM orb implementation using following setting on InitialContext
env.put("org.omg.CORBA.ORBClass","com.ibm.CORBA.iiop.ORB");
Hope that helps.

Similar Messages

  • Exception while looking up ConnectionFactory in jms

    hi all
    i have been trying to implement a simple jms program. am able to compile it. but while running it is throwing up an exception. am including the stack trace. please help
    thanx in advance.
    stack trace
    Queue name is MyQueue
    jndicontext created
    looking up MyConnectionFactory
    Feb 16, 2007 8:14:20 PM com.sun.corba.ee.spi.logging.LogWrapperBase doLog
    INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/2287"
    Feb 16, 2007 8:14:21 PM com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
    WARNING: "IOP00810211: (MARSHAL) Exception from readValue on ValueHandler in CDRInputStream"
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6845)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
         at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
         at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:559)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:739)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:226)
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:422)
         at javax.rmi.CORBA.Util.readAny(Util.java:92)
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:133)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:62)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at JmsSender.main(JmsSender.java:103)
    Caused by: java.io.IOException: Mismatched serialization UIDs : Source (Rep. IDRMI:com.sun.enterprise.deployment.ConnectorDescriptor:3766355A7E731D05:1C886CB59213196B) = 1C886CB59213196B whereas Target (Rep. ID RMI:com.sun.enterprise.deployment.ConnectorDescriptor:F4819DFF363CE47D:B379ED3E9C5AAF20) = B379ED3E9C5AAF20
         at com.sun.corba.ee.impl.util.RepositoryId.useFullValueDescription(RepositoryId.java:576)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.useFullValueDescription(ValueHandlerImpl.java:391)
         at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:397)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
         ... 20 more
    Feb 16, 2007 8:14:21 PM com.sun.enterprise.naming.SerialContext lookup
    SEVERE: NAM0004: Exception during name lookup : {0}
    java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:62)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at JmsSender.main(JmsSender.java:103)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6845)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
         at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
         at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:559)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:739)
         at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:226)
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:422)
         at javax.rmi.CORBA.Util.readAny(Util.java:92)
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:133)
         ... 9 more
    Caused by: java.io.IOException: Mismatched serialization UIDs : Source (Rep. IDRMI:com.sun.enterprise.deployment.ConnectorDescriptor:3766355A7E731D05:1C886CB59213196B) = 1C886CB59213196B whereas Target (Rep. ID RMI:com.sun.enterprise.deployment.ConnectorDescriptor:F4819DFF363CE47D:B379ED3E9C5AAF20) = B379ED3E9C5AAF20
         at com.sun.corba.ee.impl.util.RepositoryId.useFullValueDescription(RepositoryId.java:576)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.useFullValueDescription(ValueHandlerImpl.java:391)
         at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:397)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
         at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
         at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
         ... 20 more
    Feb 16, 2007 8:14:21 PM com.sun.enterprise.naming.SerialContext lookup
    SEVERE: NAM0004: Exception during name lookup : {0}
    com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to look up ConnectorDescriptor from JNDI
         at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:68)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at JmsSender.main(JmsSender.java:103)
    JNDI API lookup failed: javax.naming.CommunicationException: serial context communication ex [Root exception is com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to look up ConnectorDescriptor from JNDI]

    hey also jms ping fails in admin console..could this be the problem..how do i set it right...thanx for ur time..

  • WLS 8.1 an the XAResource interface

    Hi I wonder if someone could advise me
              I've created a remote JMS client which is using a third party transaction manager to manage an XA global transaction consisting of many JMS Queue from various WLS servers.
              My problem comes when I try to gain an XAResource from the underlying JMS Queues (needed to enlist them in the overall transaction).
              I take an javax XAQueueSession object which points to a JMS Queue on a WLS 8.1 server and try to invoke the .getXAResource() method to produce the javax XAResource. The problem is it keeps returning me a null pointer.
              the creation of the XAQueueSession is built up in this manner
              1.) Look up connectionFactory from context, cast to an XAQueueConnnectionFactory
              2.) XAQueueConnnectionFactory produces an XAQueueConnection
              3.) XAQueueConnection creates an XAQueueSession
              4.) XAQueueConnection is then started
              5.) XAQueueSession is used to gain an XAResource which produces a null pointer
              Question
              -=-=-=-=-=-=
              1) Does WLS 8.1 support the Javax XAResource interface? if it does is it possible to get an XAResource object from the XAQueueSession?
              Any comments on these quesions would be useful
              Kind Regards
              Barry

    Since WLS JMS is clustered, it's a little more complex, because once you start two-phase commit transactions, you need to always go back to the same server in the cluster to resolve them.
              The best-documented way to do this is to use the weblogic.transaction package, which is part of the Javadocs found here:
              http://e-docs.bea.com/wls/docs81/javadocs/index.html
              You need to call the following method from the weblogic.transaction package:
              TxHelper.getClientInterposedTransactionManager()
              This takes a JNDI InitialContext, and also a server name. Once you "prepare" a transaction, you'll have to go back to that server to commit it or roll it back.
              The InterposedTransactionManager object that's returned represents the JTA transaction manager on the server that you named. You can call "getXAResource" on it to get the XAResource that you'll need.
              You will also want to route your JMS calls from your client through the server that you got the transaction manager for. If you don't have a cluster, this is pretty simple. If you have a cluster, then you should create a JMS ConnectionFactory that's targeted to a single server, so that your client calls and your XA calls go to the same node in the cluster.
              The folks on the JTA newsgroup, or BEA Support, should be able to help you with the details if things don't work out, but those are the basics.

  • JCA - Resource adapter information in ManagedConnectionFactory

    Hi,
    I am developing a Outbound Resource Adapter. Is there any way to get the Resource Adapter Object associated in ManagedConnectionFactory Implementation? Or is there a means by which we can pass on the configuration
    data (Like user name, password) to ManagedConnectionFactory at start up of Resource Adapter. This is particularly
    needed when we configure some initial no of connections in a connection pool at start up.
    Thanks for any information.
    Abhijit

    Hi Abhijit,
    as the api shows a connection can be established by passing an instance of javax.resource.cci.ConnectionSpec. The interface itself provides no method, so you have to specify them on your own like setUserName(String name) and setPassword(String pw).
    Client code should look like:
    ConnectionFactory cf = ...; // jndi lookup
    ConnectionSpecImpl connSpec = new ConnectionSpecImpl();
    connSpec.setUserName("myName");
    connSpec.setPassword("myPassword");
    Connection conn = cf.getConnection(connSpec);
    Internally the connSpec instance should be passed by the factory to the pooling instance.

  • Looking up Managed ConnectionFactory by JNDI Resource-Ref

    Thank you in advance for your help...
    I'm writing an Enterprise Java Bean using WebLogic Workshop that needs
    to access a connection factory defined in a deployed Resource Adapter.
    I'm trying to access the server managed connection factory through the
    use of a resource-reference defined in the EJB file.
    The resource ref is defined in the EJB header:
    * @ejbgen:resource-ref
    * sharing-scope="Shareable"
    * auth = Container
    * jndi-name = Target_7
    * name = db/cf/Target
    * type = javax.resource.cci.ConnectionFactory
    * @ejbgen:session type="Stateless" default-transaction="NotSupported"
    * ejb-name = "UberPhoneBook"
    * @ejbgen:jndi-name
    * remote = "ejb.UberPhoneBookRemoteHome"
    * @ejbgen:file-generation remote-class = "true" remote-class-name =
    "UberPhoneBookRemote" remote-home = "true" remote-home-name =
    "UberPhoneBookHome" local-class = "false" local-class-name =
    "UberPhoneBookLocal" local-home = "false" local-home-name =
    "UberPhoneBookLocalHome"
    And the lookup is done in the EJB code:
    private void initialize() {
    if( this.initialized ) return;
    try {
    // Lookup the ConnectionFactory we should be using
    InitialContext initCntx = new InitialContext();
    ConnectionFactory cf = (ConnectionFactory) initCntx.lookup(
    "db/cf/Target" );
    this.conn = (Connection) cf.getConnection();
    this.initialized = true;
    } catch( Exception e ) {
    throw new EJBException(e);
    But I'm running into problems. My lookup results in a Name Not Found
    Exception, and I can't find my resource reference in the JNDI namespace.
    I'm using the bean in a JSP page, and it is declared in the usebean tag.
    Any ideas what my problem could be coming from?
    Thanks,
    Chris M.

              Hi!
              Did you deploy your rar file? Which jndi name has the connector?
              If you use a reference try "java:comp/env/" as prefix. Would be helpful if you
              cut the passage about the reference from your ejb-jar.xml and weblogic-ejb-jar.xml
              file and post it.
              CU
              Chris
              

  • Looking for tips on a OC4J/JNDI lookup problem

    Hello All,
    I am running into a situation where a user I have setup in Oracle Enterprise Manager 10G Instance Level Security is not able to access our JNDI resources. We have tried providing all the roles(including administrators) to this user, but to no success. For some reason it works in standalone though.
    Our exception is fired when deploying the application and the spring configuration tells the app to fetch the jms connection factory from JNDI.
    Caused by: javax.naming.NoPermissionException: Not allowed to look up jms/ConnectionFactory, check the namespace-access tag setting in orion-application.xml for details
    +     at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:873)+
    +     at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337)+
    +     at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296)+
    +     at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278)+
    +     at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)+
    +     at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)+
    +     at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)+
    +     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)+
    +     at java.lang.Thread.run(Thread.java:595)+
    +     at com.evermind.server.rmi.RMICall.warningExceptionOriginatesFromTheRemoteServer(RMICall.java:109)+
    +     at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:91)+
    +     at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:425)+
    +     at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:233)+
    +     at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302)+
    +     at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:56)+
    +     ... 43 more+
    I wonder if there is a specific role that OC4J is looking for to allow the app to use JNDI? One thread I read earlier mentioned granting the user RMI permission. Any tips on where this could be configured?
    Our namespace section of the orion application xml file is below...
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="administrators" />
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    Any thoughts or recommendations for isolating and troubleshooting the problem would be highly appreciated.
    Many Thanks in Advance Guys!

    What Mylenium said. Although, perhaps with Forge Freeform and a huge amount of work, you might be able to fake it.

  • Cannot create TransactionParams of ConnectionFactory with WLST Offline

    Hello dear WL users and geeks,
    I'm trying to automate the creation of a weblogic domain using WLST Offline but I've got some problem with the configuration of a JMS ConnectionFactory : I don't know how to activate the XA-Connection factory setting.
    Ok, here is the WLST code, results and thoughs are in comments (##) :
    ==================
    ## I start with a fresh install of Oracle Weblogic Server 11g R1 (10.3.3) (also tried 10.3.1, same problem) and use the Configuration Wizard to
    ## create a new Weblogic domain using the default "Basic Weblogic server domain template".
    ## First, read the domain
    readDomain('Oracle/Middleware/user_projects/domains/base_domain/')
    ## Create a JMSServer
    create('MyJMSServer', 'JMSServer')
    assign('JMSServer', 'MyJMSServer', 'Server', 'AdminServer')
    ## Create a JMS Module
    create('TestModule', 'JMSSystemResource')
    ## And now a ConnectionFactory
    cd('/JMSSystemResource/TestModule/JmsResource/NO_NAME_0')
    fact=create('TestConnFactory', 'ConnectionFactory')
    fact.setJNDIName('someJNDIName')
    updateDomain()
    ## Ok, let's see what is defined :
    cd ('/JMSSystemResource/TestModule/JmsResource/NO_NAME_0/ConnectionFactory/TestConnFactory')
    ls()
    ## -rw- DefaultTargetingEnabled false
    ## -rw- JNDIName someJNDIName
    ## -rw- LocalJNDIName null
    ## -rw- Name TestConnFactory
    ## -rw- Notes null
    ## -rw- SubDeploymentName null
    ## Uh oh. Why are the 'directories' TransactionParams and SecurityParams missing ? How am I supposed to edit the TransactionParams ?
    ## Maybe there is a createTransactionParams method ?
    dir(fact)
    ## ['JNDIName', 'class', 'clientParams', 'defaultDeliveryParams', 'defaultTargetingEnabled', 'equals', 'flowControlParams', 'getClass',
    ## 'getClientParams', 'getDefaultDeliveryParams', 'getFlowControlParams', 'getInvocationHandler', 'getJNDIName', 'getLoadBalancingParams',
    ## 'getLocalJNDIName', 'getName', 'getNotes', 'getProxyClass', 'getSecurityParams', 'getSubDeploymentName', 'getTransactionParams',
    ## 'hashCode', 'isDefaultTargetingEnabled', 'isProxyClass', 'isSet', 'loadBalancingParams', 'localJNDIName', 'name', 'newProxyInstance', 'notes',
    ## 'notify', 'notifyAll', 'securityParams', 'setDefaultTargetingEnabled', 'setJNDIName', 'setLocalJNDIName', 'setName', 'setNotes',
    ## 'setSubDeploymentName', 'subDeploymentName', 'toString', 'transactionParams', 'unSet', 'wait']
    ## If I try to invoke any method related to transactionParams, I've got a null pointer exception
    ==================
    Ok, now I'll use the web admin console to edit the transaction parameters : I start the Weblogic Server and go to the web-based Administration console.
    In the Domain Structure tree, I go to base_domain > Services > Messaging > JMS Modules.
    Then I click on my 'TestModule' module and then on my 'TestConnFactory' Connection Factory.
    I go in the 'Transaction' tab and I enable the XAConnectionFactory checkbox.
    Finally, I click on the save button.
    Let's start a new WLST Offline session and see what's new :
    ==================
    ## Read the domain
    readDomain('Oracle/Middleware/user_projects/domains/base_domain/')
    ## Check what is defined in my ConnectionFactory
    cd ('/JMSSystemResource/TestModule/JmsResource/NO_NAME_0/ConnectionFactory/TestConnFactory')
    ls()
    ## Hey look, the TransactionParams appeared :
    ## drw- TransactionParams
    ## -rw- DefaultTargetingEnabled true
    ## -rw- JNDIName someJNDIName
    ## -rw- LocalJNDIName null
    ## -rw- Name TestConnFactory
    ## -rw- Notes null
    ## -rw- SubDeploymentName null
    ## Go in there :
    cd('TransactionParams/NO_NAME_0')
    ls()
    ## -rw- TransactionTimeout 3600
    ## -rw- XAConnectionFactoryEnabled                    true
    ==================
    So :
    - Why the TransactionParams setting is not directly created or available when a new ConnectionFactory is created ?
    - How can I create a JMS ConnectionFactory and edit its TransactionParams using only WLST Offline (i.e., without the admin console and without WSLT online) ?
    Any help appreciated,
    Thanks !

    Ok, I found a solution :
    =============
    cd ('/JMSSystemResource/TestModule/JmsResource/NO_NAME_0/ConnectionFactory/TestConnFactory')
    create('DUMMY', 'TransactionParams')
    ls('TransactionParams/NO_NAME_0')
    ## -rw- TransactionTimeout 0
    ## -rw- XAConnectionFactoryEnabled false
    =============
    But it seems strange to have to create a dummy TransactionParams. Is it the correct way to do it ?

  • ConnectionFactory createConnection()??

    Hi,
    I found the following on the J2EE tutorial on [http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html], Chapter 33.
    * Look up connection factory and destination. If either
    * does not exist, exit. If you look up a
    * TopicConnectionFactory or a QueueConnectionFactory,
    * program behavior is the same.
    ConnectionFactory connectionFactory = null;
    Destination dest = null;
    try {
      connectionFactory = (ConnectionFactory)
        jndiContext.lookup("jms/ConnectionFactory");
      dest = (Destination) jndiContext.lookup(destName);
    } catch (Exception e) {
      System.out.println("JNDI API lookup failed: " +
        e.toString());
      e.printStackTrace();
      System.exit(1);
    //// -------------Here's the problem----------
    Connection connection =
      connectionFactory.createConnection();
    Session session = connection.createSession(false,
      Session.AUTO_ACKNOWLEDGE);Looks like they are using some API other than JMS (maybe EJB) because there is no createConnection() method for javax.jms.ConnectionFactory.
    So.......how can we use standalone JMS without EJB?
    Edited by: imnd_neel on Dec 30, 2008 11:12 AM

    [http://java.sun.com/j2ee/1.4/docs/api/javax/jms/ConnectionFactory.html#createConnection()]
    ???

  • Looking up external JNDI (JBOSS Namely) from web applications.

    Hi,
    I am unable to look up names bound to JBOSS JNDI from external web apps.
    Dump of the JBOSS JNDI
    java: Namespace
    +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
    +- DefaultDS (class: javax.sql.DataSource)
    +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
    +- ABTestDS (class: javax.sql.DataSource)
    +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
    +- comp (class: javax.naming.Context)
    +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
    +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
    +- jaas (class: javax.naming.Context)
    | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
    | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
    | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
    +- timedCacheFactory (class: javax.naming.Context)
    Failed to lookup: timedCacheFactory, errmsg=null
    +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
    +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
    +- Mail (class: javax.mail.Session)
    +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
    +- TransactionManager (class: org.jboss.tm.TxManager)
    +- hibernate (class: org.jnp.interfaces.NamingContext)
    | +- SessionFactory (class: org.hibernate.impl.SessionFactoryImpl)
    Global JNDI Namespace
    +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
    +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
    +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
    +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
    +- console (class: org.jnp.interfaces.NamingContext)
    | +- PluginManager (proxy: $Proxy37 implements interface org.jboss.console.manager.PluginManagerMBean)
    +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
    +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
    +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
    +- topic (class: org.jnp.interfaces.NamingContext)
    | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
    | +- testTopic (class: org.jboss.mq.SpyTopic)
    | +- securedTopic (class: org.jboss.mq.SpyTopic)
    +- queue (class: org.jnp.interfaces.NamingContext)
    | +- A (class: org.jboss.mq.SpyQueue)
    | +- testQueue (class: org.jboss.mq.SpyQueue)
    | +- ex (class: org.jboss.mq.SpyQueue)
    | +- DLQ (class: org.jboss.mq.SpyQueue)
    | +- D (class: org.jboss.mq.SpyQueue)
    | +- C (class: org.jboss.mq.SpyQueue)
    | +- B (class: org.jboss.mq.SpyQueue)
    +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
    +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
    +- jmx (class: org.jnp.interfaces.NamingContext)
    | +- invoker (class: org.jnp.interfaces.NamingContext)
    | | +- RMIAdaptor (proxy: $Proxy36 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
    | +- rmi (class: org.jnp.interfaces.NamingContext)
    | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
    +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
    +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
    +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
    I have an external web application that has
    jndi.properties in the classpath -- JBOSS is running on localhost
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.provider.url=jnp://localhost:1099
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    web.xml for my external webapp
    <resource-ref>
    <res-ref-name>jdbc/ABTestDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref >
    <res-ref-name>hibernate/SessionFactory</res-ref-name>
    <res-type>net.sf.hibernate.SessionFacory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    Mycode:
    try {
    Context ctx = new InitialContext();
    sessionFactory = (SessionFactory) ctx.lookup("java:comp/env/hibernate/SessionFactory");
    } catch (ClassCastException cce) {
    throw new ServiceLocatorException(cce);
    } catch (NamingException ne) {
    throw new ServiceLocatorException(ne);
    I get a NamingException.
    Any hints would be really appreciated.
    thanks
    MH

    I have hte same question
    Hey DID you figure it out?
    let me know please
    maybe by email:
    [email protected]
    THANKS A LOT

  • ConnectionFactory - who does the load balancing

              Consider creating a connectionfactory (with server affinity unticked, load balancing
              ticked and using the message delivery policy of round robin) we then go on to
              create a distributed domain targetted at the cluster of two managed server's (managed1
              and managed2)
              If I create a simple java app that put's messages to that distributed destination,
              using the connectionfactory above, who's responsible for doing the load balancing.
              Does the client create the session knowing that the connectionfactory requires
              load balancing and thus takes the responsibility for it, or does the client just
              put a constant stream of JMS messages to the WLS and the connectionfactory class
              takes responsibility for the load balancing
              Who maintain's the delivery state, the client application or WLS (i.e who's job
              is it to look up the last messages queue destination?)
              

    Hi Barry,
              A JMS client's produced messages are first delivered to the WL server
              that hosts the client's JMS connection. The JMS connection
              host remains unchanged for the life of the connection.
              Once produced messages arrive on the connection host,
              they are load balanced to their JMS destination.
              For more information I suggest reading the clustering
              sections of the JMS Performance Guide white-paper. You can find
              the white-paper here:
              http://dev2dev.bea.com/technologies/jms/index.jsp
              Tom Barnes
              Barry Myles wrote:
              > Consider creating a connectionfactory (with server affinity unticked, load balancing
              > ticked and using the message delivery policy of round robin) we then go on to
              > create a distributed domain targetted at the cluster of two managed server's (managed1
              > and managed2)
              >
              > If I create a simple java app that put's messages to that distributed destination,
              > using the connectionfactory above, who's responsible for doing the load balancing.
              >
              > Does the client create the session knowing that the connectionfactory requires
              > load balancing and thus takes the responsibility for it, or does the client just
              > put a constant stream of JMS messages to the WLS and the connectionfactory class
              > takes responsibility for the load balancing
              >
              > Who maintain's the delivery state, the client application or WLS (i.e who's job
              > is it to look up the last messages queue destination?)
              >
              >
              >
              >
              

  • Error looking up Topic when it's a resource reference in an EJB

    I have also posted this in the JNDI group, but as an after thought I thought
              it might be wise to post it here also.
              WLS 8.0
              Running in JBuilder for WLS
              I have a Stateless Session Bean in which I am looking up a JMS Connection
              Factory and a Topic. My first lookup consists of the following:
              InitialContext ctx = null;
              TopicConnectionFactory conFactory = null;
              ctx = new InitialContext();
              conFactory = (TopicConnectionFactory)
              ctx.lookup("java:comp/env/ConnectionFactory");
              That one works just fine. Later in the code i do the following lookup:
              Topic topic = null;
              topic = (Topic) ctx.lookup("java:comp/env/Topic");
              I get a NammingException. If I change the line to lookup the actuall Topic
              it works:
              topic = (Topic) ctx.lookup("jms/csrmh_refresh");
              Here is the Config.xml entries forthe JMS Configuration:
              <JMSConnectionFactory DefaultDeliveryMode="Non-Persistent"
              JNDIName="jms/ConnectionFactory" Name="JMS ConnFactory"
              Targets="myserver"/>
              <JMSServer Name="JMS Server" PagingStore="PagingStore"
              Store="PersistanceStore" Targets="myserver">
              <JMSTopic CreationTime="1065030416220"
              JNDIName="jms/csrmh_refresh" Name="RMH_Refresh"/>
              </JMSServer>
              Here is what is in the ejb.xml:
              <resource-ref>
              <description />
              <res-ref-name>ConnectionFactory</res-ref-name>
              <res-type>javax.jms.TopicConnectionFactory</res-type>
              <res-auth>Container</res-auth>
              </resource-ref>
              <resource-env-ref>
              <description />
              <resource-env-ref-name>Topic</resource-env-ref-name>
              <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
              </resource-env-ref>
              Here is what is in the weblogic
              <reference-descriptor>
              <resource-description>
              <res-ref-name>ConnectionFactory</res-ref-name>
              <jndi-name>jms/ConnectionFactory</jndi-name>
              </resource-description>
              <resource-env-description>
              <res-env-ref-name>Topic</res-env-ref-name>
              <jndi-name>jms/csrmh_refresh</jndi-name>
              </resource-env-description>
              </reference-descriptor>
              Does anyone understand why the mapping doesn't work?
              Thanks,
              -Michael Caughey
              

    As far as I can tell from your descriptors, what you're trying to do is OK.
              Could you post the stack trace for the exception you're getting, if you have
              one?
              greg
              "Michael Caughey" <[email protected]> wrote in message
              news:[email protected]...
              > I have also posted this in the JNDI group, but as an after thought I
              thought
              > it might be wise to post it here also.
              >
              > WLS 8.0
              > Running in JBuilder for WLS
              >
              >
              > I have a Stateless Session Bean in which I am looking up a JMS Connection
              > Factory and a Topic. My first lookup consists of the following:
              >
              > InitialContext ctx = null;
              > TopicConnectionFactory conFactory = null;
              > ctx = new InitialContext();
              > conFactory = (TopicConnectionFactory)
              > ctx.lookup("java:comp/env/ConnectionFactory");
              >
              > That one works just fine. Later in the code i do the following lookup:
              >
              > Topic topic = null;
              > topic = (Topic) ctx.lookup("java:comp/env/Topic");
              >
              > I get a NammingException. If I change the line to lookup the actuall
              Topic
              > it works:
              >
              > topic = (Topic) ctx.lookup("jms/csrmh_refresh");
              >
              >
              > Here is the Config.xml entries forthe JMS Configuration:
              > <JMSConnectionFactory DefaultDeliveryMode="Non-Persistent"
              > JNDIName="jms/ConnectionFactory" Name="JMS ConnFactory"
              > Targets="myserver"/>
              > <JMSServer Name="JMS Server" PagingStore="PagingStore"
              > Store="PersistanceStore" Targets="myserver">
              > <JMSTopic CreationTime="1065030416220"
              > JNDIName="jms/csrmh_refresh" Name="RMH_Refresh"/>
              > </JMSServer>
              >
              > Here is what is in the ejb.xml:
              > <resource-ref>
              > <description />
              > <res-ref-name>ConnectionFactory</res-ref-name>
              > <res-type>javax.jms.TopicConnectionFactory</res-type>
              > <res-auth>Container</res-auth>
              > </resource-ref>
              > <resource-env-ref>
              > <description />
              > <resource-env-ref-name>Topic</resource-env-ref-name>
              >
              > <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
              > </resource-env-ref>
              >
              >
              > Here is what is in the weblogic
              > <reference-descriptor>
              > <resource-description>
              > <res-ref-name>ConnectionFactory</res-ref-name>
              > <jndi-name>jms/ConnectionFactory</jndi-name>
              > </resource-description>
              > <resource-env-description>
              > <res-env-ref-name>Topic</res-env-ref-name>
              > <jndi-name>jms/csrmh_refresh</jndi-name>
              > </resource-env-description>
              > </reference-descriptor>
              >
              >
              > Does anyone understand why the mapping doesn't work?
              >
              > Thanks,
              >
              > -Michael Caughey
              >
              >
              >
              >
              >
              

  • Need help!---lookup connectionFactory failed after restart j2ee server!

    hi,
    I wonder anyone could help me to solve this context lookup problem described as bellows.i should say 'thanks' in advance!!!
    At the end of the message i post the code used to lookup administered objects then create connection.
    i use sun's default jms implementation (j2sdkee1.3.1) and jdk1.4 as environment.
    The jms client will try to establish a new connection if the j2ee server restarts (perhaps due to remote j2ee server shutdown or network trouble) , but it fails to lookup topicConnectionFactory in the JNDI this time. An namingException will be caught :
    "javax.naming.CommunicationException: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079689 No; nested exception is:
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:92)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:176)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:68)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:70)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:641)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:583)
         at com.sun.corba.ee.internal.corba.ClientDelegate.request(ClientDelegate.java:875)
         at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
         at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
         ... 6 more
    Some code in the establish() method:
    try {
    TopicConnectionFactory topicConnectionFactory = null;
    InitialContext ctx = null;
    ctx = new InitialContext();
    System.out.println("ctx:" + ctx);
    topicConnectionFactory =
    (TopicConnectionFactory) ctx.lookup ("connectionfactory");
    System.out.println("topicConnectionFactory:" + topicConnectionFactory);
    while (connection == null)
    try{
    connection = topicConnectionFactory.createTopicConnection();
    } catch (javax.jms.JMSException jmse)
    System.out.print("Cannot connect to message server...");
    System.out.println("Pausing " +
    CONNECTION_RETRY_PERIOD / 1000 + " seconds before retry.");
    try
    Thread.sleep(CONNECTION_RETRY_PERIOD);
    } catch (java.lang.InterruptedException ie) {ie.printStackTrace();}
    continue;
    System.out.println("\nConnection established");
    session =
    connection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
    topic = (Topic) ctx.lookup ("subscribeTopic");
    connection.setExceptionListener( (javax.jms.ExceptionListener) this);
    catch (javax.naming.NamingException jne){
    System.err.println("[MessageSubscriber] - NamingException!");
    //jne.printStackTrace( );
    Best Regards,
    -bawanglongqiqi

    Hi!
    I've encountered a similar problem with looking up the Home-interface
    of an EJB from a client through the InitialContext object after a
    restart of the application server.
    Try to set an additional property before creating your InitialContext
    object that clears the JNDI cache (the property name seems to differ
    between context factories - e.g. I'm using a WebSphere one and had to
    set a WebSphere specific property name).
    I'm sure you will find further info when you do a web search on "clear
    JNDI cache" for your specific JNDI provider.
    Kind regards,
    Markus

  • Javax.naming.NameNotFoundException: ConnectionFactory not bound

    Hi,
    Is there any one who has any idea about this error. Im getting this while migrating application from JBOSS 4 - JBOSS 5. What could be the approach to resolve it.
    javax.naming.NameNotFoundException: ConnectionFactory not bound
    Regards,
    Gurpreet

    Better posting this in a JBoss forum. It seems like a configuration with how you are using JNDI. Look to see what they changed from JBoss4 to JBoss5. You might need to modify or create some xml files.

  • NameNotFoundException when looking up the Recource Adapter

              Hi,
              I am facing a problem when looking-up of the Resource Adapter from the Ejb.
              I am using a session bean to lookup the Resource adapter. I have no problem deploying
              the resource adapter and the ejb. But I am getting an exception when I run the
              client.
              The <resource-ref> tag in ejb-jar.xml is as follows.
              <enterprise-beans>
              <session>
              <ejb-name>connect</ejb-name>
              <home>connect.InsertHome</home>
              <remote>connect.Insert</remote>
              <ejb-class>connect.InsertBean</ejb-class>
              <session-type>Stateless</session-type>
              <transaction-type>Container</transaction-type>
              <resource-ref>
              <res-ref-name>eis/CciBlackBoxNoTx</res-ref-name>
              <res-type>com.sun.connector.cciblackbox.CciConnectionFactory</res-type>
              <res-auth>Container</res-auth>
              </resource-ref>
              </session>
              </enterprise-beans>
              I changed the res-ref-type from javax.sql.Datasource to the connection factory
              as I am using the CCI to connect to the database.
              My weblogic-ejb-jar file contains the following description
              <reference-descriptor>
              <resource-description>
              <res-ref-name>eis/CciBlackBoxNoTx</res-ref-name>
              <jndi-name>eis/CciBlackBoxNoTxConnectorJNDINAME</jndi-name>
              </resource-description>
              </reference-descriptor>
              <jndi-name>Insert</jndi-name>
              When I run my client I am getting the follwing Exception.
              javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/connect.jar#conn
              ect/comp/env/user' Resolved: 'app/ejb/connect.jar#connect/comp/env' Unresolved:
              'user' ; remaining name 'user'
              at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basi
              cNamingNode.java:858)
              at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.ja
              va:223)
              at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              87)
              at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              95)
              at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              95)
              at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
              at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
              at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyC
              ontextWrapper.java:36)
              at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.
              java:124)
              at javax.naming.InitialContext.lookup(InitialContext.java:345)
              at connect.InsertBean.setSessionContext(InsertBean.java:64)
              at connect.InsertBean_fqerje_Impl.setSessionContext(InsertBean_fqerje_I
              mpl.java:93)
              at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.
              java:273)
              at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSession
              Pool.java:148)
              at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPoo
              l.java:101)
              at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.j
              ava:148)
              at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:1
              27)
              at weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObj
              ect.java:61)
              at connect.InsertBean_fqerje_EOImpl.insertName(InsertBean_fqerje_EOImpl
              .java:28)
              at connect.InsertBean_fqerje_EOImpl_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
              at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServer
              Ref.java:114)
              at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServi
              ceManager.java:785)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.ja
              va:308)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteReques
              t.java:30)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              where connect.jar is the name of my ejb.
              This is the session bean code I am using to looup the resource adpater.
              user = (String) initCtx.lookup("java:comp/env/user");
              password = (String) initCtx.lookup("java:comp/env/password");
              cxf =(ConnectionFactory)initCtx.lookup("java:comp/env/eis/CciBlackBoxNoTx");
              I am using the weblogic 7.0 as the application server and Sun's CciblackboxNoTx
              as the resource adpter.The weblogic-ra.xml file for the resource adpter contains
              the following connection factory and jndi name.
              <connection-factory-name>LogicalNameOfCciBlackBoxNoTx</connection-factory-name>
              <jndi-name>eis/CciBlackBoxNoTxConnectorJNDINAME</jndi-name>
              Can any one please let me know where I am going wrong. Any solution will be of
              great help.
              Thanks,
              Ramya.
              

    Hi Ramya,
              Where you have defined user and password, is you have included those in the
              bean descriptor? Or rar descriptrs?. Server unable to findout the user and
              password.
              The following tags could not able to undestand what for?
              > </reference-descriptor>
              > <jndi-name>Insert</jndi-name>
              >
              Thanks
              Kumar
              "Ramya" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              > I am facing a problem when looking-up of the Resource Adapter from the
              Ejb.
              > I am using a session bean to lookup the Resource adapter. I have no
              problem deploying
              > the resource adapter and the ejb. But I am getting an exception when I run
              the
              > client.
              >
              > The <resource-ref> tag in ejb-jar.xml is as follows.
              >
              > <enterprise-beans>
              > <session>
              > <ejb-name>connect</ejb-name>
              > <home>connect.InsertHome</home>
              > <remote>connect.Insert</remote>
              > <ejb-class>connect.InsertBean</ejb-class>
              > <session-type>Stateless</session-type>
              > <transaction-type>Container</transaction-type>
              > <resource-ref>
              > <res-ref-name>eis/CciBlackBoxNoTx</res-ref-name>
              >
              <res-type>com.sun.connector.cciblackbox.CciConnectionFactory</res-type>
              > <res-auth>Container</res-auth>
              > </resource-ref>
              > </session>
              > </enterprise-beans>
              >
              > I changed the res-ref-type from javax.sql.Datasource to the connection
              factory
              > as I am using the CCI to connect to the database.
              >
              > My weblogic-ejb-jar file contains the following description
              >
              > <reference-descriptor>
              >
              > <resource-description>
              > <res-ref-name>eis/CciBlackBoxNoTx</res-ref-name>
              > <jndi-name>eis/CciBlackBoxNoTxConnectorJNDINAME</jndi-name>
              > </resource-description>
              >
              > </reference-descriptor>
              > <jndi-name>Insert</jndi-name>
              >
              > When I run my client I am getting the follwing Exception.
              >
              >
              > javax.naming.NameNotFoundException: Unable to resolve
              'app/ejb/connect.jar#conn
              > ect/comp/env/user' Resolved: 'app/ejb/connect.jar#connect/comp/env'
              Unresolved:
              > 'user' ; remaining name 'user'
              > at
              weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basi
              > cNamingNode.java:858)
              > at
              weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.ja
              > va:223)
              > at
              weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              > 87)
              > at
              weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              > 95)
              > at
              weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:1
              > 95)
              > at
              weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
              > at
              weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
              > at
              weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyC
              > ontextWrapper.java:36)
              > at
              weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.
              > java:124)
              > at javax.naming.InitialContext.lookup(InitialContext.java:345)
              > at connect.InsertBean.setSessionContext(InsertBean.java:64)
              > at
              connect.InsertBean_fqerje_Impl.setSessionContext(InsertBean_fqerje_I
              > mpl.java:93)
              > at
              weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.
              > java:273)
              > at
              weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSession
              > Pool.java:148)
              > at
              weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPoo
              > l.java:101)
              > at
              weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.j
              > ava:148)
              > at
              weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:1
              > 27)
              > at
              weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObj
              > ect.java:61)
              > at
              connect.InsertBean_fqerje_EOImpl.insertName(InsertBean_fqerje_EOImpl
              > java:28)
              > at connect.InsertBean_fqerje_EOImpl_WLSkel.invoke(Unknown Source)
              > at
              weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
              >
              > at
              weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServer
              > Ref.java:114)
              > at
              weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
              > at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServi
              > ceManager.java:785)
              > at
              weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.ja
              > va:308)
              > at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteReques
              > t.java:30)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              > where connect.jar is the name of my ejb.
              >
              > This is the session bean code I am using to looup the resource adpater.
              >
              > user = (String) initCtx.lookup("java:comp/env/user");
              > password = (String) initCtx.lookup("java:comp/env/password");
              > cxf
              =(ConnectionFactory)initCtx.lookup("java:comp/env/eis/CciBlackBoxNoTx");
              >
              >
              >
              > I am using the weblogic 7.0 as the application server and Sun's
              CciblackboxNoTx
              > as the resource adpter.The weblogic-ra.xml file for the resource adpter
              contains
              > the following connection factory and jndi name.
              >
              >
              <connection-factory-name>LogicalNameOfCciBlackBoxNoTx</connection-factory-na
              me>
              > <jndi-name>eis/CciBlackBoxNoTxConnectorJNDINAME</jndi-name>
              >
              >
              > Can any one please let me know where I am going wrong. Any solution will
              be of
              > great help.
              >
              > Thanks,
              > Ramya.
              >
              

  • Errors looking up Resource Reference

    WLS 8.0
    Running in JBuilder for WLS
    I have a Stateless Session Bean in which I am looking up a JMS Connection
    Factory and a Topic. My first lookup consists of the following:
    InitialContext ctx = null;
    TopicConnectionFactory conFactory = null;
    ctx = new InitialContext();
    conFactory = (TopicConnectionFactory)
    ctx.lookup("java:comp/env/ConnectionFactory");
    That one works just fine. Later in the code i do the following lookup:
    Topic topic = null;
    topic = (Topic) ctx.lookup("java:comp/env/Topic");
    I get a NammingException. If I change the line to lookup the actuall Topic
    it works:
    topic = (Topic) ctx.lookup("jms/csrmh_refresh");
    Here is the Config.xml entries forthe JMS Configuration:
    <JMSConnectionFactory DefaultDeliveryMode="Non-Persistent"
    JNDIName="jms/ConnectionFactory" Name="JMS ConnFactory"
    Targets="myserver"/>
    <JMSServer Name="JMS Server" PagingStore="PagingStore"
    Store="PersistanceStore" Targets="myserver">
    <JMSTopic CreationTime="1065030416220"
    JNDIName="jms/csrmh_refresh" Name="RMH_Refresh"/>
    </JMSServer>
    Here is what is in the ejb.xml:
    <resource-ref>
    <description />
    <res-ref-name>ConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-env-ref>
    <description />
    <resource-env-ref-name>Topic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
    </resource-env-ref>
    Here is what is in the weblogic
    <reference-descriptor>
    <resource-description>
    <res-ref-name>ConnectionFactory</res-ref-name>
    <jndi-name>jms/ConnectionFactory</jndi-name>
    </resource-description>
    <resource-env-description>
    <res-env-ref-name>Topic</res-env-ref-name>
    <jndi-name>jms/csrmh_refresh</jndi-name>
    </resource-env-description>
    </reference-descriptor>
    Does anyone understand why the mapping doesn't work?
    Thanks,
    -Michael Caughey

    Please be aware that you are not communicating with Apple when you post in these forums. Most of the people who will reply to your posts are, like me, your fellow users. No one here can look up anything for you. It's also unwise to post personal information here, since these are public forums.
    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to contact the iTunes Store if you have a question for them.
    Regards.

Maybe you are looking for

  • Why won't my 5th Gen Ipod touch switch on?

    I have had my 5th Gen Ipod touch for 1 week. This morning it wouldn't switch on, the screen just stays black. Neither itunes or my computer recognise it but if I plug it into a mains charger the apple logo flashes slowly. I have tried everything sugg

  • Error Abriendo Documento en Adobe Reader 9.4.0

    Me sale este error, antes de formatear mi equipo me funcionaba el archivo, el archivo pide autorización en linea, al principio le colocaba el proxy y luego el usuario y contraseña del archivo y ya ingresaba. Ahora no me pasa del proxy inmediatamente

  • Locked status of MIC while replacing

    Hi Guys, I am trying to replace an MIC version 1 with version 2 of that MIC, using T. Code QS27, when I selected the existing MIC line and press Start button to replace, the system gives message "First select the line" though I have selected. Also no

  • How to make date specific in sourcing personalized pages

    How to make date specific in sourcing personalized pages

  • Gmail won't display pdf files

    In IE the preview works normally. In FF I recently get an error. It happens in safe mode as well. Thank you.