RE: help with trans. synchronization
Don't know if this will help, but it looks like the problem starts with the execution of a finder query. So maybe review the sql you've set for this query in orion-ejb-jar.xml. Or maybe the query can return more than one row and you have it set to return a single entity instance in the ejb's home interface? -Original Message- From: Waller Anne [mailto:[EMAIL PROTECTED]] Sent: 17 May 2002 02:35 To: Orion-Interest Subject: help with trans. synchronization Can anyone give some pointers or have come across a similar problem ? We are currently in development and in the middle of UAT testing. The application runs on Orion1.5.2 connecting to multiple datasources on the one server. A recent test raised the following exception java.lang.ArrayIndexOutOfBoundsException at com.evermind.server.ApplicationServerTransactionSynchrization.getConnection( Unknown source) . at ChangeHome_EntityHomeWrapper267.findActive(ChangeHome_EntityHomeWrapper) The application ues stateless session beans and CMP entity beans. There are 3 queuelisteners for transactions. Have reviewed the orion-ejb-jar and the ejb-jar for the transaction-attributes but am still none the wiser. Has anyone got any suggestions on tracking this down, we have put the profiler from HP called HPJMeter on and run with -Xprof. Perhaps we have too much information now but we are too inexperienced to be able to know what the next step should be in tracking this down. Would appreciate any advise on this one? regards, Anne. ** This e-mail is confidential and for the sole use of the intended recipient(s). If you are not the intended recipient, you are not authorised to disclose, use, distribute or in any other way make use of the information contained in it, and such activities are prohibited. If you have received this e-mail in error, please notify the sender by reply e-mail, delete the document and destroy all copies of the original message. **
FW: Bean to remote bean communication... (2nd try)
I originally posted this at elephantwalker but have had little response, hopefully someone here has some ideas... I'm trying to lookup a bean on a remote machine. I set up initial context in usual way using properties taken from the jndi.properties on the remote oc4j server. In fact I want to lookup the bean from within a web-app (or ejb) installed on a local oc4j server. When I attempt it all I get is NullPointerException: domain was null. Does anyone know what this means? Some more info: I do the lookup programmatically. If I run it as a standalone client (not what I want to do) I get an error telling me the Factory can't find application-client.xml - this is not surprising as it's not on my classpath. Running from local container gives the error above. I have added an entry to orion-application.xml: ejb-module remote=true path=myremoteapp-ejb / and entries for the beans deployed there into my local oc4j servers' application-client.xml Here's the code I'm using to do the lookup: Hashtable env = new Hashtable(); env.put(java.naming.provider.url, ormi://remotemachineIP:rmiport/myremoteapp); env.put (java.naming.factory.initial, com.evermind.server.ApplicationClientInitialContextFactory); env.put(java.naming.security.principal, myremoteapp); env.put(java.naming.security.credentials, password); targetEJB_URI = java:comp/env/ + targetEJB_URI; EJBHome ejbRef = null; Context ic = new InitialContext(env); //ejbRef = (EJBHome)PortableRemoteObject.narrow(ic.lookupLink (targetEJB_URI), EJBHome.class); ejbRef = (EJBHome) ic.lookupLink (targetEJB_URI); One other thing is if I use the RMIInitialContextFactory instead then the context lookup works if I'm running as a standalone client. I then only get a naming exception since it can't see application-client.xml Any help appreciated. Thanks, Chris.
RE: javax.naming.NameNotFoundException
I was looking for a config problem! OK now I'm ashamed. Thanks though, I have been overlooking that for days. -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: 23 January 2002 21:41 To: Chris Francis; Orion-Interest Subject: RE: javax.naming.NameNotFoundException Well, from CMSAuthorisationEJB, the ejb-ref-name is CMSUsersEntityEJB but in your code you are using CMSUsersEntityEJBHome (CMSAuthorisationEJBClass.java). -AP_ -Original Message- From: Chris Francis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 4:39 AM To: 'Alex Paransky'; Orion-Interest Cc: Chris Francis Subject: RE: javax.naming.NameNotFoundException OK here's some of the relevant files. Lookups are fine from the web service but I included web.xml aswell... ejb-jar.xml does include the ejb-ref tags. I also deploy an application-client.xml. Maybe I shouldn't do this? Chris. -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: 23 January 2002 00:14 To: Orion-Interest Cc: [EMAIL PROTECTED] Subject: RE: javax.naming.NameNotFoundException Yes, you do (bean to bean as well) Show some code of how you are trying to lookup the bean, and something from your deployment descriptor (ejb-jar.xml)... -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Francis Sent: Tuesday, January 22, 2002 7:55 AM To: Orion-Interest Subject: RE: javax.naming.NameNotFoundException I meant within the session tag in ejb-jar.xml I shouldn't need something like the following: ejb-ref ejb-ref-nameblah/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homeblahHome/home remoteblahEJB/remote /ejb-ref I should only need this if I'm trying to refer to an EJB in a different jar file? I might then need the ejb-link tag aswell. But anyhow, I did put these in just to check, but it didn't make any difference. I guess I didn't explain things very well below. The beans all work, I can look them all up and use them from the associated web application and Orion doesn't grumble about anything on start up. It's only the bean to bean lookup that fails. This is why I'm confused as to what is going on. Chris. -Original Message- From: Magnus Rydin [mailto:[EMAIL PROTECTED]] Sent: 22 January 2002 12:00 To: Orion-Interest Subject: SV: javax.naming.NameNotFoundException Hi Chris, You only need a application-client.xml for your application-clients. Your EJBs DO want to have references to any resources they are to use in their ejb-jar.xml entries. Why did you NOT put them there (ie what are you refering when you say that you dont need to) ? WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Chris Francis Skickat: den 22 januari 2002 12:21 Till: Orion-Interest Ämne: FW: javax.naming.NameNotFoundException Hi All, I'm tearing my hair out trying to get this to work. I have a couple of entity beans and a session bean. Everything deploys OK. The session needs to access the two entities. I've seen the examples but they look to be the same as what I've got. The ejb's are not in a jar but all live in the same package hence directory. This means I shouldn't need ejb-ref tags within my ejb-jar.xml, and I shouldn't need a application-client.xml at all. However, it appears to make little difference as to whether they are there or not. So it's something else. The only thing is, I've run out of ideas! Anyone out there suggest something? Chris.
RE: javax.naming.NameNotFoundException
Err, I haven't spammed this several times to the list! There must be something up at the list server. Apologies. Chris. -Original Message- From: Chris Francis [mailto:[EMAIL PROTECTED]] Sent: 23 January 2002 12:39 To: Orion-Interest Cc: Chris Francis Subject: RE: javax.naming.NameNotFoundException OK here's some of the relevant files. Lookups are fine from the web service but I included web.xml aswell... ejb-jar.xml does include the ejb-ref tags. I also deploy an application-client.xml. Maybe I shouldn't do this? Chris. -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: 23 January 2002 00:14 To: Orion-Interest Cc: [EMAIL PROTECTED] Subject: RE: javax.naming.NameNotFoundException Yes, you do (bean to bean as well) Show some code of how you are trying to lookup the bean, and something from your deployment descriptor (ejb-jar.xml)... -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Francis Sent: Tuesday, January 22, 2002 7:55 AM To: Orion-Interest Subject: RE: javax.naming.NameNotFoundException I meant within the session tag in ejb-jar.xml I shouldn't need something like the following: ejb-ref ejb-ref-nameblah/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homeblahHome/home remoteblahEJB/remote /ejb-ref I should only need this if I'm trying to refer to an EJB in a different jar file? I might then need the ejb-link tag aswell. But anyhow, I did put these in just to check, but it didn't make any difference. I guess I didn't explain things very well below. The beans all work, I can look them all up and use them from the associated web application and Orion doesn't grumble about anything on start up. It's only the bean to bean lookup that fails. This is why I'm confused as to what is going on. Chris. -Original Message- From: Magnus Rydin [mailto:[EMAIL PROTECTED]] Sent: 22 January 2002 12:00 To: Orion-Interest Subject: SV: javax.naming.NameNotFoundException Hi Chris, You only need a application-client.xml for your application-clients. Your EJBs DO want to have references to any resources they are to use in their ejb-jar.xml entries. Why did you NOT put them there (ie what are you refering when you say that you dont need to) ? WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Chris Francis Skickat: den 22 januari 2002 12:21 Till: Orion-Interest Ämne: FW: javax.naming.NameNotFoundException Hi All, I'm tearing my hair out trying to get this to work. I have a couple of entity beans and a session bean. Everything deploys OK. The session needs to access the two entities. I've seen the examples but they look to be the same as what I've got. The ejb's are not in a jar but all live in the same package hence directory. This means I shouldn't need ejb-ref tags within my ejb-jar.xml, and I shouldn't need a application-client.xml at all. However, it appears to make little difference as to whether they are there or not. So it's something else. The only thing is, I've run out of ideas! Anyone out there suggest something? Chris.
FW: javax.naming.NameNotFoundException
Hi All, I'm tearing my hair out trying to get this to work. I have a couple of entity beans and a session bean. Everything deploys OK. The session needs to access the two entities. I've seen the examples but they look to be the same as what I've got. The ejb's are not in a jar but all live in the same package hence directory. This means I shouldn't need ejb-ref tags within my ejb-jar.xml, and I shouldn't need a application-client.xml at all. However, it appears to make little difference as to whether they are there or not. So it's something else. The only thing is, I've run out of ideas! Anyone out there suggest something? Chris.
RE: javax.naming.NameNotFoundException
I meant within the session tag in ejb-jar.xml I shouldn't need something like the following: ejb-ref ejb-ref-nameblah/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homeblahHome/home remoteblahEJB/remote /ejb-ref I should only need this if I'm trying to refer to an EJB in a different jar file? I might then need the ejb-link tag aswell. But anyhow, I did put these in just to check, but it didn't make any difference. I guess I didn't explain things very well below. The beans all work, I can look them all up and use them from the associated web application and Orion doesn't grumble about anything on start up. It's only the bean to bean lookup that fails. This is why I'm confused as to what is going on. Chris. -Original Message- From: Magnus Rydin [mailto:[EMAIL PROTECTED]] Sent: 22 January 2002 12:00 To: Orion-Interest Subject: SV: javax.naming.NameNotFoundException Hi Chris, You only need a application-client.xml for your application-clients. Your EJBs DO want to have references to any resources they are to use in their ejb-jar.xml entries. Why did you NOT put them there (ie what are you refering when you say that you dont need to) ? WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Chris Francis Skickat: den 22 januari 2002 12:21 Till: Orion-Interest Ämne: FW: javax.naming.NameNotFoundException Hi All, I'm tearing my hair out trying to get this to work. I have a couple of entity beans and a session bean. Everything deploys OK. The session needs to access the two entities. I've seen the examples but they look to be the same as what I've got. The ejb's are not in a jar but all live in the same package hence directory. This means I shouldn't need ejb-ref tags within my ejb-jar.xml, and I shouldn't need a application-client.xml at all. However, it appears to make little difference as to whether they are there or not. So it's something else. The only thing is, I've run out of ideas! Anyone out there suggest something? Chris.