[Logo] Serotonin Software Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
updating database on *NIX  XML
Forum Index » Mango installation
Author Message
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

Hi,

today I tried to update mango from 1.7.0 to 1.8.2. All I got is a errormessage permission denied in localhost.log:

01.05.2010 22:14:18 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
01.05.2010 22:14:23 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class com.serotonin.mango.MangoContextListener
com.serotonin.ShouldNeverHappenException: java.io.FileNotFoundException: Upgrade1_8_0.log (Permission denied)
at com.serotonin.mango.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:87)
at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:135)
at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:259)
at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:89)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:49
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: Upgrade1_8_0.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at com.serotonin.mango.db.upgrade.Upgrade1_8_0.upgrade(Upgrade1_8_0.java:29)
at com.serotonin.mango.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:82)
... 27 more
01.05.2010 22:14:23 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext


can you prefix it with "${catalania.base}/logs/"?
I dont know if this fixes the problem.

Arne
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1454
Offline

I believe the upgrade log gets written to whatever directory Tomcat was started in. I could change this, but it would be a future release. In the meantime, either start from another directory, or provide permissions to the current one.

Best regards,
Matthew Lohbihler
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

For now its OK,

I have some patches, but replacement of ${property} is missing.

Arne
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

Here it is:



and in DBUpgrade add



it uses org.apache.log4j.helpers.OptionConverter.substVars to replace any ${property} with the system.Properties!

Feel free to modify it to fit your needs.

Arne
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

Oh,

add the line db.update.log.dir=${catalina.base}/logs/ to env.properties ;-)

Arne

mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1454
Offline

Does this work for you?



(The "replaceMacros" does the same thing as the log4j method you called.)

Best regards,
Matthew Lohbihler
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

Sorry answering so late,

it looks that the forum does not sent messages on a topic that I created (The alternative getting the message twice or thrice ;_))

Which StringUtils do you mean? (seroutils has Strinutils but the params mismatch)

Arne
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1454
Offline

SeroUtils was updated to support. The update will be in the next release. What i meant was that if you wanted to test you could always replace the code with the log4j version.

Best regards,
Matthew Lohbihler
apl

Initiate

Joined: 08/05/2009 13:22:03
Messages: 175
Offline

Your code with apache works

So I consider this bug is closed.

Arne
 
Forum Index » Mango installation
Go to:   
Powered by JForum 2.1.9 © JForum Team