You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by rdomingo <rd...@domingo.nl> on 2008/12/03 15:49:41 UTC

Geronimo Spring 2.5

Hello,

I'm just st arting to use geronimo, but it seems hard to get it up and
running...

My application deploy's fine to tomcat and to geronimo-jetty6-minimal-2.1.3,
but it doesn't work in geronimo-jetty6-javaee5-2.1.3, Please help

When I deploy to geronimo-jetty6-minimal-2.1.3 all works fine, but I like to
have a management console which I can't use in the minimal version... (see
also my other thread  'can't install console on geronimo jetty 2.1.3
minimal') 

When I deploy to geronimo-jetty6-javaee5-2.1.3I recieve following error:
...
NoSuchMethodError:
org.springframework.beans.factory.xml.XmlReaderContext.getResourceLoader()Lorg/springframework/core/io/ResourceLoader;
...

It seems related to the spring libraries used during runtime...
I tried:
- adding the 2.5.5 spring libs to the repository
- forcing the use of spring 2.5.5 by changing the
artifact_aliases.properties
- tried to remove all spring stuff, but this couldn't be done without
removing the console...

I just can't get it to work... :(

Please help


-- 
View this message in context: http://www.nabble.com/Geronimo-Spring-2.5-tp20814360s134p20814360.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Geronimo Spring 2.5

Posted by Kevan Miller <ke...@gmail.com>.
On Dec 4, 2008, at 4:11 AM, rdomingo wrote:

>
> Hmm, damn. Cheered to early, tomcat shows already the outofmemory  
> again after
> about 15 deploys...

OK. So, looks there must be a ClassLoader memory leak.

If you can share your application, I can have a look. The causes are  
usually application code or application libraries. There can also be  
some temporal leaks with ThreadLocal/Stack variables preventing  
ClassLoaders from being GC'ed. Which version of G are you using?

Running with -XX:+HeapDumpOnOutOfMemoryError will cause the Sun JRE to  
generate a heap dump on out-of-memory conditions. You can then do some  
post-mortem analysis to help identify cause(s). I find that YourKit is  
a very good tool for analyzing the dumps...

If you can generate a dump, I'll take a look. Or if you have an  
application, I can recreate locally...

--kevan

>
> rdomingo wrote:
>>
>>
>> Kevan Miller wrote:
>>>
>>>
>>> On Dec 3, 2008, at 11:15 AM, rdomingo wrote:
>>>
>>>>
>>>> Thank you, this seems to do the job.
>>>> The spring related error is gone.
>>>
>>> Good.
>>>
>>>>
>>>> Off topic:
>>>> Currently I get java.lang.OutOfMemoryError: PermGen space
>>>> Actually this is the reason I would like to stop using tomcat....
>>>> I will look in to this tomorrow.
>>>
>>> This is after multiple deploy/redeploys or after a single deploy?  
>>> Have
>>> you bumped your permgen space (e.g. -XX:MaxPermSize=256m)? You don't
>>> see the same problem w/ Jetty?
>>>
>>> --kevan
>>>
>>>
>>
>> Kevan, you are the greatest :-))
>> Situation before  -XX:MaxPermSize=256m, out of memory all the time
>> Situation using -XX:MaxPermSize=256m, no more out of memory. This  
>> also
>> worked for me in tomcat
>>
>> But what is actually happening ???
>>
>> My gues is that My app didn't fit in mem or garbage collection hadn't
>> enough time to do it's job. By increasing the permSize I have more  
>> time to
>> do garbage collection before I run out of memory... Is this correct ?

So, we weren't sure if this was a static problem (the application is  
too large) or a memory leak (you're results tell us that it's a  
ClassLoader memory leak). Next step is to identify the cause...

There are some temporary ClassLoader memory leaks that can be caused  
by ThreadLocal and Stack variables. It doesn't sound like this is your  
problem.

--kevan


Re: Geronimo Spring 2.5

Posted by rdomingo <rd...@domingo.nl>.
Hmm, damn. Cheered to early, tomcat shows already the outofmemory again after
about 15 deploys...


rdomingo wrote:
> 
> 
> Kevan Miller wrote:
>> 
>> 
>> On Dec 3, 2008, at 11:15 AM, rdomingo wrote:
>> 
>>>
>>> Thank you, this seems to do the job.
>>> The spring related error is gone.
>> 
>> Good.
>> 
>>>
>>> Off topic:
>>> Currently I get java.lang.OutOfMemoryError: PermGen space
>>> Actually this is the reason I would like to stop using tomcat....
>>> I will look in to this tomorrow.
>> 
>> This is after multiple deploy/redeploys or after a single deploy? Have  
>> you bumped your permgen space (e.g. -XX:MaxPermSize=256m)? You don't  
>> see the same problem w/ Jetty?
>> 
>> --kevan
>> 
>> 
> 
> Kevan, you are the greatest :-))
> Situation before  -XX:MaxPermSize=256m, out of memory all the time
> Situation using -XX:MaxPermSize=256m, no more out of memory. This also
> worked for me in tomcat
> 
> But what is actually happening ???
> 
> My gues is that My app didn't fit in mem or garbage collection hadn't
> enough time to do it's job. By increasing the permSize I have more time to
> do garbage collection before I run out of memory... Is this correct ?
> 
> Any way, thanks again !
> 

-- 
View this message in context: http://www.nabble.com/Geronimo-Spring-2.5-tp20814360s134p20829732.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Geronimo Spring 2.5

Posted by rdomingo <rd...@domingo.nl>.

Kevan Miller wrote:
> 
> 
> On Dec 3, 2008, at 11:15 AM, rdomingo wrote:
> 
>>
>> Thank you, this seems to do the job.
>> The spring related error is gone.
> 
> Good.
> 
>>
>> Off topic:
>> Currently I get java.lang.OutOfMemoryError: PermGen space
>> Actually this is the reason I would like to stop using tomcat....
>> I will look in to this tomorrow.
> 
> This is after multiple deploy/redeploys or after a single deploy? Have  
> you bumped your permgen space (e.g. -XX:MaxPermSize=256m)? You don't  
> see the same problem w/ Jetty?
> 
> --kevan
> 
> 

Kevan, you are the greatest :-))
Situation before  -XX:MaxPermSize=256m, out of memory all the time
Situation using -XX:MaxPermSize=256m, no more out of memory. This also
worked for me in tomcat

But what is actually happening ???

My gues is that My app didn't fit in mem or garbage collection hadn't enough
time to do it's job. By increasing the permSize I have more time to do
garbage collection before I run out of memory... Is this correct ?

Any way, thanks again !
-- 
View this message in context: http://www.nabble.com/Geronimo-Spring-2.5-tp20814360s134p20829360.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Geronimo Spring 2.5

Posted by Kevan Miller <ke...@gmail.com>.
On Dec 3, 2008, at 11:15 AM, rdomingo wrote:

>
> Thank you, this seems to do the job.
> The spring related error is gone.

Good.

>
> Off topic:
> Currently I get java.lang.OutOfMemoryError: PermGen space
> Actually this is the reason I would like to stop using tomcat....
> I will look in to this tomorrow.

This is after multiple deploy/redeploys or after a single deploy? Have  
you bumped your permgen space (e.g. -XX:MaxPermSize=256m)? You don't  
see the same problem w/ Jetty?

--kevan

Re: Geronimo Spring 2.5

Posted by rdomingo <rd...@domingo.nl>.
Thank you, this seems to do the job.
The spring related error is gone.

Off topic:
Currently I get java.lang.OutOfMemoryError: PermGen space
Actually this is the reason I would like to stop using tomcat....
I will look in to this tomorrow.


-- 
View this message in context: http://www.nabble.com/Geronimo-Spring-2.5-tp20814360s134p20816067.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Geronimo Spring 2.5

Posted by Kevan Miller <ke...@gmail.com>.
On Dec 3, 2008, at 9:49 AM, rdomingo wrote:

>
> Hello,
>
> I'm just st arting to use geronimo, but it seems hard to get it up and
> running...
>
> My application deploy's fine to tomcat and to geronimo-jetty6- 
> minimal-2.1.3,
> but it doesn't work in geronimo-jetty6-javaee5-2.1.3, Please help
>
> When I deploy to geronimo-jetty6-minimal-2.1.3 all works fine, but I  
> like to
> have a management console which I can't use in the minimal  
> version... (see
> also my other thread  'can't install console on geronimo jetty 2.1.3
> minimal')
>
> When I deploy to geronimo-jetty6-javaee5-2.1.3I recieve following  
> error:
> ...
> NoSuchMethodError:
> org 
> .springframework 
> .beans.factory.xml.XmlReaderContext.getResourceLoader()Lorg/ 
> springframework/core/io/ResourceLoader;
> ...
>
> It seems related to the spring libraries used during runtime...
> I tried:
> - adding the 2.5.5 spring libs to the repository
> - forcing the use of spring 2.5.5 by changing the
> artifact_aliases.properties
> - tried to remove all spring stuff, but this couldn't be done without
> removing the console...
>
> I just can't get it to work... :(

IIRC, cxf is introducing spring into the application classloader. This  
can lead to spring version conflicts (case in point...). You can  
filter spring from the parent classloaders and use the application  
supplied spring jars, instead. The following geronimo deployment plan  
should do the trick:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"  
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"  
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
   <dep:environment>
     <dep:moduleId>
       <dep:groupId>org.mygroup</dep:groupId>
       <dep:artifactId>MyApp</dep:artifactId>
       <dep:version>1.1</dep:version>
       <dep:type>car</dep:type>
     </dep:moduleId>
     <!--
          Don't load spring classes or resources from parent  
ClassLoaders.
       -->
     <dep:hidden-classes>
       <dep:filter>org.springframework.</dep:filter>
       <dep:filter>META-INF/spring</dep:filter>
     </dep:hidden-classes>
   </dep:environment>
</web-app>

You should be able to generate a minimal server with admin console  
capabilities (adding console to a minimal server or from javaee server  
using the admin console).

--kevan