RE: Can't get 2nd web module's servlet-map to register
Derek, Why aren't you using DB pool feature provided by orion instead of creating a new pool. cheers -Original Message- From: Derek Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 10:01 AM To: Orion-Interest Subject: RE: Can't get 2nd web module's servlet-map to register Hi All, I have created my own DBPool on Orion. I have a startUp class also to bind the DBPool object using JNDI. But when I start the orion server the following is the error I've got : javax.naming.NamingException: META-INF/application-client.xml resource not found (see J2EE spec, application-client chapter for requirements and format of the f ile) at com.evermind.server.ApplicationClientInitialContextFactory.getInitial Context(Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 68) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246 ) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.(InitialContext.java:198) And the code in my startup class to initialize the DBPool is: try{ Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,""); env.put(Context.PROVIDER_URL,"ormi://localhost"); Context ctx = new InitialContext(env); //My DBPool DBPool nPool = new DBPool(); ctx.bind("DBPool",nPool); } catch (Exception e){ e.printStackTrace(); } Any suggestion? Thanks in advance Derek __ This transmission and the information it contains including any attachment, is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, disclose or copy this transmission. If you have received this transmission (or any copy) in error, please notify us immediately by reply e-mail to [EMAIL PROTECTED] Please delete the original transmission(including any attachment) and its contents and destroy or return to us any hard copy. Please note that any electronically transmitted material that purports to commit Sun Hung Kai & Co. Ltd., or any of its subsidiaries or associates, to any obligation or in any other way whatsoever, unless subsequently confirmed by fax or letter signed (in either case) by our duly authorized officer(s) may not be relied on. Material transmitted to you should also be checked by reference to the hard copy of the material printed directly by us.
Presentation & Business tier JSP-Servlet Deployment
Hello friends I'm developing a system which contains JSP's that hold presentation code and business code is governed by servlets-java bean combination. The web server is Oracle HTTP server(uses apache) which is part of Oracle 9iAS. Now requirment says that the presentation JSP's will be deployed on Apcahe web server and servlets-java beans holding bisuness workflow logic to be deployed on J2EE container i.e OC4J or Orion. Note: Complete deployment will be on single machine. My questions are -: 1.) Is the usage of two web servers (apcahe & OC4J) advisable. If yes/No then why ? 2.) If application is deployed in two diffrent web server context what would be the practical problems during the development. Pl, respond urgently Many thanks Prashant
Query on JSP...........[Urgent Pls............]
Hi, I've the follwoing situation :--- A remote business method in session bean[EJB] returns java bean instance to a java scripplet in JSP. Now I want to use this java bean instance and retrieve the object values to display it on the page. Question is :- Can I associate this java bean instance returned by the session bean[ejb] with a JSP tag's ( ) id attribute, so that I can use the getter accessor method to retrieve the values from the java bean. And how can I do this ? Thanks in advance prashant
DAO design..
Hi, I want to use DAO to access data in design. I have the following doubts and need to understand the concept :- Requirement is that session beans encapsulating business logic needs to access access database through DAO object/objects. 1.) What is DAO object suppose to be ? session/entity bean or a java class 2.) Can I pack multiple SQL select queries in a single DAO class 3.) Any specific design approach for DAO Can I know any links for more information Thanks prashant
RE: "network adapter could not establish the connection"...Oracle connectivity error
You need to install oracle client in the client m/c is u are usinfg type 4 driver OCI. This allows your client to use sqlnet for DB connetion. Check if you are able to connect to DB via SQLPLUS. How ever If u are usinf type 2 driver u don't need to have oracle client installed. -Original Message- From: vasanth kumar [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 2:11 PM To: Orion-Interest Subject: "network adapter could not establish the connection"...Oracle connectivity error hi i get this network adapter adapter could not establish the connection error whenever i go for connecting any piece of code with oracle.it's pretty calm with other databases.solve me with this problem please. thanks and regards. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: orion-application.xml
Hi Oisin, For deploying bean, I'm using approach similar to you. A session bean has been deployed on Orion and I want to access it from a servlet with the desired result passed by the bean to servlet. Problem is :- The servlet is not getting access to the bean with the browser showing message "You are not authorised to use this page" I'm using ANT for bean development(with proper dir struct proposed for ANT users) and deployment. Also the servlet(.war) file is in the .EAR file. Both the bean and servlet are deployed in Orion's environment using its admin tool. I'm also associating .war file (for servlet) to default website using admin tool so that servlet can be invoked from the browser. Orion auto deployment creates orion-application,orion-web.xml,orion-ejb-jar.xml files in its default /applications-deployment dir. Also Orion shows successful bean deployment in the default /application dir where I'm going wrong or missing any tag entry in any of the discriptor files. My requirment is to access bean and get result on the servlet page. Are there any alternative/diffrent approach to what I'm following. Or are there any links that would saught my problem.Its very urgent. Thanks & Regards Prashant -Original Message- From: OMurchu, Oisin [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 5:28 PM To: Orion-Interest Subject: orion-application.xml I'm having a problem deploying to Orion, which causes the deployment time to increase over time, and eventually the jvm orion is in to run out of memory. Basically, I'm using ANT to deploy, calling the Orion admin tool (com.evermind.client.orion.OrionConsoleAdmin) and passing the relevant parameters into it. The EAR file I'm deploying includes a lib directory, with all of the required extra jar files in it (utilities, etc). In order for orion to use these when loading a bean, I put the line into orion-application.xml, between the and tag. Orion does indeed load up the jar files as expected, so that works. The problem is that each time I deploy, the number of tags at least doubles, and at one stage I was left with over 500 tags in the orion-application.xml file. At this stage, the server slowed to a crawl, and either took several minutes to load up the beans, or else crashed. Has anybody come across this behaviour? And what can I do about it? And does anybody know of a good source of documentation on the various configuration options available for Orion, as I find it is poorly documented in all areas. Maybe the people at IronFlare could get their act together from counting all the money from Oracle, and produce a decent, (even semi-)professional set of documentation. Regds., OisÃn.
RE: Calling EJB From a Servlet..
Hi, The Elephant walker. Sure the error says domain was null, but the situation is that the servlet is just an another stand-alone program (not part of deployed Hello Session Bean) residing in D:\Oracle\iSuites\j2ee\home\default-web-app\WEB-INF\classes\trg\HelloServlet directory and from there I'm trying to access Hello Session Bean which is deployed on the Orion. Both client and server are on the same machine as I'm testing this saught of workability. So I guess domain name won't be needed and if yes could you elaborate on domain name you are talking about Regards Prashant -Original Message- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 4:28 PM To: Orion-Interest Subject: RE: Calling EJB From a Servlet.. First, if the servlet and ejb are in the same application, you don't need to use properties to initialize your contextbut if you did, it looks like you left off the domain in the properties. Regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Prashant Gaikwad Sent: Tuesday, September 11, 2001 3:27 AM To: Orion-Interest Subject: Calling EJB From a Servlet.. HI Friends, I'm having a serious problem in my code and am unable to understand. I've deployed a simple Hello bean on the orion container and want to access it from a servlet. I have the servlet in D:\Oracle\iSuites\j2ee\home\default-web-app\WEB-INF\classes\trg\HelloServlet . Following is the code in servlet try { trace("In Try"); Hashtable h = new Hashtable(); h.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi. RMIInitialContextFactory"); h.put(javax.naming.Context.SECURITY_PRINCIPAL, "ejb"); h.put(javax.naming.Context.SECURITY_CREDENTIALS, "ejbadmin"); h.put(javax.naming.Context.PROVIDER_URL,"ormi://localhost/Hello"); trace("Before Init Contect "); Context context = new InitialContext (h); trace("after Initial context"); Object boundObject = context.lookup("java:comp/env/ejb/HelloHome"); trace("At Trap"); helloHome = (HelloHome) javax.rmi.PortableRemoteObject.narrow(boundObject,HelloHome.class); } catch (Throwable exception) { exception.printStackTrace(); //System.out.println("Look up exception :" + exception.toString()); //throw new ServletException( // "Unable to get home interface: " + exception.toString()); } When I run servlet from browser I get an exception when the Context is getting crerated as folloew D:\Oracle\iSuites\j2ee\home>java -jar orion.jar Oracle9iAS (1.0.2.2) Containers for J2EE initialized ConstructorBefore TryIn TryBefore Init Contect java.lang.NullPointerException: d omain was null at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:428) at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:497) at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RM IInitialContextFactory.java:150) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.(Unknown Source) at trg.HelloServlet.init(HelloServlet.java:49) at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication. java:1580) at com.evermind.server.http.HttpApplication.findServlet(HttpApplication. java:3722) at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp lication.java:1995) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques tHandler.java:444) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja va:189) at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62) In _hello Please let me know where I'm going wrong. Thanks in advance Prashant
Calling EJB From a Servlet..
HI Friends, I'm having a serious problem in my code and am unable to understand. I've deployed a simple Hello bean on the orion container and want to access it from a servlet. I have the servlet in D:\Oracle\iSuites\j2ee\home\default-web-app\WEB-INF\classes\trg\HelloServlet . Following is the code in servlet try { trace("In Try"); Hashtable h = new Hashtable(); h.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi. RMIInitialContextFactory"); h.put(javax.naming.Context.SECURITY_PRINCIPAL, "ejb"); h.put(javax.naming.Context.SECURITY_CREDENTIALS, "ejbadmin"); h.put(javax.naming.Context.PROVIDER_URL,"ormi://localhost/Hello"); trace("Before Init Contect "); Context context = new InitialContext (h); trace("after Initial context"); Object boundObject = context.lookup("java:comp/env/ejb/HelloHome"); trace("At Trap"); helloHome = (HelloHome) javax.rmi.PortableRemoteObject.narrow(boundObject,HelloHome.class); } catch (Throwable exception) { exception.printStackTrace(); //System.out.println("Look up exception :" + exception.toString()); //throw new ServletException( // "Unable to get home interface: " + exception.toString()); } When I run servlet from browser I get an exception when the Context is getting crerated as folloew D:\Oracle\iSuites\j2ee\home>java -jar orion.jar Oracle9iAS (1.0.2.2) Containers for J2EE initialized ConstructorBefore TryIn TryBefore Init Contect java.lang.NullPointerException: d omain was null at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:428) at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:497) at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RM IInitialContextFactory.java:150) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.(Unknown Source) at trg.HelloServlet.init(HelloServlet.java:49) at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication. java:1580) at com.evermind.server.http.HttpApplication.findServlet(HttpApplication. java:3722) at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp lication.java:1995) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques tHandler.java:444) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja va:189) at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62) In _hello Please let me know where I'm going wrong. Thanks in advance Prashant