-
Notifications
You must be signed in to change notification settings - Fork 145
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
Cannot register user (Column 'email' cannot be null) #519
Comments
Well, looks like this project is still not compatible with 3.3. I suggest to:
The web UI mod should recreate the Also probably solution from #510 should be applied (i.e. drop I will think about updating instructions on setting up the server for usage with web UI mod. |
Thank you for fast reply. After deleting mentioned tables and starting server I can register again. Then I had problem #510 (deviceID). I removed table 'positions', started server again and it looks like it is working. Thank you again :) |
You are welcome. Thanks for your feedback. You can avoid such issues if you switch to the 3.2. |
I'll try to stick with newest version :) PS. I guess I can close this issue |
Hi,
Today I created new Traccar Server (newest version from website) and added TraccarWebUI (built today with maven from dev branch).
I also deleted all previous versions and deleted database (and created new).
And I have this problem (from logs) while registering new user:
Feb 12, 2016 11:11:44 AM org.traccar.web.server.model.MethodCallLogger invoke INFO | jvm 1 | 2016/02/12 11:11:44 | INFO: Register 'piotr7' INFO | jvm 1 | 2016/02/12 11:11:44 | [qtp33149633-38] WARN / - Exception while dispatching incoming RPC call INFO | jvm 1 | 2016/02/12 11:11:44 | com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract org.traccar.web.shared.model.User org.traccar.web.client.model.DataService.register(java.lang.String,java.lang.String) throws org.traccar.web.shared.model.AccessDeniedException' threw an unexpected exception: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:415) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:605) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) INFO | jvm 1 | 2016/02/12 11:11:44 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) INFO | jvm 1 | 2016/02/12 11:11:44 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.Server.handle(Server.java:499) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) INFO | jvm 1 | 2016/02/12 11:11:44 | at java.lang.Thread.run(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1187) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.traccar.web.server.model.DataServiceImpl.register(DataServiceImpl.java:182) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.traccar.web.server.model.MethodCallLogger.invoke(MethodCallLogger.java:43) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at java.lang.reflect.Method.invoke(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587) INFO | jvm 1 | 2016/02/12 11:11:44 | ... 42 more INFO | jvm 1 | 2016/02/12 11:11:44 | Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3558) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:98) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:490) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:195) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:179) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:214) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:811) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:784) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:789) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181) INFO | jvm 1 | 2016/02/12 11:11:44 | ... 50 more INFO | jvm 1 | 2016/02/12 11:11:44 | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'email' cannot be null INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at java.lang.reflect.Constructor.newInstance(Unknown Source) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.Util.getInstance(Util.java:387) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:932) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994) INFO | jvm 1 | 2016/02/12 11:11:44 | at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:384) INFO | jvm 1 | 2016/02/12 11:11:44 | at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) INFO | jvm 1 | 2016/02/12 11:11:44 | ... 71 more
If log is TLDR - main error (IMO):
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'email' cannot be null
Am I doing something wrong?
I tried to fix it with MySQL command:
ALTER TABLE testTable MODIFY COLUMN email VARCHAR(128);
Then I got next error:
[...] Caused by: java.sql.SQLException: Field 'name' doesn't have a default value [...]
Fix:
'ALTER TABLE users MODIFY COLUMN name VARCHAR(128) NOT NULL DEFAULT 'piotr';'
End when next error raised I decided to ask. Maybe I made some mistakes earlier?
Greetings
Piotr
The text was updated successfully, but these errors were encountered: