Exception on implementing HttpSessionListener in Gosu. gw.internal.gosu.parser.JavaType_Proxy cannot be cast to gw.entity.ITypeList

219 views
Skip to first unread message

Varghese Renny

unread,
May 14, 2018, 3:37:48 AM5/14/18
to gosu-lang
Hi I am getting below exception on configuring servlet listener in GW. This is done to redirect to some logout page on session termination. Below are the changes done.
It's is running on jetty server.

web.xml

<listener>
 
<listener-class>eic.integration.authentication.filter.EICHttpSessionListenerCSRF</listener-class>
</listener>


EICHttpSessionListenerCSRF.gs

class EICHttpSessionListenerCSRF implements HttpSessionListener {


 
override function sessionCreated(httpSessionEvent: HttpSessionEvent) {
 
print("CSRF Session Creation "+httpSessionEvent.Session.CreationTime)
 
}

 
override function sessionDestroyed(httpSessionEvent: HttpSessionEvent) {
 
print("CSRF Session Destroyed "+httpSessionEvent.Session.LastAccessedTime)
 
}
}


I am not sure why this exception getting thrown? Please help.
java.lang.RuntimeException: gw.pl.exception.GWLifecycleException: gw.internal.gosu.parser.JavaType_Proxy cannot be cast to gw.entity.ITypeList
 at com
.guidewire.pl.system.server.InitTab.enterGuidewireStartup(InitTab.java:1091)
 at com
.guidewire.pl.system.server.InitTab.increaseRunLevelTo(InitTab.java:622)
 at com
.guidewire.pl.system.server.InitTab.setRunLevel(InitTab.java:359)
 at com
.guidewire.pl.system.servlet.GuidewireStartupServlet.init(GuidewireStartupServlet.java:87)
 at javax
.servlet.GenericServlet.init(GenericServlet.java:244)
 at org
.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:540)
 at org
.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:349)
 at org
.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:812)
 at org
.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:288)
 at org
.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1322)
 at org
.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:732)
 at org
.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:490)
 at org
.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
 at org
.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:118)
 at org
.eclipse.jetty.server.Server.start(Server.java:342)
 at org
.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:100)
 at org
.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
 at org
.eclipse.jetty.server.Server.doStart(Server.java:290)
 at com
.guidewire.commons.jetty.GWServerJettyServerMain$JettyServer.doStart(GWServerJettyServerMain.java:83)
 at org
.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
 at org
.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1250)
 at java
.security.AccessController.doPrivileged(Native Method)
 at org
.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
 at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java
.lang.reflect.Method.invoke(Method.java:498)
 at org
.eclipse.jetty.start.Main.invokeMain(Main.java:509)
 at org
.eclipse.jetty.start.Main.start(Main.java:651)
 at org
.eclipse.jetty.start.Main.main(Main.java:99)
 at com
.guidewire.commons.jetty.GWServerJettyServerMain.main(GWServerJettyServerMain.java:69)
Caused by: gw.pl.exception.GWLifecycleException: gw.internal.gosu.parser.JavaType_Proxy cannot be cast to gw.entity.ITypeList
 at com
.guidewire.pl.system.sanitycheck.DefaultLanguageLocaleSanityCheck.sanityCheck(DefaultLanguageLocaleSanityCheck.java:27)
 at com
.guidewire.pl.system.sanitycheck.SanityChecker.runChecks(SanityChecker.java:94)
 at com
.guidewire.pl.system.sanitycheck.SanityChecker.runPreStartupChecks(SanityChecker.java:70)
 at com
.guidewire.pl.system.server.InitTab.enterGuidewireStartup(InitTab.java:1089)
 
... 30 more
Caused by: java.lang.ClassCastException: gw.internal.gosu.parser.JavaType_Proxy cannot be cast to gw.entity.ITypeList
 at com
.guidewire.commons.entity.type2.TypelistTypeFactory.getTypeListIntrinsicType(TypelistTypeFactory.java:68)
 at com
.guidewire.commons.metadata.types.TypeListIntrinsicTypeCache.get(TypeListIntrinsicTypeCache.java:27)
 at com
.guidewire.commons.metadata.i18n.config.GWLocale.<init>(GWLocale.java:226)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$LocaleMaps.loadLocales(LocaleFactoryImpl.java:396)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$LocaleMaps.<init>(LocaleFactoryImpl.java:378)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$4.init(LocaleFactoryImpl.java:73)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$4.init(LocaleFactoryImpl.java:70)
 at gw
.util.concurrent.LockingLazyVar.get(LockingLazyVar.java:53)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl.getLocaleByCode(LocaleFactoryImpl.java:153)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$7.init(LocaleFactoryImpl.java:98)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl$7.init(LocaleFactoryImpl.java:91)
 at gw
.util.concurrent.LockingLazyVar.get(LockingLazyVar.java:53)
 at com
.guidewire.commons.metadata.i18n.LocaleFactoryImpl.getDefaultLocale(LocaleFactoryImpl.java:207)
 at com
.guidewire.pl.system.sanitycheck.DefaultLanguageLocaleSanityCheck.sanityCheck(DefaultLanguageLocaleSanityCheck.java:18)
 
... 33 more
n2066002w1          
2018-05-14 12:34:54,424 INFO Started o.e.j.w.WebAppContext@2e48362c{/ab,file:/C:/ELECTRIC/ELECTRIC_NEW/AB/modules/configuration/build/idea/webapp/,AVAILABLE}{C:\ELECTRIC\ELECTRIC_NEW\AB\modules\configuration\build\idea\webapp}
n2066002w1          
2018-05-14 12:34:54,562 INFO Started ServerConnector@33101686{HTTP/1.1}{0.0.0.0:8280}


Reply all
Reply to author
Forward
0 new messages