Hmm, can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT (the one i got on my computer) and the exception is logged on server side in logs/catalina*.log.
*Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/5/30 Mark Struberg <[email protected]> > For @Remote the exceptions usually get wrapped into an EJBException, isn't? > > This is done to prevent ClassNotFoundException on the client side. Imagine > some OpenJPA OptimisticLockingException gets thrown on the Server, but your > client project (say a swing app) doesn't have any openjpa.jar packaged > (becaue there is no JPA done on the client) > > > LieGrue, > strub > > > > > ----- Original Message ----- > > From: "Howard W. Smith, Jr." <[email protected]> > > To: [email protected] > > Cc: "[email protected]" <[email protected]> > > Sent: Wednesday, 29 May 2013, 22:14 > > Subject: Re: Remote exceptions logging > > > > see further clarification inline/below... > > > > On Wed, May 29, 2013 at 4:10 PM, Howard W. Smith, Jr. < > > [email protected]> wrote: > > > >> Where are your try/catch and logger lines of code? > >> > >> Per my experience, I see runtime exceptions in localhost.*, catalina, > and > >> tomcat7-stderr files in tomee/logs folder. > >> > > > > sometimes, I am able to 'catch' runtime exceptions in catalina and > > tomcat7-stderr files, but then they disappear if I refresh or reopen the > > log file. this is an example of the runtime exception being consumed and > > not stored permanently in the log file (as you 'assume' it should be > > stored > > 'permanently' in the log file). > > > > > >> > >> I am using SLF4J logger to 'reliably' out lines to log files, since > >> e.printStackTrace() is not reliable, and tomcat/tomee will consume > many of > >> those exceptions or stacktrace and not always include them in catalina > and > >> tomcat7-stderr files. > >> > > > > If you use some logger utility instead of System.out.println(...) or > > e.printStackTrace(), then the runtime exceptions will 'permanently' be > > stored/written in/to the log files. > > > > > >> > >> The type of runtime exceptions that are visible on user client PC, are > >> sometimes outputted to localhost.* files. > >> > >> Are you running TomEE as a service or via an IDE? what IDE are you > using? > >> you may need to share your server.xml, tomee.xml, and/or other > xml/config > >> files related to logging. honestly, I don't ever modify the logging > >> properties file, I use default settings. > >> > >> > >> > >> On Wed, May 29, 2013 at 4:33 AM, vhubuo <[email protected]> > > wrote: > >> > >>> In my application i want to see runtime errors in server log. > >>> For example when i'm missing a column in a table and database > > driver > >>> throws > >>> an sql exception. > >>> > >>> I think this is equivelent to this: > >>> > >>> Server - side: > >>> @Remote > >>> public interface NewClassRemote { > >>> public void test(); > >>> } > >>> > >>> @Stateless > >>> public class NewClass implements NewClassRemote { > >>> > >>> @Override > >>> public void test() { > >>> throw new UnsupportedOperationException("user defined > > exception"); > >>> } > >>> > >>> } > >>> > >>> Client - side: > >>> public class TestClient { > >>> > >>> static InitialContext ctx; > >>> > >>> public static void main(String[] agrs) throws > > MalformedURLException, > >>> NamingException { > >>> Properties p = new Properties(); > >>> p.put(Context.INITIAL_CONTEXT_FACTORY, > >>> org.apache.openejb.client.RemoteInitialContextFactory"); > >>> p.put("java.naming.provider.url", > >>> "http://127.0.0.1:8080/tomee/ejb"); > >>> ctx = new InitialContext(p); > >>> ((NewClassRemote) > > ctx.lookup("NewClassRemote")).test(); > >>> } > >>> } > >>> > >>> > >>> > >>> -- > >>> View this message in context: > >>> > > > http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663314.html > >>> Sent from the OpenEJB User mailing list archive at Nabble.com. > >>> > >> > >> > > >
