tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AdamO <adam.orend...@macrologic.pl>
Subject Re: Errors shutting down Tomcat with OpenEJB 3 Beta-2
Date Fri, 22 Feb 2008 12:16:35 GMT

Thank you for your concern. It's good to know there's nothing wrong with my
code and that everything shuts down correctly. 
I also have another problem since beta-2. I can't get @Resource
UserTransaction. I'll verify my code again before I send a post.

Best regards
Adam



Dain Sundstrom wrote:
> 
> On Feb 16, 2008, at 12:48 AM, AdamO wrote:
> 
>> I've noticed "INFO: Illegal access:" messages in my Tomcat log while  
>> testing
>> beta-2. I haven't had the messages with beta-1. Does anyone know  
>> what's
>> wrong?
> 
> There is nothing wrong with your code.  This log message is caused by  
> a piece of code I added between beta-1 and beta-2 that clears a leaky  
> cache in OpenJPA.
> 
> The problem we're running into is when we try to clear this cache in  
> for an application using a tomcat class loader with this code:
> 
>      public static void cleanOpenJPACache(ClassLoader classLoader) {
>          try {
>              Class<?> pcRegistryClass =  
> classLoader.loadClass("org.apache.openjpa.enhance.PCRegistry");
>              Method deRegisterMethod =  
> pcRegistryClass.getMethod("deRegister", ClassLoader.class);
>              deRegisterMethod.invoke(null, classLoader);
>          } catch (Throwable ignored) {
>              // there is nothing a user could do about this anyway
>          }
>      }
> 
> We run into the following code in the Tomcat class loader when we load  
> the PCRegistry class:
> 
>          // Log access to stopped classloader
>          if (!started) {
>              try {
>                  throw new IllegalStateException();
>              } catch (IllegalStateException e) {
>                  log.info(sm.getString("webappClassLoader.stopped",  
> name), e);
>              }
>          }
> 
> So, if the class loader is "stopped" it will log that huge message  
> with stack trace for every class that we attempt to load.  It will  
> take some experimenting to figure out how to avoid the exception  
> message.
> 
> Anyway, your code is fine, and I think the clean up code is working  
> fine, but it would be nice to get rid of the annoying log message.
> 
> -dain
> 
> 

-- 
View this message in context: http://www.nabble.com/Errors-shutting-down-Tomcat-with-OpenEJB-3-Beta-2-tp15516149p15632866.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message