Open vahidhedayati opened 8 years ago
This is now fixed, you will need to use
Grails Version: 3.1.4 | Groovy Version: 2.4.6 | JVM Version: 1.8.0_45
I think the comment left with the fixes for 3.1.4 had actually fixed the issue possibly that I had not updated gradle.properties.
Please refer to demo site as an example that worked locally for me before publishing plugin
hi, i am trying to use ws chat again, i just read the user guide , and already success download the plugin, but i don't know what is require, for example, when success download the plugin and open localhost:8080/ , it will redirect to login/auth, so must i download the spring security plugin again or what? i am trying to create a simple application where other user able to join the chat.
Thanks
Try looking at the configuration of this sample site: https://github.com/vahidhedayati/testwschat3/blob/master/grails-app/conf/application.groovy
Try the very first option
wschat.enableSecurity='false'
// Added by the Spring Security Core plugin:
grails.plugin.springsecurity.active = false
I would recommend referring to staticRules defined in this demo and adding missing entries to bypass authentication for required plugin actions
ERROR org.springframework.boot.SpringApplication - Application startup failed org.springframework.orm.hibernate4.HibernateSystemException: Exception occurred inside setter of grails.plugin.wschat.ChatRole.authority; nested exception is org.hibernate.PropertyAccessException: Exception occurred inside setter of grails.plugin.wschat.ChatRole.authority at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:218) ~[spring-orm-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.grails.orm.hibernate.GrailsHibernateTemplate.convertHibernateAccessException(GrailsHibernateTemplate.java:614) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] at org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:200) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:140) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:110) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.performSave(AbstractHibernateGormInstanceApi.groovy:234) ~[grails-datastore-gorm-hibernate-core-5.0.1.RELEASE.jar:na] at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.save(AbstractHibernateGormInstanceApi.groovy:154) ~[grails-datastore-gorm-hibernate-core-5.0.1.RELEASE.jar:na] at org.grails.datastore.gorm.GormInstanceApi.save(GormInstanceApi.groovy:109) ~[grails-datastore-gorm-5.0.1.RELEASE.jar:na] at org.grails.datastore.gorm.GormEntity$Trait$Helper.save(GormEntity.groovy:87) ~[grails-datastore-gorm-5.0.1.RELEASE.jar:na] at org.grails.datastore.gorm.GormEntity$Trait$Helper$save$0.call(Unknown Source) ~[na:na] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) [groovy-2.4.5.jar:2.4.5] at grails.plugin.wschat.ChatRole.save(ChatRole.groovy) ~[wschat-3.0.16.jar:na] at grails.plugin.wschat.ChatRole.save(ChatRole.groovy) ~[wschat-3.0.16.jar:na] at org.grails.datastore.gorm.GormEntity$save.call(Unknown Source) ~[na:na] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) [groovy-2.4.5.jar:2.4.5] at BootStrap$_closure1.doCall(BootStrap.groovy:23) ~[main/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) ~[springloaded-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1084) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.Closure.call(Closure.java:426) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.Closure.call(Closure.java:420) ~[groovy-2.4.5.jar:2.4.5] at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:434) ~[grails-bootstrap-3.1.1.jar:3.1.1] at grails.util.Environment.executeForEnvironment(Environment.java:427) ~[grails-bootstrap-3.1.1.jar:3.1.1] at grails.util.Environment.executeForCurrentEnvironment(Environment.java:403) ~[grails-bootstrap-3.1.1.jar:3.1.1] at org.grails.web.servlet.boostrap.DefaultGrailsBootstrapClass.callInit(DefaultGrailsBootstrapClass.java:62) ~[grails-web-3.1.1.jar:3.1.1] at org.grails.web.servlet.context.GrailsConfigUtils.executeGrailsBootstraps(GrailsConfigUtils.java:65) ~[grails-web-3.1.1.jar:3.1.1] at org.grails.plugins.web.servlet.context.BootStrapClassRunner.onStartup(BootStrapClassRunner.groovy:53) ~[grails-plugin-controllers-3.1.1.jar:3.1.1] at grails.boot.config.GrailsApplicationPostProcessor.onApplicationEvent(GrailsApplicationPostProcessor.groovy:238) ~[grails-core-3.1.1.jar:3.1.1] at grails.boot.config.GrailsApplicationPostProcessor.onApplicationEvent(GrailsApplicationPostProcessor.groovy) ~[grails-core-3.1.1.jar:3.1.1] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] at grails.boot.GrailsApp.run(GrailsApp.groovy:55) [grails-core-3.1.1.jar:3.1.1] at grails.boot.GrailsApp.run(GrailsApp.groovy:347) [grails-core-3.1.1.jar:3.1.1] at grails.boot.GrailsApp.run(GrailsApp.groovy:336) [grails-core-3.1.1.jar:3.1.1] at grails.boot.GrailsApp$run.call(Unknown Source) [grails-core-3.1.1.jar:3.1.1] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) [groovy-2.4.5.jar:2.4.5] at chat.Application.main(Application.groovy:8) [main/:na] Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of grails.plugin.wschat.ChatRole.authority at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:91) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:713) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:362) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4718) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:278) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:126) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:209) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:194) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.grails.orm.hibernate.support.ClosureEventTriggeringInterceptor.onSaveOrUpdate(ClosureEventTriggeringInterceptor.java:105) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:684) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:676) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:671) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi$_performSave_closure3.doCall(AbstractHibernateGormInstanceApi.groovy:235) ~[grails-datastore-gorm-hibernate-core-5.0.1.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) ~[springloaded-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) ~[groovy-2.4.5.jar:2.4.5] at groovy.lang.Closure.call(Closure.java:426) ~[groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53) ~[groovy-2.4.5.jar:2.4.5] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105) ~[groovy-2.4.5.jar:2.4.5] at com.sun.proxy.$Proxy100.doInHibernate(Unknown Source) ~[na:na] at org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:196) ~[grails-datastore-gorm-hibernate4-5.0.1.RELEASE.jar:na] ... 57 common frames omitted Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) ~[springloaded-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:68) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final] ... 86 common frames omitted Caused by: java.lang.NoSuchMethodError: org.grails.datastore.mapping.dirty.checking.DirtyCheckable.markDirty(Ljava/lang/String;Ljava/lang/Object;)V at grails.plugin.wschat.ChatRole.setAuthority(ChatRole.groovy) ~[wschat-3.0.16.jar:na] ... 92 common frames omitted
i tried and still failed. :(
i just add this line, and copy this to application.groovy i am using grails 3.1.1
compile "org.grails.plugins:wschat:3.0.16"
runtime 'mysql:mysql-connector-java:5.1.20'
its look like fail on inserting data to table chatRole.
the table already created, but fail to insert
i think i must create admin account right? i copied from this https://github.com/vahidhedayati/grails-wschat-plugin/wiki/Creating-admin-accounts
I will have to test/check it out later. for sure it would help to create some default permission groups
So here is the problem:
In the above error logs you sent and when tested locally this is the issue that was hit:
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) [groovy-2.4.5.jar:2.4.5] at BootStrap$_closure1.doCall(BootStrap.groovy:23) ~[main/:na] at
I think really to succeed in working with java / grails it is good to be able to actually work out where the real issue resides and working around the issue.
This none the less does appear to be an issue but really related to content provided in the test application.groovy
def adminRole = new ChatRole('ROLE_ADMIN').save()
def userRole = new ChatRole('ROLE_USER').save()
def anonymouse = new ChatRole('ROLE_ANONYMOUS').save()
def testUser = new ChatAuth('me', 'password').save()
What I then did was to
def adminRole,userRole
ChatRole.withTransacation {
adminRole = new ChatRole('ROLE_ADMIN')
if (!adminRole.save()) {
println "-- ${adminRole.errors}"
}
userRole = new ChatRole('ROLE_USER').save()
}
This the relayed further errors around the setters of this ChatRole class. Changing to the following locally :
//Spring security configuration to add me as a user and admin role
def adminRole = new ChatRole(authority:'ROLE_ADMIN').save()
def userRole = new ChatRole(authority:'ROLE_USER').save()
def testUser = new ChatAuth(username:'admin', password:'password').save()
Notice that each domain object had to declare the field name (unsure if this is something related to grails 3.1.1 .... Do read on:
So now finally app is up and running and when I access chat index I see:
Grails application running at http://localhost:8080 in environment: development
ERROR org.grails.web.errors.GrailsExceptionResolver - GroovyRuntimeException occurred when processing request: [GET] /wsChat/index
Ambiguous method overloading for method grails.plugin.wschat.beans.ConnectTagBean#validate.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface java.util.List]
[interface java.util.Map]. Stacktrace follows:
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method grails.plugin.wschat.beans.ConnectTagBean#validate.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface java.util.List]
[interface java.util.Map]
So the long and short of it is you need to upgrade from 3.1.1. I have just made a grails 3.1.10 app and it worked first time with the application.groovy / application.yml and BootStrap.groovy files copied from the above project into it and added the two plugin lines as you have done so to it.
Take a read here: https://github.com/vahidhedayati/testwschat311
Then here https://github.com/vahidhedayati/testwschat3110
You want to run a basic chat site and you are doing all this as a test from scratch why on earth 3.1.1 If you ask me there were some issues around components used by the plugin at that period right up to 3.1.4. You should really be looking to go beyond all that there is a reason they update. They find issues and fix in some cases hence the increments.
so i cannot install it on grails 3.1.1 ?
can you suggest me the best version of grails to use wschat? 👍
3.1.4+ I need to update doc
i will try to use 3.1.5
i get this message when i try to running with my new project under grails 3.1.5
ERROR org.springframework.boot.SpringApplication - Application startup failed java.lang.IllegalArgumentException: Static rules defined as a Map are not supported; must be specified as a List of Maps as described in section 'Configuring Request Mappings to Secure URLs' of the reference documentation at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.compileStaticRules(AnnotationFilterInvocationDefinition.groovy:302) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.initialize(AnnotationFilterInvocationDefinition.groovy:230) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition$initialize.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149) at grails.plugin.springsecurity.SpringSecurityCoreGrailsPlugin.initializeFromAnnotations(SpringSecurityCoreGrailsPlugin.groovy:770) 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.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) at grails.plugin.springsecurity.SpringSecurityCoreGrailsPlugin.doWithApplicationContext(SpringSecurityCoreGrailsPlugin.groovy:651) at org.grails.plugins.DefaultGrailsPlugin.doWithApplicationContext(DefaultGrailsPlugin.java:524) at org.grails.plugins.AbstractGrailsPluginManager.doPostProcessing(AbstractGrailsPluginManager.java:229) at grails.boot.config.GrailsApplicationPostProcessor.onApplicationEvent(GrailsApplicationPostProcessor.groovy:231) at grails.boot.config.GrailsApplicationPostProcessor.onApplicationEvent(GrailsApplicationPostProcessor.groovy) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at grails.boot.GrailsApp.run(GrailsApp.groovy:55) at grails.boot.GrailsApp.run(GrailsApp.groovy:374) at grails.boot.GrailsApp.run(GrailsApp.groovy:363) at grails.boot.GrailsApp$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) at chatv2.Application.main(Application.groovy:8)
am i missing some configuration?
i tried to change grails.plugins.springsecurity.securityConfigType = 'InterceptUrlMap'
to grails.plugin.springsecurity.securityConfigType = 'InterceptUrlMap'
and run.. but i cannot access localhost:8080 without any error log
Without seeing what it is you have configured locally I will not be able to really give any useful feedback. Why not save yourself all the hassle.
Jump to or download 3.1.10 then clone this project from last night:
https://github.com/vahidhedayati/testwschat3110
whilst testing it under 3.1.1 I changes this config value which got copied over to that site https://github.com/vahidhedayati/testwschat3110/blob/master/grails-app/conf/application.groovy#L48
wschat.hostname='192.168.1.204:8080'
So if you do clone it just watch out for that
Maybe look at the config of this site compared to your site. It is 3 files application.groovy / application.yml & Bootstrap.groovy.
okay, i will try 3.1.10
your code look like some wrong.
like this one..
when i success login, the user will redirect to http://localhost:8080/wsChat/authChat
but not to this 'http://localhost:8080/wschat/authChat'
wschat
and wsChat
and maybe because of this, i cannot send the message
or... that you haven't paid attention to my previous post:
wschat.hostname='192.168.1.204:8080'
In the application.groovy is pointing to my local ip. You can comment that line out if you are testing on localy pc only. If you are testing across multiple machines then define the ip of current local machine like shown.
I can see on your screen shot it is attempting ws connecting to 192.168.1.204:8080
take a look yourself
I very much doubt we have the same local ips :)
Any release after 3.0.11 has not been working on grails 3.1.0+
Question raised here
When a solution has been found version 3 can be fixed for now grails 2 has the latest version of the code.