Calling foreign EJB server from Weblogic
Hi,
I'm trying to invoke an EJB hosted in an old PowerTier EJB Container from an 8.1 SP5 hosted EJB, and I'm running in to problems. (PowerTier is based on the JBroker ORB)
So far the only way I can get it to work is by replacing Weblogic's ORB implementation with the JBroker one:
-Djavax.rmi.CORBA.StubClass=com.sssw.jbroker.rmi.StubDelegate
-Djavax.rmi.CORBA.UtilClass=com.sssw.jbroker.rmi.UtilDelegate
-Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sssw.jbroker.rmi.PortableRemoteObjectDelegate
But I'd like to avoid doing this if possible.
So I'd like to get this to work using the WL RMI-IIOP implementation to integrate with the PowerTier/JBroker server.
After looking at : http://forums.bea.com/bea/message.jspa?messageID=202437541&tstart=0
I tried the following:
Properties config = new Properties();
config.setProperty(
Context.PROVIDER_URL, "<b>iiop</b>://xxx.xxx.xxxxx.xxx:389/cn=Instance1,ou=Development,cn=Xxxx%20Xxxxxxx%20Xxxxx,ou=Components,cn=Xxxxxx%20Xxxx,ou=Applications,o=xxxxxxxx,c=uk");
InitialContext context = new InitialContext(config);
URL changed to protect the innocent - but format maintained.
When the server executes this I get the following exception:
javax.naming.InvalidNameException: url does not contain a port
at weblogic.corba.j2ee.naming.NameParser.parseURL(NameParser.java:419)
at weblogic.corba.j2ee.naming.ORBHelper.parseURL(ORBHelper.java:533)
at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:440)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:97)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:42)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
Any idea what is causing this exception? If I replace the '%20' with a normal spaces it makes no difference.
Am I going about this the right way?
Thanks!
Getting a bit closer now.
The Object retreived from LDAP was a javax.naming.Reference - which contains the IOR for the Home interface.
// Get IOR from LDAP
InitialContext context;
Hashtable config = new Hashtable();
config.put(Context.PROVIDER_URL,"ldap://<host>:389/");
config.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
context = new InitialContext(config);
Reference reference = (Reference)context.lookup("<path to home>");
// Get IOR from reference
String ior = "" + reference.get(0).getContent();
// Get WLS ORB
ORB orb = (ORB)new InitialContext().lookup("java:comp/ORB");
Object object = orb.string_to_object(ior);
FooHome home = (FooHome)PortableRemoteObject.narrow(object, FooHome.class);
Foo foo = home.create();
// Everything works fine up to here.
foo.invokeMethod(); // <-- This fails with the following exception :
java.rmi.RemoteException: ; nested exception is:
org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:197)
at weblogic.iiop.IIOPRemoteRef.invokeInternal(IIOPRemoteRef.java:205)
at weblogic.iiop.IIOPRemoteRef.invoke(IIOPRemoteRef.java:153)
at ztkt.pl.Foo_IIOP_WLStub.invokeMethod(Unknown Source)
at com.xyz.ezs.wl.ejb.PLProxyBean.invoke(PLProxyBean.java:56)
at com.xyz.ezs.wl.ejb.PLProxy_o3b3ao_EOImpl.invoke(PLProxy_o3b3ao_EOImpl.java:45)
at com.xyz.ezs.wl.ejb.PLProxy_o3b3ao_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at weblogic.iiop.ReplyMessage.getThrowable(ReplyMessage.java:337)
at weblogic.iiop.InboundResponseImpl.getThrowable(InboundResponseImpl.java:62)
at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:179)
... 15 more
(Method, class and package names changed.)
Has anyone seen this before? Any idea what might be causing it?
Similar Messages
-
How to call an external server from Webdynpro program?
Hi All,
i have a requirement in which i have to call an external server from Webdynpro ABAP program.
how to imphi ,
do u mean u need to call the external link from ur WD ABAP application ?
if so , u either create
1 a Link to URL ( LTU ) UI element and call the external link using that
2 if u wish to use some other fuctionality and thn wish to call the URL in ur application ,u write this piece of code in ur relevant on Action method :
data: lo_window_manager type ref to if_wd_window_manager.
data: lo_api_component type ref to if_wd_component.
data: lo_window type ref to if_wd_window.
data: ld_url type string.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url = ''. // ur external sever link here
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING URL = ld_url
RECEIVING WINDOW = lo_window.
lo_window->open( ).
I hope u wud be able to create URL now .
regards,
amit
Edited by: amit saini on Oct 13, 2009 11:25 AM -
Calling Oracle Stored Procedure from Weblogic.
Hi All,
I am using Oracle 11g R2 and weblogic 10.3.5.0
Do you know if it is possible to call a stored procedure from Weblogic.
Basically, what I would like to do is to call the following procedure : EXEC DBMS_SESSION.SET_IDENTIFIER('provider_a') when my application connects to my database, "provider_a" being the user used to connect to the oracle schema.
Thanks.Up !
Thanks. -
How to call the EJB methods from servlet/jsp
Hello ,
i have write one ejb signOn having the method validateUser(username,password).i can able to call this function from client.java class.i want to know whether i can call this function from servlet.if yes then where to write that servlet and web.xml file.
At present i m using weblogic server 8.1and i create directory call c:\ejb\demo and put the ejb files(home ,remote,ejb class ,client.java) then i have created .jar file and put in application file.
Now i want to create a servlet for that i have to create a new directory and put the servlet,web.xml,weblogin-web.xml file and then create one .war file and put in application directory or do some thing extra.Please help me.
Thanks In Advance
[email protected]I think this might not be the most appropriate forum for your question. You might try a forum about ejb, or weblogic, or jndi.
-
Load balancing MQ 7.0 Foreign JMS Server and Weblogic 10 MDBs?
We have the following configuration and we are trying to troubleshoot what appears to be a load balancing issue.
We have 3 Solaris servers. Each Solaris server has two Weblogic managed servers running on it. There are a total of 6 managed servers in the Weblogic cluster.
MQ Series 7.0 is also installed on each Solaris server. The MQ queue managers are in a MQ cluster. Each queue manager has the same queues defined.
We have a foreign JMS Server configured on Weblogic that has destinations and a connection factory defined. There aren't many configuration options available for the connection factory. The destinations are bound to the queues defined on MQ using the MQ bindings file.
The MQ bindings file was generated using the TRANSPORT(BIND) mechanism. Each bindings file points to the queue manager running on that machine. So the 2 managed servers running on one machine are accepting messages from the queue manager on that machine.
The MDB's listenning for messages on the MQ queues are configured as follows in the weblogic-ejb-jar.xml:
<max-beans-in-free-pool>16</max-beans-in-free-pool>
We also created a custom work manager with min threads constraint=5 and max threads constraint=16. The dispatch-policy of all the MDBs is set to the custom work manager.
The open input count on each MQ queue managers shows up as 32 which is expected.
The default load algorithm on the cluster is round-robin.
When we run a load test (injecting 40 messages per second on one MQ queue), we notice that one managed server ends up being significantly loaded than the other. Each MQ queue manager in the MQ cluster receives approximately the same number of messages in the load test. But it seems like one managed server is preferred over the other in Weblogic.
What can be done to equally balance the load among the two managed servers on each Solaris server?
Thanks for the help.Load balancing generally applies at determing how many consumer threads has to be created on each of the clustered queue instance. In that sense you have achieved perfect load balancing as your queue instances has the same no of consumer threads.
Once you have set 'x' consumer threads on a queue, it is upto messaging provider to decide which thread to deliver a particular message and you will hardly have any control over this. Since your 32 threads are listening on the same queue, MQ can select any thread for delivering the message and the behaviour could be non deterministic.
One option to change your design is to have a dispacther mdb which picks the messages off the MQ and then routes to a weblogic distributed destination and you can have your core mdb which does all processing listen to this distributed destination. You can enable load balancing when the disaptcher mdb routes the message to the distributed destination. Since dispatcher MDB is nothing more than a router, the unbalanced consumption off the MQ shouldn't seriously affect the server. -
How to call an ejb method from jsp?
Hi, everyone!
Inside my JSP, I4m using scripts in order to show and receive information, that is, a form.But I don4t Know if I can use the same variables from the script in order to call the 'set' methods from my EJB.
Could anyone show me an example?
Thanks in advance,
SilviaInitialContext ctx = new InitialContext();
GeneralEditor editor = (GeneralEditor) ctx
.lookup("GeneralEditorBean/remote");
GeneralService service = (GeneralService) ctx
.lookup("GeneralServiceBean/remote");
LanMu lm = new LanMu();
lm.setName("shdfkhsad");
editor.add(lm); -
Changing user password in the external LDAP server from weblogic
Hi !
We have been successful in configuring the ldap security realm from weblogic 7.0.
We have also done the user authentication.
Now we want to allow the user himself to change his password from the application.Can
the user password which is stored in an iplanet directory server be changed from
application?If yes , then is there any extra configuration that needs to be doneI am not sure whether u got an answer for this..
But iplanet provides a web-link for end-users to change their LDAP password...u
can just give this link in ur app ..and iplanet will take care of the rest..
Krish Venkataraman
Bank Of America Corp.
Senior Analyst
"Mitali" <[email protected]> wrote:
>
Hi !
We have been successful in configuring the ldap security realm from weblogic
7.0.
We have also done the user authentication.
Now we want to allow the user himself to change his password from the
application.Can
the user password which is stored in an iplanet directory server be changed
from
application?If yes , then is there any extra configuration that needs
to be done -
Error in holder-of-key : calling a secure webservice from weblogic instan
Hi,
I am getting following error . Can somebody decrypt this for me ?
ava.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Failed to add Signature.] FaultActor [null]No Detail; nested exception is:
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to add Signature.
at services.SSOTestHelloWorld_Stub.hello(Unknown Source)
at deloitte.iit.webservices.CallWebService.callService(CallWebService.java:31)
at jsp_servlet.__clienttest._jspService(__clienttest.java:82)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to add Signature.
at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:355)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:115)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:100)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:88)
at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
... 18 more
Caused by: weblogic.xml.crypto.wss.WSSecurityException: Failed to add Signature.
at weblogic.wsee.security.wss.SecurityPolicyDriver.processIntegrity(SecurityPolicyDriver.java:240)
at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:74)
at weblogic.wsee.security.WssClientHandler.processOutbound(WssClientHandler.java:71)
at weblogic.wsee.security.WssClientHandler.processRequest(WssClientHandler.java:55)
at weblogic.wsee.security.WssHandler.handleRequest(WssHandler.java:74)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
... 20 moreHi Stephen,
Using a registry, for example UDDI [1], would be one solution. WLS has
a complete UDDI implementation builtin [2] for this purpose.
You are correct, you need to pass the service address location found in
the <service> section of the WSDL.
Hope this helps,
Bruce
[1]
http://www.uddi.org/
[2]
http://e-docs.bea.com/wls/docs81/webserv/uddi.html
Stephen Kurlow wrote:
>
I am not sure what I need to do to be able to call a remote webservice (runs on
another weblogic server instance running on another machine in the same network)
from within a webservice. I have 2 wsdl files and I have created webservice controls
from them. I have successfully written code in the first webservice to instantiate
the parms to the 2nd webservice and invoked the 2nd webservice when both webservices
are deployed to the same weblogic server instance. So i can see the params being
marshalled and unmarshalled in the test browser.
Now how do I install the 2nd webservice on another weblogic server instance and
instruct the 1st web service to call the 2nd webservice residing on another weblogic
server instance? I presume some kind of lookup (url?) is needed and is it via
what is contained in the wsdl file?
Thanks in advance,
Stephen Kurlow -
How to call a EJB method from Session bean method
Hi all,
I'm new to J2EE programming. I have a simple doubt .
I have already created a lookup method for EJB bean in Session bean .
My question is how to call a method of an ENTITY bean (say insertRow) from SESSION bean method(Say invoke_insertRow) .
Please provide me an example code .
Thanks in advance.InitialContext ctx = new InitialContext();
GeneralEditor editor = (GeneralEditor) ctx
.lookup("GeneralEditorBean/remote");
GeneralService service = (GeneralService) ctx
.lookup("GeneralServiceBean/remote");
LanMu lm = new LanMu();
lm.setName("shdfkhsad");
editor.add(lm); -
Calling LabView ActiveX Server from TCL?
Does anyone have experience calling a LabView ActiveX server vi from
TCL? I created a simple VI with one control (labeled "A") and one
indicator (labeled "B") and a +1 adder between them. I can load and
open the VI from TCL:
package require tcom
set lv [::tcom::ref createobject "LabView.Application"]
set viPath "D:\\National Instruments\\LabView\\Activity\\a.vi"
set vi [$lv GetVIReference $viPath]
$vi FPWinOpen True
But when I try to send in data:
$vi -namedarg Call A 1
I get the error message "unknown parameter A".
I have also attempted to duplicate the "ActiveX Server" example
from the LabView help file, calling "Frequency Response.vi". This
approach encounters the same error message:
% package require t
com
3.0
% set lv [::tcom::ref createobject "LabView.Application"]
::tcom::handle0x013202F4
% set viPath "D:\\National
Instruments\\LabView\\examples\\apps\\freqresp.llb\\frequency
Response.vi"
D:\National Instruments\LabView\examples\apps\freqresp.llb\frequency
Response.vi
% set vi [$lv GetVIReference $viPath]
::tcom::handle0x01335AE8
% $vi FPWinOpen True
% $vi -namedarg Call Amplitude 10
unknown parameter Amplitude
If anyone can point me in the right direction, or give me an
example of how to do this I would greatly appreciate it.
TIA.
LeslieIn article ,
Leslie Brooks wrote:
>"Bruce Hartweg" wrote in message
>news:...
>> "Chin Huang" wrote in message
>news:[email protected]...
>> >
>> > I don't use LabView, but from the Visual Basic example I saw, it seems
>> > the Call method takes two arguments. The first is an array of parameter
>> > names and the second is an array of parameter values. Try to send in
>> > data with the Tcl command
>> >
>> > $vi Call [list A] [list 1]
>>
>> I'm unable to help the original question (don't know LAbView or VB stuff) but
>> just want to point out that [list A] is equal to A and [list 1] is the
>same as 1.
>>
>> Bruce
>
> I know what is supposed to be passed to the 'Call' method. Doing
>this:
>
>set inst [::tcom::info interface $vi]
>$inst methods
>
> produces (among other things):
>
>{1015 VOID Call {{{in out} {VARIANT *} paramNames} {{in out} {VARIANT
>*} paramVals}}}
>
> So the 'Call' method is expecting two parameters, both pointers
>to variants. TCOM appears to be passing the correct parameter type
>because the TCOM documentation says that a TCL List maps to a
>one-dimensional array of VT_VARIANT. However, the results are
>INvariant (bad pun intended):
>
>% $vi -namedarg Call Amplitude 10
>unknown parameter Amplitude
>% $vi -namedarg Call [list Amplitude] [list 10]
>unknown parameter Amplitude
>% $vi -namedarg Call [list Amplitude] [list [::tcom::na]]
>unknown parameter Amplitude
>% set i 5
>5
>% $vi -namedarg Call [list Amplitude] {incr i}
>unknown parameter Amplitude
>% $vi -namedarg Call [list Amplitude] [list [incr i]]
>unknown parameter Amplitude
>% $vi -namedarg Call Amplitude [incr i]
>unknown parameter Amplitude
>
> Who can help me with this? Who is the LabView Guru?
Try invoking the Call method without the -namedarg option. The
-namedarg option doesn't work the way you seem to think it works. The
-namedarg option provides a way to specify arguments named from the
method's parameter specification. For example, you discovered that the
Call method take two parameters named "paramNames" and "paramVals".
Tcom returns the error "unknown parameter Amplitude" because "Amplitude"
doesn't match either parameter name. -
Getting APPSRV_JNDI_LOOKUP_ERROR while calling CAF Ext Serv from WebDynpro
Hi,
Iam developing a Composite application using CAF External Service & Application Service with a Web Dynpro UI wherein all the business logic is developed and invoked as web services. I do not face any problem in generating project code, building, deploying and running the application in my machine. But when I deploy the relevant .ear files to some other machine, I get APPSRV_JNDI_LOOKUP_ERROR and Iam unable to perform any operation which invokes a web service.
Iam only trying to deploy in some other machine the following .ear files available in my machine available at ...\LocalDevelopment\DCs\sap.com\project\... folder :-
sap.com~project.ear
sap.comprojectmetadata.ear
sap.comprojectpermissions.ear
sap.comprojectwebdynpro.ear
The following is the exception trace that I get :-
===========================================================
Message : APPSRV_JNDI_LOOKUP_ERROR
[EXCEPTION]
com.sap.caf.rt.exception.ServiceException: Object not found in lookup of ZWSD__MATERIAL__SAVEDATA.
at com.sap.pxwebservice.utils.HomeFactory.getLocalHome(HomeFactory.java:60)
at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataBean.getZWSD__MATERIAL__SAVEDATA(MaterialSaveDataBean.java:341)
at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataBean.MaterialSaveData(MaterialSaveDataBean.java:315)
at com.sap.pxwebservice.appsrv.materialsavedata.MaterialSaveDataLocalLocalObjectImpl0.MaterialSaveData(MaterialSaveDataLocalLocalObjectImpl0.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
===========================================================
Please let me know :-
1) I find that always one more file called .ear is created under ...\LocalDevelopment\DCs\sap.com\project\webdynpro\_comp
But Iam unable to deploy this because it always throws invalid ear error. If I need to deploy this also, how do I do it ?
2) Is my deployment approach correct ? Is there any other simpler approach ?
3) If I need to deliver the project binaries to a third party how do I package them to ensure that it can be re-deployed at the other end ?
Thanks in advance,
Regards,
RajkumarLooks like a known issue with missing jar files.
Please refer to Oracle support document - [ID 1332553.1] -
Hi,
I am migrating my ejb application from weblogic to oracle 9i application server.What changes are needed to be made in code and what configuration changes are required.
In my application i use a couple of session beans wherin a session bean calls the method of the other session bean which acceses the database.I am using a jdbc thin driver for the database connection. is it possible for a session bean to call a method of another session bean which access the database??This concept works well in weblogic where the current application is running.
The problem is that while migrating the application to the orion server, it gives an OrionCMTException ...
memory leak..etc.
Could any one clarify.
Thanks in advance!!!Hi Avi and Harrison,
Cease Fire avi!!!!.First of all let me clear the issue of posting the same problem twice.Well, when i mentioned the problem the first time , i found the title session bean deployment was not right and few people would look into it as it was a common problem so i thought it would be appropriate if i mentioned the title correctly , so i posted the query again with the change in title.
Now coming to the answer for ur questions.
The platform used is MS Windows NT.
The (OC4J) version is 1.0.2.2.1.
I am not using JDeveloper.
The database is oracle 8i and i am using the thin driver.
The beans to be deployed are stateless session beans.
The client involved is a web client i.e a jsp application.
The first session bean is as follows.
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.sql.Timestamp;
import java.rmi.RemoteException;
import java.util.Date;
import javax.ejb.*;
import javax.naming.*;
import initcontext;
import PrintMessage;
import JB_B2B_ERROR_PARSER;
* @stereotype SessionBean
* @homeInterface DB_UTILITYHome
* @remoteInterface DB_UTILITYRemote
public class DB_UTILITY implements SessionBean
private SessionContext context;
private ResultSet rs = null;
private Statement stmt = null;
private Connection con = null;
private PrintMessage print = null;
public DB_UTILITY()
rs = null;
stmt = null;
con = null;
print = new PrintMessage();
public Connection getConnection()throws RemoteException
InitialContext initctx = null;
Connection con = null;
try
initctx = initcontext.getContext();
javax.sql.DataSource ds =
(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
con = ds.getConnection();
//(javax.sql.DataSource)initctx.lookup("java:comp/env/jdbc/ePool");
catch(NamingException namingexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", namingexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("AppError",
"Epool-10001", "DB_UTILITY.getConnection"));
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception),
"DB_UTILITY.getConnection"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
epoolException(JB_B2B_ERROR_PARSER.getErrorMessage("EpoolError",
"Epool10005", "DB_UTILITY.getConnection"));
return con;
public String getDate()throws RemoteException
String Date=null;
try
con=getConnection();
stmt=con.createStatement();
rs=stmt.executeQuery("SELECT
TO_CHAR(SYSDATE,'YYYY-MM-DD HH:MI:SS') FROM DUAL");
while(rs.next())
Date=rs.getString(1);
stmt.close();
con.close();
catch(SQLException sqlexception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", sqlexception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("DBError",
JB_B2B_ERROR_PARSER.getSQLCode(sqlexception), "DB_UTILITY.getDate"));
catch(Exception exception)
print.printUserMessage("DB_UTILITY", (new
Date()).toString(), "", exception);
throw new
EpoolException(JB_B2B_ERROR_PARSER.getErrorMessage("epoolError",
"Epool10005", "DB_UTILITY.getDate"));
finally
try
if(con != null && !con.isClosed())
con.close();
catch(Exception exception2)
stmt = null;
con = null;
return Date;
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
Also the xml files are as follows.
web.xml
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- A friendly name for this web application, this name can be used in visual development environments, for instance -->
<display-name>AddressBook Web Application</display-name>
<!-- A human-readable description of this web application -->
<description>Web module that contains an HTML welcome page, and 4 JSP's.</description>
<!-- The file(s) to show when no file is specified, i.e. only the directory is specified. -->
<welcome-file-list>
<welcome-file>B2B_COUNTRY_CODE.jsp</welcome-file>
</welcome-file-list>
<ejb-ref>
<ejb-ref-name>SB_B2B_COUNTRY_CODEHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>SB_B2B_COUNTRY_CODEHome</home
<remote>SB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref></web-app>
Application.xml
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>Country Code</display-name>
<module>
<ejb>epool_CountryCode-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>epool_CountryCode-web.war</web-uri>
<context-root>/epool_CountryCode-web</context-root>
</web>
</module>
</application>
ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<description>epool_CountryCode</description>
<enterprise-beans>
<session>
<display-name>CountryCode Session
Bean</display-name>
<ejb-name>SB_B2B_COUNTRY_CODERemote</ejb-name>
<home>SB_B2B_COUNTRY_CODEHome</home>
<remote>SB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>SB_B2B_COUNTRY_CODE</ejb-class>
<session-type>Stateless</session-type>
<ejb-ref>
<description>EJB Epool DButility</description>
<ejb-ref-name>DB_UTILITYRemote</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
</ejb-ref>
<ejb-ref>
<description>EJB Entity Bean</description>
<ejb-ref-name>EB_B2B_COUNTRY_CODERemote</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
</ejb-ref>
</session>
<session>
<display-name>DbUtility Session Bean</display-name>
<ejb-name>DB_UTILITYRemote</ejb-name>
<home>DB_UTILITYHome</home>
<remote>DB_UTILITYRemote</remote>
<ejb-class>DB_UTILITY</ejb-class>
<session-type>Stateless</session-type>
</session>
<entity>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<home>EB_B2B_COUNTRY_CODEHome</home>
<remote>EB_B2B_COUNTRY_CODERemote</remote>
<ejb-class>EB_B2B_COUNTRY_CODE</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>EB_B2B_COUNTRY_CODEPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>country_code_desc</field-name>
</cmp-field>
<cmp-field>
<field-name>phone_format_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_code</field-name>
</cmp-field>
<cmp-field>
<field-name>active_date</field-name>
</cmp-field>
<cmp-field>
<field-name>date_created</field-name>
</cmp-field>
<cmp-field>
<field-name>active_flag</field-name>
</cmp-field>
<cmp-field>
<field-name>country_phone_code</field-name>
</cmp-field>
<cmp-field>
<field-name>country_tax_percent</field-name>
</cmp-field>
<cmp-field>
<field-name>sort_order</field-name>
</cmp-field>
<cmp-field>
<field-name>date_modified</field-name>
</cmp-field>
<cmp-field>
<field-name>user_created</field-name>
</cmp-field>
<cmp-field>
<field-name>user_modified</field-name>
</cmp-field>
<resource-ref>
<description></description>
<res-ref-name>jdbc/ePool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>EB_B2B_COUNTRY_CODERemote</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<security-role>
<description>Users</description>
<role-name>users</role-name>
</security-role>
</assembly-descriptor>
</ejb-jar>
The session bean which uses the above session bean is as follows.
import javax.ejb.SessionContext;
import javax.ejb.SessionBean;
import java.sql.*;
import javax.naming.Context;
import java.sql.Timestamp;
import java.util.Vector;
import initcontext;
import DB_UTILITYHome;
import DB_UTILITYRemote;
import EB_B2B_COUNTRY_CODEHome;
import EB_B2B_COUNTRY_CODERemote;
import EB_B2B_COUNTRY_CODEPK;
* @stereotype SessionBean
* @homeInterface SB_B2B_COUNTRY_CODEHome
* @remoteInterface SB_B2B_COUNTRY_CODERemote
public class SB_B2B_COUNTRY_CODE implements SessionBean
private SessionContext context;
* Sets the context of the bean
* @param context The Bean's Context
public Vector selectCountryCode(String query,String
countquery, String pagenos) throws Exception
Context ctx = initcontext.getContext();
Connection con=null;
Vector records=new Vector();
int pageno=Integer.parseInt(pagenos);
int min=(pageno-1)*10;
int max=pageno*10;
int counter=0;
boolean recordsfound=false;
try
DB_UTILITYHome home =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote remote =
(DB_UTILITYRemote)home.create();
con=remote.getConnection();
Statement stmt = con.createStatement();
ResultSet rscount =
stmt.executeQuery(countquery);
while(rscount.next())
int temp=rscount.getInt(1);
int pagecount=temp;
pagecount=pagecount/10;
if((temp%10)>0)
pagecount=pagecount+1;
records.addElement(""+pagecount);
ResultSet rs = stmt.executeQuery(query);
while(rs.next())
counter++;
if(counter>min && counter<=max)
String row[]=new String[8];
recordsfound=true;
row[0]=rs.getString(1);
row[1]=rs.getString(2);
row[2]=rs.getString(3);
row[3]=rs.getString(4);
row[4]=rs.getString(5);
row[5]=rs.getString(6);
row[6]=rs.getString(7);
row[7]=rs.getString(8);
records.addElement(row);
con.close();
catch(Exception e)
System.out.println("Error in selecting Country
Code "+e);
throw new Exception("Error in selecting Country
Code "+e);
return(records);
public void insertCountryCode(String country_code, String
country_code_desc, String country_phone_code, String
phone_format_flag,String active_flag, String sort_order,String
country_tax_percent)throws Exception
Context ctx = initcontext.getContext();
Double Sort_Order=null;
Double cntry_tax_prct=null;
if(sort_order!=null && sort_order.length()>0)
Sort_Order=new Double(sort_order);
if(country_tax_percent!=null &&
country_tax_percent.length()>0)
cntry_tax_prct=new Double(country_tax_percent);
String user_created=null;
Timestamp date_created=null;
Timestamp active_date=null;
String user_modified=null;
Timestamp date_modified=null;
try
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote =
(DB_UTILITYRemote)dbhome.create();
user_created=dbremote.getUser();
date_created=Timestamp.valueOf(dbremote.getDate());
active_date=date_created;
EB_B2B_COUNTRY_CODEHome home =
(EB_B2B_COUNTRY_CODEHome)ctx.lookup("java:comp/env/EB_B2B_COUNTRY_CODER
emote");
EB_B2B_COUNTRY_CODERemote remote =
(EB_B2B_COUNTRY_CODERemote)home.create(country_code, country_code_desc,
country_phone_code,active_flag, phone_format_flag,user_created,
date_created, active_date, Sort_Order, user_modified,
date_modified,cntry_tax_prct);
catch(Exception e)
System.out.println("Error in Creating COUNTRY
Code "+e);
throw new Exception("Error in Creating COUNTRY
Code "+e);
public void setSessionContext(SessionContext context)
this.context = context;
public void ejbActivate()
public void ejbPassivate()
public void ejbCreate()
public void ejbRemove()
The jsp client which acces the beans is as follows.
<BODY >
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="initcontext" %>
<%@ page import = "java.util.*" %>
<%@ page import="DB_UTILITYHome"%>
<%@ page import="DB_UTILITYRemote"%>
<%@ page import="javax.naming.*"%>
<%Connection con=null; %>
<script src="search_getvalues.js">
</script>
<form name=frm1>
<%! int intCount,intI,intRowCount,intJ;
String strtname=new String();
String strhidden=new String("txthdn");
Statement st;
ResultSet rs;
ResultSetMetaData rmeta;
....%>
<%
try
Context ctx = initcontext.getContext();
DB_UTILITYHome dbhome =
(DB_UTILITYHome)ctx.lookup("java:comp/env/DB_UTILITYRemote");
DB_UTILITYRemote dbremote = (DB_UTILITYRemote)dbhome.create();
con=dbremote.getConnection();
st=con.createStatement();
rs=st.executeQuery(strsqlquery);
rmeta=rs.getMetaData();
intCount=rmeta.getColumnCount();
....... %>
</form>
</BODY>
</HTML>
The resulting exception generated is as follows:
D:\oc4j\j2ee\home>java -jar orion.jar
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... done.
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e\epool_CountryCode-web.war... done.
Auto-deploying epool_CountryCode (New server version detected)...
Auto-deploying epool_CountryCode-ejb.jar (No previous deployment
found)... done.
Error deploying
file:/D:/oc4j/j2ee/home/demo/messagelogger/messagelogger-ejb.jar homes:
No javax.jms.Destination found a
t the specified destination-location (jms/theTopic) for
MessageDrivenBean com.evermind.logger.MessageLogger
Oracle9iAS (1.0.2.2.1) Containers for J2EE initialized
Auto-deploying epool countryCode example (New server version
detected)...
************************1
************************2
COUNT QUERY :SELECT COUNT(COUNTRY_CODE) FROM BAP_COUNTRY_CODE
QUERY :SELECT
COUNTRY_CODE,COUNTRY_CODE_DESC,COUNTRY_PHONE_CODE,PHONE_FORMAT_FLAG,COU
NTRY_TAX_PERCENT ,SORT_ORDER,ACTIVE
FLAG,ACTIVEDATE FROM BAP_COUNTRY_CODE order by COUNTRY_CODE
Error in selecting Country Code java.rmi.RemoteException: Error
(de-)serializing object: com.evermind.sql.OrionCMTConnec
tion; nested exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
JB:Error in selecting country cd java.lang.Exception: Error in
selecting Country Code java.rmi.RemoteException: Error (d
e-)serializing object: com.evermind.sql.OrionCMTConnection; nested
exception is:
java.io.NotSerializableException:
com.evermind.sql.OrionCMTConnection
Error in Selecting Records
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked
connection was created)
Auto-unpacking
D:\oc4j\j2ee\home\applications\epool_CountryCode\build\epool_CountryCod
e.ear... Error unpacking: IO Error:
The system cannot find the path specified
Error updating application epool_CountryCode: Unable to find/read
assembly info for D:\oc4j\j2ee\home\applications\epool_C
ountryCode\build\epool_CountryCode (META-INF/application.xml)
But if the DBUTILITY session bean is changed to a simple bean and accessed the code works fine and i am able to retrieve the data.Is the problem there because u one session bean cannot access a database connection method from another one or could it be because of the driver???
I hope i am clear.Please revert back in case any more references are needed.
Thanks in advance!!!!!! -
Looking up an EJB in a foreign app server
Hi,
I am trying to look up an EJB in a foreign app server from within an EJB deployed
in WLS 7.0.2. I have passed the name of the initialcontext factory with the -Djava.naming.factory.initial
argument to the java command in the startWebLogic.cmd file. However WLS uses the
weblogic.jndi.internal.WLContextImpl class to perform the lookup. Why is this
happening, any ideas, advises?
Thanks
Sriram"sriram" <[email protected]> wrote:
>
Deepak, Thank you for the reply. Setting the weblogic.jndi.WLInitialContextFactory
to my foreign app server's ContextFactory doesn't work. The WLS still
uses weblogic.jndi.internal.WLContextImpl
to do the lookup. Does any other propertes need to set as well to accomplish
what I am doing
Thanks
Sriram
"Deepak Vohra" <[email protected]> wrote:
Specify the system property
weblogic.jndi.WLInitialContextFactory=<initial context factory>
"sriram" <[email protected]> wrote:
Hi,
I am trying to look up an EJB in a foreign app server from within an
EJB deployed
in WLS 7.0.2. I have passed the name of the initialcontext factory
with
the -Djava.naming.factory.initial
argument to the java command in the startWebLogic.cmd file. HoweverWLS
uses the
weblogic.jndi.internal.WLContextImpl class to perform the lookup. Why
is this
happening, any ideas, advises?
Thanks
Sriram
hi,
Try the below code in the Lookup EJB
Properties prop = new properties();
/* For Weblogic */
prop.put(Context.INITAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL,"t3://ipaddress:7001");
/* For JBOSS */
prop.put(Context.INITAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
prop.put(Context.PROVIDER_URL,"jnp://ipaddress:7001");
InitialContext prop = new InitialContext(prop);
regards,
Elango TR
Elango TR
Sip Technologies & Exports Ltd. Elnet Software City,Chennai
http://www.siptech.co.in
[email protected] -
Call weblogic EJB without using weblogic.jndi.T3InitialContextFactory
I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
The context retrieval is as follows:
Properties table = new Properties();
table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
Context context = new InitialContext(table);
return context;
but when I run the client I am getting the follwing error:
javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 12 more
I have the J2EE jar on the client path and all....but can't get through this error
need help guys!
SamirSamir j <> writes:
Make sure IIOP is enabled on the server side. There was a bug in
earlier 8.1 config wizards that defaulted it to off.
andy
I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
The context retrieval is as follows:
Properties table = new Properties();
table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
Context context = new InitialContext(table);
return context;
but when I run the client I am getting the follwing error:
javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 12 more
I have the J2EE jar on the client path and all....but can't get through this error
need help guys!
Samir -
Call an EJB from standalone program in WS
Hello,
I am trying to call an ejb program from JavaProject(stand alone program) of WebsphereApplication Developer5.1.2.After getting initial context,it throws an error. The stack trace as follows,
javax.naming.NamingException: Error during resolve. Root exception is org.omg.CORBA.NO_IMPLEMENT: vmcid: 0x0 minor code: 0 completed: No
at com.ibm.ws.Transaction.JTS.CurrentImpl.suspend(CurrentImpl.java:394)
at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4070)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
at com.cts.ramyaJava.TrySample.main(TrySample.java:48)
If anyone faced the same problem,please let me know the solution.
Thanks,
Ramya Dharmarajan.Hello,
I am trying to call an ejb program from JavaProject(stand alone program) of WebsphereApplication Developer5.1.2.After getting initial context,it throws an error. The stack trace as follows,
javax.naming.NamingException: Error during resolve. Root exception is org.omg.CORBA.NO_IMPLEMENT: vmcid: 0x0 minor code: 0 completed: No
at com.ibm.ws.Transaction.JTS.CurrentImpl.suspend(CurrentImpl.java:394)
at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4070)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
at com.cts.ramyaJava.TrySample.main(TrySample.java:48)
If anyone faced the same problem,please let me know the solution.
Thanks,
Ramya Dharmarajan.
Maybe you are looking for
-
When I try to uninstall apple updater I get a message that says " The feature you are trying to use is on a network resource that is unavailable." I dont understand this. How can I finish uninstalling the apple update program?
-
Solaris 8 : core in /usr/lib/libssasnmp.so.1
Hello, I have a core file when i use the trap_send_with_more_para() function to send a ColdStart trap in Solaris 8 (with or without the last SNMP patch (108869-18)) with SEA 1.0.3.. I have the same problem in Solaris 7 (SEA 1.0.3) when i add the 1077
-
Upgrading 5th generation hard drive
Wondering if anyone can advise. Was thinking of upgrading one of my 80G classics to a 160G by replacing the hard drive, as I don't intend to splash out on yet another ipod, but see this as a cheaper option for getting more memory. Then I wondered. I
-
Are there any general guidelines/algorithm to perform arc/circular motion?
My system consists of a PC with a IEEE488.2 from NI that connects to 2 Newport MM4006 controllers, which, in turn control a high-precision stage. I would like to know if you can provide me with any guidance/algorithm to learn about programming arc/ci
-
Https Problem - ClosedChannelException
Hello, I have a webservice that I deployed into the standalone OC4J. I then enabled https according to the instructions given in http://download.oracle.com/docs/cd/B25221_04/web.1013/b14429/configssl.htm ! When I'm calling the webservice via Firefox