Showing posts with label Troubleshoot. Show all posts
Showing posts with label Troubleshoot. Show all posts

Thursday, December 1, 2011

Solution for View Source menu opening Desktop

Problem

Out IT team had do downgrade Internet Explorer on one of the system from IE8 to IE6.

Strange things began to happen after that. One frustrating issue was with clicking on the View -> Source menu in Internet Explorer 6. Instead of opening the page source in notepad, it was opening a new explorer view and showing the Desktop!!!

Googling didn't help - there were plenty of people with the same problem but no solution.

Thankfully, I knew it was a registry corruption issue and was able to identify the fix indirectly from some sites.

Actual Fix
  1. Open regedit.
  2. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer.
  3. Here, there should be a key called "View Source". Simply delete this key (if you feel unsafe, you can backup just this key before deletion).
  4. Restart your internet explorer and the problem is solved!

Actual Cause
In HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer, IE 7 and 8 has a key called "View Source". This contents of this key is used to define which Editor will open when you select View Source from the menu. Unfortunately, when IE 7 or IE 8 gets rolled back to IE6, the contents of the "View Source" key is deleted from registry but not the key itself.
So when IE6 starts, it finds the key and incorrectly expects the editor settings there.
Deleting the "View Source" registry key causes IE to use notepad.exe to display the source by default!

Tuesday, July 14, 2009

Error in Tolven RC1 configPhase3 - ORA-00932

Running configPhase3.bat of Tolven RC1 (with Windows-OpenLdap/Oracle10g/Jboss) was causing errors.

The command prompt showed:
C:\tolven\tolven-RC1\bin>configPhase3.bat
0 [main] INFO root - Start log4j - Configuration: file:/C:/tolven/tolven-RC1/bi
n/tolven-log4j.xml, logFileName: C:\tolven\tolven-RC1\log\tolven.log
18:29:07,570 INFO [TPFBoot] Loaded configDir C:\tolven\tolven-config
18:29:07,695 INFO [TPFBoot] Generated boot.properties: C:\DOCUME~1\sachin\LOC
ALS~1\Temp\tpf_7376485784350116145_boot.properties
18:29:07,757 INFO [TolvenApplicationInitializer] logging system initialized
18:29:07,757 INFO [TolvenApplicationInitializer] application root is C:\tolven\
tolven-RC1\bin
18:29:08,023 INFO [PluginRegistryImpl] configured, stopOnError=true, isValidati
ng=false
18:29:08,132 INFO [ShadingPathResolver] configured, shadow folder is C:\tolven\
tolven-config\build\temp\.jpf-shadow
18:29:08,757 INFO [PluginRegistryImpl] plug-in and fragment descriptors registe
red - 117
18:29:08,804 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.library.jasperreports-0.0.1.zip has
been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/o
rg.tolven.library.jasperreports-0.0.1.zip for {PluginFragment: uid=org.tolven.li
brary.jasperreports@0.0.1} with key org.tolven.library.jasperreports
18:29:08,804 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.assembler.jboss.oracle-0.0.1.zip has
been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/
org.tolven.assembler.jboss.oracle-0.0.1.zip for {PluginFragment: uid=org.tolven.
assembler.jboss.oracle@0.0.1} with key org.tolven.assembler.jboss.oracle
18:29:08,804 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.library.jboss-0.0.1.zip has been rep
laced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/org.tolve
n.library.jboss-0.0.1.zip for {PluginFragment: uid=org.tolven.library.jboss@0.0.
1} with key org.tolven.library.jboss
18:29:08,804 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.assembler.jboss-0.0.2.zip has been r
eplaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/org.tol
ven.assembler.jboss-0.0.2.zip for {PluginFragment: uid=org.tolven.assembler.jbos
s@0.0.1} with key org.tolven.assembler.jboss
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.deploy.source-0.0.2.zip has been rep
laced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/org.tolve
n.deploy.source-0.0.2.zip for {PluginFragment: uid=org.tolven.deploy.source@0.0.
1} with key org.tolven.deploy.source
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.assembler.oracle.persistencexml-0.0.
1.zip has been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime
/plugins/org.tolven.assembler.oracle.persistencexml-0.0.1.zip for {PluginFragmen
t: uid=org.tolven.assembler.oracle.persistencexml@0.0.1} with key org.tolven.ass
embler.oracle.persistencexml
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.component.oracle.init-0.0.1.zip has
been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/o
rg.tolven.component.oracle.init-0.0.1.zip for {PluginFragment: uid=org.tolven.co
mponent.oracle.init@0.0.1} with key org.tolven.component.oracle.init
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.deploy.jboss-0.0.3.zip has been repl
aced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/org.tolven
.deploy.jboss-0.0.3.zip for {PluginFragment: uid=org.tolven.deploy.jboss@0.0.1}
with key org.tolven.deploy.jboss
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.component.application.oracle.indexes
-0.0.1.zip has been replaced with new file:/C:/tolven/tolven-config/repositoryRu
ntime/plugins/org.tolven.component.application.oracle.indexes-0.0.1.zip for {Plu
ginFragment: uid=org.tolven.component.application.oracle.indexes@0.0.1} with key
org.tolven.component.application.oracle.indexes
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.assembler.oracle.orm-0.0.1.zip has b
een replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/or
g.tolven.assembler.oracle.orm-0.0.1.zip for {PluginFragment: uid=org.tolven.asse
mbler.oracle.orm@0.0.1} with key org.tolven.assembler.oracle.orm
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.component.application.jboss-0.0.1.zi
p has been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plu
gins/org.tolven.component.application.jboss-0.0.1.zip for {PluginFragment: uid=o
rg.tolven.component.application.jboss@0.0.1} with key org.tolven.component.appli
cation.jboss
18:29:08,820 WARN [ShadingPathResolver] old context URL file:/C:/tolven/tolven-
config/repositoryRuntime/plugins/org.tolven.deploy.pluginframework-0.0.1.zip has
been replaced with new file:/C:/tolven/tolven-config/repositoryRuntime/plugins/
org.tolven.deploy.pluginframework-0.0.1.zip for {PluginFragment: uid=org.tolven.
deploy.pluginframework@0.0.1} with key org.tolven.deploy.pluginframework
18:29:08,929 INFO [TolvenApplicationInitializer] integrity check done: errors -
0, warnings - 0
18:29:08,929 INFO [TolvenApplicationInitializer] application plug-in is org.tol
ven.command
18:29:08,929 INFO [StandardPluginManager] plug-in started - org.tolven.library.
pluginframework@0.0.1 (active/total: 1 of 105)
18:29:08,929 INFO [StandardPluginManager] plug-in started - org.tolven.library.
serverconfig@0.0.2 (active/total: 2 of 105)
18:29:08,945 INFO [StandardPluginManager] plug-in started - org.tolven.command@
0.0.3 (active/total: 3 of 105)
18:29:08,945 INFO [StandardPluginManager] plug-in started - org.tolven.config.d
atabase@0.0.1 (active/total: 4 of 105)
18:29:08,960 INFO [StandardPluginManager] plug-in started - org.tolven.library.
bouncy-castle@0.0.1 (active/total: 5 of 105)
18:29:08,960 INFO [StandardPluginManager] plug-in started - org.tolven.config.l
dap@0.0.1 (active/total: 6 of 105)
18:29:08,976 INFO [AdminAssembler] *** start ***
18:29:09,179 INFO [AdminAssembler] tmpDir - c:\tolven\tolven-config\build\repos
itoryTmp
18:29:09,179 INFO [AdminAssembler] stageDir - c:\tolven\tolven-config\build\rep
ositoryStage
18:29:09,179 INFO [AdminAssembler] devLib - c:\tolven\tolven-config\devLib
18:29:09,195 INFO [AdminAssembler] Admin keystore: c:\tolven\tolven-config\cred
entials\admin\tolvendev-admin.jks
18:29:09,195 INFO [AdminAssembler] Admin truststore: c:\tolven\tolven-config\cr
edentials\admin\tolvendev-admin-cacerts.jks
18:29:09,210 INFO [AdminAssembler] Admin secretkey: c:\tolven\tolven-config\cre
dentials\admin\admin-encryptedSecretKey
18:29:09,210 INFO [AdminAssembler] Admin password store: c:\tolven\tolven-confi
g\credentials\admin\admin-password.cfg
18:29:09,804 INFO [AdminAssembler] LDAP key: c:\tolven\tolven-config\credential
s\ldap\tolvendev-ldap-key.pem
18:29:09,804 INFO [AdminAssembler] LDAP certificate: c:\tolven\tolven-config\cr
edentials\ldap\tolvendev-ldap-cert.pem
18:29:09,804 INFO [AdminAssembler] LDAP truststore: c:\tolven\tolven-config\cre
dentials\ldap\tolvendev-ldap-cacerts.pem
18:29:09,804 INFO [AdminAssembler] LDAPClient key: c:\tolven\tolven-config\cred
entials\ldapclient\tolvendev-ldapclient-key.pem
18:29:09,820 INFO [AdminAssembler] Database keystore: c:\tolven\tolven-config\c
redentials\oracle\tolvendev-oracle.jks
18:29:09,820 INFO [AdminAssembler] Database truststore: c:\tolven\tolven-config
\credentials\oracle\root.crt
18:29:09,835 INFO [AdminAssembler] DatabaseClient key: c:\tolven\tolven-config\
credentials\pgadmin\postgresql.key
18:29:09,835 INFO [AdminAssembler] DatabaseClient certificate: c:\tolven\tolven
-config\credentials\pgadmin\postgresql.crt
18:29:09,851 INFO [AdminAssembler] AppServer keystore: c:\tolven\tolven-config\
credentials\jboss\tolvendev-jboss.jks
18:29:09,851 INFO [AdminAssembler] AppServer truststore: c:\tolven\tolven-confi
g\credentials\jboss\tolvendev-jboss-cacerts.jks
18:29:09,851 INFO [AdminAssembler] MDBUser key: c:\tolven\tolven-config\credent
ials\mdbuser\tolvendev-mdbuser-key.pem
18:29:09,867 INFO [AdminAssembler] MDBUser certificate: c:\tolven\tolven-config
\credentials\mdbuser\tolvendev-mdbuser-cert.pem
18:29:09,867 INFO [AdminAssembler] MDBUser keystore: c:\tolven\tolven-config\cr
edentials\mdbuser\tolvendev-mdbuser.p12
18:29:10,164 INFO [TolvenConfigWrapper] Load JSSE keystore for admin
18:29:10,164 INFO [TolvenConfigWrapper] Load JSSE truststore for admin
18:29:10,164 INFO [AdminAssembler] *** end ***
18:29:10,164 INFO [StandardPluginManager] plug-in started - org.tolven.assemble
r.admin@0.0.4 (active/total: 7 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
jasperreports@0.0.1 (active/total: 8 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
remoteclient@0.0.1 (active/total: 9 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
jboss@0.0.1 (active/total: 10 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
tolvenclient@0.0.2 (active/total: 11 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
javaee@0.0.1 (active/total: 12 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.library.
jdbcdriver@0.0.1 (active/total: 13 of 105)
18:29:10,179 INFO [StandardPluginManager] plug-in started - org.tolven.componen
t.application.jboss@0.0.1 (active/total: 14 of 105)
18:29:10,195 INFO [StandardPluginManager] plug-in started - org.tolven.library.
application@0.0.1 (active/total: 15 of 105)
18:29:10,257 INFO [Application] *** start ***
18:29:10,273 INFO [Application] Starting for user: admin to jnp://localhost:109
9
18:29:10,429 INFO [Application] Update MDBUser mdbuser
18:29:10,429 INFO [TolvenClient] jndi: java.naming.provider.url=jnp://localhost
:1099
18:29:10,429 INFO [TolvenClient] jndi: java.naming.factory.initial=org.jboss.na
ming.NamingContextFactory
18:29:10,429 INFO [TolvenClient] jndi: java.naming.factory.url.pkgs=org.jboss.n
aming:org.jnp.interfaces
18:29:11,523 INFO [LoadMDBUsers] Rolling back transaction : load mdbuser for: a
dmin
Application start failed.
org.java.plugin.PluginLifecycleException: can't start plug-in org.tolven.compone
nt.application@0.0.1
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:415)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:245)
at org.tolven.command.TolvenApplication.startRequiredPlugins(TolvenAppli
cation.java:87)
at org.tolven.command.TolvenApplication.startApplication(TolvenApplicati
on.java:56)
at org.java.plugin.boot.Boot.boot(Boot.java:346)
at org.java.plugin.boot.Boot.main(Boot.java:243)
at org.tolven.plugin.boot.TPFBoot.main(TPFBoot.java:102)
Caused by: java.lang.RuntimeException: Could not load mdbuser for: admin
at org.tolven.client.load.LoadMDBUsers.updateMDBUser(LoadMDBUsers.java:3
0)
at org.tolven.component.application.Application.updateMDBUser(Applicatio
n.java:152)
at org.tolven.component.application.Application.doStart(Application.java
:123)
at org.java.plugin.Plugin.start(Plugin.java:82)
at org.java.plugin.PluginManager.startPlugin(PluginManager.java:325)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:407)
... 6 more
Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.
SQLGrammarException: could not execute query
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)

at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
erceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(Stateles
sInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(R
oleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(Role
BasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
ationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
enticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
usInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessCo
ntainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
otingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(Se
rverThread.java:573)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.j
ava:373)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.jav
a:166)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGr
ammarException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException
(AbstractEntityManagerImpl.java:629)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
at org.tolven.security.bean.LoginBean.findUser(LoginBean.java:73)
at org.tolven.security.bean.LoginBean.createOrUpdateUser(LoginBean.java:
314)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
ntextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Int
erceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invok
e(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsI
nterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
erceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(Stateles
sInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(R
oleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(Role
BasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
ationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
enticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
usInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessCo
ntainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
otingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(Se
rverThread.java:573)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.j
ava:373)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.jav
a:166)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI
nvoker.java:163)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
eInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPr
opagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
lientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.
java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteP
roxy.java:107)
at $Proxy19.createOrUpdateUser(Unknown Source)
at org.tolven.client.load.LoadMDBUsers.updateMDBUser(LoadMDBUsers.java:2
5)
at org.tolven.component.application.Application.updateMDBUser(Applicatio
n.java:152)
at org.tolven.component.application.Application.doStart(Application.java
:123)
at org.java.plugin.Plugin.start(Plugin.java:82)
at org.java.plugin.PluginManager.startPlugin(PluginManager.java:325)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:407)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:245)
at org.tolven.command.TolvenApplication.startRequiredPlugins(TolvenAppli
cation.java:87)
at org.tolven.command.TolvenApplication.startApplication(TolvenApplicati
on.java:56)
at org.java.plugin.boot.Boot.boot(Boot.java:346)
at org.java.plugin.boot.Boot.main(Boot.java:243)
at org.tolven.plugin.boot.TPFBoot.main(TPFBoot.java:102)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
eInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPr
opagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
lientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.
java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteP
roxy.java:107)
at $Proxy19.createOrUpdateUser(Unknown Source)
at org.tolven.client.load.LoadMDBUsers.updateMDBUser(LoadMDBUsers.java:2
5)
at org.tolven.component.application.Application.updateMDBUser(Applicatio
n.java:152)
at org.tolven.component.application.Application.doStart(Application.java
:123)
at org.java.plugin.Plugin.start(Plugin.java:82)
at org.java.plugin.PluginManager.startPlugin(PluginManager.java:325)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:407)
at org.java.plugin.standard.StandardPluginManager.activatePlugin(Standar
dPluginManager.java:245)
at org.tolven.command.TolvenApplication.startRequiredPlugins(TolvenAppli
cation.java:87)
at org.tolven.command.TolvenApplication.startApplication(TolvenApplicati
on.java:56)
at org.java.plugin.boot.Boot.boot(Boot.java:346)
at org.java.plugin.boot.Boot.main(Boot.java:243)
at org.tolven.plugin.boot.TPFBoot.main(TPFBoot.java:102)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2223)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
va:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
at org.tolven.security.bean.LoginBean.findUser(LoginBean.java:73)
at org.tolven.security.bean.LoginBean.createOrUpdateUser(LoginBean.java:
314)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationCo
ntextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Int
erceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invok
e(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsI
nterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
erceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(Stateles
sInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(R
oleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(Role
BasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
ationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
enticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
usInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessCo
ntainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
otingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(Se
rverThread.java:573)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.j
ava:373)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.jav
a:166)
Caused by: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected -
got BLOB

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPrepare
dStatement.java:810)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStateme
nt.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPrepa
redStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:3384)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery
(WrappedPreparedStatement.java:236)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:
186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
... 46 more
Press any key to continue . . .


And the JBoss Server logs showed:
2009-07-07 18:29:11,398 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 932, SQLState: 42000
2009-07-07 18:29:11,398 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00932: inconsistent datatypes: expected - got BLOB


After enabling full DEBUG logging for JBoss server AND Hibernate, the problem was identified as an incorrect SQL Query (see ORA-00932: inconsistent datatypes: expected - got BLOB)!

The basic problem was a wrong SQL query formed by Hibernate - the TOLVENUSER table has 3 columns of type BLOB and the query in question was "SELECT DISTINCT...". Whereas "DISTINCT" does not work with blob columns (in Oracle 10g anyway) and hence the oracle error: ORA_00932.

The approach I had was to customise the offending query to simply remove "DISTINCT", especially since TOLVENUSER table already has a primary key on ID column anyway - the "DISTINCT" was hence redundant in the first place.
This was done by updating a single Java file, org.tolven.security.bean.LoginBean (under TolvenEJB module). In the findUser( String principal) method, find the following line and remove "DISTINCT":
String select = "SELECT DISTINCT u FROM TolvenUser u WHERE u.ldapUID = :principal " +

I then updated this compiled class file direclty into the tolvenEJB.jar file in JBoss's tolven ear file (at "...tolven-jboss-4.2.2.GA\server\tolven\deploy\tolven.ear/tolvenEJB.jar") and restarted Jboss.

And it was smooth running all the way after that (configPhase3 and so on). I'm accessing all Tolven web app pages perfectly now.

ORA-00932: inconsistent datatypes: expected - got BLOB

"ORA-00932: inconsistent datatypes: expected - got BLOB"
This weird single-line error in JBoss's console/log made no sense at all until I added the following snippet in the server's log4j.xml to enable Hibernate logging (thanks to Joe at the Tolven Forum):
<category name="org.hibernate.SQL">
<priority value="DEBUG"/>
</category>

(Also of course modified the server logging threshold to DEBUG)

And then came this stacktrace:

2009-07-13 18:27:47,322 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select distinct tolvenuser0_.id as id27_, tolvenuser0_.ldapUID as ldapUID27_, tolvenuser0_.lastLogin as lastLogin27_, tolvenuser0_.creation as creation27_, tolvenuser0_.status as status27_, tolvenuser0_.sponsorship_id as sponsor19_27_, tolvenuser0_.timeZone as timeZone27_, tolvenuser0_.locale as locale27_, tolvenuser0_.emailFormat as emailFor8_27_, tolvenuser0_.demoUser as demoUser27_, tolvenuser0_.likeness_id as likeness18_27_, tolvenuser0_.pbeKeyAlgorithm as pbeKeyA10_27_, tolvenuser0_.salt as salt27_, tolvenuser0_.iterationCount as iterati12_27_, tolvenuser0_.encodedEncryptedPrivateKeyInfo as encoded13_27_, tolvenuser0_.PRIVATE_KEY_SIZE as PRIVATE14_27_, tolvenuser0_.PRIVATE_KEY_ALGORITHM as PRIVATE15_27_, tolvenuser0_.x509EncodedKeySpec as x16_27_, tolvenuser0_.PUBLIC_KEY_ALGORITHM as PUBLIC17_27_ from tolven.TolvenUser tolvenuser0_ where tolvenuser0_.ldapUID=? and (tolvenuser0_.status='ACTIVE' or tolvenuser0_.status='active' or tolvenuser0_.status='new' or tolvenuser0_.status='ACTIVATING' or tolvenuser0_.status='')]
java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
at org.tolven.security.bean.LoginBean.findUser(LoginBean.java:73)
at org.tolven.security.bean.LoginBean.createOrUpdateUser(LoginBean.java:314)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
2009-07-13 18:27:47,338 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 932, SQLState: 42000
2009-07-13 18:27:47,338 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00932: inconsistent datatypes: expected - got BLOB


Once the erring query was out in the open (in bold above), I tried executing it in an SQL window and identified that the error was being thrown on those columns of this table that were of type BLOB.
And Google quickly told me that Oracle doesn't like using "SELECT DISTINCT..." on any BLOB columns of a table. Voila!

Monday, April 27, 2009

Checkstyle Bug - "Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'DUSException'".(?) and Solution

Was in the code review phase last week... time for checkstyle, findbugs n PMD to come out!

Since it was a new project, with a little tinkering of a half-working Hudson ant script someone was working on, I could generate my Review reports. My checkstyle task was like below:
<target name = "checkstyle">
<mkdir dir="${checkstyle.report}"/>
<taskdef resource="checkstyletask.properties" classpath ="${checkstyle.home}/checkstyle-all-4.4.jar;${checkstyle.home}/checkstyle-optional-4.4.jar" />
<checkstyle config="${basedir}\..\settings\CheckstyleSettings.xml" failonviolation="false">
<fileset dir="${src.java.dir}" includes="**/*.java"/>
<formatter type="xml" toFile="${checkstyle.report}\checkstyle_errors.xml"/>
</checkstyle>

<style in="${checkstyle.report}\checkstyle_errors.xml" out="${checkstyle.report}\checkstyle_report.html"
style="${basedir}\..\settings\checkstyle.xsl"/>
</target>

Unfortunately, the Checkstyle Reports kept giving a strange Error in some classes:
"Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'DUSException'." at Line 0.
Classes which had this error would have no other Errors although the Warnings were not affected.

However, in my Eclipse editor with Checksyle Plugin and the same Checkstyle settings, I would get normal Checkstyle Errors and Warnings without thie Error.

Clearly, this was some Checkstyle runtime error and not an error in my class which resulted in Checkstyle failing to process that class for Errors.

Searched the net and came up with lots of explanations / bug accusations that made a lot of sense but no easy solution... Checkstyle was somehow missing out the DUSException class when it was encountered in a throws tag of a methods Javadoc.

So i decided to manually add my source class files to the classpath... and it worked!
<checkstyle config="${basedir}\..\settings\CheckstyleSettings.xml" failonviolation="false">
<classpath>
<path location="${classes.dir}" />
<path refid="code-lib-classpath" />
</classpath>
<fileset dir="${src.java.dir}" includes="**/*.java"/>
<formatter type="xml" toFile="${checkstyle.report}\checkstyle_errors.xml"/>
</checkstyle>

Unfortunately, the Checkstyle report started showing the real CS Errors and they doubled! :) But the team could finally tackle 'em bugs before they slipped to the next phase...


Strange thing was that most of the (new) team was also getting the same Checkstyle Bug in Eclipse... which was what made me assume that it really was a CS Bug.
Until I had a look at their CS preferences and found that they were applying CS on .java files only. Once it was changed to apply to all files, the issue was resolved in their Eclipse as well

Tuesday, February 24, 2009

Error reading from file ... .msi Verify that the file exists and that you can access it

Got a confounding error that occurred when trying to install an msi file on windows XP:

(Error reading from file ... .msi
Verify that the file exists and that you can access it.)


After quite a bit of hair-pulling, I realised this was happening because I had removed Security rights to all users except myself for this folder... including the System group!

I suppose since the System is what performs actions on msi to unpack it, etc, it needs rights here.
So all I had to do was to put the msi file in a folder that has System rights.

In this case, I simply enabled access for System group to the directory and the problem was solved.



Thursday, November 20, 2008

Additional Steps if encountering frequent “java.lang.OutOfMemoryError: PermGen space” exception.

Glassbox does take up some additional memory slowing the startup. Also, it tends to place additional load in the PermGen (Permanent Generation) memory space - this would result in the Server crashing out with "java.lang.OutOfMemoryError: PermGen space" exception (see http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java for details).

The fix is a simple matter of increasing your max PermGen size (default is 64MB in Sun Servers). Use the following options when starting the JVM:
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:MaxPermSize=128m

This actually works for any genuine PermGen error. But note that in most cases, PermGen running out of space is because of inefficient or incorrect cleaning up for Garbage collection - that is, some where in your code, you are unnecessarily keeping references even after use.
 
Superblog Directory