Moses / Update to V3 fails Follow
I stoped the Youtrack V2 service, installed V3, ran Moses and restarted the service. Unfortunately something failed, I get the execption below, when I try to access my Youtrack web server (see below). See at the very bottom for the messages that Moses spits out.
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.RuntimeException: Old format database exists and should be converted. Look at http://confluence.jetbrains.net/display/YTD3/Converting+Database+for+YouTrack+Upgrade for details. jetbrains.charisma.main.YouTrackInit.init(YouTrackInit.java:59) jetbrains.charisma.main.InitWebApplicationServiceLocatorListener.onAfterInit(InitWebApplicationServiceLocatorListener.java:14) jetbrains.springframework.configuration.runtime.ServiceLocator.fireLocalAfterInit(ServiceLocator.java:101) jetbrains.charisma.main.ServletImpl.init(ServletImpl.java:67) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) java.lang.Thread.run(Unknown Source)
C:\Users\Administrator\Downloads>"c:\Program Files (x86)\Java\jre6\bin\java.exe"
-jar moses.jar c:\teamsysdata
13:36:54,387 INFO [ClasspathXmlServiceLocator ] [main ] ----------
------------------------------
13:36:54,390 INFO [ClasspathXmlServiceLocator ] [main ] Init xml s
pring configuration with configs:
13:36:54,390 INFO [ClasspathXmlServiceLocator ] [main ] classp
ath*:com/jetbrains/teamsys/database/je/persistence/*Configuration.xml
13:36:54,390 INFO [ClasspathXmlServiceLocator ] [main ] classp
ath*:jetbrains/dnq/moses/BerkeleyToJet.xml
13:36:54,390 INFO [ClasspathXmlServiceLocator ] [main ] ----------
------------------------------
13:36:54,411 INFO [ClassPathXmlApplicationContext] [main ] Use patche
d resource pattern resolver.
13:36:54,442 INFO [ClassPathXmlApplicationContext] [main ] Refreshing
jetbrains.springframework.configuration.runtime.MyClassPathXmlApplicationContex
t@1dd7056: display name [jetbrains.springframework.configuration.runtime.MyClass
PathXmlApplicationContext@1dd7056]; startup date [Mon Jun 20 13:36:54 EDT 2011];
root of context hierarchy
13:36:54,557 INFO [XmlBeanDefinitionReader ] [main ] Loading XM
L bean definitions from URL [jar:file:/C:/Users/Administrator/Downloads/moses.ja
r!/com/jetbrains/teamsys/database/je/persistence/jePersistenceConfiguration.xml]
13:36:54,626 INFO [XmlBeanDefinitionReader ] [main ] Loading XM
L bean definitions from URL [jar:file:/C:/Users/Administrator/Downloads/moses.ja
r!/jetbrains/dnq/moses/BerkeleyToJet.xml]
13:36:54,637 INFO [XmlBeanDefinitionReader ] [main ] Loading XM
L bean definitions from URL [jar:file:/C:/Users/Administrator/Downloads/moses.ja
r!/jetbrains/dnq/moses/BerkeleyToJet.xml]
13:36:54,643 INFO [DefaultListableBeanFactory ] [main ] Overriding
bean definition for bean 'exodus': replacing [Generic bean: class [jetbrains.dn
q.moses.Moses]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0;
dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in
URL [jar:file:/C:/Users/Administrator/Downloads/moses.jar!/jetbrains/dnq/moses/
BerkeleyToJet.xml]] with [Generic bean: class [jetbrains.dnq.moses.Moses]; scope
=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; a
utowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=nu
ll; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Us
ers/Administrator/Downloads/moses.jar!/jetbrains/dnq/moses/BerkeleyToJet.xml]]
13:36:54,644 INFO [DefaultListableBeanFactory ] [main ] Overriding
bean definition for bean 'systemPropertiesConfigurer': replacing [Generic bean:
class [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyChec
k=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodN
ame=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:
/C:/Users/Administrator/Downloads/moses.jar!/jetbrains/dnq/moses/BerkeleyToJet.x
ml]] with [Generic bean: class [org.springframework.beans.factory.config.Propert
yPlaceholderConfigurer]; scope=singleton; abstract=false; lazyInit=false; autowi
reMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanN
ame=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; d
efined in URL [jar:file:/C:/Users/Administrator/Downloads/moses.jar!/jetbrains/d
nq/moses/BerkeleyToJet.xml]]
13:36:54,644 INFO [ClassPathXmlApplicationContext] [main ] Bean facto
ry for application context [jetbrains.springframework.configuration.runtime.MyCl
assPathXmlApplicationContext@1dd7056]: org.springframework.beans.factory.support
.DefaultListableBeanFactory@1749757
13:36:54,722 INFO [DefaultListableBeanFactory ] [main ] Pre-instan
tiating singletons in org.springframework.beans.factory.support.DefaultListableB
eanFactory@1749757: defining beans [persistentEnvironmentConfig,textIndexEnviron
mentConfig,exodus,systemPropertiesConfigurer]; root of factory hierarchy
13:36:55,151 INFO [JEDataEnvironment ] [main ] BerkeleyDB
environment created: C:\Users\Administrator\teamsysdata
13:36:55,284 INFO [Environment ] [main ] Exodus env
ironment created: C:\Users\Administrator\teamsysdata
13:36:55,285 INFO [ServiceLocator ] [main ] ServiceLoc
atorListeners initialization order:
13:36:55,359 INFO [JEDataEnvironment ] [main ] BerkeleyDB
environment created: c:\teamsysdata
13:36:55,449 INFO [Environment ] [main ] Exodus env
ironment created: c:\teamsysdata
13:36:55,449 INFO [Moses ] [main ] Start blob
s copy
13:36:55,449 INFO [Moses ] [main ] Finished b
lobs copy
13:36:55,514 INFO [Moses ] [main ] Store sequ
ences
Exception in thread "main" java.lang.IllegalArgumentException: Key must be great
er
at jetbrains.exodus.tree.btree.BottomPageMutable.putRight(BottomPageMuta
ble.java:97)
at jetbrains.exodus.tree.btree.BTreeMutable.putRight(BTreeMutable.java:1
06)
at jetbrains.exodus.env.Store.putRight(Store.java:100)
at jetbrains.dnq.moses.Moses.copyStores(Moses.java:76)
at jetbrains.dnq.moses.Moses.main(Moses.java:173)
13:36:55,557 INFO [ClassPathXmlApplicationContext] [Thread-2 ] Closing je
tbrains.springframework.configuration.runtime.MyClassPathXmlApplicationContext@1
dd7056: display name [jetbrains.springframework.configuration.runtime.MyClassPat
hXmlApplicationContext@1dd7056]; startup date [Mon Jun 20 13:36:54 EDT 2011]; ro
ot of context hierarchy
Please sign in to leave a comment.
Please mail to youtrack-feedback@jetbrains.com to discuss how can we access
your database.
--
Best regards,
Vyacheslav Lukianov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Try to erasing all *.xd files in C:\Users\Administrator\teamsysdata (or any youtrack database folder you have) and re-runinning moses.
Thanks, that fixed it for me!
I tried the same thing. The moses conversion fails with every method possible.
No matter which method I try I get the same error as before. It just won't convert correctly no matter what I do.
It gets worse than that. Much worse. I tried to roll back to YouTrack 2.2, recovered my teamsys data directory. Now all my data is gone. All the project and users disappeared completely. The backup is worthless!!
So I found what the problem was. The YouTrack installer does not behave as documented. The Windows service that it installs logs in under the system account, not the user account. Even if the service was previously configured to run under the user account, after installl, the new service runs under the system account. This means that the location of teamsys data under the user home directory becomes irrelevant. This is why after the install I saw no data, and any operations that I did with moses.jar on the teamsysdata directory under the usert accounts had no effect, because it was no longer looking at that directory at all.
The procedure I had to do to get rid of the problem was:
I have to say, that while YouTrack works great once you get it installed. The installation on Windows was always a nightmare from version 1.0 till now. There are always problems and you have to figure out these things pretty much by yourself because the documentation is simply wrong.
We will check our documentation, thank you. Also, feel free to vote to issue about preserving user settings in windows service: http://youtrack.jetbrains.net/issue/JT-10331
Just FYI. After some problems with rights, solved by chown -R youtrack:youtrack youtrack/, there were still problem with java -jar moses.jar on teamsysdata. I found that in teamsysdata/textindex some *.xd and xd* files after unsuccessful conversion remains. Seems such files must be also removed before successful conversion.
You can remove whole /textindex folder before convertation.
Text index will be rebuilt.
Sergey.