Tuesday, August 24, 2010

MS SQL Server Backup and Restore -Aha

Recently i took a the backup on an instance of MS SQL Server and restored to another instance of the MS SQL Server.  After that i started getting this error when i tried to login to that machine from a remote machine (using SQL Server Management Studio Express and also via JDBC). Then i got the error:  Microsoft SQL Error: 4064

This error is thrown in many cases, this being one. In this case i got the error as the signature of the database tables did not match.

To fix it i ran the below command on the machine that has the SQL Server installed:-
EXEC sp_change_users_login 'Auto_Fix', 'user-name'

The user-name is the name of all the users you are using to connect.

That worked for me. Let me know if this helps you.

Friday, August 13, 2010

VMware ThinApp: Build Failed

I recently installed VMware ThinApp. While using the ThinApp SetupCapture application to capture the installation of applications, i faced Build Errors Couple of time. If  anyone gets Build errors, they should try either of the option below:-

1) Turn off any anti-virus protection, especially the one's as Symantic Endpoint.
2) The destination path of the build folder should be a simple path like c:\thinkapp
     If it is nested in too many layers of windows , i.e. in  c:\.......\documentsSettings\Desktop...etc

I did the above two changes and was successfully able to build thin apps.

Thursday, August 12, 2010

JBoss server stops intermittently!

No need to worry, if anyone sees the below message in JBoss log :


18:13:24,579 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
18:13:25,614 INFO  [Http11Protocol] Pausing Coyote HTTP/1.1 on http-
18:13:25,617 INFO  [Http11Protocol] Stopping Coyote HTTP/1.1 on http-
18:13:25,619 INFO  [AjpProtocol] Pausing Coyote AJP/1.3 on ajp-
18:13:25,622 INFO  [AjpProtocol] Stopping Coyote AJP/1.3 on ajp-
18:13:25,625 INFO  [Http11Protocol] Pausing Coyote HTTP/1.1 on http-
18:13:25,625 INFO  [Http11Protocol] Stopping Coyote HTTP/1.1 on http-
18:13:25,725 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@8b8da6 undeployed
18:13:25,727 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@a2b3b8 undeployed
18:13:25,729 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@17feece undeployed
18:13:25,783 INFO  [TomcatDeployment] undeploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
18:13:26,135 INFO  [QueueService] Queue[/queue/ExpiryQueue] stopped
18:13:26,137 INFO  [QueueService] Queue[/queue/DLQ] stopped
18:13:26,188 INFO  [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED shutting down.
18:13:26,188 INFO  [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED paused.
18:13:26,189 INFO  [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED shutdown complete.
18:13:26,196 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' from JNDI name 'java:JmsXA'
18:13:26,246 INFO  [ServerPeer] JMS ServerPeer[0] stopped
18:13:26,263 INFO  [TomcatDeployment] undeploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
18:13:26,362 INFO  [TomcatDeployment] undeploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
18:13:26,365 INFO  [TomcatDeployment] undeploy, ctxPath=/, vfsUrl=ROOT.war
18:13:26,368 INFO  [TomcatDeployment] undeploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
18:13:26,385 INFO  [TomcatDeployment] undeploy, ctxPath=/px_etobto, vfsUrl=px_etobto.war
18:13:26,493 INFO  [StandardService] Stopping service jboss.web
18:13:27,003 INFO  [MailService] Mail service 'java:/Mail' removed from JNDI
18:13:27,214 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' from JNDI name 'java:DefaultDS'
18:13:27,215 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MSSQLDS' from JNDI name 'java:MSSQLDS'
18:13:27,445 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
18:13:27,445 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
18:13:27,458 INFO  [SimpleThreadPool] There are still 28 worker threads active. See javadoc runInThread(Runnable) for a possible explanation
18:13:27,458 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
18:13:28,653 INFO  [TransactionManagerService] Stopping transaction recovery manager
18:13:29,021 INFO  [HypersonicDatabase] Database standalone closed clean
18:13:40,348 INFO  [ServerImpl] Shutdown complete
Shutdown complete
Halting VM


This is not neccesarily a JBoss bug.
Look at the first line, it says: Runtime shutdown hook called, forceHalt: true.

Most probably in your java code , you have a System.exit.
Search for that and fix it.

Let me know if it helps.