Invoking session Bean second time gives me error
Hi, I am getting the following error when I am invoking my session bean second time. First time it works perfectly and second time it gives the following error. How can I solve this error. Any help will be appreciated. Thanks Ritesh. My Code: private IntialContex getInitialContext(String app) { String appUrl= "ormi://localhost:/"; appUrl= appUrl + app; java.util.Hashtable tab= new java.util.Hashtable(); tab.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory"); tab.put("java.naming.provider.url", appUrl); tab.put("java.naming.security.principal", "admin"); tab.put("java.naming.security.credentials", "password"); return new javax.naming.InitialContext(tab); } // in servlet InitialContext ictx= getInitialContext(apps); userManagerHome= (UserManagerHome) PortableRemoteObject.narrow(ictx.lookup("java:comp/env/UserManager"), UserManagerHome.class); UserManager userM = userMangerHome.create(); userM.doLogin(userName,Password); //application Client file UserManager Session com.aclcargo.sessionbean.UserManagerHome com.aclcargo.sessionbean.UserManager //Error on second Request com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.rmi.OrionRemoteException: java.lang.NullPointerException at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.ejb.EJBUtils.getUserException(EJBUtils.java:199) at UserManager_StatelessSessionBeanWrapper0.doLogin(UserManager_StatelessSessio nBeanWrapper0.java:64) at Login.service(ActionMultiplexer.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j ava:501) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis patcher.java:170) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java: 576) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62) Nested exception is: java.lang.NullPointerException at com.aclcargo.sessionbean.BeansHome.getRegisteredUserHome(BeansHome.java:58) at com.aclcargo.sessionbean.UserManagerBean.doLogin(UserManagerBean.java:45) at UserManager_StatelessSessionBeanWrapper0.doLogin(UserManager_StatelessSessio nBeanWrapper0.java:54) at Login.service(ActionMultiplexer.java:73) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j ava:501) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis patcher.java:170) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java: 576) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189) at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
Re: Library placement
It sounds like Struts (like many projects from jakarta) has broken classloading. You can print out the current classloader in Orion from any class to see what paths are included. These consist of: paths specified in orion-application.xml via jar/zip files in orion/lib jar/zip files in mywebapp/WEB-INF/lib or if your app is packed into a .ear, Class-Path entries in MANIFEST.MF On Fri, 19 Oct 2001, Perry Hoekstra wrote: > What is the correct placement of supporting libraries for an application > within Orion? We are running into continual class loader issues no > matter where we place them. > > We have tried: > > - The approved J2EE blueprints location which is WEB-INF/lib. This > works fine in Tomcat, however, I get a ClassNotFound exception a Struts > class (the Struts ActionHome class). > > - Orion directed path which is a lib directory at the base of the .ear > file. This I tried based on messages from the Orion mailing list and > the Elephantwalker support site. My libraries were document in the > "orion-application.xml" configuration file in the tag. This > causes intermittant class loader issues. The first form which is > derived from a Struts ActionForm comes up fine but the next form throws > a ClassNotFound exception. In addition, Struts tags (ie. the ErrorTag) > is not found when the page that has that tag is accessed. > > - Placing libraries on the classpath for Orion server startup. Again, > problems with ClassNotFound exceptions. > > I grant you, all of this issues seem to resolve around the Struts > framework. Is anyone aware of a problem revolving around Struts and > Orion specially dealing with classloader issues? On the Struts site, > the only issues it documents have to deal with an old version of Orion > (1.0.3) I think. > > BTW, I have these problems using 1.5.2 and 1.5.3 on Solaris 2.8, Linux > RH 7.1, Windows NT 4.0sp6, and Windows 2000. So I know that it is not > an OS-specific problem. > > At this point, I am at a loss... Thoughts, ideas??? > >
Library placement
What is the correct placement of supporting libraries for an application within Orion? We are running into continual class loader issues no matter where we place them. We have tried: - The approved J2EE blueprints location which is WEB-INF/lib. This works fine in Tomcat, however, I get a ClassNotFound exception a Struts class (the Struts ActionHome class). - Orion directed path which is a lib directory at the base of the .ear file. This I tried based on messages from the Orion mailing list and the Elephantwalker support site. My libraries were document in the "orion-application.xml" configuration file in the tag. This causes intermittant class loader issues. The first form which is derived from a Struts ActionForm comes up fine but the next form throws a ClassNotFound exception. In addition, Struts tags (ie. the ErrorTag) is not found when the page that has that tag is accessed. - Placing libraries on the classpath for Orion server startup. Again, problems with ClassNotFound exceptions. I grant you, all of this issues seem to resolve around the Struts framework. Is anyone aware of a problem revolving around Struts and Orion specially dealing with classloader issues? On the Struts site, the only issues it documents have to deal with an old version of Orion (1.0.3) I think. BTW, I have these problems using 1.5.2 and 1.5.3 on Solaris 2.8, Linux RH 7.1, Windows NT 4.0sp6, and Windows 2000. So I know that it is not an OS-specific problem. At this point, I am at a loss... Thoughts, ideas??? -- Perry Hoekstra E-Commerce Architect Talent Software Services [EMAIL PROTECTED]
Re: orion xml's
On Thu, 18 Oct 2001, Morten Wilken wrote: > Am i the only one who thinks that the idea that you have to edit the > autogenerated files like orion-ejb-jar.xml etc. is a bit problematic? Probably. > sure it can be done and it works, but i would be much happier if i could > have 2 sets of xml files, the ones you edit (and you could put in your > versioning system), and another set that orion generates, and that you never > have to fiddle with. It's much more convenient than the alternative: having ot generate both sets of XML before you can deploy at all. As it is, you can manually generate the stuff you want, and Orion will... oh wait, looks like you're not aware of that fully, read on! > it seems an odd mix the way it is right now, as if it was meant to be > seperated, but somehow it wasn't followed through > > i could be wrong, and missing the point of the structure entirely Here's what I do: deploy with just the J2EE files, then copy the orion-generated files to my base directory (i.e., orion-web.xml into WEB-INF, etc.) and edit that file. Then I wipe out the deployment that orion made, and redeploy; Orion copies the orion-*.xml files in place and uses them. > comments appreciated > sincerely > morten wilken > > --- Joseph B. Ottinger [EMAIL PROTECTED] http://adjacency.org/ IT Consultant
Re: Presentation & Business tier JSP-Servlet Deployment
At 11.52 19/10/2001, Prashant Gaikwad wrote: >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. Why this requirement? Be very careful not to mistake Apache the web server proper (that cannot serve JSP at all) for the bastardized Oracle HTTP Server (that comes installed with JServ). I don't know how could you serve JSPs with Apache, and I don't believe you'll want to use JServ thru Oracle HTTP Server, once you discover how old and unsupported it is... >1.) Is the usage of two web servers (apcahe & OC4J) advisable. If yes/No >then why ? I'm using Apache to serve static content (HTML, images, Flash, etc.) and Orion to serve JSP and servlets, and to run the business logic of my application. Apache is configured as a front-end to Orion thru mod_proxy. The main benefit is that Orion doesn't get bothered with serving static content. >2.) If application is deployed in two diffrent web server context what >would be the practical problems during the development. I apologize if I'm misunderstanding your question, but I strongly get the impression that you believe that Apache is a JSP container. It is not, Apache isn't a "web server context" in the J2EE sense of the word "context". Sebastiano Pilla E-TREE S.p.a. Via Fonderia 43 - 31100 Treviso (Italy) phone +39.0422.3107 fax +39.0422.310888 http://www.e-tree.com http://www.webanana.com
Re: SV: MDB in orion 1.5.2 using Queue
Magnus, I created my own resource provider for Tibco JMS and it would work, but only for the Queue/Topic returned by getDefaultResource() (can't remember the exact method name off the top of my head). Anyway, my orion-ejb-jar.xml would like like: My queue would be located at java:comp/resource/TibcoProvider/myQueue But if I put in my orion-ejb-jar.xml file the complete signature, ("jms/MyQueue"), my MDB can't locate the proper queue/connection factory. It appears that "jms/MyQueue" would imply that the "root" of the lookup must take place at "java:comp/env", which is a sibling to java:comp/resource. My JNDI knowledge is very limited, so if you can explain to me how I can specify which queue to use with my resource provider, that would be great! -Pat At 10:41 AM 10/19/2001 +0200, you wrote: >Hi. > >1) In 1.5.3 Orion will tell you if you havent implemented MessageDrivenBean >and MessageListener in your MDB. > >2) Orion will use the default JMS resource if you dont specify a >destination-location etc in orion-ejb-jar.xml. > >ResourceProviders, made public in 1.5.2, lets you use 3rd party resources in >a very simple way. A document on this issue is in progress and will be >released shortly, with examples, samples and details. > >A MDB document is also in progress, but other documents have higher prio >right now. >WR > > > > > -Ursprungligt meddelande- > > Från: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]För Romen Law > > Skickat: den 19 oktober 2001 03:39 > > Till: Orion-Interest > > Ämne: RE: MDB in orion 1.5.2 using Queue > > > > > > ello, > > > > Thanks for all the replies. > > > > I must apologise: my MDB using Queue was working all along. It's > > just that I > > was using System.out.println() for logging so I couldn't see it on the > > console. But after using log4j I could see it. Well, there is > > first time for > > everything. > > > > I did find two things though: > > 1. someone posted before saying that in Orion you should not make MDB > > implement MessageListener, otherwise it will not work. I found that to be > > false. > > > > 2. I still do need to modify the destination-location in > > orion-ejb-jar.xml. > > If I don't it still works provided that I only have one or > > defined in jms.xml. Orion seems to use that one disregarding the > > queue name > > you specify in the sender. > > > > cheers > > romen > > > >
Transaction behaviour
Hi all, We have implemented a session facade architecture, with session beans calling multiple entity beans. We have configured the as "Required" for everything, as normal. What is the exact criteria for a session method to rollback? Is it that it must be a system initiated exception, or else the application must call setRollBackOnly()? Its just that calling this method causes a rollback, but the the container does not come up with the "Session was rolled back" exception, so I'm a bit worried about it. I know this has been addressed before on this list, so I apologise for going over old stuff, but I've noticed that some applications call the setRollbackOnly method and others don't. Is it just that those ones don't care if a rollback occurs? Specificaly, we have a stateless session bean that we invoke through a statefull one (that a servlet creates and invokes). The stateless bean always tries to create the entity beans. We would like it such that if either fails to create, the method does a rollback - all or nothing. Does this mean that we must call setRollbackOnly() ? Thanks for any help on this. Justin
Re: SV: MDB in orion 1.5.2 using Queue
Magnus, When could we expect the durable subscription-type tag to work? Currently it does not work. I have used resource-provider to connect my MDB to an external JMS server and I noticed that if I set the subscription-type to durable then when I use my declared connectionfactories in resource-provider to send messages to the same topic that my mdb is listening to I do not receive those messages in my mdb. It seems that you are creating a subscriber and if durable is set then you are setting the boolean value that tells the subscriber whether to pick up messages that it sent in to false. Just a guess though. Just curious,thanks, Tim Pouyer On Fri, 2001-10-19 at 04:41, Magnus Rydin wrote: > Hi. > > 1) In 1.5.3 Orion will tell you if you havent implemented MessageDrivenBean > and MessageListener in your MDB. > > 2) Orion will use the default JMS resource if you dont specify a > destination-location etc in orion-ejb-jar.xml. > > ResourceProviders, made public in 1.5.2, lets you use 3rd party resources in > a very simple way. A document on this issue is in progress and will be > released shortly, with examples, samples and details. > > A MDB document is also in progress, but other documents have higher prio > right now. > WR > > > > > -Ursprungligt meddelande- > > Från: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]För Romen Law > > Skickat: den 19 oktober 2001 03:39 > > Till: Orion-Interest > > Ämne: RE: MDB in orion 1.5.2 using Queue > > > > > > ello, > > > > Thanks for all the replies. > > > > I must apologise: my MDB using Queue was working all along. It's > > just that I > > was using System.out.println() for logging so I couldn't see it on the > > console. But after using log4j I could see it. Well, there is > > first time for > > everything. > > > > I did find two things though: > > 1. someone posted before saying that in Orion you should not make MDB > > implement MessageListener, otherwise it will not work. I found that to be > > false. > > > > 2. I still do need to modify the destination-location in > > orion-ejb-jar.xml. > > If I don't it still works provided that I only have one or > > defined in jms.xml. Orion seems to use that one disregarding the > > queue name > > you specify in the sender. > > > > cheers > > romen > > > > > > >
RE: JavaMail problem
Hi, Thanks for the replies. Still no joy, this is strange behaviour. We don't want to enable relaying totally, because of the security risks. Yet its still a problem if we enable it for specific IP addresses, it doesn't work. We can enable routing to specific external domains, and this works. Anyway, it appears to be either a JavaMail or Exchange Server problem, so I'll keep looking there. Thanks again, Justin -Original Message- From: Christoph Sturm [mailto:[EMAIL PROTECTED]] Sent: 16 October 2001 16:43 To: Orion-Interest Cc: Orion-Interest Subject: Re: JavaMail problem Hello Justin, Tuesday, October 16, 2001, 10:48:20 AM, you wrote: JC> I have set Exchange to disable relaying except for the IP address of the JC> machine the appserver is on. The problem is I'm still getting the JC> "javax.mail.SendFailedException: 550 Relaying is prohibited" error. You need to restart the internet mail service (in control panel/services) for the change to take effect. -- Best regards, Christophmailto:[EMAIL PROTECTED]
RE: MDB in orion 1.5.2 using Queue
On Fri, 2001-10-19 at 02:38, Romen Law wrote: > > I did find two things though: > 1. someone posted before saying that in Orion you should not make MDB > implement MessageListener, otherwise it will not work. I found that to be > false. Cool. Sorry for the false info. I was referring to this previous post: http://www.mail-archive.com/orion-interest%40orionserver.com/msg14877.html Obviously one needs onMessage() to receive the messages...But it compiles and deploys fine without the MessageListener declaration. oh well. cheers, - Renaud -- Renaud Bruyeron <[EMAIL PROTECTED]> Fullsix London - http://www.fullsix.com/
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
SV: MDB in orion 1.5.2 using Queue
Hi. 1) In 1.5.3 Orion will tell you if you havent implemented MessageDrivenBean and MessageListener in your MDB. 2) Orion will use the default JMS resource if you dont specify a destination-location etc in orion-ejb-jar.xml. ResourceProviders, made public in 1.5.2, lets you use 3rd party resources in a very simple way. A document on this issue is in progress and will be released shortly, with examples, samples and details. A MDB document is also in progress, but other documents have higher prio right now. WR > -Ursprungligt meddelande- > Från: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]För Romen Law > Skickat: den 19 oktober 2001 03:39 > Till: Orion-Interest > Ämne: RE: MDB in orion 1.5.2 using Queue > > > ello, > > Thanks for all the replies. > > I must apologise: my MDB using Queue was working all along. It's > just that I > was using System.out.println() for logging so I couldn't see it on the > console. But after using log4j I could see it. Well, there is > first time for > everything. > > I did find two things though: > 1. someone posted before saying that in Orion you should not make MDB > implement MessageListener, otherwise it will not work. I found that to be > false. > > 2. I still do need to modify the destination-location in > orion-ejb-jar.xml. > If I don't it still works provided that I only have one or > defined in jms.xml. Orion seems to use that one disregarding the > queue name > you specify in the sender. > > cheers > romen > >
RE: Nimda Virus
Title: RE: Nimda Virus er no ... you meet on IRC get the other guys IP and then you ... Justin -Original Message-From: Nusairat, Joseph F. [mailto:[EMAIL PROTECTED]]Sent: 18 October 2001 04:02To: Orion-InterestSubject: RE: Nimda Virus Wow i didnt believe rudeness was a part of these forums. SHould we now meet out back at lunch and fight? I believe thats how it goes. ANYWAY ... i think the other guy was right about it propogating through the file sharing ports i believe we had one or two that were open Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -Original Message-From: J.D. Bertron [mailto:[EMAIL PROTECTED]]Sent: Thursday, October 18, 2001 8:14 AMTo: Orion-InterestSubject: RE: Nimda Virus Get a clue. You work for MCI WorldCom. What did you expect ? -Original Message-From: Nusairat, Joseph F. [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 17, 2001 4:29 PMTo: Orion-InterestSubject: RE: Nimda Virus lol ... well how did we get infected??? Does anyone have any clue how that could happen? Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -Original Message- From: Hani Suleiman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 17, 2001 10:15 AM To: Orion-Interest Subject: Re: Nimda Virus Of course not, it only affects IIS. On Wed, 17 Oct 2001, Nusairat, Joseph F. wrote: > Have any of u had issues with this exploiting the Orion App? > > > Joseph Faisal Nusairat, Sr. Project Manager > WorldCom > tel: 614-723-4232 > pager: 888-452-0399 > textmsg: [EMAIL PROTECTED] > >