A difficult javax.naming.NameNotFoundException problem
I have to move my application from IBM X455 PC Server to IBM X3850 (inter x86 64bit) PC Server . The application had been running on IBM X455 for about 3 years well . The OS is Red hat linux. The weblogic server on IBM X455 is 8.1.3. I tar the application from IBM X455 to IBM X3850 and install weblogic 8.1.4 on the x86 64bit OS. I redeploy the application on weblogic 8.1.4. When the client try to connect to the server, follow errors appear:
<Jul 30, 2008 8:39:21 AM GMT+08:00> <Warning> <WLW> <000000> <Unable to load class ProcessControl>
<Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Exception processing SessionService
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.RuntimeException: Unable to create adaptor
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_814_WLStub.confirmDeployment(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispProjectJar.confirmDeployment(DispProjectJar.java:190)
at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:752)
at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:767)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:649)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.reformsoft.safe.manage.SessionFilter.doFilter(SessionFilter.java:64)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.RuntimeException: Unable to create adaptor
at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:198)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.confirmDeployment(SyncDispatcherBean.java:346)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.confirmDeployment(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
... 24 more
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'SafeWebService.GenericStateless.bean.StatelessContainer' didn
't find subcontext 'GenericStateless' Resolved SafeWebService; remaining name 'GenericStateless/bean/StatelessContainer'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:225)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.bea.wlw.runtime.core.dispatcher.DispBean.getHome(DispBean.java:132)
at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:189)
... 28 more
>
<Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Returning HTTP 500 due to httpWriteCompileErrors <error> <description>An
unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.rmi.RemoteExcep
tion:EJB Exception: ; nested exception is: java.lang.RuntimeException: Unable to create adaptor</description> <source>[unknown sourc
e]</source> <line>[unknown line]</line> <column>[unknown column]</column> <prescription>An unexpected error occurred. Please contact
[email protected] for further assistance.</prescription> </error> >
I check the weblogic console and find that there is something wrong with the JNDI tree. The state of GenericStateless is red. because of my poor english , please get the picture from http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=47583&messageID=282533 or http://www.itpub.net/viewthread.php?tid=1032379&extra=page%3D1&frombbs=1 , it will help.
Since the application is an old one and runs well on IBM X455 machine , the configuration of JNDI and other components is ok. Since the weblogic version is different(8.1.3 to 8.1.4, 32 bit to 64 bit) , is there anything wrong with the weblogic or JDK enviroment? or OS configuration? I have tried weblogic 8.1.6 and many versions of JDK too, still failed . What is wrong? Please help me ASAP. Thanks a lot!
Did you managed to get the solution to the above error. Can you please let me know the solution if you have get it right? You can post back to my id [email protected]
Thanks,
SK
Edited by: shivaG on Nov 3, 2008 4:25 AM
Similar Messages
-
Hi,
I am getting the following error when I try to do a search on an ldap (AD LDS) database:
javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best match of:
'DC=AppPartFE,DC=com'
]; remaining name 'cn=Users,dc=AppPartFE,dc=com'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
at javax.naming.directory.InitialDirContext.search(Unknown Source)
at Test.<init>(Test.java:70)
at Test.main(Test.java:118)
I can bind successfully using either the userPrincipalName (UPN) or the Distinguished Name (DN), however my search is failing.
It is almost as if I am connected to the db tree at the wrong place. Do I need a different search scope?
I appreciate any assistance you can provide.
Here is my code:
import java.util.*;
import static java.lang.System.err;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
public class Test
public Test()
Properties prop = new Properties();
prop.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory");
prop.put("java.naming.provider.url", "ldap://MyHost.Mydomain.labs.CompanyX.com:50004");
String strProviderUrl = "ldap://MyHost.Mydomain.labs.CompanyX.com:50004";
// Can successfully bind with the userPrincipalName in AD LDS
//prop.put("java.naming.security.principal", "[email protected]");
// Can successfully bind with Distinguished Name
// Note: the string is case insensitive and embedded blank after a comma is not a problem
prop.put("java.naming.security.principal", "cn=tst0001,cn=Users,dc=AppPartFE,dc=com");
prop.put("java.naming.security.credentials", "password");
try {
LdapContext ctx = new InitialLdapContext(prop, null);
System.out.println("Bind successful");
//I am successful to this point....
//now try doing a search on another user
String strFilter = "(&(objectClass=userProxy)(sAMAccountName=tst0001))";
SearchControls searchControls = new SearchControls();
searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); //works with object class=* to find top partition node
NamingEnumeration<SearchResult> results = ctx.search("cn=Users,dc=AppPartFE,dc=com", strFilter, searchControls);
SearchResult searchResult = null;
if(results.hasMoreElements()) {
searchResult = (SearchResult) results.nextElement();
//make sure there is not another item available, there should be only 1 match
if(results.hasMoreElements()) {
System.err.println("Matched multiple users for the accountName");
catch (NamingException ex) {
ex.printStackTrace();
public static void main(String[] args)
Test ldaptest = new Test();Because you are specifiying a base distinguished name in your ldap url, the ldap context will be rooted at that context and all subsequent objects will be relative to that base distinguished name.//connect to my domain controller
String ldapURL = "ldaps://rhein:636/dc=bodensee,dc=de";andString userName = "CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de";results in an fully distinguished name of:CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de,dc=bodensee,dc=deEither specify your ldap url asString ldapURL = "ldaps://rhein:636";and leave your username as is, or specify the user object relative to the base distinguished name in the ldapurlString userName = "CN=verena bit,OU=Lehrer,OU=ASR"; -
Problem with ADF BC 11G and datasource : javax.naming.NameNotFoundException
Hi,
My application works with ADF BC 10G but does not work with ADF BC 11g. In both cases I use the same data source.
My application uses only the BC4J from ADF.
The setting of the datasource in my EAR is only in the web.xml and weblogic.xml, as in 10g version.
What have I forgotten?
Thanks.
## Detail 0 ##
javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
The setting is :
web.xml
<resource-ref>
<description>JDBC connection</description>
<res-ref-name>jdbc/datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
weblogic.xml
<weblogic-web-app>
<description>Web Application</description>
<weblogic-version></weblogic-version>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/datasource</res-ref-name>
<jndi-name>jdbc/datasource</jndi-name>
</resource-description>
</reference-descriptor>
</weblogic-web-app>
this code finds the datasource :
InitialContext initialContextForDatasource = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
There is no error in the logs about data source
Edited by: jdev user on Nov 24, 2010 11:16 AM
Edited by: jdev user on Nov 25, 2010 10:59 AMA change in the problem :
This code finds the datasource :
InitialContext initialContextForDatasource = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
There is no error in the log about data source :
<BEA-001124> <Created Connection Pool named DS .>
<BEA-001174> <Creating Data Source named DS , JNDI Name = jdbc/datasource.>
<BEA-001512> <Data Source DS has been successfully created.>
but the applicationModule don't find the data source :
## Detail 0 ##
javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
Edited by: jdev user on Nov 25, 2010 1:40 PM -
Javax.naming.NameNotFoundException: jdbc not bound
Hi !
I've a application deployed with JBoss 4.0.2 Solaris 2.8, I've create a Oracle DS, when I try to read data from a database throw DS works fine, but when I try to insert, delete or update records from database the jboss show the next error.
2005-09-07 09:17:55,662 ERROR [org.jboss.ejb.plugins.LogInterceptor] Transaction
RolledbackLocalException in method: public abstract int com.soluzionasf.arqw10.g
c.cmp.OracleSequenceSessionLocal.getNextSequenceNumber(java.lang.String) throws
javax.ejb.FinderException, causedBy:
javax.naming.NameNotFoundException: jdbc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionBean.getConnection
(OracleSequenceSessionBean.java:76)
at com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionBean.getNextSequen
ceNumber(OracleSequenceSessionBean.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
tatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
elessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(Service
EndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
66)
This is my DS definition
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>jdbc/OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@10.98.10.42:1532:orcl28</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>evo_adminis</user-name>
evo_adminis1
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<type-mapping>Oracle9i</type-mapping>
</local-tx-datasource>
Who knows the solutions for my problem
Thanks for advanceCould be that your EJB is connected to a wrong datasource called only "jdbc"?
Strangely you say that while reading data all works fine (so the datasource definition is ok) but only when writing data there is a NamingException.
The stacktrace seems to report an error while getting datasource reference inside com.soluzionasf.arqw10.gc.cmp.OracleSequenceSessionLocal.getNextSequenceNumber method, the problems seems to be a bad name resource name ("jdbc" instead of java:jdbc/OracleDS or java:comp/env/jdbc/OracleDS if you use resource reference in your web.xml file). If you created this class as a CMP perhaps you misstype the right datasource name, otherwise if you code this method by yourseft you misstype the naming reference. -
Javax.naming.NameNotFoundException: SessionEJBBean not found
Please help I am getting error: javax.naming.NameNotFoundException: SessionEJBBean not found.
I am using JDeveloper 10g as editor.
The embedded server is running, SessionEJBBean is also there. I have restarted the computer, changed 'SessionEJB' from 'SessionEJBBean'. Yet No success. This is what I get.:
javax.naming.NameNotFoundException: SessionEJBBean not found
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at friends.SessionEJBClient.main(SessionEJBClient.java:11)
Process exited with exit code 0.
SessionEJBClient.java
package friends;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class SessionEJBClient {
public static void main(String [] args) {
try {
final Context context = getInitialContext();
SessionEJB sessionEJB = (SessionEJB)context.lookup("SessionEJBBean");
} catch (Exception ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
// Get InitialContext for Embedded OC4J
// The embedded server must be running for lookups to succeed.
return new InitialContext();
}Thank you.Thanks Karma-9 for your reply. My issue has got resolved as I followed this link:
http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm
However I have now new problem in hand, when I am trying to insert data in database
using JSP. I am having problem with request.getParameter(). It is not
recognised by JSP. A red underline is being shown below
request.getParameter(). One more thing, in JSP page, if I take cursor over
'request' in request.getParameter, it shows, 'Name request not found'. When
I take cursor over 'getParameter' in request.getParameter, it shows, 'Method
getParameter (java.lang.String) not found in<unknown>'.
This is my code:
MyPage.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.sql.*, javax.naming.Context,
javax.naming.InitialContext, javax.naming.NamingException,
friendspackage.*, java.text.*, java.util.*"%>
<%!
public void jspInit () {
String name, city;
name = request.getParameter("name");
city = request.getParameter("city");
try {
final Context context = getInitialContext();
SessionFriends sessionFriends =
(SessionFriends)context.lookup("SessionFriends");
sessionFriends.addFriends("name","city");
//System.out.println( "Success" );
} catch (Exception ex) {
ex.printStackTrace();
private static Context getInitialContext() throws NamingException {
// Get InitialContext for Embedded OC4J
// The embedded server must be running for lookups to succeed.
return new InitialContext();
%>MyPage.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"></meta>
<title>My Friends</title>
</head>
<body>
<form name="MyFriends" action="MyFriends.jsp" method="post">
Name:
<input type="text" name="name">
City:
<input type="text" name="city">
<input type="submit" value="Submit">
</form>
</body>
</html>Please let me know if I have to make any changes in web.xml which is:
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="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" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee">
<description>Empty web.xml file for Web Application</description>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>Thank you again.
Anurag -
EJB javax.naming.NameNotFoundException:
Hi,
I have EJB deployed in JRUN. I am trying to run Client program. It is giving the following error
javax.naming.NameNotFoundException: ejbT.test1Home not found
at allaire.ejipt._NamingContext.lookup(_NamingContext.java:73)
at allaire.ejipt._ClientContext.lookup(_ClientContext.java:113)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at ejbT.testClient.main(testClient.java:44)
I checked <ejb-name> in ejb-jar.xml and jrun-ejb-jar.xml file .. they are the same.
What can be the problem.
Can some please help me.
Thanks in advance.Does the JNDI name in your client match that of your EJB?
-
Hi,
I'm trying to run an esb process that invokes a bpel process but I'm getting the following error invoking bpel:
oracle.tip.esb.server.common.exceptions.BusinessEventFatalException: Se ha devuelto una excepción no tratada en el sistema ESB. La excepción mostrada es: "java.lang.Exception: Fallo al crear el bean "ejb/collaxa/system/DeliveryBean"; la excepción mostrada es: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:158)
at oracle.tip.esb.server.service.impl.bpel.BPELService.processBusinessEvent(BPELService.java:342)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:106)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:85)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1416)
at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.processSubscriptions(DeferredEventDispatcher.java:150)
at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.dispatch(DeferredEventDispatcher.java:67)
at oracle.tip.esb.server.dispatch.agent.JavaDeferredMessageHandler.handleMessage(JavaDeferredMessageHandler.java:115)
at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.java:162)
at oracle.tip.esb.server.dispatch.agent.ESBWork.run(ESBWork.java:120)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:595)
at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:158)
at oracle.tip.esb.server.service.impl.bpel.BPELService.processBusinessEvent(BPELService.java:342)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:106)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:85)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1416)
at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:105)
at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:273)
at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.processSubscriptions(DeferredEventDispatcher.java:150)
at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
at oracle.tip.esb.server.dispatch.DeferredEventDispatcher.dispatch(DeferredEventDispatcher.java:67)
at oracle.tip.esb.server.dispatch.agent.JavaDeferredMessageHandler.handleMessage(JavaDeferredMessageHandler.java:115)
at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.jav
I know that the processes work fine because I have deployed them in another server and they are working fine. The esb process invokes the bpel without problems.
I have read some threads in this forum where this error appears, but they are related to jsps, and the solution given doesn't apply.
I really appreciate any help. Thanks in advance,
Zaloahere is the detailed properties.
properties.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
properties.put("java.naming.provider.url", "ormi://localhost");
properties.put("java.naming.security.principal",
"admin");
properties.put("java.naming.security.credentials",
"welcome" -
Javax.naming.NameNotFoundException: comp not bound
When i try to deploy the following error message.. pls help
Hii all..I am facing some problems with eclipse.If any one know waht the problem is pls help me..
i cant bulid the work space completely as i get out of memory error continuously. i use 1GB Ram, and my vmargs is "eclipse.exe -vmargs -Duser.language=en -Xms128M -Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=1024M"
just after the error the building process continues and "successfully built" message is shown ( though i dont know whether it is successful or not and in problem listing it only warnings are shown).
When i start jboss server i get the error javax.naming.NameNotFoundException: comp not bound
i have included full server log,
waiting for your help.
org.jboss.deployment.DeploymentInfo@bed157bf { url=file:/D:/jboss-4.0.2/server/default/deploy/IA.ear/UTILEJB.jar/ }
deployer: null
status: Starting
state: START_SUBDEPLOYMENTS
watch: file:/D:/jboss-4.0.2/server/default/deploy/IA.ear/UTILEJB.jar/
altDD: null
lastDeployed: 1233122716687
lastModified: 1233122621468
mbeans:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@5d7b9e6e { url=file:/D:/jboss-4.0.2/server/default/deploy/jboss-ws4ee.sar/jboss-ws4ee.war }
deployer: org.jboss.web.tomcat.tc5.Tomcat5@174aa60
status: Deployment FAILED reason: {color:#ff0000}*Error during deploy; - nested throwable: (javax.naming.NameNotFoundException: comp not bound)*{color}
state: FAILED
watch: file:/D:/jboss-4.0.2/server/default/deploy/jboss-ws4ee.sar/jboss-ws4ee.war
altDD: null
lastDeployed: 1233122713125
lastModified: 1233122713078
mbeans:
Edited by: DEVISARASWATHI on Jan 28, 2009 12:49 AM
Edited by: DEVISARASWATHI on Jan 28, 2009 1:20 AMWhen i try to deploy the following error message.. pls help
Hii all..I am facing some problems with eclipse.If any one know waht the problem is pls help me..
i cant bulid the work space completely as i get out of memory error continuously. i use 1GB Ram, and my vmargs is "eclipse.exe -vmargs -Duser.language=en -Xms128M -Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=1024M"
just after the error the building process continues and "successfully built" message is shown ( though i dont know whether it is successful or not and in problem listing it only warnings are shown).
When i start jboss server i get the error javax.naming.NameNotFoundException: comp not bound
i have included full server log,
waiting for your help.
org.jboss.deployment.DeploymentInfo@bed157bf { url=file:/D:/jboss-4.0.2/server/default/deploy/IA.ear/UTILEJB.jar/ }
deployer: null
status: Starting
state: START_SUBDEPLOYMENTS
watch: file:/D:/jboss-4.0.2/server/default/deploy/IA.ear/UTILEJB.jar/
altDD: null
lastDeployed: 1233122716687
lastModified: 1233122621468
mbeans:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@5d7b9e6e { url=file:/D:/jboss-4.0.2/server/default/deploy/jboss-ws4ee.sar/jboss-ws4ee.war }
deployer: org.jboss.web.tomcat.tc5.Tomcat5@174aa60
status: Deployment FAILED reason: {color:#ff0000}*Error during deploy; - nested throwable: (javax.naming.NameNotFoundException: comp not bound)*{color}
state: FAILED
watch: file:/D:/jboss-4.0.2/server/default/deploy/jboss-ws4ee.sar/jboss-ws4ee.war
altDD: null
lastDeployed: 1233122713125
lastModified: 1233122713078
mbeans:
Edited by: DEVISARASWATHI on Jan 28, 2009 12:49 AM
Edited by: DEVISARASWATHI on Jan 28, 2009 1:20 AM -
Hi,
trying to obtain UserTransaction from client:
UserTransaction t = (UserTransaction)context.lookup("java:comp/UserTransaction");
but I get this error:
javax.naming.NameNotFoundException: java:comp/UserTransaction not found
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
Any help?The problem has been resolved. It was a usage-related issue. Thank you all.
-
Help, help! I have a problem:
javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:355)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:595)
code:
initialContext = new InitialContext();
LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
in web.xml:
<ejb-local-ref>
<ejb-ref-name>StatelessREBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
<local>com.re.stateless.ejb.LocalStatelessRE</local>
<ejb-link>StatelessREBean</ejb-link>
</ejb-local-ref>
Any help will be appreciated! Thanks in advance.Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
It worked for me when i used to get a similar exception. -
Help: javax.naming.NameNotFoundException
I am new to EJB and learning the examples in J2EE tutorial.
I try to run my client from a different machine with my J2EE application server. The client runs fine in the same machine with the application server. I change the code as below and try to make the client work in remote machine:
Original code:
Context initial = new InitialContext();
I changed to:
Properties env = new Properties();
env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
env.setProperty("java.naming.provider.url", "iiop://192.168.1.55:3700");
InitialContext initial = new InitialContext(env);
but it can't work even in the local machine. The below exception is occured:
javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
The problem must in these two line:
env.setProperty("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory" );
env.setProperty("java.naming.provider.url", "iiop://192.168.1.55:3700");
I am new to EJB and can't find any document that tell me how to set these two properties.
Anybody can help me please? Any suggestion is welcome, thanks.....http://docs.sun.com/source/817-6087/dgjndi.html This will give you hopefully the info that you need
-
Javax.naming.NameNotFoundException: java:comp/EJBContext not found
I get the following exception when I hit my login page:
javax.naming.NameNotFoundException: java:comp/EJBContext not found
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:60)
at com.evermind.naming.FilterContext.lookup(FilterContext.java:126)
at com.evermind.server.ApplicationClientContext.lookup(ApplicationClientContext.java:63)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.seam.util.EJB.getEJBContext(EJB.java:115)
at org.jboss.seam.util.Transactions.isEJBCTransactionActiveOrMarkedRollback(Transactions.jav
a:111)
at org.jboss.seam.util.Transactions.isTransactionActiveOrMarkedRollback(Transactions.java:54
at org.jboss.seam.web.ExceptionFilter.rollbackTransactionIfNecessary(ExceptionFilter.java:12
8)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:61
7)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatche
r.java:368)
at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:889
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:797)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:607)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:376)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:161)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:142)
at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.ja
va:275)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
I'm using JBoss Seam as my web framework, and the Seam container is starting up successfully after deploying my WAR file. I get this stacktrace when I hit my first page.
I googled "java:comp/EJBContext" and it looks like it's a standard EJB3 resource which should be available. Any ideas?I figured out how to get JBoss Seam working with OC4J 11 and wrote it up here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamOC4J11g
By the way, the solution to this particular problem was I didn't need to have any content in my jndi.properties at all, and I was trying to use java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory (or com.evermind.server.rmi.RMIInitialContextFactory). -
WL5.1 SP* javax.naming.NameNotFoundException
I am looking for advice ... I started getting a NameNotFoundException when I
moved from SP6 to SP8 running on a Solaris machine (NO code changes).
Anyone have any ideas as to the problem? As the deployment names seem
correct, it is not obvious to me where the problem lies.
ejb-jar.xml snippet
=============
<session>
<description>ProductHierarchy EJB</description>
<display-name>ProductHierarchy</display-name>
<ejb-name>ProductHierarchy</ejb-name>
<home>com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome</home>
<remote>com.redcelsius.ecommerce.product.ejb.ProductHierarchy</remote>
<ejb-class>com.redcelsius.ecommerce.product.ejb.ProductHierarchyBean</ejb-cl
ass>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
weblogic-ejb-jar.xml snippet
===================
<weblogic-enterprise-bean>
<ejb-name>ProductHierarchy</ejb-name>
<caching-descriptor>
</caching-descriptor>
<jndi-name>ecommerce.ProductHierarchyHome</jndi-name>
</weblogic-enterprise-bean>
client home lookup snippet
==================
InitialContext ctx =
AbstractResourceFactory.getResourceFactory().getInitialContext();
Object ref = ctx.lookup("ecommerce.ProductHierarchyHome");
Weblogic deployment
===============
Thu Mar 01 12:18:31 GMT-05:00 2001:<I> <EJB JAR deployment
./myserver/redcelsius/ecommerce-server.jar> EJB home interface:
'com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome' deployed bound
to the JNDI name: 'ecommerce.ProductHierarchyHome'
Exception
=======
javax.naming.NameNotFoundException: 'ecommerce.ProductHierarchyHome';
remaining name 'ecommerce.ProductHierarchyHome'
at
weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:745)
at
weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
at
weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
com.redcelsius.ecommerce.product.web.ProductBean.getEJB(ProductBean.java:68)I solved the problem. We read vendor specific values (such as
Context.PROVIDER_URL and Context.INITIAL_CONTEXT_FACTORY) from a property
file in a startup class in a static initializer.
It seems that the timing of when the startup class is loaded changed between
sp6 and sp8; as a result the static initializer could not find our property
file to set the values required when InitialContext(Properties) is called.
Everything now works.
Alan Koop
"Rob Woollen" <[email protected]> wrote in message
news:[email protected]...
Are you sure that you are looking up the EJB on the WLS server that
deployed it? (I have to ask.)
Otherwise, there shouldn't be any required code changes between SP6 and
SP8. We certainly test 1000s of EJBs against the service pack so JNDI
lookups should work fine.
Have you made any environmental changes?
If you go back to SP6, does it still work?
-- Rob
Alan Koop wrote:
I am looking for advice ... I started getting a NameNotFoundException
when I
moved from SP6 to SP8 running on a Solaris machine (NO code changes).
Anyone have any ideas as to the problem? As the deployment names seem
correct, it is not obvious to me where the problem lies.
ejb-jar.xml snippet
=============
<session>
<description>ProductHierarchy EJB</description>
<display-name>ProductHierarchy</display-name>
<ejb-name>ProductHierarchy</ejb-name>
<home>com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome</home>
<remote>com.redcelsius.ecommerce.product.ejb.ProductHierarchy</remote>
<ejb-class>com.redcelsius.ecommerce.product.ejb.ProductHierarchyBean</ejb-cl
ass>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
weblogic-ejb-jar.xml snippet
===================
<weblogic-enterprise-bean>
<ejb-name>ProductHierarchy</ejb-name>
<caching-descriptor>
</caching-descriptor>
<jndi-name>ecommerce.ProductHierarchyHome</jndi-name>
</weblogic-enterprise-bean>
client home lookup snippet
==================
InitialContext ctx =
AbstractResourceFactory.getResourceFactory().getInitialContext();
Object ref = ctx.lookup("ecommerce.ProductHierarchyHome");
Weblogic deployment
===============
Thu Mar 01 12:18:31 GMT-05:00 2001:<I> <EJB JAR deployment
./myserver/redcelsius/ecommerce-server.jar> EJB home interface:
'com.redcelsius.ecommerce.product.ejb.ProductHierarchyHome' deployedbound
to the JNDI name: 'ecommerce.ProductHierarchyHome'
Exception
=======
javax.naming.NameNotFoundException: 'ecommerce.ProductHierarchyHome';
remaining name 'ecommerce.ProductHierarchyHome'
at
weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:745)
at
weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
at
weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
com.redcelsius.ecommerce.product.web.ProductBean.getEJB(ProductBean.java:68)
>
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com -
OC4J Configuration - javax.naming.NameNotFoundException
Here is a description of the problem we are having:
The Problem
We have a remote client that wishes to invoke services
that we are
going to provide. These services will be accessible via a JNDI
lookup from
the client's JVM. The client, is operating in a JRE, version
1.2.2, but is
an in-house Java Server Engine (developed before the Servlet API
specification) and not a command line client application. It is
desirable to
do a simple JNDI lookup from the RMIInitialContext and gain
access to the
services (Home Interface). Attached is a demonstration of a
client
application doing a lookup against the deployment shown below
(orion-ejb-jar.xml ). Notice the name of the service in the
lookup on the
client application are exactly the same as the location
declaration of the
session deployment element of the orion-ejb-jar.xml. The service
(EJB, not
attached) was deployed without any errors. The exception we are
getting is:
Exception in thread "main" javax.naming.NameNotFoundException:
DAServicesDemo not found
at com.evermind.server.rmi.RMIContext.lookup
(RMIContext.java:121)
at javax.naming.InitialContext.lookup
(InitialContext.java:350)
at test.RemoteServiceClient.main
(RemoteServiceClient.java:26)
The RMI server has been configured with the default
settings, and is
listening on port 8474
The Source
package test;
import ORG.oclc.da.beans.*;
import javax.naming.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
public class RemoteServiceClient
public static void main(String[] args)
throws NamingException, CreateException,
RemoteException,
Exception{
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
h.put
(Context.PROVIDER_URL, "ormi://risc14.dev.oclc.org:8474");
InitialContext context = new InitialContext(h);
DAServicesDemoHome remoteServiceHome =
(DAServicesDemoHome) (new
InitialContext(h)).lookup("DAServicesDemo");
DAServicesDemo remoteService =
(DAServicesDemo)remoteServiceHome.create();
System.out.println("Here it is: " +
remoteService.getContentGroup());
C_DemoServices remoteService = new C_DemoServices();
String result = remoteService.getContentGroup();
System.out.println("This is the result form the remote
service: " +
result);
EJB-jar.xml
<ejb-jar>
<description>
Proof of concept application for the integration of DA to
CORC
</description>
<display-name>Digital Archive Remote Services</display-name>
<enterprise-beans>
<session>
<ejb-name>DAServicesDemo</ejb-name>
<home>ORG.oclc.da.beans.DAServicesDemoHome</home>
<remote>ORG.oclc.da.beans.DAServicesDemo</remote>
<ejb-class>ORG.oclc.da.beans.DAServicesDemoBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DAServicesDemo</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Orion-ejb.jar
<orion-ejb-jar deployment-version="1.0.2.2" deployment-
time="ea2215b915">
<enterprise-beans>
<session-deployment name="DAServicesDemo"
location="DAServicesDemo"
wrapper="DAServicesDemoHome_StatelessSessionHomeWrapper1"
timeout="1800"
persistence-filename="DAServicesDemo" />
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping
name="<default-ejb-caller-role>" impliesAll="true" />
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>
Any help would be greatly appreciated, thanks in advanced...Hi Jonathan,
If I understand you correctly, you are trying to access an EJB in
OC4J from a separate, external JVM. If that is correct, then, in
order to achieve that, the (EJB) home interface "stub" class must
be located in the client's JVM. Unfortunately, I haven't figured
out how to do that, and therefore, as far as I can see, the only
two client options available are:
1. Web-based client -- servlet or JSP
2. Application client -- standalone java application.
However, for both options, the client must also be deployed to
OC4J. I don't know how to obtain "stub" classes generated by OC4J
so that I can give external clients access to them.
According to the J2EE spec, application clients need to be run
within containers, too -- albeit thin containers. I presume that
means you need 2 instances of OC4J running -- one for the server
and one for the client. Seems a bit "heavy" to me, so for now I'm
going with the web-based (servlet) client and having external
java classes communicate with the servlet.
Hope this has been of assistance to you,
Avi. -
JNDI - javax.naming.NameNotFoundException
Hi,*
I am new to JNDI. I am trying to execute the below mentioned code eg given in help topic in sun website.
** Included JAR files[fscontext.jar, provideutil.jar]*
** passing /classes as command line argument as mentioned in that example.[not sure its the right way]*
** I am using RAD to compile and execute the application.*
*import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Hashtable;
import com.sun.jndi.fscontext.RefFSContextFactory;
public class Resolve {
public static void main(String argv[]) {
// The user should provide a file to lookup
if (argv.length != 1) {
System.+err+.println("Usage: java Resolve ");
System.+exit+(-1);
String name = argv[0];
// Here we use the file system service provider
Hashtable env = new Hashtable();
env.put(Context.+INITIAL_CONTEXT_FACTORY+, "com.sun.jndi.fscontext.RefFSContextFactory");
try {
// Create the initial context
Context ctx = new InitialContext(env);
System.+out+.println("1");
// Look up an object
Object obj = ctx.lookup(name);
System.+out+.println("2");
// Print it out
System.+out+.println(name + " is bound to: " + obj);
// Close the context
ctx.close();
} catch (NamingException e) {
System.+err+.println("Problem looking up " + name + ": " + e);
Output:
1
Problem looking up /classes: javax.naming.NameNotFoundException:/classes
Could you please help me resolving this issue.
Thanks in advance.Hello:
I display the full context of the connection factory in the application that publish the message:
Full context is :
Enviroment is : {java.naming.corba.orb=com.sun.enterprise.iiop.POAEJBORB@ec4a87}
And in the web service when i create the initial context the full context is:
Full context is : java:
Enviroment is : {java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, java.naming.factory.url.pkgs=org.apache.naming}
How can i see the connection factory in the Web Service, because the connection factory was created in other Application?
Maybe you are looking for
-
ITunes won´t open: because "secured Volume or no rights!"
Something went wrong with iTunes on my MacBook, and though I´ve trashed and downloaded anew, it won´t open. It claims "iTunes is on a secured Volume or I have no access rights" (Finder Information shows I have the rights). Copying from the iMac did´n
-
So multi tasking..phone and messages showing up in multitask bar
So this sounds silly.. i m kinda confused on how the multi tasking works..right now i am have only 2 apps running in the background phone and messages..does that drain my battery by running or r those frozen..and i feel like the multitask bar is in s
-
Updating xml ( again...)
I know that there are zillions post about this but I got a bit confused... My problem is, I need to change a node value and write back to the xml file. I used this code to save the changes back in the file: TransformerFactory xformFactory = Transfor
-
Inconsistencies during role update
Hello Gurus, Scenario: When custom tcodes are added to an existing role and the profile re-generated, the change documents shows deletion of some other Auth Objs from the same role. We found that, upon the addition of the custom tcode, ACTVT 01 was r
-
Trying to use my hp photosmart p1000 with window vista..
trying to use p1000 with vista I had a problem a while ago with window 7 and same p1000 and tech from hp got it to work...does anyone know the solution to this one?