FS JNDI problem in PI 7.1

Hi,
We configured File Based JNDI 1.1.2 in SAP PI 7.0 and it was working fine. But recently we upgraded this to PI 7.1 from then its not working any more.
In communication channels i could see some error like
Error connecting due to missing class: com.sun.jndi.fscontext.RefFSContextFactory. Ensure that all resources required are present in the JMS provider library: aii_af_jmsproviderlib.sda
we have deployed all the necessary libraries. But still we are getting this error.
Any ideas what's happing here? Pleas  help me out.
Best Regards,
Prasad Babu.

Hi Stefan,
actually its the problem with the descriptor file. After fixing it i was able to deploy it on the server. Now i configured PI 7.1 JMS communication channel with the module i created and deployed. In communication channel i am getting i am below exception.
Message processing failed. Cause: javax.ejb.TransactionRolledbackLocalException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBTransactionRolledbackException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException
Any idea on what could be the problem?
Am i missing something here. Do i need to adjust any libraries on server?
Thanks for your help.
Best Regards,
Prasad Babu.

Similar Messages

  • New version of JDev causing JNDI problems

    We just upgraded to the newest Developer Preview of JDEV and all of a sudden client code that compiled and ran fine under the old version is no longer running. I'm guessing something changed in the libraries, but I'm not sure what and why this is occurring.
    Here's what happened:
    1) It seems that the constructor for InitialContext having a parameter for Properties is no longer available. PITA...but whatever, I switched it to use the Hashtable environment which should I figured work. However:
    2) Upon switching to the new environment passage I get an exception:
    javax.naming.CommunicationException with the topmost stacked function being oracle.oc4j.security.KeyExchange.getKeyAgreement.
    I'm guessing that passing the string password into the environment is no longer acceptable?!? WTF!
    So, does anyone have any suggestions to fix this. I'm sure we should be using jndi.properties and all that jazz, but we have tons of client code that works this way and I'm not about to go changing it all unless I really have to.
    edit: I tried a sample piece of code using jndi.properties file and am getting the same exception. Maybe this is a problem between the two libraries (OC4J server & the lib on JDev??) GRRRRRRR!
    Message was edited by:
    [email protected]

    OK...turned out to be the second one. I guess the new JDEV libs aren't compatible with the older server I'm running? I just had to remove all the Jdev libraries from the project and point them to the libs within the server install.
    So...if anyone else runs into this...that's how I fixed it. Sorry I wasted y'alls time and threadspace :D.

  • Crystal Report JRC and JNDI problem

    I need to convert one of our internal web application from using Crystal Report Server 10 RAS to using Crystal Report XI Java Component (JRC). I found several examples from SAP/BusinessObjects but am stuck with a database connectivity problem.
    The basic enviornment info:
    JBoss 4.0.3 SP1
    Crystal Report JRC XI
    Windows XP/Server 2003
    JDK 1.5.x
    MS SQL Server 2005
    The error I am getting is "Error finding JNDI name (xxx)", although the application is already using the same JNDI and was able to display data on the web.
    I added debug code:
                    Context initialContext = null;
                    try {
                        initialContext = new InitialContext();
                        DataSource ds = (DataSource) initialContext.lookup("java:MYAPP");
                        String t = ds.toString();
                        log.debug(t);
                    } catch (NamingException e) {
                        log.error(e);
    I was able to get the data source successfully. The actual report file uses JDBC with JNDI named as "MYAPP". When I call the viewer, it gives
    Error finding JNDI name (MYAPP)
    message.
    Any comment or help would be appreciated.
    Thanks.

    How are you setting your connection info?
    This is what we do:
    IConnectionInfo connectionInfo = new ConnectionInfo();
    PropertyBag propertyBag = new PropertyBag();                    
    propertyBag.put("JNDI Datasource Name", reportJndiName);
    propertyBag.put("Database DLL", DATABASE_DLL); // required!!! (but we don't actually provide a DLL, or even run in windows)
    connectionInfo.setAttributes(propertyBag);
    connectionInfo.setKind(ConnectionInfoKind.SQL);
    ConnectionInfos connectionInfos = databaseController.getConnectionInfos(null);
    IConnectionInfo oldConnectionInfo = connectionInfos.getConnectionInfo(0);
    databaseController.replaceConnection(oldConnectionInfo, connectionInfo, null, DBOptions._useDefault );

  • Oracle 8i & JNDI Problem

    I am trying to connect to a remote instance of Oracle 8i. The DataSource object is bound, but when I do a lookup I get a null pointer exception.
    Here's the source code so far:
    public class ConnectionManager {
    private static ConnectionManager instance = null;
    private static String USER_NAME = "dyn3";
    private static String PASSWORD = "dyn3";
    private static String DRIVER_TYPE = "thin";
    private static String DATABASE_SERVER_NAME = "3.87.208.60";
    private static int PORT = 1521;
    private static String DATABASE_NAME = "etest";
    private static int MAX_CONNECTIONS = 500;
    public static final String ORACLE_DATABASE_URL = "@3.45.93.127:1521:";
    public static final String ORACLE_DATABASE_SID = "media6";
    private static String BIND_NAME =
    DATABASE_NAME+"@"+DATABASE_SERVER_NAME+":"+PORT;
    private InitialContext initCtx = null;
    * Loads the Oracle JDBC driver
    * @see oracle.jdbc.driver.OracleDriver
    * @see java.sql.DriverManager
    private ConnectionManager() throws Exception {
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    createOracleDataSource();
    }catch(Exception s) {
    s.printStackTrace();
    throw s;
    private void createOracleDataSource()
    throws SQLException, NamingException {
    DataSource ods = new DataSource();
    ods.setDriverType(DRIVER_TYPE);
    ods.setServerName(DATABASE_SERVER_NAME);
    ods.setDatabaseName(DATABASE_NAME);
    ods.setPortNumber(PORT);
    ods.setUser(USER_NAME);
    ods.setPassword(PASSWORD);
    ods.setMaxLimit(MAX_CONNECTIONS);
    rebind(ods);
    private void rebind(OracleConnectionCacheImpl ods)
    throws NamingException {
    try {
    File directory = new File("jdbc");
    if ( ! (directory.exists()) ) {
    directory.mkdir();
    System.out.println("url= "+directory.toURL().toString());
    Hashtable env = new Hashtable ();
    env.put (Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.fscontext.RefFSContextFactory");
    env.put (Context.PROVIDER_URL,
    directory.toURL().toString());
    initCtx = new InitialContext(env);
    System.out.println("Context = "+initCtx);
    System.out.println("BIND_NAME="+BIND_NAME);
    initCtx.rebind(BIND_NAME, ods);
    }catch(NameAlreadyBoundException n) {
    //do nothing - this is OK
    }catch(NamingException ne) {
    ne.printStackTrace();
    throw ne;
    }catch(Exception e) {
    e.printStackTrace();
    * Returns an instance of ConnectionManager
    public static ConnectionManager getInstance() throws Exception {
    if (instance == null) {
    instance = new ConnectionManager();
    return instance;
    * Gets a connection to the database
    public Connection getConnection() throws SQLException, NamingException {
    DataSource pds = (DataSource)initCtx.lookup(BIND_NAME);
    return pds.getConnection();
    Can anyone shed some light on this problem? The Oracle manuals aren't much help.
    Thanks!

    You can use internet just to check if the apache server embedded with your oracle, not to verify oracle itself. Open a prompt in your host and try to access it by sqlplus "/ as sysdba" this should let you connect, then verify listener is up and running, lsnrctl status , this will let you know if you are able to connect, next if you want to access it from outside, install an 8i client on a remote pc and configure connectivity files using netca.
    ~ Madrid

  • JNDI problems in OC4J

    Hi,
    I'm running OC4J integrated with the SOA Suite 10.1.3.3.
    I have a legacy web service created with XFire and deployed in OC4J, lets call it HelloWorldService. I would like to bind a POJO object from within this service with JNDI.
    I would then like to lookup this object from another web service which is a EJB3 session bean, deployed in the same OC4J instance. Lets call it LookupBean.
    I can see in the JNDI browser that the POJO is bound under the HelloWorldService. But when i try to lookup the POJO i get an error saying that the POJO cannot be found.
    This is how i bind the POJO from HelloWorldService
    Context initialContext = new InitialContext();
    initialContext.bind("HelloWorldServicePOJO", obj);
    This is how i try to do the lookup from LookupBean:
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial",
    "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put("java.naming.provider.url","ormi://localhost:12401/HelloWorldService");
    //env.put("java.naming.provider.url","opmn:ormi://localhost:6003:home/HelloWorldService");
    env.put("java.naming.security.principal","oc4jadmin");
    env.put("java.naming.security.credentials","oc4jadmin");
    Context context = new InitialContext(env);
    POJO obj = (POJO) context.lookup("HelloWorldServicePOJO");
    I have tried also with the out commented line above, but it does not work. What can be wrong?
    Thanks,
    Mattias

    Hi,
    thanks for the link, but I already knew it and read a lot in it. I still don't get what exactly is going wrong. I replaced the jgroups-core.jar by my jgroups-jar which results in the same exception. It also seems that somehow the commons-logging.jar-classes from /webservices is being loaded even though it's not in the classpath of my application. I noticed this when I replaced every commons-logging.jar by the commons-logging-api.jar from JCL 1.0.4 (which we use in our application) since my EJBs could not be loaded then due to the following problem:
    06/08/04 15:34:42 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Error initializing ejb-modules: [cms-core:pbb-jms-receiver-1.0:Importer_Topic] - Unable to load ejb-class com.pironet.pbng.jms.mdb.asynchron.ImporterTopicSubscriber, see section 23.2 of the EJB 2.1 specificationjava.lang.ExceptionInInitializerError
    06/08/04 15:34:42 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:510)
    06/08/04 15:34:42 Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
    06/08/04 15:34:42 at java.lang.Class.getDeclaredConstructors0(Native Method)
    06/08/04 15:34:42 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
    06/08/04 15:34:42 at java.lang.Class.getConstructor0(Class.java:2640)
    06/08/04 15:34:42 at java.lang.Class.getConstructor(Class.java:1629)
    06/08/04 15:34:42 at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
    06/08/04 15:34:42 ... 27 more
    It seems like the initialization of the jchannel happens, even though it's being initialized in my application, in one of the classloaders which don't have access to my libs...and I'm definitely not going to add all my jars into locations the root-classloader (or whoever) has access to.

  • Jndi problem

    Hi,
    I have to write a simple application that uses jndi to get a jdbc connection.
    I'll try to explain step by step everything what I did. I used Tomcat 5.5.12, SQL Server 2000.
    1. I created a simple web app "jndi" and next I put the jdbc lib to the WEB-INF/lib
    2. I added
    <Context docBase="jndi" path="/jndi" reloadable="true" source="org.eclipse.jst.j2ee.server:jndi">
    <Resource name="jndi/cimmarron_com" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000" username="xxx" password="xxx"
    driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=db1;password=hib1"/>
    </Context>
    to server.xml . The preceding xml code is between <host> tag
    3. My web.xml file in WEB-INF/ looks:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>
    jndi</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jndi/cimarron_com</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    4. At the end, I wrote the simple Main.java :
    package test;
    import javax.naming.*;
    import java.sql.*;
    import javax.sql.DataSource;
    public class Main {
    * @param args
    public static void main(String[] args) throws SQLException,NamingException{
    Context ctx = new InitialContext();
    DataSource source = (DataSource) ctx.lookup("java:comp/env/jdbc/cimarron_com");
    Connection conn = source.getConnection();
    Problems:
    I've got the exception like this:
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at test.Main.main(Main.java:12)
    and I have web.xml warning "CHKJ4019W: Invalid res-sharing-scope; valid values are "Shareable" or "Unshareable"
    I really don't know where is the problem, I've looked for helping in google for 2 days and I still don't know

    Tourang,
    I have only two suggestions for you (but no answers -- sorry).
    1. Try the JDeveloper and ADF forum.
    2. For your information, "JDeveloper" has an embedded OC4J server. Are you deploying to a different OC4J (_not_ the embedded one) and trying to run your application from the embedded one?
    Good Luck,
    Avi.

  • Crazy JNDI Problem... (Third Party DB Driver Effects Lookup???) (OAS 10g)

    Ok folks, I need some help here...
    The scenario is this...
    I have a simple web app (one jsp) which is used as a "status checker" to ensure that all the session beans we expected to be deployed are actually deployed and that they can be looked up with JNDI and run some small status routine... That war file for that app is included in the ear file with all of the session ejb jar deployments...
    Now, the collection of session beans references three different datasources at one time or another... 2 of which are oracle databases and 1 is a DB2 database...
    Lets name them as follows...
    OracleDataSource1
    OracleDataSource2
    DB2DataSource
    Now, if I configure the three datasources in the oracle standalone OC4J 10g datasource file and deploy the ear file to standalone OC4J 10g, all of the lookups work, and it successfully uses the datasources... no problems at all...
    Ok, so now I try to deploy the ear on OAS 10g using the enterprise manager console, and deployment works fine...
    If I run the app before configuring the datasources, of course the lookups work, but the status routines of certains beans fail because they are not able to look up the datasources... no big deal, just start adding the datasources...
    I configure OracleDataSource1 and rerun... now things still work, the lookups for all the beans works fine, and some pass now, but others still want the other datasources...
    Now configure OracleDataSource2 and rerun... as before, things all work great but there are still complaints looking for the DB2DataSource from a couple of the routines...
    Herein lies the problem...
    I configure DB2DataSource and rerun, and boom, my program crashes claiming that the lookup of the bean failed...
    Now mind you, these beans have all been looked up numerous times during previous runs, and absolutely nothing has been changed with the application... in fact, even the beans that wanted the DB2DataSource were looked up successfully and then just complained of no datasource during their status routine execution...
    It's just that once I configure the DB2DataSource, all of a sudden my lookups don't work... I have tried commenting out a couple of the beans, and regardless of which lookups are commented out, it still fails saying it can't find any of the beans, even if the beans i'm trying to look up don't use the DB2DataSource, it doesn't seem to matter...
    The InitialContext used for the lookup uses the default "new InitialContext()" constructor and the lookups work fine when the DB2DataSource is not configured, but once it is, the lookups fail saying the objects are not found...
    I have consulted with a few other developers here, and noone can seem to understand why this behavior is happening... I have added debugging statements to print the contents of the context's environment, and it is always empty regardless of whether the lookups pass or fail...
    The ONLY difference I can see with this DB2DataSource is that it uses an external 3rd party driver... The oracle connections use a driver which was packaged with the OAS installation... I feel pretty strongly that it has to do with the driver because if I have the DB2DataSource configured (causing the failure) and then I edit that datasource to say that it should us the oracle driver, miraculously it causes the lookups to work again, except now I get the error saying the oracle driver doesn't like my DB2 jdbc url...
    I'm sorry for the long post, but I'm hoping that at least one person has encountered this before... I cannot think of any reason why the configuration of that datasource with the third party driver would cause these problems, especially when the exact same configuration and setup DOES work with standalone OC4J 10g, even with the DB2DataSource configured... ????? And the fact that the lookups work fine until that datasource is configured really blows my mind... i wouldn't think the datasource configuration should have anything to do with whether the lookups of the session beans succeed or not... hahaha...
    Any help would be great... I'm pullin my hair out here... :)
    Thanks,
    -Garrett

    No, I have not asked on the oracle forums yet... :)
    It seems that the cause is the driver itself... if I set a different driver for the datasource configuation, the lookups work but it just complains about the driver not being correct for the individual beans...
    I have found some documentation claiming that there is an OAS version of the DB2 driver, as well as a Merant version, but I can't seem to find jar files for either...
    Does anyone know where I can download the "YMdb2.jar" file? Supposedly this contains the DB2 DataDirect driver that I need...
    Thanks,
    -Garrett

  • JNDI problem with Sun Application Server

    I am trying to call a extremely simple EJB from a remote computer. But everytime I run the client I get a Class castException. I have used Weblogic and Jboss in the past and I never had any problem with JNDI. I included all the files except for the descriptor. Please help, this is driving me nut.
    Here is the exception i get:
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at clients.testEjbTest.main(testEjbTest.java:42)
    The remote Interface :
    package ejb.test;
    import javax.ejb.*;
    public interface Test extends javax.ejb.EJBObject{
    public String getResult() throws java.rmi.RemoteException;
    The Home interface is:
    package ejb.test;
    import javax.ejb.*;
    public interface TestHome extends javax.ejb.EJBHome{
    public Test create() throws java.rmi.RemoteException, CreateException;
    The Bean is:
    package ejb.test;
    import javax.ejb.*;
    public class TestBean implements javax.ejb.SessionBean {
    public TestBean() {}
    public String getResult() { return "hello";}
    public void ejbActivate() {  }
    public void ejbPassivate() {  }
    public void ejbRemove() {  }
    public void ejbCreate() throws CreateException {  }
    public void setSessionContext(javax.ejb.SessionContext sessionContext) { }
    The client is:
    public class testEjbTest {
    public testEjbTest() { }
    public static void main(String[] args) {
    try{
    Properties env = new Properties();
    env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
    env.setProperty("java.naming.provider.url", "iiop://192.168.0.102:3700");
    InitialContext ic = new InitialContext(env);
    Object objref = ic.lookup("TestBean");
    Object tt = PortableRemoteObject.narrow(objref, ejb.test.TestHome.class);
    }catch(Exception e){e.printStackTrace();}

    Hi,
    I am new to this Forum.
    I have an application running on Weblogic.
    I want to shift to using SunOne as the Webserver and weblogic as application server.
    But when I deploy the application I am getting this ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow.
    java.lang.ClassCastException
         at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
         at com.elsevier.portal.admin.web.proxy.LoginProxy.getLoginSession(LoginProxy.java:156)
         at com.elsevier.portal.admin.web.proxy.LoginProxy.authenticateUser(LoginProxy.java:48)
        at com.elsevier.portal.admin.web.actions.LoginAction.login(LoginActi
    on.java:201)
         at com.elsevier.portal.admin.web.actions.LoginAction.execute(LoginAction.java:80)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java
    :1482)
          at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:
    525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletServic
    e(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    warning: CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVal
    ve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)The code snippet is as follows�.
    protected LoginSession getLoginSession() throws ApplicationException {
    LoginSessionHome home = null;
    LoginSession object = null;
    try {
    home = (LoginSessionHome) (PortableRemoteObject.narrow(ProxyUtil.getEJBHome(getProperties().getProperty(DataCoreConstants.LOGIN_JNDI_NAME),getProperties()),LoginSessionHome.class));
    object = home.create();
    catch(ClassCastException cse){
    cse.printStackTrace();
    logger.error("Class Cast Exception is thrown while casting the Object to                      LoginSessionHome");
    logger.error(cse);
    throw new ApplicationException(ExceptionConstants.CLASS_CAST_EXCEPTION);
    return object;
    }Same method is running on weblogic without any problem�
    Help needed urgently.
    Regards,
    Neha.

  • J2EE RI and MySQL, JNDI problems

    Hi.
    I am trying to write a simple J2EE application that would use Entety EJB with bean persisatance. I have downloaded driver from the www.mysql.org, copied it to the lib/system directory and modified J2EE_CLASSPATH in bin/userconfig.bat. I am using reference implementation server and with deploytool in �tools/serverconfiguration/datasourses/standard� I am specifying driver: org.gjt.mm.mysql.Driver or com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource and in datasourses in JNDI Name I write �jdbc/mydb� and in JDBC URL �jdbc:mysql://localhost:3306/this�, problem comes up when I try to reference �jdbc/mydb� from an entity bean, during deployment process of application it says that it is not bound
    Binding name:`java:comp/env/jdbc\persondb`
    Warning: Reference reference java:comp/env/jdbc\persondb is using a JNDI name that is not bound: jdbc\mydb
    I do not get it, what I am doing wrong? Please help me to find out how to bind a JNDI name to MySQL

    Ive been playing with the J2EE RI server for a bit now..
    and dispite documentation to the contrary the latest RI DOES NOT use standard naming conventions when referencing jndi resources.
    ie:
    so if you trying to get : java:com/env/jdbc/persondb
    then try accessing it by
    jdbc/persondb
    omit the java:com/env/

  • URGENT:Testing deployed OAS EJB Aplication (JNDI Problem)

    Please I need urgently help on this subject matter:
    Environment:
    OAS 4.0.8.2a on NT 4.5 SP5
    Jdeveloper 3.1
    Oracle 8R2
    After succesfull deployment of BC4J aplication on OAS I want simply test it. When I click to test on the appModule on the tree, the dialog asking the connection information appears..I choose OAS option from the drop down box.
    The error message I get is:
    "apps/ejb/ClientesProjectOAS/pkgClientes/PkgClientesModule is not the name of a registered component"
    I have tried with other variants too taking into account what OAS Administration shows..but no luck!
    Now, WHAT SHOULD BE PUT TO THE "JNDI PATH" and "CLIENT JAR PATH" options. This is the most confusing point to me and there are practically no valid/good information on online help.
    Thanx.
    Best regards,
    Ari Supperi
    [email protected]

    I have (almost) the same problem. Any idea? My weak english must be the reason, but I cannot find out what to enter into the JNDI and the Client jar path during testing my OAS deployed AppModule.
    Thx,
    Tib
    null

  • Websphere 6: JNDI problem with Sping - urgent.

    Hi,
    I have my cJSC project working fine with JNDI on my local sun app server. However when deploying to websphere I am getting problems.
    Obviously websphere is different setup and I have had to add the following to the web.xml to get a datasource
    <resource-ref>
         <description>VMS Datasource</description>
         <res-ref-name>jdbc/VMSDS</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
    </resource-ref>
    However, the app is still bombing out with following..
    Error page exception
    The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.
    Original Exception:
    Error Message: SRVE0207E: Uncaught initialization exception thrown by servlet
    Error Code: 500
    Target Servlet: Faces Servlet
    Error Stack:
    java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at com.ibm.ws.cache.servlet.ServletWrapper.init(ServletWrapper.java:231)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:274)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2954)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
    at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1912)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Error Page Exception:
    Error Message: Cannot find FacesContext
    Error Code: 0
    Target Servlet: null
    Error Stack:
    javax.servlet.jsp.JspException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
    at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
    at com.ibm._jsp._ErrorPage._jspx_meth_f_view_0(_ErrorPage.java:330)
    at com.ibm._jsp._ErrorPage._jspService(_ErrorPage.java:63)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:264)
    at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:344)
    at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:216)
    at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:246)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)
    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
    at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:294)
    at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:2593)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2983)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
    at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1912)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Anybody used JSC and Websphere with JNDI? I go live next week and don't want to have to configure a context file each time for production.
    Regards,
    LOTI

    Is the resource ref the same as you configured for the bundled
    Sun App server ?
    We do have a sample JNDI application and tip if they help:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/code/sampleapps/2/JaasAuthentication.zip
    (see the README file in the zip file)
    http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/2/jaas_authentication.html
    John

  • 10G JNDI problems

    I migrated from 9.0.3 to 9.0.4 and now have the following problem. I am using the local OC4J instance. I am attempting to get the connection to the database using the following code:
    try
    Context ctxt = new InitialContext();
    DataSource ds = (DataSource PortableRemoteObject.narrow(ctxt.lookup("jdbc/RVDS"), DataSource.class);
    con = ds.getConnection();
    catch (Exception ex)
    ex.printStackTrace();
    The stack trace is as follows:
    04/04/05 12:46:36 javax.naming.NamingException: com.evermind.server.ApplicationInitialContextFactory should only be used inside Orion server environments. For client com.evermind.server.ApplicationClientInitialContextFactory or com.evermind.server.rmi.RMIInitialContextFactory should be used
    04/04/05 12:46:36      at com.evermind.server.PreemptiveApplicationContext.getContext(PreemptiveApplicationContext.java:31)
    04/04/05 12:46:36      at com.evermind.naming.FilterContext.lookup(FilterContext.java:138)
    04/04/05 12:46:36      at javax.naming.InitialContext.lookup(InitialContext.java:347)
    04/04/05 12:46:36      at MVRInit.jspService(MVRInit.jsp:35)
    04/04/05 12:46:36      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
    ...MORE...
    This was working just fine in 9.0.3, Any ideas what is happening?

    Kevin -- I'm not sure why it's not working anymore. What you have there looks kind of funky -- you're doing a remote cast on a local object. The stacktrace is telling you that it's not a supported operation -- when you just construct an InitialContext with no parameters, it gives you ApplicationInitialContextFactory, which doesn't support this remote lookup and casting
    If you want to get a datasource from JNDI from a servlet/ejb running in the local OC4J container, then it's actually a little bit easier to do. There's no need to do the PortableRemoteObject.narrow(string,class).
    If you had a datasource defined with a location of "jdbc/RVDS", and assuming you don't want to do the fully abstract resource-ref-mapping, then you should be able to get the datasource just by doing a lookup of the initialcontext.
    try
      InitialContext ic = new InitialContext();
      DataSource ds = (DataSource)ic.lookup("jdbc/RVDS");
      Connection con = ds.getConnection();
    If you were running on a remote node (ie application client) and wanted to get a DS from an OC4J instance, then you'd need to use the ApplicationClientInitialContextFactory and specify a corresponding resource ref entry in the deployment descriptor and then look that up.
    hope that helps
    -steve-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • UserManagement JNDI Problem: objectClass: account

    Hello,
    i'm using JNDI to develop a usermanagement on an OpenLDAP Server.
    I only use the standard LDAP schemes (core;cosine;inetorg).
    here is a LDIF that works with ldapadd
    dn: ou=max,cn=Entwicklung,ou=roles,dc=ecs,dc=com
    ou: max,
    uid: maxLogin
    userPassword: maxLoginPW
    description: whatever u what
    objectClass: top
    # objectClass: account--> uid attribute; description attribute
    objectClass: account
    # objectClass: simpleSecurityObject --> userPassword attribute
    objectClass: simpleSecurityObject
    Everything works fine except:
    When I try to bind an context containing the mentioned attributes, JNDI does not seem to know the ACCOUNT object class (from cosine scheme)
    and throws an exception.
    SchemaViolationException: [LDAP: error code 65 - no structural object class provided]
    ACCOUNT is a structural class.
    if i add objectClass: organizationalUnit for workarround, following exception is thrown:
    [LDAP: error code 65 - attribute 'uid' not allowed]
    another hint that[b] JNDI does not know objectclass ACCOUNT and cosine.scheme respectively.
    How can i import the cosine scheme into JDNI?
    regards
    SPN

    I solved the problem.
    Thanks 4 reading :)

  • OpenJMS and JNDI problem -- classpath difficulties

    Hello All,
    I am trying to get an application of mine to publish to a JMS topic. I am using OpenJMS.
    Here is the code I am using to get the javax.jms.Connection:
    Hashtable props = new Hashtable();
    props.put(Context.PROVIDER_URL, "tcp://localhost:3035/");               
    props.put("java.naming.factory.initial", "org.exolab.jms.jndi.InitialContextFactory");
    props.put("java.naming.security.principal", "admin");
    props.put("java.naming.security.credentials","openjms");
    context = new InitialContext(props);
    // look up the ConnectionFactory
    ConnectionFactory factory = (ConnectionFactory) context.lookup("ConnectionFactory");
    // create the connection
    connection = factory.createConnection();When I run this code I get the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms.jndi.InitialContextFactory
                [Root exception is java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory]
      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
      at javax.naming.InitialContext.init(Unknown Source)
      at javax.naming.InitialContext.<init>(Unknown Source)
      at cma.live.CmaLiveClient.<init>(CmaLiveClient.java:41)
      at cma.trade.CmaTradeClient.<init>(CmaTradeClient.java:24)
      at cma.tradelog.PW_TradeHandler.startJMS(PW_TradeHandler.java:201)
      at cma.tradelog.PW_TradeHandler.access$100(PW_TradeHandler.java:38)
      at cma.tradelog.PW_TradeHandler$2.run(PW_TradeHandler.java:225)
      at java.util.TimerThread.mainLoop(Unknown Source)
      at java.util.TimerThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory
      at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
      ... 11 moreThis looks like a simple case of the correct jar file not being in my classpath. But the following code runs perfectly:
    javax.naming.spi.InitialContextFactory initial_context_factory =
         (javax.naming.spi.InitialContextFactory)
         Class.forName("org.exolab.jms.jndi.InitialContextFactory").newInstance();
    org.exolab.jms.jndi.InitialContextFactory exolab_initial_context_factory =
         (org.exolab.jms.jndi.InitialContextFactory)
         Class.forName("org.exolab.jms.jndi.InitialContextFactory").newInstance();I have googled around a bit and found a handful of other people who have had the same problem. For instance, check out [this thread|http://fixunix.com/weblogic/221703-javax-naming-noinitialcontextexception-cannot-instantiate-class-weblogic-jndi-wlinitialcontextfactory-root-exception-java-lang-classnotfoundexception-weblogic-jndi-wlinitialcontextfactory.html] .
    The issue seems to occur when the program runs inside another environment. The guy in the thread referenced above is using WebLogic. I'm trying to run my code inside Portware, which is a java application used for stock trading. I basically load my code into Portware and it runs inside the Portware environment. I have access to all the Portware classes and so forth. It appears that OpenJMS does not adapt well to being run inside an environment that controls that classpath.
    If anyone has any ideas about how I can hack my way around this problem, I would greatly appreciate it. How can I figure out what classpath the OpenJMS stuff is trying to use? It is obviously not using the one that is defined by the environment it is running in.
    Thanks.

    When I write a program that is to run inside Portware, I must put any jar files it depends on in an "ext" directory that is under the main Portware directory. So this is the classpath (along with Portware's own jar files). This has worked fine for a lot of programs I've written.
    I have included the OpenJMS jar files in this directory as well. I know that they are in the Portware classpath because I can find them using a program running in Portware when I use the Class.forName() method.
    As you suggested, I ran a program containing the line:
    System.out.println(System.getProperties().getProperty("java.class.path"));It printed the following line:
    ;C:\Program Files\Java\jre1.5.0_14\lib\deploy.jarObviously, Portware's classpath is different from this.
    I should mention, by the way, that when I load my programs into Portware I do so by pointing Portware to a *.java file and then compiling it from within Portware. A program that compiles correctly in Netbeans might not compile in Portware if I don't have the correct jars loaded into the ext directory. Once a program has been compiled withing Portware, I am able to find it on a menu and run it in Portware.
    My program that uses the OpenJMS jar compiles fine in Portware, but fails at runtime with the ClassNotFoundException. This is in spite of the fact that the class that the OpenJMS jar is trying to find is in a jar file that is in the same ext directory that the OpenJMS jar file is in, and also in spite of the fact that I am able to load the class myself using the Class.forName() method.

  • [JNDI] problem to publish local interface

    I have a problem (same as OC4J AS), the remote interface work well, but I can't use the local interface:
    package be.starapic.test.ejb;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    @Stateless(name="mysession2", mappedName="mysession2")
    @Local(MySession2Local.class)
    public class MySession2Bean implements MySession2Local {
         public String sayHello2() {
              return "You are welcome :)";
    Can't find that Local interface when browsing JNDI tree, so I guest you, what must I do ??? I think it would work because I use mappedName, but won't work with local interface :(

    Hi,
    Are you implementing Windows Azure Pack [WAP] solution ?
    If so, then I would request to post your question once again on the Azure Pack Forum.
    http://social.msdn.microsoft.com/forums/azure/en-US/home?forum=windowsazurepack
    Regards,
    Mekh.

Maybe you are looking for

  • HELP!!: Two server application instances could work in the same port?

    Hi everybody!!! i have two server application instances over the same JVM and both of them need to get requests from the same port, how can i get this?? I`m not interested on using RMI, and i wouldn`t like to use sockets, because i have already using

  • SQL query to get alert information

    Hello, Would anyone help me with a query where we can find the all state change information of an alert. The below query I am using will give the last state change not all state change happening. Any help is appreciated. SELECT AlertStringName, Monit

  • Transfer of IPOD Tunes to New Mac Book

    Prior to purchasing a new Mac Book and IPOD (80 Gig), I ripped my entire CD collection using ITunes to my old PC. Connecting my new IPOD to the PC, I then sync'd the entire ITunes Library to the IPOD. Upon purchase of the MacBook, I attempted to "syc

  • After automatic update to firefox 23, the wlecome to firefox/ Android page always opens

    The automatic updater did the update to Firefox 23 several days ago. Since then, when I open Firefox the add-on compatibility check runs before Firefox opens, and Firefox always opens to the Welcome to Firefox page that wants me to connect my PC with

  • Imported Illustrator type looks bad in Premiere.

    I'm making title cards in Adobe Illustrator CS 4 and importing them into Premiere CS 4. When I render the movie, the type looks like crap. Is there something I can do in Illustrator or Premiere to improve the quality? Thanks in advance for the help.