coco,
Ensure that idpays is setup properly, as a side note I'm not sure it is being
assigned the appropriate value.
| PaysLocal paysLocal = paysLocalHome.create(""+idpays+1,detail_pays);
|
This may or may not be the desired result, this code will append a one to the
end of idpays, so 100 becomes 1001. If this is the desired outcome, ignore,
otherwise, specify order by using parentesis. See the following example:
| public class test {
| public static void main(String [] args) {
| int idpays = 100;
|
| System.out.println("\"\"+idpays+1 = " + idpays+1);
| System.out.println("\"\"+(idpays+1) = " + (idpays+1));
| }
| }
|
Oddly enough returns the following:
| ""+idpays+1 = 1001
| ""+(idpays+1) = 101
|
Also, check the source at:
atlantis.m.common.session.CommonSessionBean line 226.
Perhaps there is a check in CommonSessionBean that is kicking it back null?
Otherwise, make sure you initializing the local home interface? I usually
setup something to the effect of:
| if ( paysLocalHome == null ) {
| // local interface is null, initialize a new context
| try {
| InitialContext ctx = new InitialContext();
| Object objref =
ctx.lookup("adjust/to/your/ejb/local/jndi/name/Pays");
| paysLocalHome = (PaysLocalHome)
PortableRemoteObject.narrow(objref, PaysLocalHome.class);
| } catch (ClassCastException e) {
| log("ClassCastException occurred, unable to create session
bean!",e);
| } catch (NamingException e) {
| log("NamingException occurred, unable to create session
bean!",e);
| }
| }
|
Anyhow, more code would be helpful.
Thanks!
Joshua Preston.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930123#3930123
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930123
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user