ClassCastException out of JNDI

I have an object I am placing in the JNDI tree through a WebLogic
startup class. I then have other classes that access that object. Right
now I am doing testing and I want to get at that object through a
servlet. The problem is that I get a ClassCastException when retrieving
the object. Why? Different classloaders. My object in the JNDI was
loaded with :
weblogic.boot.ServerClassLoader@b62b1638
My servlet was loaded with
weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave@1f031637
How can I get to my object. My object is already in the WebLogic
classpath. Is there some way to specify the classloader?
Thanks for any help.
Jay Baker

Joel Shellman wrote:
I get the following ClassCastException when trying to get a
PersistenceManagerFactory out of JNDI after JCA installation of Kodo 3.0.0.
[12/12/03 9:55:43:338 PST] 605771bf SystemErr R
java.lang.ClassCastException: kodo.jdbc.ee.JDBCConnectionFactory
[12/12/03 9:55:43:338 PST] 605771bf SystemErr R      at
com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:328)
[12/12/03 9:55:43:338 PST] 605771bf SystemErr R      at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:146)
[12/12/03 9:55:43:338 PST] 605771bf SystemErr R      at
kodo.runtime.KodoHelper.getPersistenceManagerFactory(KodoHelper.java:212)
[12/12/03 9:55:43:338 PST] 605771bf SystemErr R      at
kodo.runtime.KodoHelper.getPersistenceManagerFactory(KodoHelper.java:184)
Any ideas what would be causing this problem?Here are some more details. I get the exception when I call:
KodoHelper.getPersistenceManagerFactory("java:comp/env/jdo/Kodo", new
InitialContext());
But if I call:
Context context = new InitialContext();
pmf = (PersistenceManagerFactory)context.lookup("java:comp/env/jdo/Kodo");
Then it works fine it seems.

Similar Messages

  • Adapter JNDI are errored out in JNDI tree on Weblogic

    Hey,
    I have setup weblogic 10.3.4 and SOA Suite 11g.
    The adapters seem to be deployed and active with a green 'OK' status in the deployments on the soa_server1. However when I go to the jndi tree for the soa_server1, all the adapters have an '!' for errored out.
    This is causing various problems. In particular when a process using the Oracle Apps Adapter is deployed it is unable to find the jdbc connection associated with the adapter. However, the jdbc jndi entry is in the tree and the jdbc connection test's just fine.
    So there seems to be a missing link in how the adapters are deployed and how the JNDI is getting updated or something.
    The error is below. Any help appreciated.
    ====> CubeEngine load MIS_INB_WorkOrder_AR_Sync/Process_WO_AR_Sync took 726 ms
    INFO: DeploymentEventPublisher.invoke Publishing deploy event for default/MIS_INB_WorkOrder_AR_Sync!1.0*soa_85dcf1de-1d63-4b34-9f99-3e52c1f04366
    <Aug 10, 2011 1:25:33 PM EDT> <Warning> <oracle.soa.services.notification> <BEA-000000> <<.> Notification via email, voice, SMS or IM will not be sent. If you would like to enable them, please configure corresponding sdpmessaging driver. Then modify the accounts and set NotificationMode attribute to either NONE, EMAIL or ALL in workflow-notification-config.xml>
    INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> MIS_INB_WorkOrder_AR_Sync Error while performing endpoint Activation: javax.resource.ResourceException: Unable to find data source null>
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> MIS_INB_WorkOrder_AR_Sync
    javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:52)
         at oracle.tip.adapter.aq.v2.AppsEndpoint.activate(AppsEndpoint.java:51)
         at oracle.tip.adapter.aq.v2.jca.AQResourceAdapter.endpointActivation(AQResourceAdapter.java:62)
         at oracle.tip.adapter.apps.AppsResourceAdapter.endpointActivation(AppsResourceAdapter.java:152)
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:494)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performEndpointActivation(JCAEndpointActivation.java:637)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.activateInboundJcaEndpoint(JCAEndpointActivation.java:620)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performActivation(JCAEndpointActivation.java:383)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:583)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.activate(AdapterServiceRevisionRegistry.java:438)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.setDefaultRevision(AdapterServiceRevisionRegistry.java:403)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeries.setDefaultRevision(AdapterServiceRevisionRegistry.java:328)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeriesSet.setDefaultRevision(AdapterServiceRevisionRegistry.java:134)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.setDefaultRevision(AdapterServiceRevisionRegistry.java:96)
         at oracle.integration.platform.blocks.adapter.AdapterService.defaultRevisionChanged(AdapterService.java:309)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.processDefaultInSeries(FabricKernelInitializerServlet.java:577)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.run(FabricKernelInitializerServlet.java:526)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: java.sql.SQLException: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:97)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:68)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:216)
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:49)
         ... 19 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:429)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getConnection(AppsManagedConnectionFactory.java:308)
         at oracle.tip.adapter.apps.AppsManagedConnection.getConnection(AppsManagedConnection.java:147)
         at oracle.tip.adapter.apps.AppsConnection.getJdbcConnection(AppsConnection.java:77)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:94)
         ... 22 more
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.AppsDataSource'. Resolved 'jdbc'; remaining name 'AppsDataSource'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:426)
         ... 26 more
    >
    oracle.fabric.common.FabricDeploymentException: [JCABinding] [MIS_INB_WorkOrder_AR_Sync.consumeARTrgReq/1.0]Unable to complete initialization due to: Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    : Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    {rootCauses=[]}
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.access$3600(AdapterServiceRevisionRegistry.java:66)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:608)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.activate(AdapterServiceRevisionRegistry.java:438)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.setDefaultRevision(AdapterServiceRevisionRegistry.java:403)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeries.setDefaultRevision(AdapterServiceRevisionRegistry.java:328)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeriesSet.setDefaultRevision(AdapterServiceRevisionRegistry.java:134)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.setDefaultRevision(AdapterServiceRevisionRegistry.java:96)
         at oracle.integration.platform.blocks.adapter.AdapterService.defaultRevisionChanged(AdapterService.java:309)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.processDefaultInSeries(FabricKernelInitializerServlet.java:577)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.run(FabricKernelInitializerServlet.java:526)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: BINDING.JCA-12517
    Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:513)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performEndpointActivation(JCAEndpointActivation.java:637)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.activateInboundJcaEndpoint(JCAEndpointActivation.java:620)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performActivation(JCAEndpointActivation.java:383)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:583)
         ... 11 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:52)
         at oracle.tip.adapter.aq.v2.AppsEndpoint.activate(AppsEndpoint.java:51)
         at oracle.tip.adapter.aq.v2.jca.AQResourceAdapter.endpointActivation(AQResourceAdapter.java:62)
         at oracle.tip.adapter.apps.AppsResourceAdapter.endpointActivation(AppsResourceAdapter.java:152)
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:494)
         ... 15 more
    Caused by: java.sql.SQLException: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:97)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:68)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:216)
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:49)
         ... 19 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:429)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getConnection(AppsManagedConnectionFactory.java:308)
         at oracle.tip.adapter.apps.AppsManagedConnection.getConnection(AppsManagedConnection.java:147)
         at oracle.tip.adapter.apps.AppsConnection.getJdbcConnection(AppsConnection.java:77)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:94)
         ... 22 more
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.AppsDataSource'. Resolved 'jdbc'; remaining name 'AppsDataSource'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:426)
         ... 26 more
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.integration.platform> <SOA-20020> <Deployment of composite "MIS_INB_WorkOrder_AR_Sync" failed: [JCABinding] [MIS_INB_WorkOrder_AR_Sync.consumeARTrgReq/1.0]Unable to complete initialization due to: Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    : Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.

    Hey,
    I have setup weblogic 10.3.4 and SOA Suite 11g.
    The adapters seem to be deployed and active with a green 'OK' status in the deployments on the soa_server1. However when I go to the jndi tree for the soa_server1, all the adapters have an '!' for errored out.
    This is causing various problems. In particular when a process using the Oracle Apps Adapter is deployed it is unable to find the jdbc connection associated with the adapter. However, the jdbc jndi entry is in the tree and the jdbc connection test's just fine.
    So there seems to be a missing link in how the adapters are deployed and how the JNDI is getting updated or something.
    The error is below. Any help appreciated.
    ====> CubeEngine load MIS_INB_WorkOrder_AR_Sync/Process_WO_AR_Sync took 726 ms
    INFO: DeploymentEventPublisher.invoke Publishing deploy event for default/MIS_INB_WorkOrder_AR_Sync!1.0*soa_85dcf1de-1d63-4b34-9f99-3e52c1f04366
    <Aug 10, 2011 1:25:33 PM EDT> <Warning> <oracle.soa.services.notification> <BEA-000000> <<.> Notification via email, voice, SMS or IM will not be sent. If you would like to enable them, please configure corresponding sdpmessaging driver. Then modify the accounts and set NotificationMode attribute to either NONE, EMAIL or ALL in workflow-notification-config.xml>
    INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> MIS_INB_WorkOrder_AR_Sync Error while performing endpoint Activation: javax.resource.ResourceException: Unable to find data source null>
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> MIS_INB_WorkOrder_AR_Sync
    javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:52)
         at oracle.tip.adapter.aq.v2.AppsEndpoint.activate(AppsEndpoint.java:51)
         at oracle.tip.adapter.aq.v2.jca.AQResourceAdapter.endpointActivation(AQResourceAdapter.java:62)
         at oracle.tip.adapter.apps.AppsResourceAdapter.endpointActivation(AppsResourceAdapter.java:152)
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:494)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performEndpointActivation(JCAEndpointActivation.java:637)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.activateInboundJcaEndpoint(JCAEndpointActivation.java:620)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performActivation(JCAEndpointActivation.java:383)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:583)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.activate(AdapterServiceRevisionRegistry.java:438)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.setDefaultRevision(AdapterServiceRevisionRegistry.java:403)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeries.setDefaultRevision(AdapterServiceRevisionRegistry.java:328)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeriesSet.setDefaultRevision(AdapterServiceRevisionRegistry.java:134)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.setDefaultRevision(AdapterServiceRevisionRegistry.java:96)
         at oracle.integration.platform.blocks.adapter.AdapterService.defaultRevisionChanged(AdapterService.java:309)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.processDefaultInSeries(FabricKernelInitializerServlet.java:577)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.run(FabricKernelInitializerServlet.java:526)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: java.sql.SQLException: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:97)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:68)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:216)
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:49)
         ... 19 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:429)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getConnection(AppsManagedConnectionFactory.java:308)
         at oracle.tip.adapter.apps.AppsManagedConnection.getConnection(AppsManagedConnection.java:147)
         at oracle.tip.adapter.apps.AppsConnection.getJdbcConnection(AppsConnection.java:77)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:94)
         ... 22 more
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.AppsDataSource'. Resolved 'jdbc'; remaining name 'AppsDataSource'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:426)
         ... 26 more
    >
    oracle.fabric.common.FabricDeploymentException: [JCABinding] [MIS_INB_WorkOrder_AR_Sync.consumeARTrgReq/1.0]Unable to complete initialization due to: Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    : Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    {rootCauses=[]}
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.access$3600(AdapterServiceRevisionRegistry.java:66)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:608)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.activate(AdapterServiceRevisionRegistry.java:438)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.setDefaultRevision(AdapterServiceRevisionRegistry.java:403)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeries.setDefaultRevision(AdapterServiceRevisionRegistry.java:328)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceSeriesSet.setDefaultRevision(AdapterServiceRevisionRegistry.java:134)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry.setDefaultRevision(AdapterServiceRevisionRegistry.java:96)
         at oracle.integration.platform.blocks.adapter.AdapterService.defaultRevisionChanged(AdapterService.java:309)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.processDefaultInSeries(FabricKernelInitializerServlet.java:577)
         at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.run(FabricKernelInitializerServlet.java:526)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: BINDING.JCA-12517
    Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:513)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performEndpointActivation(JCAEndpointActivation.java:637)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.activateInboundJcaEndpoint(JCAEndpointActivation.java:620)
         at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performActivation(JCAEndpointActivation.java:383)
         at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:583)
         ... 11 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:52)
         at oracle.tip.adapter.aq.v2.AppsEndpoint.activate(AppsEndpoint.java:51)
         at oracle.tip.adapter.aq.v2.jca.AQResourceAdapter.endpointActivation(AQResourceAdapter.java:62)
         at oracle.tip.adapter.apps.AppsResourceAdapter.endpointActivation(AppsResourceAdapter.java:152)
         at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:494)
         ... 15 more
    Caused by: java.sql.SQLException: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:97)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:68)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getQueue(DBQueueFactory.java:216)
         at oracle.tip.adapter.aq.v2.database.AppsDequeueAgentFactory.createAppsDequeueAgent(AppsDequeueAgentFactory.java:49)
         ... 19 more
    Caused by: javax.resource.ResourceException: Unable to find data source null
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:429)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getConnection(AppsManagedConnectionFactory.java:308)
         at oracle.tip.adapter.apps.AppsManagedConnection.getConnection(AppsManagedConnection.java:147)
         at oracle.tip.adapter.apps.AppsConnection.getJdbcConnection(AppsConnection.java:77)
         at oracle.tip.adapter.aq.v2.database.DBQueueFactory.getDatabaseConnection(DBQueueFactory.java:94)
         ... 22 more
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.AppsDataSource'. Resolved 'jdbc'; remaining name 'AppsDataSource'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:426)
         ... 26 more
    <Aug 10, 2011 1:25:44 PM EDT> <Error> <oracle.integration.platform> <SOA-20020> <Deployment of composite "MIS_INB_WorkOrder_AR_Sync" failed: [JCABinding] [MIS_INB_WorkOrder_AR_Sync.consumeARTrgReq/1.0]Unable to complete initialization due to: Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.
    : Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter Oracle Applications Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{QueueName=WF_BPEL_Q, DatabaseSchema=APPS, Consumer=ORA_850j4e1g8gsjcc9g6oo36e9h65, MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.mas.soa.workorder2ar.trigger', AppsEventSchema=CUSTOM_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null
    Please correct the reported issue and redeploy the BPEL process.

  • ClassCastException on ejb jndi lookup

    Hello,
    I try to get an standalone remote client to to connect to my stateless session bean:
    java.util.Properties props = new java.util.Properties();
    props.put("java.naming.provider.url", "181.205.12.19:50004");
    props.put("java.naming.factory.initial", "com.sap.engine.services.jndi.InitialContextFactoryImpl" );
    props.put("java.naming.security.authentication", "simple");
    props.put("java.naming.security.principal", "j2ee_admin");
    props.put("java.naming.security.credentials", "*****");
    jndiContext = new InitialContext(props);
    fetching of jndi context is fine, but once I try to lookup my home interface I get a class cast exception:
    home = (ToEdifactConverterHome) PortableRemoteObject.narrow(jndiContext.lookup ("sap.com/EdifactEar/ToEdifactConverterBean"), ToEdifactConverterHome.class);
    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 test.cceag.transform.TransformTester.setUp(TransformTester.java:74)
         at test.cceag.transform.TransformTester.main(TransformTester.java:48)
    The jndi lookup seems to return the bean implementation object, but not the home interface itself.
    Thanks for any hints
    Matthias

    Hi Matthias,
    i think the   guide
    "How to...EJB: Accessing EJB Applications Using JNDI"
    will help you to solve the ejb lookup problem:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0736159e-0301-0010-9ea4-c63d83d0797b
    good luck, Katharina

  • Object GC'ed out of JNDI?

    Folks,
    We've experienced some bizarre behavior within one of our EJB's and its
    interactions with JNDI during our performance testing effort. We've
    developed a theory, and we're currently developing a test case for it, but I
    wanted to post it here and see if anybody has encountered similar issues, or
    if anybody from BEA can confirm our theory.
    The ejbCreate() method for the EJB in question instantiates an object and
    binds it into JNDI, as follows:
    try {
    Context ctx = new InitialContext();
    ProblemObject obj = new ProblemObject();
    ctx.rebind("problemObject", obj);
    ctx.close();
    } catch(Exception e) {}
    Another class, unrelated to the EJB, then looks up the bound object at some
    unspecified later point in time, and tries to use it. In about half of our
    load tests, one of the lookups will return null (i.e., the lookup succeeds,
    but the result is null, and the target object for the assignment is assigned
    null). Thereafter, all lookups return null, and all attempts to use the
    problem object fail with a NullPointerException.
    Our theory is that, since the object initially bound into JNDI was a local
    variable, it is subject to GC. The randomness could be caused by
    coincidence--specifically, if the problem object is in use when a major GC
    occurs, it won't get collected. If, however, it's not being used (and
    therefore not referenced) when GC occurs, it gets collected.
    Thoughts?
    I'll post the results of our test, as well.
    Thanks,
    cramer

    "Steve Cramer" <[email protected]> writes:
    try {
    Context ctx = new InitialContext();
    ProblemObject obj = new ProblemObject();
    ctx.rebind("problemObject", obj);
    ctx.close();
    } catch(Exception e) {}
    Another class, unrelated to the EJB, then looks up the bound object at some
    unspecified later point in time, and tries to use it. In about half of our
    load tests, one of the lookups will return null (i.e., the lookup succeeds,
    but the result is null, and the target object for the assignment is assigned
    null). Thereafter, all lookups return null, and all attempts to use the
    problem object fail with a NullPointerException.
    Our theory is that, since the object initially bound into JNDI was a local
    variable, it is subject to GC. The randomness could be caused by
    coincidence--specifically, if the problem object is in use when a major GC
    occurs, it won't get collected. If, however, it's not being used (and
    therefore not referenced) when GC occurs, it gets collected.If I understood JNDI halfway right, it'll store (typically) a
    serialized version of your object in the directory. So that should
    depend at all on the existence of the original object that was
    bound. A lookup will re-instatiate it anyway.
    So GC shouldn't matter in this case.
    But unfortunately, I don't have any idea what could really be the
    cause. Does the failure happen only in one specific client
    JVM-instance, and others keep getting the object correctly at the same
    time. E.g. ist the object still bound when you check in the
    weblogic.Console?
    -- joe

  • Figuring out local JNDI names with WSAD

    I have a cmp bean, with JNDI name "ejb/ebmusic2/AlbumLocalHome".
    when i try to look it up from another bean it fails. i also tried to add
    the prefix "java:comp/env" as i saw being done in IBM redbook in a
    similar circumstances, and yet the JNDI client fails to discover everything
    that is after the "java" prefix.
    any thoughts ? thanks for your help.

    try "local:ejb/ejb/"
    so your code could say:
    private String JNDI_LOCAL_PREFIX = "local:ejb/ejb/";

  • ClassCastException while looking up RMI objects bound to weblogic.JNDI under WLS 6.1

    We deploy a servlet (in a single .war archive) establishing a RMI connection to
    an external Java object bound into weblogic JNDI (WLS 6.1).
    We get a ClassCastException on invoking JNDI lookup:
    Servlet failed with Exception>
    java.lang.ClassCastException: $Proxy67
         at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Curiously we don't observe these problems when we include all the classes of the
    remote application in the classpath of the WebLogic Server. Actually we want to
    avoid including external classes in weblogic.classpath for (hot) deployment reasons.
    It also seems that problems don't occur when accessing the remote object from
    an independent client application.
    We expect this to be a classloader conflict within WLS 6.1
    Does anybody know a solution to our problems?
    Thanks for suggestions
    Andreas Koerner

    There was a similar bug that was supposedly fixed in WL 6.1 SP 2. I had
    filed a bug on this myself, and was given a patch for SP1, you should be
    able to ask for the patch for CR060416.
    Peter Mularien
    Deploy Solutions, Inc.
    Andreas Koerner wrote:
    >
    We deploy a servlet (in a single .war archive) establishing a RMI connection to
    an external Java object bound into weblogic JNDI (WLS 6.1).
    We get a ClassCastException on invoking JNDI lookup:
    Servlet failed with Exception>
    java.lang.ClassCastException: $Proxy67
    at com.thyssenkrupp.tks.tnt.admin.rmi.ClientServlet.init(ClientServlet.java:81)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:366)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:240)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Curiously we don't observe these problems when we include all the classes of the
    remote application in the classpath of the WebLogic Server. Actually we want to
    avoid including external classes in weblogic.classpath for (hot) deployment reasons.
    It also seems that problems don't occur when accessing the remote object from
    an independent client application.
    We expect this to be a classloader conflict within WLS 6.1
    Does anybody know a solution to our problems?
    Thanks for suggestions
    Andreas Koerner

  • Problem with JNDI in WLS 5.1

    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco

    Take out the "weblogic.jndi.WLInitialContextFactory" and add the respective factory NAME..
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Cheers,
    Naggi
    Senthil Kumar S wrote:
    http://weblogic.com/docs51/classdocs/API_jndi.html#delegate
    Marco wrote:
    Hi all,
    i have a problem with JNDI in WLE 5.1.
    i am accessing an LDAP on another machine running Netscape Directory Server.
    The host URL is ldap://myhost:65535/o=marco, c=fi
    i am always getting back the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassCastException: weblog
    ic.jndi.WLInitialContextFactory
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    58)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    and my code is this:
    Hashtable _environment = new Hashtable();
    try {
    environment.put(Context.INITIALCONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    environment.put(Context.PROVIDERURL, "ldap://myhost:65535");
    if ((principal!=null) || (credentials!=null)) {
    environment.put(Context.SECURITYAUTHENTICATION, "simple");
    environment.put(Context.SECURITYPRINCIPAL, principal);
    environment.put(Context.SECURITYCREDENTIALS, credentials);
    context = new InitialContext(environment);
    parser = context.getNameParser(initialCtxFactory);
    } catch(Exception e) {
    e.printStackTrace();
    can anyone help me please??
    thanx in advance
    marco--
    http://www.net4tech.com

  • JNDI lookup through COMP_NAME

    Hello Frnds,
    I am using xdoclet 1.2 feature in my application to generate the stubs for ejb bean classes.
    and i am using the websphere application server to deploy my application.
    Please find the code below :
    In Home class
    public static final String COMP_NAME="java:comp/env/ejb/TestEJBLocal";
    public static final String JNDI_NAME="ejb/TestEJBLocal";
    In Bean Class
    @ejb.bean name="TestEJB" view-type="local"
    * local-jndi-name="ejb/TestEJBLocal"
    * type="CMP" reentrant="False" cmp-version="2.x" schema="Test"
    * primkey-field="testID"
    For lookup:
    public EJBHome lookUpHome(Class homeClass) throws HomeFactoryException {
              try {
                   EJBHome ejbHome = (EJBHome) _ejbHomes.get(homeClass);
                   if (ejbHome == null) {
                        ejbHome = (EJBHome) PortableRemoteObject.narrow(_context
                                  .lookup("*java:comp/env/ejb/TestEJBLocal*"), homeClass);
                        _ejbHomes.put(homeClass, ejbHome);
                   return ejbHome;
              } catch (ClassCastException e) {
                   throw new HomeFactoryException(e);
              } catch (NamingException e) {
                   throw new HomeFactoryException(e);
    When i pass the COMP_NAME for lookup, application is throwing an exception like Name Not Found exception.
    The problem i'm facing here is, JNDI lookup is not happening through COMP_NAME.
    Could someone help me on resloving this problem.
    Helping on othis highly appreciated :)
    Cheers,
    Cap

    Hi:I'm unable to get JNDI reference object from remote application client with "java:comp/env/ejb/<lookupName>".
    The exception says:
    Application threw an exception:javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201 completed: No]
    The J2EE server and client are run on different machines, and needs to be like this. There isn't any problem with JSP/Servlet (cause they run/execute on the server itself). How will the client find out the JNDI refernce my mere specification of "java:comp/env/..."?
    Am I making a mistake anywhere?
    BEA Weblogic & IBM Websphere allows explicitly specifying the server name, while doing JNDI lookup. Is there anything similary for J2EE?
    I couldn't find reference for this anywhere in the J2EE tutorial or EJB books.
    - Devashish

  • Jndi unknown source

    I am trying jms example but i have problen while in lookup ,i could not find the resource running in the sun app server.
    the below is the code
    import javax.jms.*;
    import javax.naming.*;
    import java.util.*;
    public class SimpleTopicPublisher {
    * Main method.
    * @param args the topic used by the example and,
    * optionally, the number of messages to send
    public static void main(String[] args) {
    String topicName = null;
    Context jndiContext = null;
    TopicConnectionFactory topicConnectionFactory = null;
    TopicConnection topicConnection = null;
    TopicSession topicSession = null;
    Topic topic = null;
    TopicPublisher topicPublisher = null;
    TextMessage message = null;
    final int NUM_MSGS;
    if ( (args.length < 1) || (args.length > 2) ) {
    System.out.println("Usage: java " +
    "SimpleTopicPublisher <topic-name> " +
    "[<number-of-messages>]");
    System.exit(1);
    topicName = new String(args[0]);
    System.out.println("Topic name is " + topicName);
    if (args.length == 2){
    NUM_MSGS = (new Integer(args[1])).intValue();
    } else {
    NUM_MSGS = 1;
    * Create a JNDI API InitialContext object if none exists
    * yet.
    try {
                   // String url = "mq://INBANN0L3CT171.ap01.lucent.com:7676/";
    // Properties p = new Properties();
              //p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory");
    // p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");
    //p.put(Context.PROVIDER_URL, url);
    //ctx = new InitialContext(p);
    jndiContext = new InitialContext();
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API " +
    "context: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    * Look up connection factory and topic. If either does
    * not exist, exit.
    try {
    topicConnectionFactory = (TopicConnectionFactory)
    jndiContext.lookup("jms/myjms");
    topic = (Topic) jndiContext.lookup(topicName);
    } catch (NamingException e) {
    System.out.println("JNDI API lookup failed: " +
    e.toString());
    e.printStackTrace();
    System.exit(1);
    * Create connection.
    * Create session from connection; false means session is
    * not transacted.
    * Create publisher and text message.
    * Send messages, varying text slightly.
    * Finally, close connection.
    try {
    topicConnection =
    topicConnectionFactory.createTopicConnection();
    topicSession =
    topicConnection.createTopicSession(false,
    Session.AUTO_ACKNOWLEDGE);
    topicPublisher = topicSession.createPublisher(topic);
    message = topicSession.createTextMessage();
    for (int i = 0; i < NUM_MSGS; i++) {
    message.setText("This is message " + (i + 1));
    System.out.println("Publishing message: " +
    message.getText());
    topicPublisher.publish(message);
    } catch (JMSException e) {
    System.out.println("Exception occurred: " +
    e.toString());
    } finally {
    if (topicConnection != null) {
    try {
    topicConnection.close();
    } catch (JMSException e) {}
    and below is the error while running
    D:\>java SimpleTopicPublisher mytopic 3
    Topic name is mytopic
    Apr 23, 2012 5:03:48 PM com.sun.enterprise.v3.server.CommonClassLoaderServiceIm
    l findDerbyClient
    INFO: Cannot find javadb client jar file, derby jdbc driver will not be availab
    e by default.
    JNDI API lookup failed: javax.naming.NamingException: Lookup failed for 'java:c
    mp/env/jms/myjms' in SerialContext[myEnv={java.naming.factory.initial=com.sun.e
    terprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com
    sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presenta
    ion.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NamingException:
    nvocation exception: Got null ComponentInvocation ]
    javax.naming.NamingException: Lookup failed for 'java:comp/env/jms/myjms' in Se
    ialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.Se
    ialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming,
    ava.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactor
    Impl} [Root exception is javax.naming.NamingException: Invocation exception: Go
    null ComponentInvocation ]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:518)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: javax.naming.NamingException: Invocation exception: Got null Compone
    tInvocation
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.getCompone
    tId(GlassfishNamingManagerImpl.java:873)
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Gla
    sfishNamingManagerImpl.java:742)
    at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.
    ava:169)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:498)
    ... 3 more
    D:\>javac SimpleTopicPublisher.java
    D:\>java SimpleTopicPublisher mytopic 3
    Topic name is mytopic
    Apr 23, 2012 5:09:28 PM com.sun.enterprise.v3.server.CommonClassLoaderServiceIm
    l findDerbyClient
    INFO: Cannot find javadb client jar file, derby jdbc driver will not be availab
    e by default.
    java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:262)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNam
    Service(SerialContext.java:1244)
    at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(Seria
    Context.java:410)
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:346)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:504)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: java.lang.ClassCastException: Object is not of remote type com.sun.e
    terprise.naming.impl.SerialContextProvider
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:254)
    ... 8 more
    JNDI API lookup failed: javax.naming.NamingException: Lookup failed for 'jms/my
    ms' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.nami
    g.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterpris
    .naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIS
    ateFactoryImpl} [Root exception is javax.naming.NamingException: Unable to acqu
    re SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=c
    m.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.
    kgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.
    resentation.rmi.JNDIStateFactoryImpl} [Root exception is java.lang.ClassCastExc
    ption]]
    javax.naming.NamingException: Lookup failed for 'jms/myjms' in SerialContext[my
    nv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContex
    Factory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.fa
    tory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root e
    ception is javax.naming.NamingException: Unable to acquire SerialContextProvide
    for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming
    impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.
    aming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDISta
    eFactoryImpl} [Root exception is java.lang.ClassCastException]]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:518)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvide
    for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming
    impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.
    aming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDISta
    eFactoryImpl} [Root exception is java.lang.ClassCastException]
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:351)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:504)
    ... 3 more
    Caused by: java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:262)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNam
    Service(SerialContext.java:1244)
    at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(Seria
    Context.java:410)
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:346)
    ... 4 more
    Caused by: java.lang.ClassCastException: Object is not of remote type com.sun.e
    terprise.naming.impl.SerialContextProvider
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:254)
    ... 8 more
    plese help me in resolving...

    I am trying jms example but i have problen while in lookup ,i could not find the resource running in the sun app server.
    the below is the code
    import javax.jms.*;
    import javax.naming.*;
    import java.util.*;
    public class SimpleTopicPublisher {
    * Main method.
    * @param args the topic used by the example and,
    * optionally, the number of messages to send
    public static void main(String[] args) {
    String topicName = null;
    Context jndiContext = null;
    TopicConnectionFactory topicConnectionFactory = null;
    TopicConnection topicConnection = null;
    TopicSession topicSession = null;
    Topic topic = null;
    TopicPublisher topicPublisher = null;
    TextMessage message = null;
    final int NUM_MSGS;
    if ( (args.length < 1) || (args.length > 2) ) {
    System.out.println("Usage: java " +
    "SimpleTopicPublisher <topic-name> " +
    "[<number-of-messages>]");
    System.exit(1);
    topicName = new String(args[0]);
    System.out.println("Topic name is " + topicName);
    if (args.length == 2){
    NUM_MSGS = (new Integer(args[1])).intValue();
    } else {
    NUM_MSGS = 1;
    * Create a JNDI API InitialContext object if none exists
    * yet.
    try {
                   // String url = "mq://INBANN0L3CT171.ap01.lucent.com:7676/";
    // Properties p = new Properties();
              //p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory");
    // p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");
    //p.put(Context.PROVIDER_URL, url);
    //ctx = new InitialContext(p);
    jndiContext = new InitialContext();
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API " +
    "context: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    * Look up connection factory and topic. If either does
    * not exist, exit.
    try {
    topicConnectionFactory = (TopicConnectionFactory)
    jndiContext.lookup("jms/myjms");
    topic = (Topic) jndiContext.lookup(topicName);
    } catch (NamingException e) {
    System.out.println("JNDI API lookup failed: " +
    e.toString());
    e.printStackTrace();
    System.exit(1);
    * Create connection.
    * Create session from connection; false means session is
    * not transacted.
    * Create publisher and text message.
    * Send messages, varying text slightly.
    * Finally, close connection.
    try {
    topicConnection =
    topicConnectionFactory.createTopicConnection();
    topicSession =
    topicConnection.createTopicSession(false,
    Session.AUTO_ACKNOWLEDGE);
    topicPublisher = topicSession.createPublisher(topic);
    message = topicSession.createTextMessage();
    for (int i = 0; i < NUM_MSGS; i++) {
    message.setText("This is message " + (i + 1));
    System.out.println("Publishing message: " +
    message.getText());
    topicPublisher.publish(message);
    } catch (JMSException e) {
    System.out.println("Exception occurred: " +
    e.toString());
    } finally {
    if (topicConnection != null) {
    try {
    topicConnection.close();
    } catch (JMSException e) {}
    and below is the error while running
    D:\>java SimpleTopicPublisher mytopic 3
    Topic name is mytopic
    Apr 23, 2012 5:03:48 PM com.sun.enterprise.v3.server.CommonClassLoaderServiceIm
    l findDerbyClient
    INFO: Cannot find javadb client jar file, derby jdbc driver will not be availab
    e by default.
    JNDI API lookup failed: javax.naming.NamingException: Lookup failed for 'java:c
    mp/env/jms/myjms' in SerialContext[myEnv={java.naming.factory.initial=com.sun.e
    terprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com
    sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presenta
    ion.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NamingException:
    nvocation exception: Got null ComponentInvocation ]
    javax.naming.NamingException: Lookup failed for 'java:comp/env/jms/myjms' in Se
    ialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.Se
    ialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming,
    ava.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactor
    Impl} [Root exception is javax.naming.NamingException: Invocation exception: Go
    null ComponentInvocation ]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:518)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: javax.naming.NamingException: Invocation exception: Got null Compone
    tInvocation
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.getCompone
    tId(GlassfishNamingManagerImpl.java:873)
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(Gla
    sfishNamingManagerImpl.java:742)
    at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.
    ava:169)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:498)
    ... 3 more
    D:\>javac SimpleTopicPublisher.java
    D:\>java SimpleTopicPublisher mytopic 3
    Topic name is mytopic
    Apr 23, 2012 5:09:28 PM com.sun.enterprise.v3.server.CommonClassLoaderServiceIm
    l findDerbyClient
    INFO: Cannot find javadb client jar file, derby jdbc driver will not be availab
    e by default.
    java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:262)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNam
    Service(SerialContext.java:1244)
    at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(Seria
    Context.java:410)
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:346)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:504)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: java.lang.ClassCastException: Object is not of remote type com.sun.e
    terprise.naming.impl.SerialContextProvider
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:254)
    ... 8 more
    JNDI API lookup failed: javax.naming.NamingException: Lookup failed for 'jms/my
    ms' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.nami
    g.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterpris
    .naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIS
    ateFactoryImpl} [Root exception is javax.naming.NamingException: Unable to acqu
    re SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=c
    m.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.
    kgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.
    resentation.rmi.JNDIStateFactoryImpl} [Root exception is java.lang.ClassCastExc
    ption]]
    javax.naming.NamingException: Lookup failed for 'jms/myjms' in SerialContext[my
    nv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContex
    Factory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.fa
    tory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root e
    ception is javax.naming.NamingException: Unable to acquire SerialContextProvide
    for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming
    impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.
    aming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDISta
    eFactoryImpl} [Root exception is java.lang.ClassCastException]]
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:518)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:455)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at SimpleTopicPublisher.main(SimpleTopicPublisher.java:112)
    Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvide
    for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming
    impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.
    aming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDISta
    eFactoryImpl} [Root exception is java.lang.ClassCastException]
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:351)
    at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.ja
    a:504)
    ... 3 more
    Caused by: java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:262)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNam
    Service(SerialContext.java:1244)
    at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(Seria
    Context.java:410)
    at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialConte
    t.java:346)
    ... 4 more
    Caused by: java.lang.ClassCastException: Object is not of remote type com.sun.e
    terprise.naming.impl.SerialContextProvider
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(Portable
    emoteObject.java:254)
    ... 8 more
    plese help me in resolving...

  • NW 7.0 EHP1 DestinationService java.lang.ClassCastException

    Hi,
    I am trying to set up an RFC Connection in the SAP Enterprise Portal using the RFCDestinationsService on NetWeaver 7.0 EHP1.
    I have previously done this in NW 6.2 but it seems that the implementation on the SAP JCO has changed in NW 7.0
    The code I am using:
    import java.util.Properties;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import com.sap.mw.jco.JCO;
    import com.sap.mw.jco.JCO.Exception;
    import com.sap.security.core.server.destinations.api.DestinationException;
    import com.sap.security.core.server.destinations.api.DestinationService;
    import com.sap.security.core.server.destinations.api.RFCDestination;
         JCO.Client jcoClient = null;
         RFCDestination dst = null;
         DestinationService dstService = null;
         InitialContext ctx = new InitialContext();
         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         Object obj = ctx.lookup(DestinationService.JNDI_KEY_LOCAL);
         dstService = (DestinationService) obj;
    At this point the Cast to the DestinationService throws a ClassCastException.
    Can anyone point me in the right direction to overcome this.
    Many thanks,

    Hi Anyone Struggling With This,
    I have found a solution. I had a look in Visual Administrator at the implementation of the JNDI Registry in NW 7.01 and found that it is substantially different to NW 6.40.
    Anyone with access to both systems will see what I mean.
    Anyway DestinationService.JNDI_KEY_LOCAL returns a reference to tcsecdestinationsservicelocal which returns the class com.sap.security.core.server.destinations.services.LocalDestinationServiceImpl. And that causes the ClassCastException.
    The JNDI Registry in NW 7.01 also has a reference to tcsecdestinationsserviceremote referring to a class com.sap.engine.interfaces.cross.ObjectReferenceImpl. That class returns a $Proxy object and does not throw an Exception.
    The code that works (for me) is
         Object obj = ctx.lookup("tcsecdestinationsserviceremote");
         DestinationService dstService = (DestinationService) obj;
    and away you go.
    I hope this helps someone else struggling with this issue.
    Cheers,
    Neil.

  • Jndi lookup of deployable proxy

    Hey All,
    i try to call webservice via a deployable proxy.
    when looking it up i get a naming exception.
    i set up a jndi mapping in the client bean's ejb-j2ee-engine.xml, which reads as follows:
    <server-component-ref>
         <description>
         </description>
         <name>WeatherServiceProxy</name>
         <type>interface</type>
         <jndi-name>/wsclients/proxies/de.sap.coe/WeatherServiceProject/WeatherServiceProxy</jndi-name>
    </server-component-ref>
    i look up the proxy like this:
    ctx.lookup("java:comp/WeatherServiceProxy");
    i guess the mapping is incorrect. the documentation says to do reference the proxy like this:
    /wsclients/proxies/<ProviderName>/<ApplicationName>/<ProxyName>
    i do not understand however, what provider and application name are. i used the proxy's .ear filename as application name. for lack of better ideas i used the package structure as providername... it just seemed semantically similar ;-).
    Any help is well appreciated.
    Cheers, Michael

    Hello!
    i solved the problem: the providerName in my case was "sap.com".
    In order to find out the jndi-location you can go to visual Admin. Services --> JNDI Registry --> wsclients --> proxies ....
    or whatever else you're looking for.
    Cheers, Michael

  • Why only j2sdkee1.3 support JNDI lookup "java:comp/env" from remote client?

    Hi:
    I have been puzzled by this function of j2sdkee1.3.1 support JNDI lookup "java:comp/env" from client. I always think that "java:comp/env" namespace can only be access by the application server self for it is a private namespace. The weblogic and websphere doest support this.
    Why?
    Regards!
    John Lee

    Hi:I'm unable to get JNDI reference object from remote application client with "java:comp/env/ejb/<lookupName>".
    The exception says:
    Application threw an exception:javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201 completed: No]
    The J2EE server and client are run on different machines, and needs to be like this. There isn't any problem with JSP/Servlet (cause they run/execute on the server itself). How will the client find out the JNDI refernce my mere specification of "java:comp/env/..."?
    Am I making a mistake anywhere?
    BEA Weblogic & IBM Websphere allows explicitly specifying the server name, while doing JNDI lookup. Is there anything similary for J2EE?
    I couldn't find reference for this anywhere in the J2EE tutorial or EJB books.
    - Devashish

  • Why j2sdkee1.3.1 support JNDI lookup "java:comp/env" from  remote client?

    Hi:
    I have been puzzled by this function of j2sdkee1.3.1 support JNDI lookup "java:comp/env"
    from client. I always think that "java:comp/env" namespace can only be access
    by the application server self for it is a private namespace. The weblogic and
    websphere doest support this.
    Why?
    Regards!
    John

    Hi:I'm unable to get JNDI reference object from remote application client with "java:comp/env/ejb/<lookupName>".
    The exception says:
    Application threw an exception:javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201 completed: No]
    The J2EE server and client are run on different machines, and needs to be like this. There isn't any problem with JSP/Servlet (cause they run/execute on the server itself). How will the client find out the JNDI refernce my mere specification of "java:comp/env/..."?
    Am I making a mistake anywhere?
    BEA Weblogic & IBM Websphere allows explicitly specifying the server name, while doing JNDI lookup. Is there anything similary for J2EE?
    I couldn't find reference for this anywhere in the J2EE tutorial or EJB books.
    - Devashish

  • Accessing JNDI from Standalone JAVA application

    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

    You can strip out the jndi related classes from the weblogic.jar which can be distributed
    to the client installation. I don't think you will be violating any bea licensing
    policies with this.
    Rajan Kumar <[email protected]> wrote:
    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application
    which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

  • Where to find info about JNDI and Glassfish 3.1.2?

    Hello,
    i am searching already long time to find information on how to find e.g. an EntityManagerFactory using JNDI and an Glassfish server.
    Can anybody point me to some useable documentation? The GF admin and developer and deployment guide as well as the reference
    does not provide a lot of information. They write about general JNDI topics, how to configure data sources, that JNDI can be used to
    lookup resources and the like, on other places people write about, hey, lookup the EntityManagerFactory for your persistence unit
    (persistence.xml), but i am not able to find what JNDI names i can lookup and where and how i can find out what JNDI names are
    available in my server at all.
    Thanks for any hint,
    Chris

    Hello
    Maybe it sounds stupid now but what kind of info do you need exactly?
    When you need BIOS update you can visit BIOS download page - http://www.toshiba.eu/innovation/download_bios.jsp
    For drivers Toshiba drivers download page - http://www.toshiba.eu/innovation/download_drivers_bios.jsp
    When you need Users manuals document you can download it from - http://www.toshiba.eu/innovation/download_manuals.jsp
    General info about this machine you can find on http://aps2.toshiba-tro.de/unitdetails/
    Thats all you can find.
    I have old P200 and it is the same machine as your A200 just bigger with 17 display. In BIOS under advanced BIOS options there is SATA controller mode option and two options: AHCI and Compatibility mode.
    It should be used with AHCI mode and then you will have full HDD performance. Many people use compatibility mode to install old WXP without loading SATA driver.
    Can you please tell us what kind of info do you need and what do you want to do with this machine.
    I really hope we can help you somehow.

Maybe you are looking for

  • External Oracle Databse connection from SAP

    Dear all, I know that this question has been asked before, but as i am facing some primitive issues so i am again posting my query. My requirement is to connect to an external ORACLE db from SAP and read data from that server. That ORACLE db is locat

  • Open sales order indicator / field at Item level

    Is there any field at sales order item level to tell  the order is Opened (open order Item)?.  Will anyone share your expertise pl.

  • AD RMS 2012 Templates/Permissions [Option] is not visible at Outlook 2013 in Nokia Windows 8 Mobile Device

    I have AD RMS 2012 Server, its working fine by applying restricted Templates/Permissions on OWA, Outlook & other MS Office Tools (Word Excel, PowerPoint). But the AD RMS Templates/Permissions [Option] is not visible at Outlook 2013 in Nokia Windows 8

  • Need help on setting up my alarm

    How can I extend the duration the alarm plays on a blackberry curve?  I have a 25 minute song I want played every morning and have it come on as my alarm.  How do I change the duration of the alarm in order to hear the whole song?  As default setting

  • Characteristics longer than 30 characters

    Hi all, I see that there is a way to extend characteristics to n-more than 30 characters. This is OSS note 554086. But I see that the note is limited up to version 470. Since my system is ECC 6.0, the note is normally not applicable. Since this is qu