Re: Error deploying roller.war tomcat7

Gaurav <[email protected]>
Newsgroups gmane.comp.java.roller.user
Message-ID <[email protected]>
Hello,

I have removed the log4j.appender.roller-startup.File and still its not 
working and giving the same error.
I am using Ubuntu 13.10, jdk 1.7, tomcat7 and have started the tomcat 
from root. I have done everything for this, but still getting below 
errors, I adding full stacktrace for both roller.lo and catalina.out

roller.log

INFO  2013-11-30 17:10:07,262 DatabaseProvider:successMessage - SUCCESS: 
Got parameters. Using configuration type JDBC_PROPERTIES
INFO  2013-11-30 17:10:07,266 DatabaseProvider:successMessage - -- Using 
JDBC driver class: com.mysql.jdbc.Driver
INFO  2013-11-30 17:10:07,267 DatabaseProvider:successMessage - -- Using 
JDBC connection URL: 
jdbc:mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8
INFO  2013-11-30 17:10:07,267 DatabaseProvider:successMessage - -- Using 
JDBC username: root
INFO  2013-11-30 17:10:07,267 DatabaseProvider:successMessage - -- Using 
JDBC password: [hidden]
INFO  2013-11-30 17:10:07,268 DatabaseProvider:successMessage - SUCCESS: 
loaded JDBC driver class [com.mysql.jdbc.Driver]

Catalina.out (on start of tomcat)

  Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], 
exists: [false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: 
[false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], 
exists: [false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: 
[false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], 
exists: [false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:55 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: 
[false], isDirectory: [false], canRead: [false]
Nov 30, 2013 5:09:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-9080"]
Nov 30, 2013 5:09:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1213 ms
Nov 30, 2013 5:09:56 PM org.apache.catalina.core.StandardService 
startInternal
INFO: Starting service Catalina
Nov 30, 2013 5:09:56 PM org.apache.catalina.core.StandardEngine 
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Nov 30, 2013 5:09:56 PM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor 
/etc/tomcat7/Catalina/localhost/host-manager.xml
Nov 30, 2013 5:09:57 PM org.apache.catalina.startup.HostConfig 
deployDescriptor
INFO: Deploying configuration descriptor 
/etc/tomcat7/Catalina/localhost/manager.xml
Nov 30, 2013 5:09:57 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/roller.war
Nov 30, 2013 5:09:57 PM 
org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to 
'0' did not find a matching property.
Nov 30, 2013 5:10:04 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
WARNING: maxIdle is smaller than minIdle, setting maxIdle to: 10
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: roller-startup.log (Permission denied)
     at java.io.FileOutputStream.openAppend(Native Method)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
     at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
     at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
     at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
     at 
org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
     at 
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
     at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
     at 
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
     at 
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
     at 
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
     at 
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
     at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
     at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
     at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
     at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
     at org.apache.log4j.Logger.getLogger(Logger.java:104)
     at 
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283)
     at 
org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at 
org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
     at 
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:782)
     at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
     at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
     at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
     at 
org.apache.roller.weblogger.ui.core.RollerSession.<clinit>(RollerSession.java:53)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at java.lang.Class.newInstance0(Class.java:355)
     at java.lang.Class.newInstance(Class.java:308)
     at 
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:138)
     at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854)
     at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
     at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
     at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
     at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
     at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
     at 
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
     at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)
log4j:ERROR Either File or DatePattern options are not set for appender 
[roller-startup].
Roller Weblogger: Successfully loaded custom properties file from classpath
Nov 30, 2013 5:10:07 PM org.apache.catalina.core.StandardContext 
startInternal
SEVERE: Error listenerStart
Nov 30, 2013 5:10:07 PM org.apache.catalina.core.StandardContext 
startInternal
SEVERE: Context [/roller] startup failed due to previous errors
Nov 30, 2013 5:10:07 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/roller] appears to have started a thread 
named [MySQL Statement Cancellation Timer] but has failed to stop it. 
This is very likely to create a memory leak.
Nov 30, 2013 5:10:07 PM org.apache.catalina.startup.HostConfig 
deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Nov 30, 2013 5:10:07 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9080"]
Nov 30, 2013 5:10:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11459 ms






On Saturday 30 November 2013 05:00 PM, Glen Mazza wrote:
> That's the version of the document I was referring to -- the latest 
> from SVN trunk -- we have a link to the same on our Roller home page.
>
> I work with Tomcat 7 w/5-1 SNAPSHOT on Ubuntu at home, and my upcoming 
> blog at http://web-gmazza.rhcloud.com/blog/ presently uses Tomcat 7 also.
>
> I would certainly remove roller-startup.log from your 
> roller-custom.properties file--the permission problem could be two 
> threads trying to write to that same file simultaneously due to your 
> configuration of it in that file.  roller-startup.log is the (usually 
> always empty) file created by Roller before it reads your 
> roller-custom.properties file (and uses the usual roller.log logging 
> file configured there), it's meant to record any errors that occur 
> before that beginning step only, so it's nonsensical to include it in 
> the config file.  (I'm not sure we really need roller-startup.log 
> anymore, if Roller fries before it even gets to the config file I 
> would think system logging should be the place for users to go.)
>
> Glen
>
>
> On 11/30/2013 06:10 AM, Gaurav wrote:
>> Hello,
>>
>> I have started the tomcat server with root user, and I think root 
>> have full permission to read/write anywhere in the system.
>> Also, Can you provide me the SVN link of the documentation, As the 
>> one I downloaded is lastest from SVN last updated in august for 
>> version 5.1.0 
>> (http://svn.apache.org/viewvc/roller/trunk/docs/roller-install-guide.odt?revision=1515262&view=co)
>>
>> Thanks
>> Gaurav
>>
>>
>> On Saturday 30 November 2013 04:34 PM, Glen Mazza wrote:
>>> Hi Gaurav, "java.io.FileNotFoundException: roller-startup.log 
>>> (Permission denied)" suggests the user running Tomcat on the server 
>>> doesn't have read/write permission to create "roller-startup.log".  
>>> That's the first file created by Roller upon app startup (it usually 
>>> remains empty, as subsequent logging goes to a logging file as 
>>> configured in your roller-custom.properties.)  I would try to run on 
>>> a Tomcat on your machine for which you have full read/write 
>>> permissions first.
>>>
>>> Incidentally, the latest install guide from SVN (in your docs folder 
>>> for the 5.1 download) will have full, updated instructions for 
>>> running on Tomcat, GlassFish and JBoss.
>>>
>>> Glen
>>>
>>> On 11/30/2013 05:54 AM, Gaurav wrote:
>>>> Hello,
>>>>
>>>> I have build the latest roller-5.1-SNAPSHOT successfully and have 
>>>> tried deploying it to tomcat7 and jetty.
>>>>
>>>> Before this also, during build of code I got some problem like we 
>>>> must have maven version more greater  than 3.0.5. After build I 
>>>> tried running on jetty server, but then again jetty gave error due 
>>>> to jdk version. As jdk 1.7 is needed for that. But still I was not 
>>>> able to successfully deploy on jetty as did not able to find and 
>>>> documentation for setting up of database and other things. jetty 
>>>> was successfully started but when I mount roller app it gave me 404.
>>>>
>>>> At last I switched to tomcat7, then again I have followed the 
>>>> roller installation guide for tomcat, but still having this error.
>>>>
>>>> I have added this line 
>>>> (*log4j.appender.roller-startup.File=/var/log/tomcat7/roller-startup.log*) 
>>>> in roller-custom.properties but still the same issue.
>>>>
>>>> Nov 30, 2013 4:13:42 PM org.apache.tomcat.jdbc.pool.ConnectionPool 
>>>> init
>>>> WARNING: maxIdle is smaller than minIdle, setting maxIdle to: 10
>>>> log4j:ERROR setFile(null,true) call failed.
>>>> java.io.FileNotFoundException: roller-startup.log (Permission denied)
>>>>     at java.io.FileOutputStream.openAppend(Native Method)
>>>>     at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
>>>>     at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
>>>>     at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
>>>>     at 
>>>> org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
>>>>     at 
>>>> org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
>>>>     at 
>>>> org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307) 
>>>>
>>>>     at 
>>>> org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
>>>>     at 
>>>> org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
>>>>     at 
>>>> org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
>>>>     at 
>>>> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
>>>>     at 
>>>> org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
>>>>     at 
>>>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
>>>>     at 
>>>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
>>>>     at 
>>>> org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
>>>>     at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
>>>>     at org.apache.log4j.Logger.getLogger(Logger.java:104)
>>>>     at 
>>>> org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283)
>>>>     at 
>>>> org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
>>>>     at 
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>     at 
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>     at 
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>     at 
>>>> org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
>>>>     at 
>>>> org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:782)
>>>>     at 
>>>> org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
>>>>     at 
>>>> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
>>>>     at 
>>>> org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
>>>>     at 
>>>> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
>>>>     at 
>>>> org.apache.roller.weblogger.ui.core.RollerSession.<clinit>(RollerSession.java:53)
>>>>     at 
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>     at 
>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>     at 
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>     at java.lang.Class.newInstance0(Class.java:355)
>>>>     at java.lang.Class.newInstance(Class.java:308)
>>>>     at 
>>>> org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:138)
>>>>     at 
>>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4854)
>>>>     at 
>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
>>>>     at 
>>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>>>     at 
>>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>>>     at 
>>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) 
>>>>
>>>>     at 
>>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>>>     at 
>>>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
>>>>     at 
>>>> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
>>>>     at 
>>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 
>>>>
>>>>     at 
>>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>>>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>>>     at 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>>     at 
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>>     at java.lang.Thread.run(Thread.java:662)
>>>> log4j:ERROR Either File or DatePattern options are not set for 
>>>> appender [roller-startup].
>>>> Roller Weblogger: Successfully loaded custom properties file from 
>>>> classpath
>>>> Nov 30, 2013 4:13:46 PM org.apache.catalina.core.StandardContext 
>>>> startInternal
>>>> SEVERE: Error listenerStart
>>>> Nov 30, 2013 4:13:46 PM org.apache.catalina.core.StandardContext 
>>>> startInternal
>>>> SEVERE: Context [/roller] startup failed due to previous errors
>>>> Nov 30, 2013 4:13:46 PM 
>>>> org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
>>>> SEVERE: The web application [/roller] appears to have started a 
>>>> thread named [MySQL Statement Cancellation Timer] but has failed to 
>>>> stop it. This is very likely to create a memory leak.
>>>> Nov 30, 2013 4:13:46 PM org.apache.catalina.startup.HostConfig 
>>>> deployDirectory
>>>> INFO: Deploying web application directory 
>>>> /var/lib/tomcat7/webapps/ROOT
>>>> Nov 30, 2013 4:13:46 PM org.apache.coyote.AbstractProtocol start
>>>> INFO: Starting ProtocolHandler ["http-bio-9080"]
>>>> Nov 30, 2013 4:13:46 PM org.apache.catalina.startup.Catalina start
>>>> INFO: Server startup in 17588 ms
>>>>
>>>> Please help, really spend full day till now on this.
>>>>
>>>
>>
>>
>
>


-- 
Regards,
*Gaurav Saini*
/Developer, Digital Marketing and Pursuing B.Tech/
/Viithiisys Technologies/
/Email: [email protected], [email protected]/
/Mobile: +91-9915346686/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.