geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Spring petclinic sample application (from Srping 2.5.1) on Geronimo 2.0.2?
Date Tue, 29 Jan 2008 23:11:30 GMT
well, a couple fairly obvious things are going on...

1. You are running out of permgen space.  You need to include  
something like -XX:MaxPermSize=128m in your java command to start  
geronimo.  I usually start geronimo 2.0.2 directly

java -XX:MaxPermSize=128m -Djava.endorsed.dirs=lib/endorsed - 
javaagent:bin/jpa.jar -jar bin/server.jar --long

If you use a script I think you'd do something like
export JAVA_OPTS="-XX:MaxPermSize=128m"


2. I think this app is designed to not be deployed on a javaee 5 app  
server: I think it probably includes a persistence.xml file, which is  
automatically picked up by an ee  app server and all the jpa stuff is  
processed.  You can  certainly see openjpa working hard to enhance  
the entity classes and get everything set up for you.  If you really  
want to use the jdbc data access I recommend removing the  
persistence.xml file.  Or, you can enjoy the benefits of jpa :-) by  
saying that's what you'll use.  You will probably have to hook up the  
datasources in persistence.xml, so posting it would still be helpful.

thanks
david jencks

On Jan 29, 2008, at 2:49 PM, Paul Wong wrote:

> David,
>
> I believe you are right.
> It looks like I have persistence issues here:
> I am using the default Spring PetClinic application which uses HSQL  
> as the database.
> Please find the applicationContext-jdbc.xml and web.xml attached.
>
> Thanks a lot.
>
> Paul
>
> ****************************************************************
> Geronimo Application Server started
> 14:39:24,862 WARN  [MetaData] No setter was found for method new in  
> type org.spr
> ingframework.samples.petclinic.BaseEntity while searching for  
> persistent propert
> ies. This method will be ignored. If you intended for this to be  
> persistent, ple
> ase add a corresponding setter, or switch to field access for this  
> type hierarch
> y.
> 14:39:24,877 WARN  [MetaData] No setter was found for method  
> specialties in type
>  org.springframework.samples.petclinic.Vet while searching for  
> persistent proper
> ties. This method will be ignored. If you intended for this to be  
> persistent, pl
> ease add a corresponding setter, or switch to field access for this  
> type hierarc
> hy.
> 14:39:24,877 WARN  [MetaData] No setter was found for method  
> nrOfSpecialties in
> type org.springframework.samples.petclinic.Vet while searching for  
> persistent pr
> operties. This method will be ignored. If you intended for this to  
> be persistent
> , please add a corresponding setter, or switch to field access for  
> this type hie
> rarchy.
> 14:39:24,877 WARN  [MetaData] No setter was found for method pets  
> in type org.sp
> ringframework.samples.petclinic.Owner while searching for  
> persistent properties.
>  This method will be ignored. If you intended for this to be  
> persistent, please
> add a corresponding setter, or switch to field access for this type  
> hierarchy.
> 14:39:24,955 WARN  [MetaData] No setter was found for method visits  
> in type org.
> springframework.samples.petclinic.Pet while searching for  
> persistent properties.
>  This method will be ignored. If you intended for this to be  
> persistent, please
> add a corresponding setter, or switch to field access for this type  
> hierarchy.
> 14:39:25,065 WARN  [Enhance] Detected the following possible  
> violations of the r
> estrictions placed on property access persistent types:
> "org.springframework.samples.petclinic.BaseEntity" uses property  
> access, but its
>  field "id" is accessed directly in method "isNew" defined in  
> "org.springframewo
> rk.samples.petclinic.BaseEntity".
> 14:39:25,112 WARN  [Enhance] Detected the following possible  
> violations of the r
> estrictions placed on property access persistent types:
> "org.springframework.samples.petclinic.Owner" uses property access,  
> but its fiel
> d "city" is accessed directly in method "toString" defined in  
> "org.springframewo
> rk.samples.petclinic.Owner".
> "org.springframework.samples.petclinic.Owner" uses property access,  
> but its fiel
> d "telephone" is accessed directly in method "toString" defined in  
> "org.springfr
> amework.samples.petclinic.Owner".
> "org.springframework.samples.petclinic.Owner" uses property access,  
> but its fiel
> d "address" is accessed directly in method "toString" defined in  
> "org.springfram
> ework.samples.petclinic.Owner".
> 14:40:53,049 ERROR [[jsp]] Servlet.service() for servlet jsp threw  
> exception
> java.lang.OutOfMemoryError: PermGen space
> 14:40:55,283 ERROR [[jsp]] Servlet.service() for servlet jsp threw  
> exception
> java.lang.OutOfMemoryError: PermGen space
> 14:40:55,283 ERROR [0]] Exception Processing ErrorPage 
> [exceptionType=java.lang.E
> xception, location=/WEB-INF/jsp/uncaughtException.jsp]
> javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen  
> space
>         at org.apache.jasper.servlet.JspServlet.service 
> (JspServlet.java:274)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
> 806)
>         at  
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter 
> (ApplicationF
> ilterChain.java:206)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke 
> (ApplicationDisp
> atcher.java:654)
>         at  
> org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
> tionDispatcher.java:447)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward 
> (ApplicationD
> ispatcher.java:379)
>         at org.apache.catalina.core.ApplicationDispatcher.forward 
> (ApplicationDis
> patcher.java:292)
>         at org.apache.catalina.core.StandardHostValve.custom 
> (StandardHostValve.j
> ava:424)
>         at org.apache.catalina.core.StandardHostValve.throwable 
> (StandardHostValv
> e.java:271)
>         at org.apache.catalina.core.StandardHostValve.invoke 
> (StandardHostValve.j
> ava:142)
>         at org.apache.catalina.valves.ErrorReportValve.invoke 
> (ErrorReportValve.j
> ava:104)
>         at org.apache.catalina.core.StandardEngineValve.invoke 
> (StandardEngineVal
> ve.java:109)
>         at org.apache.catalina.valves.AccessLogValve.invoke 
> (AccessLogValve.java:
> 563)
>         at org.apache.catalina.connector.CoyoteAdapter.service 
> (CoyoteAdapter.jav
> a:261)
>         at org.apache.coyote.http11.Http11Processor.process 
> (Http11Processor.java
> :844)
>         at org.apache.coyote.http11.Http11Protocol 
> $Http11ConnectionHandler.proce
> ss(Http11Protocol.java:581)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run 
> (JIoEndpoint.java:44
> 7)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.OutOfMemoryError: PermGen space
> 14:41:51,190 ERROR [[/console-standard]] StandardWrapper.Throwable
> java.lang.OutOfMemoryError: PermGen space
> 14:41:51,205 ERROR [[LogManager]] Allocate exception for servlet  
> LogManager
> java.lang.OutOfMemoryError: PermGen space
> 14:41:51,205 ERROR [PortletInvokerImpl] PortletInvokerImpl.render()  
> - Error whil
> e dispatching portlet.
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,408 ERROR [ColumnFragment_jsp]] Servlet.service() for  
> servlet jsp.WEB_0
> 02dINF.aggregation.ColumnFragment_jsp threw exception
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,408 ERROR [RowFragment_jsp]] Servlet.service() for servlet  
> jsp.WEB_002d
> INF.aggregation.RowFragment_jsp threw exception
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,424 ERROR [PageFragment_jsp]] Servlet.service() for  
> servlet jsp.WEB_002
> dINF.aggregation.PageFragment_jsp threw exception
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,424 ERROR [PageFragment_jsp]] Servlet.service() for  
> servlet jsp.WEB_002
> dINF.aggregation.PageFragment_jsp threw exception
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,424 ERROR [RootFragment_jsp]] Servlet.service() for  
> servlet jsp.WEB_002
> dINF.aggregation.RootFragment_jsp threw exception
> java.lang.OutOfMemoryError: PermGen space
> 14:41:53,424 ERROR [Servlet] Exception caught:
> 14:41:55,627 ERROR [[se-console]] Servlet.service() for servlet se- 
> console threw
>  exception
> java.lang.OutOfMemoryError: PermGen space
>
> ****************************************************************
>
> On Jan 29, 2008 2:38 PM, David Jencks <david_jencks@yahoo.com> wrote:
> The plan doesn't have anything obvious wrong.
>
> Can you look in var/config/geronimo.log and find the stack trace  
> for  the first exception?  Just the message line doesn't have  
> enough info.
>
> Is there a persistence.xml file in this app?  If so could you post  
> it?  Most likely you have to configure datasources for it to use.
> thanks
> david jencks
>
> On Jan 29, 2008, at 2:21 PM, Paul Wong wrote:
>
>> Hi All,
>>
>> I have modified the geronimo-web.xml to the following:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app
>>     xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>>     <environment>
>>         <moduleId>
>>             <groupId>org.springframework.samples</groupId>
>>             <artifactId>petclinic</artifactId>
>>             <version>1.0</version>
>>         </moduleId>
>>         <dependencies></dependencies>
>>     </environment>
>>
>>     <context-root>/petclinic</context-root>
>> </web-app>
>>
>> I got the following error after deployment:
>> I think I might just miss something in my deployment file(s).
>> If it is not too much trouble, please help.  Thanks a lot.
>>
>> 6851 total message(s) in log file. 10 matched your criteria  
>> (number of results capped).
>> 6621: 14:07:03,893 ERROR [GBeanInstanceState] Error while  
>> starting; GBean is now in the FAILED state: abstractName="default/ 
>> petclinic/1201644415049/car?J2EEApplication=default/petclinic/ 
>> 1201644415049/car,j2eeType=WebModule,name=petclinic.war"
>> 6669: 14:07:03,955 ERROR [GBeanInstance] Problem in doStop of  
>> default/petclinic/1201644415049/car?J2EEApplication=default/ 
>> petclinic/1201644415049/car,PersistenceUnitModule=WEB-INF/lib/ 
>> petclinic- 
>> domain.jar,WebModule=petclinic.war,j2eeType=PersistenceUnit,name=PetC 
>> linic
>> 6712: 14:15:51,424 ERROR [ContextLoader] Context initialization  
>> failed
>> 6714: 14:15:51,424 ERROR [[/petclinic]] Exception sending context  
>> initialized event to listener instance of class  
>> org.springframework.web.context.ContextLoaderListener
>> 6716: 14:15:51,424 ERROR [StandardContext] Error listenerStart
>> 6717: 14:15:51,424 ERROR [StandardContext] Context [/petclinic]  
>> startup failed due to previous errors
>> 6718: 14:15:52,612 ERROR [ContainerBase] ContainerBase.addChild:  
>> start:
>> 6766: 14:15:52,627 WARN [TomcatWebAppContext] TomcatWebAppContext  
>> failed
>> 6767: 14:15:52,627 ERROR [GBeanInstanceState] Error while  
>> starting; GBean is now in the FAILED state: abstractName="default/ 
>> petclinic/1201644940768/car?J2EEApplication=default/petclinic/ 
>> 1201644940768/car,j2eeType=WebModule,name=petclinic.war"
>> 6815: 14:15:52,627 ERROR [GBeanInstance] Problem in doStop of  
>> default/petclinic/1201644940768/car?J2EEApplication=default/ 
>> petclinic/1201644940768/car,PersistenceUnitModule=WEB-INF/lib/ 
>> petclinic- 
>> domain.jar,WebModule=petclinic.war,j2eeType=PersistenceUnit,name=PetC 
>> linic
>>
>>
>>
>> On Jan 29, 2008 1:14 PM, David Jencks <david_jencks@yahoo.com> wrote:
>> Could you give us more info on exactly where you found this app  
>> and where the geronimo plan is?  We might want to try to get the  
>> plan upgraded to a less obsolete version.  The geronimo 1.0 plans  
>> were not compatible with later geronimo releases.
>>
>> In geronimo 1.1 we included a plan upgrader, but it seems to have  
>> disappeared from later geronimo releases.  The simplest way to use  
>> it is I believe to download a copy of geronimo 1.1 from http:// 
>> geronimo.apache.org/apache-geronimo-v11-release.html, unpack it,  
>> and run
>>
>> java -jar bin/upgrade.jar <input-plan> <output-plan>
>>
>> This is less than desirable.... but this is also the first anyone  
>> has noticed that the upgrader has gone missing.
>>
>> thanks
>> david jencks
>>
>>
>>
>> On Jan 29, 2008, at 12:13 PM, Paul Wong wrote:
>>
>>> hey all:
>>>
>>>
>>> I am trying to deploy the Spring petclinic sample application  
>>> (from Srping 2.5.1) on Geronimo 2.0.2 and i get this error:
>>>
>>>
>>> org.apache.geronimo.common.DeploymentException: Cannot handle web  
>>> plan
>>>
>>> with namespace http://geronimo.apache.org/xml/ns/j2ee/web-1.0 --
>>>
>>> expecting http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 or......
>>>
>>>
>>> Any suggestion to get this going?
>>>
>>>
>>> Thanks a lot for your great help.
>>>
>>>
>>> Paul
>>>
>>>
>>>
>>
>>
>
>
> <web.xml><applicationContext-jdbc.xml>


Mime
View raw message