Moses / Update to V3 fails

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

9 comments
Comment actions Permalink

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!"

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/ConvertingDatabasefor+Y

ouTrack+Upgrade for details.

     jetbrains.charisma.main.YouTrackInit.ini

t(YouTrackInit.java:59)

     jetbrains.charisma.main.InitWebApplicati

onServiceLocatorListener.onAfterInit(InitWebApplicationServiceLocatorL

istener.java:14)

     jetbrains.springframework.configuration.

runtime.ServiceLocator.fireLocalAfterInit(ServiceLocator.java:101)

     jetbrains.charisma.main.ServletImpl.init

(ServletImpl.java:67)

     javax.servlet.GenericServlet.init(Generi

cServlet.java:212)

     org.apache.catalina.valves.ErrorReportVa

lve.invoke(ErrorReportValve.java:102)

     org.apache.catalina.connector.CoyoteAdap

ter.service(CoyoteAdapter.java:298)

     org.apache.coyote.http11.Http11AprProces

sor.process(Http11AprProcessor.java:859)

     org.apache.coyote.http11.Http11AprProtoc

ol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)

     org.apache.tomcat.util.net.AprEndpoint$W

orker.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 

----------

------------------------------

13:36:54,390 INFO 

Init xml s

pring configuration with configs:

13:36:54,390 INFO 

classp

ath:com/jetbrains/teamsys/database/je/persistence/Configuration.xml

13:36:54,390 INFO 

classp

ath*:jetbrains/dnq/moses/BerkeleyToJet.xml

13:36:54,390 INFO 

----------

------------------------------

13:36:54,411 INFO 

Use patche

d resource pattern resolver.

13:36:54,442 INFO 

Refreshing

jetbrains.springframework.configuration.runtime.MyClassPathXmlApplica

tionContex

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 

Loading XM

L bean definitions from URL

[jar:file:/C:/Users/Administrator/Downloads/moses.ja

r!/com/jetbrains/teamsys/database/je/persistence/jePersistenceConfigur

ation.xml]

13:36:54,626 INFO 

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 

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 

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/m

oses/

BerkeleyToJet.xml]] with [Generic bean: class

; 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/BerkeleyToJ

et.xml]]

13:36:54,644 INFO 

Overriding

bean definition for bean 'systemPropertiesConfigurer': replacing

[Generic bean:

class

[org.springframework.beans.factory.config.PropertyPlaceholderConfigure

r];

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/Berke

leyToJet.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 

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 

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 

BerkeleyDB

environment created: C:\Users\Administrator\teamsysdata

13:36:55,284 INFO 

Exodus env

ironment created: C:\Users\Administrator\teamsysdata

13:36:55,285 INFO 

ServiceLoc

atorListeners initialization order:

13:36:55,359 INFO 

BerkeleyDB

environment created: c:\teamsysdata

13:36:55,449 INFO 

Exodus env

ironment created: c:\teamsysdata

13:36:55,449 INFO 

Start blob

s copy

13:36:55,449 INFO 

Finished b

lobs copy

13:36:55,514 INFO 

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 

Closing je

tbrains.springframework.configuration.runtime.MyClassPathXmlApplicatio

nContext@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

---

Original message URL:

http://devnet.jetbrains.net/message/5306883#5306883

0
Comment actions Permalink

Try to erasing all *.xd files in C:\Users\Administrator\teamsysdata (or any youtrack database folder you have) and re-runinning moses.

0
Comment actions Permalink

Thanks, that fixed it for me!

0
Comment actions Permalink

I tried the same thing. The moses conversion fails with every method possible.

  • Tried in-place conversion (multiple times)
  • Tried recovering from backup and trying in-place conversion
  • Tried making a copy of teamsysdata to another directory and then tryign to run moses with source/destination as specified

No matter which method I try I get the same error as before. It just won't convert correctly no matter what I do.

0
Comment actions Permalink

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!!

0
Comment actions Permalink

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:

  1. uninstall
  2. recover teamsysdata from backup (in the user account home dir)
  3. install YouTrack 2.2
    1. When prompted to start the service, uncheck the checkbox (do not start the service)
  4. go to windows services and change the YouTrack web server service to run under the user account (it installs under the system user) and then manually start the service
  5. login to verify that my old data was infact there (finally! after lots of frustration)
  6. stop the YouTrack service
  7. run moses.jar on the teamsys data directory
  8. run the YouTrack 3.0 installer
    1. Again, when prompted to start the service, uncheck the checkbox
  9. Manually edit the service again to have it login as the user rather than the local system account
  10. Start the service
  11. login to YouTrack to verify that it's OK
  12. Put in the new license code that was sent by email

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.

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

You can remove whole /textindex folder before convertation.

Text index will be rebuilt.

Sergey.

0

Please sign in to leave a comment.