-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception trying to authenticate #2
Comments
Can you share a code example so I'll be able to reproduce the problem? This kind of errors usually occur when you're trying to save an object which doesn't implement the |
On second thought, I think it'll be a good idea to make OrientHttpSession::setAttribute throw an exception if an attribute is not serializable. Let me fix this really quick. |
Ok, so tried with new Serialization check, with code, then exception. Not sure I understand, is it the SecurityContextImpl that's the issue because it's not serializable? package com.grimace;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import io.github.maseev.spring.session.orientdb.EnableOrientHttpSession;
import org.springframework.web.bind.annotation.RequestMapping;
import java.security.Principal;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@EnableOrientHttpSession
@SpringBootApplication
public class Application {
@RequestMapping("/hello")
public Map<String,Object> home() {
Map<String,Object> model = new HashMap<String,Object>();
model.put("id", UUID.randomUUID().toString());
model.put("content", "Hello World");
return model;
}
@RequestMapping("/user")
public Principal user(Principal user) {
return user;
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
|
With the latest update this shouldn't be a problem any more. |
@grimace Did this fix solve your problem? |
yes! Problem solved. Thank you! |
I'm new to spring-session assume I'm missing something, but I get an exception:
com.orientechnologies.orient.core.exception.OSerializationException: Linked type [class org.springframework.security.web.savedrequest.DefaultSavedRequest:DefaultSavedRequest[http://localhost:9090/login]] cannot be serialized because is not part of registered entities. To fix this error register this class
DB name="testdb"
...also I found a suggestion via google search that suggests :
'you should use the "ODatabaseDocumentTx" to open db if you want create/use
a Document database.
replace OObjectDatabaseTx with ODatabaseDocumentTx
(example ODatabaseDocumentTx db = new ODatabaseDocumentTx'
Tho I'm not quite sure that is what I'm up against.
The text was updated successfully, but these errors were encountered: