You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by vhubuo <dm...@balticom.eu> on 2013/05/28 17:17:40 UTC

Remote exceptions logging

Hello. 
I use standalone tomee plus 1.5.2 

I have a remote stateless bean witch throws an exception. 
The exception is visible on client side as an error but is not visible in
the server output. 

How to configure logging to achieve this behavior?



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
As far as I understand if error occurres in JSP the exception gets caught and
stack trace is printed to localhost.date log file.
But I do not call EJB through JSP and stack trace does not get printed not
to catalina.out not to localhost.date file.

Is the printStackTrace called on run-time exceptions from remote ejbs ?
How do I enable it ?



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663321.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
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 <st...@yahoo.de>

> 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." <sm...@gmail.com>
> > To: users@tomee.apache.org
> > Cc: "users@openejb.apache.org" <us...@openejb.apache.org>
> > 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. <
> > smithh032772@gmail.com> 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 <dm...@balticom.eu>
> > 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.
> >>>
> >>
> >>
> >
>

Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the app is
redeployed.

I build app WAR with netbeans ant. And copy WAR to webapps folder.
If I reboot the server the logs are shown correctly again.



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663338.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well, ATM the 1.6.0-SNAPSHOT is pretty stable excepted regarding openjpa
(we are waiting a commit from them to get back stable). So if you use
openjpa stay on 1.5.x otherwise you can take the today snapshot.

*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 vhubuo <dm...@balticom.eu>

> Yes. The RuntimeExceptions are wrapped into EJBException for the client.
> And
> I see the stack trace on client. But I don't see the stack trace in any of
> server log files.
>
> So my question is how does TomEE log unexpected exceptions in stateless
> beans exposed via remote annotation ? And is there any configuration
> available.
>
> I use a "clean" installation of 1.5.2 of the server without any
> configuration.
>
> >can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
>
> On 1.6.0-SNAPSHOT it works correctly.
>
> I get:
> май 30, 2013 9:14:57 AM
> org.apache.openejb.core.transaction.EjbTransactionUtil
> handleSystemException
> SEVERE: EjbTransactionUtil.handleSystemException: user defined exception
> java.lang.UnsupportedOperationException: user defined exception
>
> What are your recommendations on production usage?
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
> wonder if -Dopenejb.log.factory=slf4j could be a workaround for older 
> versions

Does not work for me.



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663452.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
wonder if -Dopenejb.log.factory=slf4j could be a workaround for older
versions

*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/6/3 vhubuo <dm...@balticom.eu>

> For the 1.6.0 builds everything work fine.
> For 1.5.2 and 1.5.3 ".useParentHandlers = true" workaround does not work.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663433.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
For the 1.6.0 builds everything work fine.
For 1.5.2 and 1.5.3 ".useParentHandlers = true" workaround does not work.



--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663433.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well i never use manager. i use tomee mvn plugin: mvn clean package
tomee:run [test phase] [quit, work, restart]
*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 Dmitrijs Litajevs <dm...@balticom.eu>

> Yes I mean recopy.
> But I get same behavior with netbeans deploy action.
> And undeploy and deploy from localhost:8080/manager/html/
>
> Why unexpected exceptions are cached differently after redeploy?
> Do you always shutdown the server process to distribute a new version of
> your program?
> For what is there an undeployment\deployment process ?
>
> I don't understand your development process then.
>
>
>
>
>
> On Thu, May 30, 2013 at 4:18 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > you mean you recopy the war without restarting? not sure it should work
> >
> > *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 Dmitrijs Litajevs <dm...@balticom.eu>
> >
> > > I start the server. Copy app.war to the webapps dir. It deploys
> > > Then call the @Remote bean form my se client. Error shows correctly in
> > > catalina.out
> > >
> > > Then i change something in the method that i called. For example error
> > > description.
> > > And copy app.war ti webapps dir again. It deploys.
> > > Then call the @Remote bean form my se client. Is does not show up in
> any
> > > log again.
> > >
> > >
> > >
> > > On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> > > <rm...@gmail.com>wrote:
> > >
> > > > i didn't get the issue...
> > > >
> > > >
> > > > *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 Dmitrijs Litajevs <dm...@balticom.eu>
> > > >
> > > > > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> > the
> > > > app
> > > > > is redeployed.
> > > > >
> > > > > > I build app WAR with netbeans ant. And copy WAR to webapps
> folder.
> > > > > > If I reboot the server the logs are shown correctly again.
> > > > >
> > > > > Any way to fix this?
> > > > >
> > > > >
> > > > >
> > > > > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > > > > <rm...@gmail.com>wrote:
> > > > >
> > > > > > because you neevr know if the ejb is local or remote so it was
> the
> > > > > provided
> > > > > > solution to keep the same code i think
> > > > > >
> > > > > > *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 Chris.Christo <ch...@mail.com>
> > > > > >
> > > > > > > sorry that meant to say 'custom runtime exception subclasses'.
> > > > > > >
> > > > > > > Chris Christo
> > > > > > >
> > > > > > > ---
> > > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > > GitHub: https://github.com/ChrisChristo
> > > > > > >
> > > > > > > On 30 May 2013, at 12:14, "Chris.Christo" <
> > chris.christo@mail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Just a question I have related to this;
> > > > > > > >
> > > > > > > > Why do your own customer runtime exception subclasses get
> > wrapped
> > > > in
> > > > > an
> > > > > > > EjbException when the ejb beans are local?
> > > > > > > > Surely the caller will have the exception class in its
> > classpath?
> > > > > > > >
> > > > > > > > Chris Christo
> > > > > > > >
> > > > > > > > ---
> > > > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > > > GitHub: https://github.com/ChrisChristo
> > > > > > > >
> > > > > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> > wrote:
> > > > > > > >
> > > > > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> > the
> > > > > > > client. And
> > > > > > > >> I see the stack trace on client. But I don't see the stack
> > trace
> > > > in
> > > > > > any
> > > > > > > of
> > > > > > > >> server log files.
> > > > > > > >>
> > > > > > > >> So my question is how does TomEE log unexpected exceptions
> in
> > > > > > stateless
> > > > > > > >> beans exposed via remote annotation ? And is there any
> > > > configuration
> > > > > > > >> available.
> > > > > > > >>
> > > > > > > >> I use a "clean" installation of 1.5.2 of the server without
> > any
> > > > > > > >> configuration.
> > > > > > > >>
> > > > > > > >>> can you check with the snapshot, i just tried with
> > > 1.6.0-SNAPSHOT
> > > > > > > >>
> > > > > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > > > > > >>
> > > > > > > >> I get:
> > > > > > > >> май 30, 2013 9:14:57 AM
> > > > > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > > > > > handleSystemException
> > > > > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user
> defined
> > > > > > exception
> > > > > > > >> java.lang.UnsupportedOperationException: user defined
> > exception
> > > > > > > >>
> > > > > > > >> What are your recommendations on production usage?
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> View this message in context:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > > > > > >> Sent from the OpenEJB User mailing list archive at
> Nabble.com.
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Remote exceptions logging

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
Yes I mean recopy.
But I get same behavior with netbeans deploy action.
And undeploy and deploy from localhost:8080/manager/html/

Why unexpected exceptions are cached differently after redeploy?
Do you always shutdown the server process to distribute a new version of
your program?
For what is there an undeployment\deployment process ?

I don't understand your development process then.





On Thu, May 30, 2013 at 4:18 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> you mean you recopy the war without restarting? not sure it should work
>
> *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 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > I start the server. Copy app.war to the webapps dir. It deploys
> > Then call the @Remote bean form my se client. Error shows correctly in
> > catalina.out
> >
> > Then i change something in the method that i called. For example error
> > description.
> > And copy app.war ti webapps dir again. It deploys.
> > Then call the @Remote bean form my se client. Is does not show up in any
> > log again.
> >
> >
> >
> > On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > i didn't get the issue...
> > >
> > >
> > > *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 Dmitrijs Litajevs <dm...@balticom.eu>
> > >
> > > > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> the
> > > app
> > > > is redeployed.
> > > >
> > > > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > > > > If I reboot the server the logs are shown correctly again.
> > > >
> > > > Any way to fix this?
> > > >
> > > >
> > > >
> > > > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > > > <rm...@gmail.com>wrote:
> > > >
> > > > > because you neevr know if the ejb is local or remote so it was the
> > > > provided
> > > > > solution to keep the same code i think
> > > > >
> > > > > *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 Chris.Christo <ch...@mail.com>
> > > > >
> > > > > > sorry that meant to say 'custom runtime exception subclasses'.
> > > > > >
> > > > > > Chris Christo
> > > > > >
> > > > > > ---
> > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > GitHub: https://github.com/ChrisChristo
> > > > > >
> > > > > > On 30 May 2013, at 12:14, "Chris.Christo" <
> chris.christo@mail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Just a question I have related to this;
> > > > > > >
> > > > > > > Why do your own customer runtime exception subclasses get
> wrapped
> > > in
> > > > an
> > > > > > EjbException when the ejb beans are local?
> > > > > > > Surely the caller will have the exception class in its
> classpath?
> > > > > > >
> > > > > > > Chris Christo
> > > > > > >
> > > > > > > ---
> > > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > > GitHub: https://github.com/ChrisChristo
> > > > > > >
> > > > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> wrote:
> > > > > > >
> > > > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> the
> > > > > > client. And
> > > > > > >> I see the stack trace on client. But I don't see the stack
> trace
> > > in
> > > > > any
> > > > > > of
> > > > > > >> server log files.
> > > > > > >>
> > > > > > >> So my question is how does TomEE log unexpected exceptions in
> > > > > stateless
> > > > > > >> beans exposed via remote annotation ? And is there any
> > > configuration
> > > > > > >> available.
> > > > > > >>
> > > > > > >> I use a "clean" installation of 1.5.2 of the server without
> any
> > > > > > >> configuration.
> > > > > > >>
> > > > > > >>> can you check with the snapshot, i just tried with
> > 1.6.0-SNAPSHOT
> > > > > > >>
> > > > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > > > > >>
> > > > > > >> I get:
> > > > > > >> май 30, 2013 9:14:57 AM
> > > > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > > > > handleSystemException
> > > > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> > > > > exception
> > > > > > >> java.lang.UnsupportedOperationException: user defined
> exception
> > > > > > >>
> > > > > > >> What are your recommendations on production usage?
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> --
> > > > > > >> View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Remote exceptions logging

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
I would never assume such steps should make an app work. It seems as though
the assumption or requirement is that app has been running and need to
redeploy new change in app, and expect it to work after redeploy.

Per my experience, I always shutdown, drop war, delete unpacked war folder,
and 'start' tomee.

When I do redeploy without shutdown and start tomee, my database connection
doesn't work, because I think it is still locked by tomee that was not
shutdown.

Why is there assumption that stuff should work without shutdown first?
 On May 30, 2013 9:18 AM, "Romain Manni-Bucau" <rm...@gmail.com>
wrote:

> you mean you recopy the war without restarting? not sure it should work
>
> *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 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > I start the server. Copy app.war to the webapps dir. It deploys
> > Then call the @Remote bean form my se client. Error shows correctly in
> > catalina.out
> >
> > Then i change something in the method that i called. For example error
> > description.
> > And copy app.war ti webapps dir again. It deploys.
> > Then call the @Remote bean form my se client. Is does not show up in any
> > log again.
> >
> >
> >
> > On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > i didn't get the issue...
> > >
> > >
> > > *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 Dmitrijs Litajevs <dm...@balticom.eu>
> > >
> > > > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> the
> > > app
> > > > is redeployed.
> > > >
> > > > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > > > > If I reboot the server the logs are shown correctly again.
> > > >
> > > > Any way to fix this?
> > > >
> > > >
> > > >
> > > > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > > > <rm...@gmail.com>wrote:
> > > >
> > > > > because you neevr know if the ejb is local or remote so it was the
> > > > provided
> > > > > solution to keep the same code i think
> > > > >
> > > > > *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 Chris.Christo <ch...@mail.com>
> > > > >
> > > > > > sorry that meant to say 'custom runtime exception subclasses'.
> > > > > >
> > > > > > Chris Christo
> > > > > >
> > > > > > ---
> > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > GitHub: https://github.com/ChrisChristo
> > > > > >
> > > > > > On 30 May 2013, at 12:14, "Chris.Christo" <
> chris.christo@mail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Just a question I have related to this;
> > > > > > >
> > > > > > > Why do your own customer runtime exception subclasses get
> wrapped
> > > in
> > > > an
> > > > > > EjbException when the ejb beans are local?
> > > > > > > Surely the caller will have the exception class in its
> classpath?
> > > > > > >
> > > > > > > Chris Christo
> > > > > > >
> > > > > > > ---
> > > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > > GitHub: https://github.com/ChrisChristo
> > > > > > >
> > > > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> wrote:
> > > > > > >
> > > > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> the
> > > > > > client. And
> > > > > > >> I see the stack trace on client. But I don't see the stack
> trace
> > > in
> > > > > any
> > > > > > of
> > > > > > >> server log files.
> > > > > > >>
> > > > > > >> So my question is how does TomEE log unexpected exceptions in
> > > > > stateless
> > > > > > >> beans exposed via remote annotation ? And is there any
> > > configuration
> > > > > > >> available.
> > > > > > >>
> > > > > > >> I use a "clean" installation of 1.5.2 of the server without
> any
> > > > > > >> configuration.
> > > > > > >>
> > > > > > >>> can you check with the snapshot, i just tried with
> > 1.6.0-SNAPSHOT
> > > > > > >>
> > > > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > > > > >>
> > > > > > >> I get:
> > > > > > >> май 30, 2013 9:14:57 AM
> > > > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > > > > handleSystemException
> > > > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> > > > > exception
> > > > > > >> java.lang.UnsupportedOperationException: user defined
> exception
> > > > > > >>
> > > > > > >> What are your recommendations on production usage?
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> --
> > > > > > >> View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you mean you recopy the war without restarting? not sure it should work

*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 Dmitrijs Litajevs <dm...@balticom.eu>

> I start the server. Copy app.war to the webapps dir. It deploys
> Then call the @Remote bean form my se client. Error shows correctly in
> catalina.out
>
> Then i change something in the method that i called. For example error
> description.
> And copy app.war ti webapps dir again. It deploys.
> Then call the @Remote bean form my se client. Is does not show up in any
> log again.
>
>
>
> On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > i didn't get the issue...
> >
> >
> > *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 Dmitrijs Litajevs <dm...@balticom.eu>
> >
> > > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the
> > app
> > > is redeployed.
> > >
> > > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > > > If I reboot the server the logs are shown correctly again.
> > >
> > > Any way to fix this?
> > >
> > >
> > >
> > > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > > <rm...@gmail.com>wrote:
> > >
> > > > because you neevr know if the ejb is local or remote so it was the
> > > provided
> > > > solution to keep the same code i think
> > > >
> > > > *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 Chris.Christo <ch...@mail.com>
> > > >
> > > > > sorry that meant to say 'custom runtime exception subclasses'.
> > > > >
> > > > > Chris Christo
> > > > >
> > > > > ---
> > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > GitHub: https://github.com/ChrisChristo
> > > > >
> > > > > On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com>
> > > > wrote:
> > > > >
> > > > > > Just a question I have related to this;
> > > > > >
> > > > > > Why do your own customer runtime exception subclasses get wrapped
> > in
> > > an
> > > > > EjbException when the ejb beans are local?
> > > > > > Surely the caller will have the exception class in its classpath?
> > > > > >
> > > > > > Chris Christo
> > > > > >
> > > > > > ---
> > > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > > GitHub: https://github.com/ChrisChristo
> > > > > >
> > > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> > > > > >
> > > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for the
> > > > > client. And
> > > > > >> I see the stack trace on client. But I don't see the stack trace
> > in
> > > > any
> > > > > of
> > > > > >> server log files.
> > > > > >>
> > > > > >> So my question is how does TomEE log unexpected exceptions in
> > > > stateless
> > > > > >> beans exposed via remote annotation ? And is there any
> > configuration
> > > > > >> available.
> > > > > >>
> > > > > >> I use a "clean" installation of 1.5.2 of the server without any
> > > > > >> configuration.
> > > > > >>
> > > > > >>> can you check with the snapshot, i just tried with
> 1.6.0-SNAPSHOT
> > > > > >>
> > > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > > > >>
> > > > > >> I get:
> > > > > >> май 30, 2013 9:14:57 AM
> > > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > > > handleSystemException
> > > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> > > > exception
> > > > > >> java.lang.UnsupportedOperationException: user defined exception
> > > > > >>
> > > > > >> What are your recommendations on production usage?
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> --
> > > > > >> View this message in context:
> > > > >
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Remote exceptions logging

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
> well i never use manager. i use tomee mvn plugin: mvn clean package
> tomee:run [test phase] [quit, work, restart]

I don't use maven jet. But as I see it also uses server undeploy deploy
actions. As my ant project does. Or drop in war does. Or manager.
>From documentation:
reloadOnUpdate means to reload the context (webapp). It means
undeploying/redeploying it.

> This imo indicates some nasty ClassLoader or scanning issue
Maybe. It could be a bug in openejb threadpool unexpected exception
handler. If it is redefined.

> Afaik it's not defined whether you should get this log on the server at
all. Most servers I know don't log it. You might work around it by writing
a CDI Extension which adds an @LogExceptions kind of Interceptor to those
beans. Or just add the interceptor to to those EJBs yourself manually.

Before I used Glassfish and it loged all unexpected exceptions.
The odd thing is that unexpected exceptions are loged to localhost.date
file for JSP pages even when the app gets redeployed.
I will try to do an CDI Extension. Thanks for advice.






On Fri, May 31, 2013 at 9:15 AM, Mark Struberg <st...@yahoo.de> wrote:

>
>
> There are imo two different things in the game here:
>
> 1.) This imo indicates some nasty ClassLoader or scanning issue
>
> 2.) Afaik it's not defined whether you should get this log on the server
> at all. Most servers I know don't log it. You might work around it by
> writing a CDI Extension which adds an @LogExceptions kind of Interceptor to
> those beans. Or just add the interceptor to to those EJBs yourself manually.
>
>
> LieGrue,
> strub
>
> >________________________________
> > From: Dmitrijs Litajevs <dm...@balticom.eu>
> >To: users@tomee.apache.org
> >Sent: Thursday, 30 May 2013, 15:08
> >Subject: Re: Remote exceptions logging
> >
> >
> >I start the server. Copy app.war to the webapps dir. It deploys
> >Then call the @Remote bean form my se client. Error shows correctly in
> >catalina.out
> >
> >Then i change something in the method that i called. For example error
> >description.
> >And copy app.war ti webapps dir again. It deploys.
> >Then call the @Remote bean form my se client. Is does not show up in any
> >log again.
> >
> >
> >
> >On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> ><rm...@gmail.com>wrote:
> >
> >> i didn't get the issue...
> >>
> >>
> >> *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 Dmitrijs Litajevs <dm...@balticom.eu>
> >>
> >> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> the
> >> app
> >> > is redeployed.
> >> >
> >> > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> >> > > If I reboot the server the logs are shown correctly again.
> >> >
> >> > Any way to fix this?
> >> >
> >> >
> >> >
> >> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> >> > <rm...@gmail.com>wrote:
> >> >
> >> > > because you neevr know if the ejb is local or remote so it was the
> >> > provided
> >> > > solution to keep the same code i think
> >> > >
> >> > > *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 Chris.Christo <ch...@mail.com>
> >> > >
> >> > > > sorry that meant to say 'custom runtime exception subclasses'.
> >> > > >
> >> > > > Chris Christo
> >> > > >
> >> > > > ---
> >> > > > Twitter: https://twitter.com/ChrisChristo7
> >> > > > Tumblr: http://chrischristo7.tumblr.com
> >> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> >> > > > GitHub: https://github.com/ChrisChristo
> >> > > >
> >> > > > On 30 May 2013, at 12:14, "Chris.Christo" <chris.christo@mail.com
> >
> >> > > wrote:
> >> > > >
> >> > > > > Just a question I have related to this;
> >> > > > >
> >> > > > > Why do your own customer runtime exception subclasses get
> wrapped
> >> in
> >> > an
> >> > > > EjbException when the ejb beans are local?
> >> > > > > Surely the caller will have the exception class in its
> classpath?
> >> > > > >
> >> > > > > Chris Christo
> >> > > > >
> >> > > > > ---
> >> > > > > Twitter: https://twitter.com/ChrisChristo7
> >> > > > > Tumblr: http://chrischristo7.tumblr.com
> >> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> >> > > > > GitHub: https://github.com/ChrisChristo
> >> > > > >
> >> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> wrote:
> >> > > > >
> >> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> the
> >> > > > client. And
> >> > > > >> I see the stack trace on client. But I don't see the stack
> trace
> >> in
> >> > > any
> >> > > > of
> >> > > > >> server log files.
> >> > > > >>
> >> > > > >> So my question is how does TomEE log unexpected exceptions in
> >> > > stateless
> >> > > > >> beans exposed via remote annotation ? And is there any
> >> configuration
> >> > > > >> available.
> >> > > > >>
> >> > > > >> I use a "clean" installation of 1.5.2 of the server without any
> >> > > > >> configuration.
> >> > > > >>
> >> > > > >>> can you check with the snapshot, i just tried with
> 1.6.0-SNAPSHOT
> >> > > > >>
> >> > > > >> On 1.6.0-SNAPSHOT it works correctly.
> >> > > > >>
> >> > > > >> I get:
> >> > > > >> май 30, 2013 9:14:57 AM
> >> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> >> > > > handleSystemException
> >> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> >> > > exception
> >> > > > >> java.lang.UnsupportedOperationException: user defined exception
> >> > > > >>
> >> > > > >> What are your recommendations on production usage?
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> --
> >> > > > >> View this message in context:
> >> > > >
> >> > >
> >> >
> >>
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> >> > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >> > > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

did some tests with manager app, the error is logged (each time) on server
side but the logger doesn't have handlers anymore sometimes.

A workaround is to add in conf/logging.properties:
.useParentHandlers = true

FYI:
https://issues.apache.org/jira/browse/TOMEE-954

*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/31 Romain Manni-Bucau <rm...@gmail.com>

> mvn doesn't use deploy/undeploy, that's distinct things
>
> *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/31 Jean-Louis MONTEIRO <je...@gmail.com>
>
>> Hi,
>>
>> AFAIR, it is required as per the spec to log any system exception.
>>
>> JLouis
>>
>>
>> 2013/5/31 Mark Struberg <st...@yahoo.de>
>>
>> >
>> >
>> > There are imo two different things in the game here:
>> >
>> > 1.) This imo indicates some nasty ClassLoader or scanning issue
>> >
>> > 2.) Afaik it's not defined whether you should get this log on the server
>> > at all. Most servers I know don't log it. You might work around it by
>> > writing a CDI Extension which adds an @LogExceptions kind of
>> Interceptor to
>> > those beans. Or just add the interceptor to to those EJBs yourself
>> manually.
>> >
>> >
>> > LieGrue,
>> > strub
>> >
>> > >________________________________
>> > > From: Dmitrijs Litajevs <dm...@balticom.eu>
>> > >To: users@tomee.apache.org
>> > >Sent: Thursday, 30 May 2013, 15:08
>> > >Subject: Re: Remote exceptions logging
>> > >
>> > >
>> > >I start the server. Copy app.war to the webapps dir. It deploys
>> > >Then call the @Remote bean form my se client. Error shows correctly in
>> > >catalina.out
>> > >
>> > >Then i change something in the method that i called. For example error
>> > >description.
>> > >And copy app.war ti webapps dir again. It deploys.
>> > >Then call the @Remote bean form my se client. Is does not show up in
>> any
>> > >log again.
>> > >
>> > >
>> > >
>> > >On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
>> > ><rm...@gmail.com>wrote:
>> > >
>> > >> i didn't get the issue...
>> > >>
>> > >>
>> > >> *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 Dmitrijs Litajevs <dm...@balticom.eu>
>> > >>
>> > >> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
>> > the
>> > >> app
>> > >> > is redeployed.
>> > >> >
>> > >> > > I build app WAR with netbeans ant. And copy WAR to webapps
>> folder.
>> > >> > > If I reboot the server the logs are shown correctly again.
>> > >> >
>> > >> > Any way to fix this?
>> > >> >
>> > >> >
>> > >> >
>> > >> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
>> > >> > <rm...@gmail.com>wrote:
>> > >> >
>> > >> > > because you neevr know if the ejb is local or remote so it was
>> the
>> > >> > provided
>> > >> > > solution to keep the same code i think
>> > >> > >
>> > >> > > *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 Chris.Christo <ch...@mail.com>
>> > >> > >
>> > >> > > > sorry that meant to say 'custom runtime exception subclasses'.
>> > >> > > >
>> > >> > > > Chris Christo
>> > >> > > >
>> > >> > > > ---
>> > >> > > > Twitter: https://twitter.com/ChrisChristo7
>> > >> > > > Tumblr: http://chrischristo7.tumblr.com
>> > >> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
>> > >> > > > GitHub: https://github.com/ChrisChristo
>> > >> > > >
>> > >> > > > On 30 May 2013, at 12:14, "Chris.Christo" <
>> chris.christo@mail.com
>> > >
>> > >> > > wrote:
>> > >> > > >
>> > >> > > > > Just a question I have related to this;
>> > >> > > > >
>> > >> > > > > Why do your own customer runtime exception subclasses get
>> > wrapped
>> > >> in
>> > >> > an
>> > >> > > > EjbException when the ejb beans are local?
>> > >> > > > > Surely the caller will have the exception class in its
>> > classpath?
>> > >> > > > >
>> > >> > > > > Chris Christo
>> > >> > > > >
>> > >> > > > > ---
>> > >> > > > > Twitter: https://twitter.com/ChrisChristo7
>> > >> > > > > Tumblr: http://chrischristo7.tumblr.com
>> > >> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
>> > >> > > > > GitHub: https://github.com/ChrisChristo
>> > >> > > > >
>> > >> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
>> > wrote:
>> > >> > > > >
>> > >> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
>> > the
>> > >> > > > client. And
>> > >> > > > >> I see the stack trace on client. But I don't see the stack
>> > trace
>> > >> in
>> > >> > > any
>> > >> > > > of
>> > >> > > > >> server log files.
>> > >> > > > >>
>> > >> > > > >> So my question is how does TomEE log unexpected exceptions
>> in
>> > >> > > stateless
>> > >> > > > >> beans exposed via remote annotation ? And is there any
>> > >> configuration
>> > >> > > > >> available.
>> > >> > > > >>
>> > >> > > > >> I use a "clean" installation of 1.5.2 of the server without
>> any
>> > >> > > > >> configuration.
>> > >> > > > >>
>> > >> > > > >>> can you check with the snapshot, i just tried with
>> > 1.6.0-SNAPSHOT
>> > >> > > > >>
>> > >> > > > >> On 1.6.0-SNAPSHOT it works correctly.
>> > >> > > > >>
>> > >> > > > >> I get:
>> > >> > > > >> май 30, 2013 9:14:57 AM
>> > >> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
>> > >> > > > handleSystemException
>> > >> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user
>> defined
>> > >> > > exception
>> > >> > > > >> java.lang.UnsupportedOperationException: user defined
>> exception
>> > >> > > > >>
>> > >> > > > >> What are your recommendations on production usage?
>> > >> > > > >>
>> > >> > > > >>
>> > >> > > > >>
>> > >> > > > >>
>> > >> > > > >>
>> > >> > > > >> --
>> > >> > > > >> View this message in context:
>> > >> > > >
>> > >> > >
>> > >> >
>> > >>
>> >
>> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
>> > >> > > > >> Sent from the OpenEJB User mailing list archive at
>> Nabble.com.
>> > >> > > > >
>> > >> > > >
>> > >> > > >
>> > >> > >
>> > >> >
>> > >>
>> > >
>> > >
>> >
>>
>>
>>
>> --
>> Jean-Louis
>>
>
>

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
mvn doesn't use deploy/undeploy, that's distinct things

*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/31 Jean-Louis MONTEIRO <je...@gmail.com>

> Hi,
>
> AFAIR, it is required as per the spec to log any system exception.
>
> JLouis
>
>
> 2013/5/31 Mark Struberg <st...@yahoo.de>
>
> >
> >
> > There are imo two different things in the game here:
> >
> > 1.) This imo indicates some nasty ClassLoader or scanning issue
> >
> > 2.) Afaik it's not defined whether you should get this log on the server
> > at all. Most servers I know don't log it. You might work around it by
> > writing a CDI Extension which adds an @LogExceptions kind of Interceptor
> to
> > those beans. Or just add the interceptor to to those EJBs yourself
> manually.
> >
> >
> > LieGrue,
> > strub
> >
> > >________________________________
> > > From: Dmitrijs Litajevs <dm...@balticom.eu>
> > >To: users@tomee.apache.org
> > >Sent: Thursday, 30 May 2013, 15:08
> > >Subject: Re: Remote exceptions logging
> > >
> > >
> > >I start the server. Copy app.war to the webapps dir. It deploys
> > >Then call the @Remote bean form my se client. Error shows correctly in
> > >catalina.out
> > >
> > >Then i change something in the method that i called. For example error
> > >description.
> > >And copy app.war ti webapps dir again. It deploys.
> > >Then call the @Remote bean form my se client. Is does not show up in any
> > >log again.
> > >
> > >
> > >
> > >On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> > ><rm...@gmail.com>wrote:
> > >
> > >> i didn't get the issue...
> > >>
> > >>
> > >> *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 Dmitrijs Litajevs <dm...@balticom.eu>
> > >>
> > >> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> > the
> > >> app
> > >> > is redeployed.
> > >> >
> > >> > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > >> > > If I reboot the server the logs are shown correctly again.
> > >> >
> > >> > Any way to fix this?
> > >> >
> > >> >
> > >> >
> > >> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > >> > <rm...@gmail.com>wrote:
> > >> >
> > >> > > because you neevr know if the ejb is local or remote so it was the
> > >> > provided
> > >> > > solution to keep the same code i think
> > >> > >
> > >> > > *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 Chris.Christo <ch...@mail.com>
> > >> > >
> > >> > > > sorry that meant to say 'custom runtime exception subclasses'.
> > >> > > >
> > >> > > > Chris Christo
> > >> > > >
> > >> > > > ---
> > >> > > > Twitter: https://twitter.com/ChrisChristo7
> > >> > > > Tumblr: http://chrischristo7.tumblr.com
> > >> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > >> > > > GitHub: https://github.com/ChrisChristo
> > >> > > >
> > >> > > > On 30 May 2013, at 12:14, "Chris.Christo" <
> chris.christo@mail.com
> > >
> > >> > > wrote:
> > >> > > >
> > >> > > > > Just a question I have related to this;
> > >> > > > >
> > >> > > > > Why do your own customer runtime exception subclasses get
> > wrapped
> > >> in
> > >> > an
> > >> > > > EjbException when the ejb beans are local?
> > >> > > > > Surely the caller will have the exception class in its
> > classpath?
> > >> > > > >
> > >> > > > > Chris Christo
> > >> > > > >
> > >> > > > > ---
> > >> > > > > Twitter: https://twitter.com/ChrisChristo7
> > >> > > > > Tumblr: http://chrischristo7.tumblr.com
> > >> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > >> > > > > GitHub: https://github.com/ChrisChristo
> > >> > > > >
> > >> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> > wrote:
> > >> > > > >
> > >> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> > the
> > >> > > > client. And
> > >> > > > >> I see the stack trace on client. But I don't see the stack
> > trace
> > >> in
> > >> > > any
> > >> > > > of
> > >> > > > >> server log files.
> > >> > > > >>
> > >> > > > >> So my question is how does TomEE log unexpected exceptions in
> > >> > > stateless
> > >> > > > >> beans exposed via remote annotation ? And is there any
> > >> configuration
> > >> > > > >> available.
> > >> > > > >>
> > >> > > > >> I use a "clean" installation of 1.5.2 of the server without
> any
> > >> > > > >> configuration.
> > >> > > > >>
> > >> > > > >>> can you check with the snapshot, i just tried with
> > 1.6.0-SNAPSHOT
> > >> > > > >>
> > >> > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > >> > > > >>
> > >> > > > >> I get:
> > >> > > > >> май 30, 2013 9:14:57 AM
> > >> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > >> > > > handleSystemException
> > >> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user
> defined
> > >> > > exception
> > >> > > > >> java.lang.UnsupportedOperationException: user defined
> exception
> > >> > > > >>
> > >> > > > >> What are your recommendations on production usage?
> > >> > > > >>
> > >> > > > >>
> > >> > > > >>
> > >> > > > >>
> > >> > > > >>
> > >> > > > >> --
> > >> > > > >> View this message in context:
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > >> > > > >> Sent from the OpenEJB User mailing list archive at
> Nabble.com.
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>
>
>
> --
> Jean-Louis
>

Re: Remote exceptions logging

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi,

AFAIR, it is required as per the spec to log any system exception.

JLouis


2013/5/31 Mark Struberg <st...@yahoo.de>

>
>
> There are imo two different things in the game here:
>
> 1.) This imo indicates some nasty ClassLoader or scanning issue
>
> 2.) Afaik it's not defined whether you should get this log on the server
> at all. Most servers I know don't log it. You might work around it by
> writing a CDI Extension which adds an @LogExceptions kind of Interceptor to
> those beans. Or just add the interceptor to to those EJBs yourself manually.
>
>
> LieGrue,
> strub
>
> >________________________________
> > From: Dmitrijs Litajevs <dm...@balticom.eu>
> >To: users@tomee.apache.org
> >Sent: Thursday, 30 May 2013, 15:08
> >Subject: Re: Remote exceptions logging
> >
> >
> >I start the server. Copy app.war to the webapps dir. It deploys
> >Then call the @Remote bean form my se client. Error shows correctly in
> >catalina.out
> >
> >Then i change something in the method that i called. For example error
> >description.
> >And copy app.war ti webapps dir again. It deploys.
> >Then call the @Remote bean form my se client. Is does not show up in any
> >log again.
> >
> >
> >
> >On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
> ><rm...@gmail.com>wrote:
> >
> >> i didn't get the issue...
> >>
> >>
> >> *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 Dmitrijs Litajevs <dm...@balticom.eu>
> >>
> >> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when
> the
> >> app
> >> > is redeployed.
> >> >
> >> > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> >> > > If I reboot the server the logs are shown correctly again.
> >> >
> >> > Any way to fix this?
> >> >
> >> >
> >> >
> >> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> >> > <rm...@gmail.com>wrote:
> >> >
> >> > > because you neevr know if the ejb is local or remote so it was the
> >> > provided
> >> > > solution to keep the same code i think
> >> > >
> >> > > *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 Chris.Christo <ch...@mail.com>
> >> > >
> >> > > > sorry that meant to say 'custom runtime exception subclasses'.
> >> > > >
> >> > > > Chris Christo
> >> > > >
> >> > > > ---
> >> > > > Twitter: https://twitter.com/ChrisChristo7
> >> > > > Tumblr: http://chrischristo7.tumblr.com
> >> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> >> > > > GitHub: https://github.com/ChrisChristo
> >> > > >
> >> > > > On 30 May 2013, at 12:14, "Chris.Christo" <chris.christo@mail.com
> >
> >> > > wrote:
> >> > > >
> >> > > > > Just a question I have related to this;
> >> > > > >
> >> > > > > Why do your own customer runtime exception subclasses get
> wrapped
> >> in
> >> > an
> >> > > > EjbException when the ejb beans are local?
> >> > > > > Surely the caller will have the exception class in its
> classpath?
> >> > > > >
> >> > > > > Chris Christo
> >> > > > >
> >> > > > > ---
> >> > > > > Twitter: https://twitter.com/ChrisChristo7
> >> > > > > Tumblr: http://chrischristo7.tumblr.com
> >> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> >> > > > > GitHub: https://github.com/ChrisChristo
> >> > > > >
> >> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu>
> wrote:
> >> > > > >
> >> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for
> the
> >> > > > client. And
> >> > > > >> I see the stack trace on client. But I don't see the stack
> trace
> >> in
> >> > > any
> >> > > > of
> >> > > > >> server log files.
> >> > > > >>
> >> > > > >> So my question is how does TomEE log unexpected exceptions in
> >> > > stateless
> >> > > > >> beans exposed via remote annotation ? And is there any
> >> configuration
> >> > > > >> available.
> >> > > > >>
> >> > > > >> I use a "clean" installation of 1.5.2 of the server without any
> >> > > > >> configuration.
> >> > > > >>
> >> > > > >>> can you check with the snapshot, i just tried with
> 1.6.0-SNAPSHOT
> >> > > > >>
> >> > > > >> On 1.6.0-SNAPSHOT it works correctly.
> >> > > > >>
> >> > > > >> I get:
> >> > > > >> май 30, 2013 9:14:57 AM
> >> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> >> > > > handleSystemException
> >> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> >> > > exception
> >> > > > >> java.lang.UnsupportedOperationException: user defined exception
> >> > > > >>
> >> > > > >> What are your recommendations on production usage?
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> --
> >> > > > >> View this message in context:
> >> > > >
> >> > >
> >> >
> >>
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> >> > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >> > > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>



-- 
Jean-Louis

Re: Remote exceptions logging

Posted by Mark Struberg <st...@yahoo.de>.

There are imo two different things in the game here:

1.) This imo indicates some nasty ClassLoader or scanning issue

2.) Afaik it's not defined whether you should get this log on the server at all. Most servers I know don't log it. You might work around it by writing a CDI Extension which adds an @LogExceptions kind of Interceptor to those beans. Or just add the interceptor to to those EJBs yourself manually.


LieGrue,
strub

>________________________________
> From: Dmitrijs Litajevs <dm...@balticom.eu>
>To: users@tomee.apache.org 
>Sent: Thursday, 30 May 2013, 15:08
>Subject: Re: Remote exceptions logging
> 
>
>I start the server. Copy app.war to the webapps dir. It deploys
>Then call the @Remote bean form my se client. Error shows correctly in
>catalina.out
>
>Then i change something in the method that i called. For example error
>description.
>And copy app.war ti webapps dir again. It deploys.
>Then call the @Remote bean form my se client. Is does not show up in any
>log again.
>
>
>
>On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
><rm...@gmail.com>wrote:
>
>> i didn't get the issue...
>>
>>
>> *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 Dmitrijs Litajevs <dm...@balticom.eu>
>>
>> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the
>> app
>> > is redeployed.
>> >
>> > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
>> > > If I reboot the server the logs are shown correctly again.
>> >
>> > Any way to fix this?
>> >
>> >
>> >
>> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
>> > <rm...@gmail.com>wrote:
>> >
>> > > because you neevr know if the ejb is local or remote so it was the
>> > provided
>> > > solution to keep the same code i think
>> > >
>> > > *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 Chris.Christo <ch...@mail.com>
>> > >
>> > > > sorry that meant to say 'custom runtime exception subclasses'.
>> > > >
>> > > > Chris Christo
>> > > >
>> > > > ---
>> > > > Twitter: https://twitter.com/ChrisChristo7
>> > > > Tumblr: http://chrischristo7.tumblr.com
>> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
>> > > > GitHub: https://github.com/ChrisChristo
>> > > >
>> > > > On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com>
>> > > wrote:
>> > > >
>> > > > > Just a question I have related to this;
>> > > > >
>> > > > > Why do your own customer runtime exception subclasses get wrapped
>> in
>> > an
>> > > > EjbException when the ejb beans are local?
>> > > > > Surely the caller will have the exception class in its classpath?
>> > > > >
>> > > > > Chris Christo
>> > > > >
>> > > > > ---
>> > > > > Twitter: https://twitter.com/ChrisChristo7
>> > > > > Tumblr: http://chrischristo7.tumblr.com
>> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
>> > > > > GitHub: https://github.com/ChrisChristo
>> > > > >
>> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
>> > > > >
>> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for the
>> > > > client. And
>> > > > >> I see the stack trace on client. But I don't see the stack trace
>> in
>> > > any
>> > > > of
>> > > > >> server log files.
>> > > > >>
>> > > > >> So my question is how does TomEE log unexpected exceptions in
>> > > stateless
>> > > > >> beans exposed via remote annotation ? And is there any
>> configuration
>> > > > >> available.
>> > > > >>
>> > > > >> I use a "clean" installation of 1.5.2 of the server without any
>> > > > >> configuration.
>> > > > >>
>> > > > >>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
>> > > > >>
>> > > > >> On 1.6.0-SNAPSHOT it works correctly.
>> > > > >>
>> > > > >> I get:
>> > > > >> май 30, 2013 9:14:57 AM
>> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
>> > > > handleSystemException
>> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
>> > > exception
>> > > > >> java.lang.UnsupportedOperationException: user defined exception
>> > > > >>
>> > > > >> What are your recommendations on production usage?
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> View this message in context:
>> > > >
>> > >
>> >
>> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
>> > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
>> > > > >
>> > > >
>> > > >
>> > >
>> >
>>
>
>

Re: Remote exceptions logging

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
I start the server. Copy app.war to the webapps dir. It deploys
Then call the @Remote bean form my se client. Error shows correctly in
catalina.out

Then i change something in the method that i called. For example error
description.
And copy app.war ti webapps dir again. It deploys.
Then call the @Remote bean form my se client. Is does not show up in any
log again.



On Thu, May 30, 2013 at 4:03 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> i didn't get the issue...
>
>
> *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 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the
> app
> > is redeployed.
> >
> > > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > > If I reboot the server the logs are shown correctly again.
> >
> > Any way to fix this?
> >
> >
> >
> > On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > because you neevr know if the ejb is local or remote so it was the
> > provided
> > > solution to keep the same code i think
> > >
> > > *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 Chris.Christo <ch...@mail.com>
> > >
> > > > sorry that meant to say 'custom runtime exception subclasses'.
> > > >
> > > > Chris Christo
> > > >
> > > > ---
> > > > Twitter: https://twitter.com/ChrisChristo7
> > > > Tumblr: http://chrischristo7.tumblr.com
> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > GitHub: https://github.com/ChrisChristo
> > > >
> > > > On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com>
> > > wrote:
> > > >
> > > > > Just a question I have related to this;
> > > > >
> > > > > Why do your own customer runtime exception subclasses get wrapped
> in
> > an
> > > > EjbException when the ejb beans are local?
> > > > > Surely the caller will have the exception class in its classpath?
> > > > >
> > > > > Chris Christo
> > > > >
> > > > > ---
> > > > > Twitter: https://twitter.com/ChrisChristo7
> > > > > Tumblr: http://chrischristo7.tumblr.com
> > > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > > GitHub: https://github.com/ChrisChristo
> > > > >
> > > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> > > > >
> > > > >> Yes. The RuntimeExceptions are wrapped into EJBException for the
> > > > client. And
> > > > >> I see the stack trace on client. But I don't see the stack trace
> in
> > > any
> > > > of
> > > > >> server log files.
> > > > >>
> > > > >> So my question is how does TomEE log unexpected exceptions in
> > > stateless
> > > > >> beans exposed via remote annotation ? And is there any
> configuration
> > > > >> available.
> > > > >>
> > > > >> I use a "clean" installation of 1.5.2 of the server without any
> > > > >> configuration.
> > > > >>
> > > > >>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
> > > > >>
> > > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > > >>
> > > > >> I get:
> > > > >> май 30, 2013 9:14:57 AM
> > > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > > handleSystemException
> > > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> > > exception
> > > > >> java.lang.UnsupportedOperationException: user defined exception
> > > > >>
> > > > >> What are your recommendations on production usage?
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > > >
> > > >
> > > >
> > >
> >
>

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i didn't get the issue...


*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 Dmitrijs Litajevs <dm...@balticom.eu>

> > On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the app
> is redeployed.
>
> > I build app WAR with netbeans ant. And copy WAR to webapps folder.
> > If I reboot the server the logs are shown correctly again.
>
> Any way to fix this?
>
>
>
> On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > because you neevr know if the ejb is local or remote so it was the
> provided
> > solution to keep the same code i think
> >
> > *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 Chris.Christo <ch...@mail.com>
> >
> > > sorry that meant to say 'custom runtime exception subclasses'.
> > >
> > > Chris Christo
> > >
> > > ---
> > > Twitter: https://twitter.com/ChrisChristo7
> > > Tumblr: http://chrischristo7.tumblr.com
> > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > GitHub: https://github.com/ChrisChristo
> > >
> > > On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com>
> > wrote:
> > >
> > > > Just a question I have related to this;
> > > >
> > > > Why do your own customer runtime exception subclasses get wrapped in
> an
> > > EjbException when the ejb beans are local?
> > > > Surely the caller will have the exception class in its classpath?
> > > >
> > > > Chris Christo
> > > >
> > > > ---
> > > > Twitter: https://twitter.com/ChrisChristo7
> > > > Tumblr: http://chrischristo7.tumblr.com
> > > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > > GitHub: https://github.com/ChrisChristo
> > > >
> > > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> > > >
> > > >> Yes. The RuntimeExceptions are wrapped into EJBException for the
> > > client. And
> > > >> I see the stack trace on client. But I don't see the stack trace in
> > any
> > > of
> > > >> server log files.
> > > >>
> > > >> So my question is how does TomEE log unexpected exceptions in
> > stateless
> > > >> beans exposed via remote annotation ? And is there any configuration
> > > >> available.
> > > >>
> > > >> I use a "clean" installation of 1.5.2 of the server without any
> > > >> configuration.
> > > >>
> > > >>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
> > > >>
> > > >> On 1.6.0-SNAPSHOT it works correctly.
> > > >>
> > > >> I get:
> > > >> май 30, 2013 9:14:57 AM
> > > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > > handleSystemException
> > > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> > exception
> > > >> java.lang.UnsupportedOperationException: user defined exception
> > > >>
> > > >> What are your recommendations on production usage?
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > >
> > >
> > >
> >
>

Re: Remote exceptions logging

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
> On 1.6.0-SNAPSHOT-20130529.041208-84-plus the problem occurs when the app
is redeployed.

> I build app WAR with netbeans ant. And copy WAR to webapps folder.
> If I reboot the server the logs are shown correctly again.

Any way to fix this?



On Thu, May 30, 2013 at 3:44 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> because you neevr know if the ejb is local or remote so it was the provided
> solution to keep the same code i think
>
> *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 Chris.Christo <ch...@mail.com>
>
> > sorry that meant to say 'custom runtime exception subclasses'.
> >
> > Chris Christo
> >
> > ---
> > Twitter: https://twitter.com/ChrisChristo7
> > Tumblr: http://chrischristo7.tumblr.com
> > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > GitHub: https://github.com/ChrisChristo
> >
> > On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com>
> wrote:
> >
> > > Just a question I have related to this;
> > >
> > > Why do your own customer runtime exception subclasses get wrapped in an
> > EjbException when the ejb beans are local?
> > > Surely the caller will have the exception class in its classpath?
> > >
> > > Chris Christo
> > >
> > > ---
> > > Twitter: https://twitter.com/ChrisChristo7
> > > Tumblr: http://chrischristo7.tumblr.com
> > > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > > GitHub: https://github.com/ChrisChristo
> > >
> > > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> > >
> > >> Yes. The RuntimeExceptions are wrapped into EJBException for the
> > client. And
> > >> I see the stack trace on client. But I don't see the stack trace in
> any
> > of
> > >> server log files.
> > >>
> > >> So my question is how does TomEE log unexpected exceptions in
> stateless
> > >> beans exposed via remote annotation ? And is there any configuration
> > >> available.
> > >>
> > >> I use a "clean" installation of 1.5.2 of the server without any
> > >> configuration.
> > >>
> > >>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
> > >>
> > >> On 1.6.0-SNAPSHOT it works correctly.
> > >>
> > >> I get:
> > >> май 30, 2013 9:14:57 AM
> > >> org.apache.openejb.core.transaction.EjbTransactionUtil
> > handleSystemException
> > >> SEVERE: EjbTransactionUtil.handleSystemException: user defined
> exception
> > >> java.lang.UnsupportedOperationException: user defined exception
> > >>
> > >> What are your recommendations on production usage?
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >> View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> > >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> > >
> >
> >
>

Re: Remote exceptions logging

Posted by Romain Manni-Bucau <rm...@gmail.com>.
because you neevr know if the ejb is local or remote so it was the provided
solution to keep the same code i think

*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 Chris.Christo <ch...@mail.com>

> sorry that meant to say 'custom runtime exception subclasses'.
>
> Chris Christo
>
> ---
> Twitter: https://twitter.com/ChrisChristo7
> Tumblr: http://chrischristo7.tumblr.com
> LinkedIn: http://uk.linkedin.com/in/chrischristo
> GitHub: https://github.com/ChrisChristo
>
> On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com> wrote:
>
> > Just a question I have related to this;
> >
> > Why do your own customer runtime exception subclasses get wrapped in an
> EjbException when the ejb beans are local?
> > Surely the caller will have the exception class in its classpath?
> >
> > Chris Christo
> >
> > ---
> > Twitter: https://twitter.com/ChrisChristo7
> > Tumblr: http://chrischristo7.tumblr.com
> > LinkedIn: http://uk.linkedin.com/in/chrischristo
> > GitHub: https://github.com/ChrisChristo
> >
> > On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> >
> >> Yes. The RuntimeExceptions are wrapped into EJBException for the
> client. And
> >> I see the stack trace on client. But I don't see the stack trace in any
> of
> >> server log files.
> >>
> >> So my question is how does TomEE log unexpected exceptions in stateless
> >> beans exposed via remote annotation ? And is there any configuration
> >> available.
> >>
> >> I use a "clean" installation of 1.5.2 of the server without any
> >> configuration.
> >>
> >>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
> >>
> >> On 1.6.0-SNAPSHOT it works correctly.
> >>
> >> I get:
> >> май 30, 2013 9:14:57 AM
> >> org.apache.openejb.core.transaction.EjbTransactionUtil
> handleSystemException
> >> SEVERE: EjbTransactionUtil.handleSystemException: user defined exception
> >> java.lang.UnsupportedOperationException: user defined exception
> >>
> >> What are your recommendations on production usage?
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>
>

Re: Remote exceptions logging

Posted by "Chris.Christo" <ch...@mail.com>.
sorry that meant to say 'custom runtime exception subclasses'.

Chris Christo

---
Twitter: https://twitter.com/ChrisChristo7
Tumblr: http://chrischristo7.tumblr.com
LinkedIn: http://uk.linkedin.com/in/chrischristo
GitHub: https://github.com/ChrisChristo

On 30 May 2013, at 12:14, "Chris.Christo" <ch...@mail.com> wrote:

> Just a question I have related to this;
> 
> Why do your own customer runtime exception subclasses get wrapped in an EjbException when the ejb beans are local? 
> Surely the caller will have the exception class in its classpath?
> 
> Chris Christo
> 
> ---
> Twitter: https://twitter.com/ChrisChristo7
> Tumblr: http://chrischristo7.tumblr.com
> LinkedIn: http://uk.linkedin.com/in/chrischristo
> GitHub: https://github.com/ChrisChristo
> 
> On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:
> 
>> Yes. The RuntimeExceptions are wrapped into EJBException for the client. And
>> I see the stack trace on client. But I don't see the stack trace in any of
>> server log files.
>> 
>> So my question is how does TomEE log unexpected exceptions in stateless
>> beans exposed via remote annotation ? And is there any configuration
>> available.
>> 
>> I use a "clean" installation of 1.5.2 of the server without any
>> configuration.
>> 
>>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
>> 
>> On 1.6.0-SNAPSHOT it works correctly.
>> 
>> I get:
>> май 30, 2013 9:14:57 AM
>> org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
>> SEVERE: EjbTransactionUtil.handleSystemException: user defined exception
>> java.lang.UnsupportedOperationException: user defined exception
>> 
>> What are your recommendations on production usage?
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
> 


Re: Remote exceptions logging

Posted by "Chris.Christo" <ch...@mail.com>.
Just a question I have related to this;

Why do your own customer runtime exception subclasses get wrapped in an EjbException when the ejb beans are local? 
Surely the caller will have the exception class in its classpath?

Chris Christo

---
Twitter: https://twitter.com/ChrisChristo7
Tumblr: http://chrischristo7.tumblr.com
LinkedIn: http://uk.linkedin.com/in/chrischristo
GitHub: https://github.com/ChrisChristo

On 30 May 2013, at 07:19, vhubuo <dm...@balticom.eu> wrote:

> Yes. The RuntimeExceptions are wrapped into EJBException for the client. And
> I see the stack trace on client. But I don't see the stack trace in any of
> server log files.
> 
> So my question is how does TomEE log unexpected exceptions in stateless
> beans exposed via remote annotation ? And is there any configuration
> available.
> 
> I use a "clean" installation of 1.5.2 of the server without any
> configuration.
> 
>> can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT
> 
> On 1.6.0-SNAPSHOT it works correctly.
> 
> I get:
> май 30, 2013 9:14:57 AM
> org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
> SEVERE: EjbTransactionUtil.handleSystemException: user defined exception
> java.lang.UnsupportedOperationException: user defined exception
> 
> What are your recommendations on production usage?
> 
> 
> 
> 
> 
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
Yes. The RuntimeExceptions are wrapped into EJBException for the client. And
I see the stack trace on client. But I don't see the stack trace in any of
server log files.

So my question is how does TomEE log unexpected exceptions in stateless
beans exposed via remote annotation ? And is there any configuration
available.

I use a "clean" installation of 1.5.2 of the server without any
configuration.

>can you check with the snapshot, i just tried with 1.6.0-SNAPSHOT

On 1.6.0-SNAPSHOT it works correctly.

I get:
май 30, 2013 9:14:57 AM
org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
SEVERE: EjbTransactionUtil.handleSystemException: user defined exception
java.lang.UnsupportedOperationException: user defined exception

What are your recommendations on production usage?





--
View this message in context: http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282p4663336.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Remote exceptions logging

Posted by Mark Struberg <st...@yahoo.de>.
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." <sm...@gmail.com>
> To: users@tomee.apache.org
> Cc: "users@openejb.apache.org" <us...@openejb.apache.org>
> 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. <
> smithh032772@gmail.com> 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 <dm...@balticom.eu> 
> 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.
>>> 
>> 
>> 
> 

Re: Remote exceptions logging

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
see further clarification inline/below...

On Wed, May 29, 2013 at 4:10 PM, Howard W. Smith, Jr. <
smithh032772@gmail.com> 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 <dm...@balticom.eu> 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.
>>
>
>

Re: Remote exceptions logging

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
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.

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.

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 <dm...@balticom.eu> 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.
>

Re: Remote exceptions logging

Posted by vhubuo <dm...@balticom.eu>.
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.

Re: Remote exceptions logging

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
same answer as the other post.

JLouis


2013/5/28 vhubuo <dm...@balticom.eu>

> Hello.
> I use standalone tomee plus 1.5.2
>
> I have a remote stateless bean witch throws an exception.
> The exception is visible on client side as an error but is not visible in
> the server output.
>
> How to configure logging to achieve this behavior?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Remote-exceptions-logging-tp4663282.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>



-- 
Jean-Louis