Skip to main content
12-Amethyst
April 10, 2014
Question

Method Server crashes after Rehosting on WC start as error Invalid object name 'Repository'

  • April 10, 2014
  • 12 replies
  • 4395 views

Hi Everybody,

I have an issue to start the MS on the target server after Rehosting is completed.

Please help to resolve. Attached the MS lo

Source and Target Server Environment :

WC : 10.1 M030

OS : Windows 2008 R2

SQL Server 2008 R2

Steps followed :

1) Export the LDAP manually.

2) Imported the source LDAP successfully to Target.

3) Database backed up via SQL server Management Studio.

4) Restored the database successfully.

5) Run the ant file –

ant "-Dtarget-ldap=ldap://cn=manager:xxxx/" -Dtarget-domain=xxxx

6) Modified the db.properties appropriately.

7) Started the Windchill as service.

Fails to start with Method server failure with the below error message :

wt.services.ManagerException: Could not initialize Auditing service.

Nested exception is: wt.ufid.UfidException: A persistence error occurred.

Nested exception is: (wt.pom.pomResource/0) wt.pom.PersistenceException: A persistence error occurred. System message follows:

Nested exception is: wt.pom.DatastoreException: A SQL error has occurred for the statement "SELECT 'wt.ufid.Repository',A0.displayName,A0.guid,A0.lastKnownDomain,A0.local,CONVERT(varchar,A0.createStampA2,120),A0.markForDeleteA2,CONVERT(varchar,A0.modifyStampA2,120),A0.idA2A2,A0.updateCountA2,CONVERT(varchar,A0.updateStampA2,120) FROM Repository A0 WHERE ((A0.guid = ?)) AND (A0.markForDeleteA2 = 0); Bind Parameters=[Ldap.mm.local]". Database system message follows:

Nested exception is: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'Repository'.

12 replies

1-Visitor
April 10, 2014

Hello,

Change the hostname setting in wt.proprties ->

java.rmi.server.hostname=mmiplpdmtest01.mm.local

in

java.rmi.server.hostname=hostname of your site (example : pdm.world.com)

Regards

Pascal

taruchamy12-AmethystAuthor
12-Amethyst
April 11, 2014

Hi Pascal,

Thanks for the reply.

Though I did not mention in the steps, java.rmi.server.hostname was already set 😞 to the target machine.

Thanks

Murthi

13-Aquamarine
April 10, 2014

On startup, Windchill is connecting to the DB and is trying to query the Repository table. But SQL Server is saying that it doesn't know of any table with this name. Log into this Database through the SQL Server Management Studio and try running the query:

SELECT * FROM Repository;

If this returns the same 'Invalid object name' error message, then something must have gone wrong when importing the DB on the target system. If this query does successfully return entries, then check the DB related settings in db.properties.

1-Visitor
April 10, 2014

During rehost after schema import, I run following in database. Check if it helps you.

update repository set lastknowndomain='<TagetServerName>' where local=1;

taruchamy12-AmethystAuthor
12-Amethyst
April 11, 2014

Hi Yogesh,

Thanks for the reply.

The value of LastKnown Domain was updated already as the target machine.

Still the issue exists ...

Thanks

Murthi

1-Visitor
April 11, 2014

I think there is a problem with the import of the Database or the schema used. Invalid object name means that the database user can't access the repository table.

As a simple test try to query the table repository with your credentials.

taruchamy12-AmethystAuthor
12-Amethyst
April 11, 2014

Hi Herbert,

Thanks for the reply.

As I mentioned above, I was able to connect to the database via SQL Management studio and I can access and query the specific table info. with the same user I mentioned in the db.properties.

Thanks

Murthi

1-Visitor
April 11, 2014

Maybe there is an issue with the default schema:http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5e760744-442b-44c7-8116-77136e12a898/error-invalid-object-name-tablename-but-the-tables-exist-in-the-database?forum=sqlgetstarted

Sorry i'm not familiar with sql server and don't know the settings in windchill