Resetting the admin account?

Unable to log in to the admin account for some reason. Is there anyway to reset this login?

I assume since I'm using the default db I should be using the following.

I'm running on windows so in command prompt I go to /webapps/ROOT/WEB-INF/lib directory and ran java -cp server.jar;hsqldb.jar ChangePassword ]]>

I tried this and I get java is an unrecognized command. I only know enough java to compile and run a program.

0
12 comments

It seems java.exe is not in your PATH.

--
Pavel Sher

0
Avatar
Permanently deleted user

Yea, I remedied that problem and re-ran the command.

Got
"using TeamCity configuration directory path: C:/Documents and Settings/user/.BuildServer
exception in thread "main" java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver"

I copied the ChangePassword.java file posted from http://intellij.net/forums/thread.jspa?threadID=265749, to the ]]>/webapps/ROOT/WEB-INF/lib directory because it didn't exist. Am I missing a driver or what is not right?

0

There is no need to copy ChangePassword class, it is already included into the TeamCity distribution (it is in the server.jar)

Please check that you have hsqldb.jar in the ]]>/webapps/ROOT/WEB-INF/lib directory. If not then your installation was corrupted some how.

--
Pavel Sher

0
Avatar
Permanently deleted user

The hsqldb.jar file does exist.

Here is the command:

C:\Program Files\Java\jdk1.6.0_10\bin>java -cp E:\TeamCity\webapps\ROOT\WEB-INF\
lib\server.jar;hsqldb.jar ChangePassword user pass

Here is the extended error message.

Using TeamCity configuration directory path: C:/Documents and Settings/user/
.BuildServer
Exception in thread "main" java.lang.ClassNotFoundException: org.hsqldb.jdbcDriv
er
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at ChangePassword.main(ChangePassword.java:0)

Edited by: suedeuno on Nov 17, 2008 8:21 PM

Edited by: suedeuno on Nov 17, 2008 8:25 PM

0

This command should work:

java -cp E:\TeamCity\webapps\ROOT\WEB-INF\lib\server.jar;E:\TeamCity\webapps\ROOT\WEB-INF\lib\hsqldb.jar ChangePassword user pass

--
Pavel Sher

0
Avatar
Permanently deleted user

That command gives me this:

Exception in thread "main" java.sql.SQLException: Table not found in statement [
UPDATE users SET PASSWORD = ? WHERE USERNAME = ? AND REALM IS NULL]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.]]>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at ChangePassword.main(ChangePassword.java:22)

0
Avatar
Permanently deleted user

Any ideas? I'm hoping I don't have to reinstall TC.

0

This error means that one of the main tables "users" does not exist. Possible causes are:
- you have non standard place for .BuildServer directory (custom teamcity data directory) - in this case specify third parameter - teamcity data path
- you have empty database (are you sure you are using default HSQLDB database?)

--
Pavel Sher

0
Avatar
Permanently deleted user

I don't believe I changed anything from the default install.

The configuration directory path is C:/Documents and Settings/user/.BuildServer which should be default.

I didn't change anything for the database so that should be default too. How could I check?

0
Avatar
Permanently deleted user

It looks like this confirms the default db, from my buildserver.properties file:

#HSQL Database Engine 1.8.0.9
#Mon Nov 17 14:42:19 CST 2008
hsqldb.script_format=0
runtime.gc_interval=0
sql.enforce_strict_size=false
hsqldb.cache_size_scale=8
readonly=false
hsqldb.nio_data_file=true
hsqldb.cache_scale=14
version=1.8.0
hsqldb.default_table_type=memory
hsqldb.cache_file_scale=1
hsqldb.log_size=200
modified=yes
hsqldb.cache_version=1.7.0
hsqldb.original_version=1.8.0
hsqldb.compatible_version=1.8.0

0

Do you have some sensible data in your database? May I ask you to send your database (.BuildServer/system/buildserver.* files and version.dat) to teamcity-feedback at jetbrains.com?

--
Pavel Sher

0
Avatar
Permanently deleted user

I emailed the files. I didn't find a version.dat though.

0

Please sign in to leave a comment.