Ok here goes...
1. In org.apache.roller.weblogger.ui.core.RollerContext
The way code is currently written you will get a NULL pointer exception that
will cause roller to NOT run because of the following..
// get the *real* path to <context>/resources
String ctxPath= servletContext.getRealPath("/");
//log.info(ctxPath);
if(!ctxPath.endsWith(File.separator))
ctxPath += File.separator + "resources";
else
ctxPath += "resources";
servletContext.getRealPath returns null if the war has not been unPacked.
The purpose of this class is to create the context that Roller works within.
It "discerns" it's context and uses any settings in
roller-custom.properties. So if you then change the code to :
String ctxPath ="";
// get the *real* path to <context>/resources
ctxPath= servletContext.getRealPath("/");
//log.info(ctxPath);
if(ctxPath!=null&&!ctxPath.endsWith(File.separator))
ctxPath += File.separator + "resources";
else
ctxPath += "resources";
and change the roller-custom.properties to have a base.dir property to
something like your home directory and have the uploads and planecache
directories be in ${basedir}/roller_data/uploads, etc.
this takes care of the first issue. Furthermore, move the themes velocity
templates to a themes directory outside of the war also.
If you do this and try again. You will then deploy properly until you try to
access the index page of the roller project. You will then run into your
next issue:
Page:
Unexpected Exception
Status Code 500
Message An exception occurred processing JSP page /index.jsp at line 31
28:
} else { 29: // dispatch to setup page 30: RequestDispatcher setuppage =
request.getRequestDispatcher("/roller-ui/setup.rol"); 31:
setuppage.forward(request, response); 32: } 33: 34: %> Stacktrace:
Type
Exception Roller has encountered and logged an unexpected exception.
Catalina.out
java.lang.IllegalStateException: Roller Weblogger has not been bootstrapped
yet
at
org.apache.roller.weblogger.business.WebloggerFactory.getWeblogger(WebloggerFactory.java:60)
at
org.apache.roller.weblogger.ui.struts2.core.Setup.execute(Setup.java:60)
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
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterce$
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
org.apache.roller.weblogger.ui.struts2.util.UIActionPrepareInterceptor.intercept(UIActionPrepareInterceptor.java:$
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
It is at this point I was asking had anyone else started down this path....
Allen Gilliland-3 wrote:
>
> Can you be more specific about "there are code issues"?
>
> That's a pretty vague statement and doesn't leave much to go on.
>
> -- Allen
>
>
> mclovis wrote:
>> To be clear in this thread roller will be deployed to Tomcat as a war and
>> the
>> Host configuration will have the attribute unPackWars ="false" so that
>> roller will remain a war.
>>
>>
>> Ryan de Laplante-2 wrote:
>>> I followed the 4.0 install instructions to create a .war file and
>>> successfully deployed it to GlassFish V2 with no issues.
>>>
>>>
>>> mclovis wrote:
>>>> I am starting a new thread on this question because I asked the
>>>> question
>>>> incorrectly before and I hope to get new feedback. Currently If you run
>>>> Roller as a PACKED war there are code issues. You can start to change
>>>> the
>>>> code and configuration to overcome these issues. Has anyone had any
>>>> success
>>>> or thoughts on this? Thanks in advance.
>>>>
>>>
>>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Running-Roller-as-a-Packed-WAR-tp18856261s12275p18873470.html
Sent from the Roller - User mailing list archive at Nabble.com.