[JBoss-user] throwing custom exceptions in EJB with CMP
Hey all- I posted this to the forums with no response... In one of my EJBs I throw a custom exception. I'd like to be able to catch this exception in my client jsp code, but instead of throwing my exception, an UndeclaredThrowableException is thrown with my exception nested in it. is there anything I can do to make my exception declared? -Todd here's the code for my exception: public class UnknownCreditCardTypeException extends Exception { public UnknownCreditCardTypeException(String sMessage) { super(sMessage); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] throwing custom exceptions in EJB with CMP
you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. hth dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 9:53 PM Subject: [JBoss-user] throwing custom exceptions in EJB with CMP Hey all- I posted this to the forums with no response... In one of my EJBs I throw a custom exception. I'd like to be able to catch this exception in my client jsp code, but instead of throwing my exception, an UndeclaredThrowableException is thrown with my exception nested in it. is there anything I can do to make my exception declared? -Todd here's the code for my exception: public class UnknownCreditCardTypeException extends Exception { public UnknownCreditCardTypeException(String sMessage) { super(sMessage); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] throwing custom exceptions in EJB with CMP
unless I'm missing something obvious, what you're doing should (tm) work (o: if its a simple small example feel free to send it to me privately and I'll have a look when I get home tonight. cheers dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Dmitri Colebatch [EMAIL PROTECTED]; Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Friday, March 08, 2002 7:10 AM Subject: RE: [JBoss-user] throwing custom exceptions in EJB with CMP FYI- I'm using jboss 2.4.4 w/ catialina you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. I think I'm already doing that. here's the prototype from my remote interface: public void setType(String _type) throws RemoteException, UnknownCreditCardTypeException; Is there something else I have to do in the interface? -Todd -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 5:43 AM To: Todd Marshall; Jboss-User@Lists. Sourceforge. Net Subject: Re: [JBoss-user] throwing custom exceptions in EJB with CMP you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. hth dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 9:53 PM Subject: [JBoss-user] throwing custom exceptions in EJB with CMP Hey all- I posted this to the forums with no response... In one of my EJBs I throw a custom exception. I'd like to be able to catch this exception in my client jsp code, but instead of throwing my exception, an UndeclaredThrowableException is thrown with my exception nested in it. is there anything I can do to make my exception declared? -Todd here's the code for my exception: public class UnknownCreditCardTypeException extends Exception { public UnknownCreditCardTypeException(String sMessage) { super(sMessage); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] throwing custom exceptions in EJB with CMP (fixed it)
Dmitri- While in the process of writing a quick example app to replicate the problem, I figured it out. I wasn't throwing the exception in the Home interface from my create methods. Thank you very much for your time. :) -Todd -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 3:59 PM To: Todd Marshall; Jboss-User@Lists. Sourceforge. Net Subject: Re: [JBoss-user] throwing custom exceptions in EJB with CMP unless I'm missing something obvious, what you're doing should (tm) work (o: if its a simple small example feel free to send it to me privately and I'll have a look when I get home tonight. cheers dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Dmitri Colebatch [EMAIL PROTECTED]; Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Friday, March 08, 2002 7:10 AM Subject: RE: [JBoss-user] throwing custom exceptions in EJB with CMP FYI- I'm using jboss 2.4.4 w/ catialina you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. I think I'm already doing that. here's the prototype from my remote interface: public void setType(String _type) throws RemoteException, UnknownCreditCardTypeException; Is there something else I have to do in the interface? -Todd -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 5:43 AM To: Todd Marshall; Jboss-User@Lists. Sourceforge. Net Subject: Re: [JBoss-user] throwing custom exceptions in EJB with CMP you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. hth dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 9:53 PM Subject: [JBoss-user] throwing custom exceptions in EJB with CMP Hey all- I posted this to the forums with no response... In one of my EJBs I throw a custom exception. I'd like to be able to catch this exception in my client jsp code, but instead of throwing my exception, an UndeclaredThrowableException is thrown with my exception nested in it. is there anything I can do to make my exception declared? -Todd here's the code for my exception: public class UnknownCreditCardTypeException extends Exception { public UnknownCreditCardTypeException(String sMessage) { super(sMessage); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] throwing custom exceptions in EJB with CMP (fixed it)
np... thats the way it all works isn't it (o: - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED]; Ean Schuessler [EMAIL PROTECTED] Sent: Friday, March 08, 2002 10:20 AM Subject: RE: [JBoss-user] throwing custom exceptions in EJB with CMP (fixed it) Dmitri- While in the process of writing a quick example app to replicate the problem, I figured it out. I wasn't throwing the exception in the Home interface from my create methods. Thank you very much for your time. :) -Todd -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 3:59 PM To: Todd Marshall; Jboss-User@Lists. Sourceforge. Net Subject: Re: [JBoss-user] throwing custom exceptions in EJB with CMP unless I'm missing something obvious, what you're doing should (tm) work (o: if its a simple small example feel free to send it to me privately and I'll have a look when I get home tonight. cheers dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Dmitri Colebatch [EMAIL PROTECTED]; Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Friday, March 08, 2002 7:10 AM Subject: RE: [JBoss-user] throwing custom exceptions in EJB with CMP FYI- I'm using jboss 2.4.4 w/ catialina you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. I think I'm already doing that. here's the prototype from my remote interface: public void setType(String _type) throws RemoteException, UnknownCreditCardTypeException; Is there something else I have to do in the interface? -Todd -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 5:43 AM To: Todd Marshall; Jboss-User@Lists. Sourceforge. Net Subject: Re: [JBoss-user] throwing custom exceptions in EJB with CMP you can throw exceptions from your interface methods, just add them to the interface and the implementing method's throws clauses. hth dim - Original Message - From: Todd Marshall [EMAIL PROTECTED] To: Jboss-User@Lists. Sourceforge. Net [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 9:53 PM Subject: [JBoss-user] throwing custom exceptions in EJB with CMP Hey all- I posted this to the forums with no response... In one of my EJBs I throw a custom exception. I'd like to be able to catch this exception in my client jsp code, but instead of throwing my exception, an UndeclaredThrowableException is thrown with my exception nested in it. is there anything I can do to make my exception declared? -Todd here's the code for my exception: public class UnknownCreditCardTypeException extends Exception { public UnknownCreditCardTypeException(String sMessage) { super(sMessage); } } ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user