You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by bhardage <bh...@harding.edu> on 2009/07/08 23:17:34 UTC

Problem deploying Spring Portlet MVC webapp

Hello,

I'm working on learning the Spring Portlet MVC framework and I've hit a
small problem. I've created a war file from my webapp which has the basic
portlet structure (i.e. WEB-INF->web.xml file and context folder for spring
context files, etc.).

My problem is that the portlet's web.xml file uses paths like
"/WEB-INF/context/myapp-context.xml", but when I deploy the war file to the
"jetexpress/WEB-INF/deploy/local/" directory, the previous path maps to
"jetexpress/WEB-INF/context/myapp-context.xml", which doesn't exist.

Would someone be able to tell me a way to resolve this problem, other than
copying the context folder to the jetexpress portal's WEB-INF directory. I'd
like to keep my portlets as portal-independent as possible.

Thanks for the help,
B.J.
-- 
View this message in context: http://www.nabble.com/Problem-deploying-Spring-Portlet-MVC-webapp-tp24399589p24399589.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Problem deploying Spring Portlet MVC webapp

Posted by bhardage <bh...@harding.edu>.
Thanks for your reply Woonsan. I put my war file directly into the deploy
folder and was glad to see Jetspeed deployed it to my tomcat server. I also
added a reference to one of the petportal portlets (just a plain, no frills,
print to response.getWriter() portlet) in the default psml file, just to see
it working.

However, the portlet shows up on the main page with a Title of "Welcome" as
it should, but in its body it displays the message "Portlet Application
petportal not available".

Any Suggestions?

Thanks,
B.J.
-- 
View this message in context: http://www.nabble.com/Problem-deploying-Spring-Portlet-MVC-webapp-tp24399589p24410485.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Problem deploying Spring Portlet MVC webapp

Posted by bhardage <bh...@harding.edu>.
Well, I've checked all the relevant log files, and they all report an error
but I can't locate the source.

jetspeed-deployment.log

2009-07-09 11:12:21,328 [Timer-3] ERROR deployment - Unable to start portlet
application after 10 retries:
org.apache.jetspeed.components.portletregistry.RegistryException: Error
starting portlet application petportal
org.apache.jetspeed.components.portletregistry.RegistryException: Error
starting portlet application petportal
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.attemptStartPA(PortletApplicationManager.java:677)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.tryStartPortletApplication(PortletApplicationManager.java:244)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy13.tryStartPortletApplication(Unknown Source)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.retryStartPortletApplication(PortletApplicationManager.java:214)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.startPortletApplication(PortletApplicationManager.java:195)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
	at $Proxy13.startPortletApplication(Unknown Source)
	at
org.apache.jetspeed.container.JetspeedContainerServlet.attemptStart(JetspeedContainerServlet.java:191)
	at
org.apache.jetspeed.container.JetspeedContainerServlet$1.run(JetspeedContainerServlet.java:162)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

localhost.2009-07-09.log

...

Jul 9, 2009 11:12:21 AM org.apache.catalina.core.ApplicationContext log
SEVERE: JetspeedContainerServlet: initialization failed for Portlet
Application at: /petportal
org.apache.jetspeed.components.portletregistry.RegistryException: Error
starting portlet application petportal
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.attemptStartPA(PortletApplicationManager.java:677)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.tryStartPortletApplication(PortletApplicationManager.java:244)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy13.tryStartPortletApplication(Unknown Source)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.retryStartPortletApplication(PortletApplicationManager.java:214)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.startPortletApplication(PortletApplicationManager.java:195)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
	at $Proxy13.startPortletApplication(Unknown Source)
	at
org.apache.jetspeed.container.JetspeedContainerServlet.attemptStart(JetspeedContainerServlet.java:191)
	at
org.apache.jetspeed.container.JetspeedContainerServlet$1.run(JetspeedContainerServlet.java:162)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
Jul 9, 2009 11:12:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 9, 2009 11:12:22 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'springapp'
Jul 9, 2009 11:12:26 AM org.apache.catalina.core.ApplicationContext log
INFO: JetspeedContainerServlet: attemping to start Portlet Application at:
/j2-admin
Jul 9, 2009 11:12:26 AM org.apache.catalina.core.ApplicationContext log
INFO: JetspeedContainerServlet: started Portlet Application at: /j2-admin

The petportal.log file reports no errors, however.

2009-07-09 11:18:14,812 INFO [org.springframework.web.context.ContextLoader]
- Root WebApplicationContext: initialization started
2009-07-09 11:18:14,828 INFO
[org.springframework.web.context.support.XmlWebApplicationContext] -
Refreshing
org.springframework.web.context.support.XmlWebApplicationContext@199c55a:
display name [Root WebApplicationContext]; startup date [Thu Jul 09 11:18:14
CDT 2009]; root of context hierarchy
2009-07-09 11:18:14,875 INFO
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading
XML bean definitions from ServletContext resource
[/WEB-INF/context/common.xml]
2009-07-09 11:18:14,890 INFO
[org.springframework.web.context.support.XmlWebApplicationContext] - Bean
factory for application context
[org.springframework.web.context.support.XmlWebApplicationContext@199c55a]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@17470d0
2009-07-09 11:18:14,937 INFO
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] -
Loading properties file from ServletContext resource
[/WEB-INF/pets.properties]
2009-07-09 11:18:14,953 INFO
[org.springframework.beans.factory.support.DefaultListableBeanFactory] -
Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@17470d0:
defining beans
[petService,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,messageSource,viewResolver,defaultExceptionHandler];
root of factory hierarchy
2009-07-09 11:18:14,968 INFO [org.springframework.web.context.ContextLoader]
- Root WebApplicationContext: initialization completed in 156 ms

Any ideas would me much appreciated.

Thanks,
B.J.
-- 
View this message in context: http://www.nabble.com/Problem-deploying-Spring-Portlet-MVC-webapp-tp24399589p24413251.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Problem deploying Spring Portlet MVC webapp

Posted by bhardage <bh...@harding.edu>.
Changing the log level to DEBUG produced the following in
jetspeed-deployment:

2009-07-09 13:21:52,093 [Timer-3] DEBUG deployment - Is portlet application
petportal monitored? -> false
2009-07-09 13:21:52,093 [Timer-3] DEBUG deployment - Try to start portlet
application petportal.
2009-07-09 13:21:52,093 [Timer-3] DEBUG deployment - New checksum for
portlet application petportal is 766526751
2009-07-09 13:21:52,140 [Timer-3] DEBUG deployment - Portlet Application
petportal found in registry.
2009-07-09 13:21:52,156 [Timer-3] ERROR deployment - Error starting portlet
application petportal
org.apache.jetspeed.components.portletregistry.RegistryException: Cannot
start portlet application petportal: as Application Types don't match: 1 !=
0
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.attemptStartPA(PortletApplicationManager.java:504)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.tryStartPortletApplication(PortletApplicationManager.java:244)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy13.tryStartPortletApplication(Unknown Source)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.retryStartPortletApplication(PortletApplicationManager.java:214)
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.startPortletApplication(PortletApplicationManager.java:195)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
	at $Proxy13.startPortletApplication(Unknown Source)
	at
org.apache.jetspeed.container.JetspeedContainerServlet.attemptStart(JetspeedContainerServlet.java:191)
	at
org.apache.jetspeed.container.JetspeedContainerServlet$1.run(JetspeedContainerServlet.java:162)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
2009-07-09 13:21:52,156 [Timer-3] DEBUG deployment - Add change monitor for
application petportal and set unsuccessful starts to 1.
2009-07-09 13:21:52,203 [Timer-3] DEBUG deployment - Is portlet application
petportal monitored? -> true
2009-07-09 13:21:52,203 [Timer-3] DEBUG deployment - Try to start portlet
application petportal.
2009-07-09 13:21:52,203 [Timer-3] DEBUG deployment - New checksum for
portlet application petportal is 766526751
2009-07-09 13:21:52,203 [Timer-3] DEBUG deployment - Portlet Application
petportal found in registry.
2009-07-09 13:21:52,203 [Timer-3] ERROR deployment - Error starting portlet
application petportal
org.apache.jetspeed.components.portletregistry.RegistryException: Cannot
start portlet application petportal: as Application Types don't match: 1 !=
0
	at
org.apache.jetspeed.tools.pamanager.PortletApplicationManager.attemptStartPA(PortletApplicationManager.java:504)
...

basically repeating for 10 tries.

The jetspeed-layouts portlet produced the following:

2009-07-09 13:21:50,671 [main] DEBUG deployment - Is portlet application
jetspeed-layouts monitored? -> false
2009-07-09 13:21:50,671 [main] DEBUG deployment - Try to start portlet
application jetspeed-layouts.
2009-07-09 13:21:50,671 [main] DEBUG deployment - New checksum for portlet
application jetspeed-layouts is 2454617269
2009-07-09 13:21:51,296 [main] DEBUG deployment - Portlet Application
jetspeed-layouts found in registry.
2009-07-09 13:21:51,296 [main] DEBUG deployment - unregistering portlet
application jetspeed-layouts...
2009-07-09 13:21:51,296 [main] DEBUG deployment - Re-register existing
portlet application jetspeed-layouts.
2009-07-09 13:21:51,296 [main] DEBUG deployment - Node for Portlet
application jetspeed-layouts is SAVED.
2009-07-09 13:21:51,296 [main] DEBUG deployment - Register Portlet
application jetspeed-layouts in portlet factory.
2009-07-09 13:21:51,296 [main] DEBUG deployment - Add change monitor for
application jetspeed-layouts with checksum 2454617269.
2009-07-09 13:21:51,296 [main] INFO  deployment - Deployment scanner
successfuly started!

So, it looks like the petportal portlet is crashing right before it tries to
unregister the petportal application. I'm not exactly sure what the error
"Application Types don't match: 1 != 0" means though.

I'm afraid I'm not familiar enough with Jetspeed to know exactly what this
is saying.

Thanks,
B.J.
-- 
View this message in context: http://www.nabble.com/Problem-deploying-Spring-Portlet-MVC-webapp-tp24399589p24415051.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Problem deploying Spring Portlet MVC webapp

Posted by bhardage <bh...@harding.edu>.
Hey Woonsan,

Thanks a lot for your help. I never actually "installed" Jetspeed through
the installer. I had built the jetexpress tutorial with maven and deployed
it to my existing tomcat installation, so I guess it didn't actually use a
database, unless it was using Derby.

Anyway, I installed Jetspeed through the installer and deployed the
petportal application and everything seems to be working fine.

Thanks again,
B.J.
-- 
View this message in context: http://www.nabble.com/Problem-deploying-Spring-Portlet-MVC-webapp-tp24399589p24428136.html
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org