From 02bc284ff1c5af45d99ead74f236987f3bd5d818 Mon Sep 17 00:00:00 2001 From: abazov73 <92822431+abazov73@users.noreply.github.com> Date: Tue, 16 May 2023 01:25:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A8=D0=B5=D1=81=D1=82=D0=B0=D1=8F=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0.=20=D0=93=D0=BE?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=D0=BE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/ipLab/data.mv.db | Bin 106496 -> 114688 bytes backend/ipLab/data.trace.db | 632 ++++++++++++++++++ .../Controllers/OrderedController.java | 19 +- .../Controllers/ProductController.java | 19 +- .../ipLab/StoreDataBase/Model/User.java | 5 +- .../StoreDataBase/Service/UserService.java | 2 +- frontend/src/App.jsx | 31 +- frontend/src/checkLogin.jsx | 24 + frontend/src/components/common/Header.jsx | 11 +- frontend/src/components/common/Toolbar.jsx | 12 +- .../src/components/common/ToolbarOrder.jsx | 4 +- .../src/components/pages/addToStorePage.jsx | 7 +- .../src/components/pages/customerPage.jsx | 7 +- frontend/src/components/pages/loginPage.jsx | 50 ++ frontend/src/components/pages/logout.jsx | 20 + frontend/src/components/pages/orderPage.jsx | 6 +- frontend/src/components/pages/productPage.jsx | 7 +- frontend/src/components/pages/storePage.jsx | 7 +- frontend/src/services/DataService.js | 34 +- 19 files changed, 860 insertions(+), 37 deletions(-) create mode 100644 frontend/src/checkLogin.jsx create mode 100644 frontend/src/components/pages/loginPage.jsx create mode 100644 frontend/src/components/pages/logout.jsx diff --git a/backend/ipLab/data.mv.db b/backend/ipLab/data.mv.db index cd412bd32bebea4c3e9a1cd17d35548755975f2c..cac197a704358fa4e72ab8e778b65cde2b639568 100644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UHLCLx~XXoskraQWkE`Y}6 zX&WLV>r7bN7$J6y;~^>QdWiM=3Uc!&{hO=qCMF&K*d@(;W!*H8UTESYE>O3UqkLo# zA4#Gd);f65W7vuMNOgQ91o~UmsD1Qf&3f+`z9N@&gG};t7w&N;^-hJ;oDAwcg29cvjc+ ziFe^k`g7}jRXT(pU<%32P}dD%#}ZcMwDwLj>2`mgf>d?5jp3y=lY~?e!G_i}Uh&#Y z=p{|&Y*o(Y9mwscU?hDMjHGXZ5%>ihCp4hq7ru`WRL!zKt%7j~m3@3GLXQri@+qwd zl^|5Uxf#X=R6e*AM!0?ph0vA9QThItU=HIihY+eksQjg0!PtPx-~1-r7nUl2_s~)0 z@e+r!1q>`qpnOdz3D_nY0cGp@r10AMqS_zaI#Bk3yEVGp?JoC}2A;=0rGeh^ z;!bIXP~vCcOE}FTr!?@rQ9Y^6-MF#1Tl}_SnYsW&OEeZx`D=Rd(gamL*QRO@7vdfH z++5sT2uj)9$pz{~iJYwE@nY+?G}a?6)MV@ZG_H-b^p#k%+u_aHO{LbFc6>6jc14+0oxw9A zYw2?9nhb7kSOUBE#7}85X$xCA;}2sAbfN)rWp9Y zdq}cyoI?^>eii+JSehN94+}&JuGp!~N$D z6EA$0Xk|KZMb17&hnhxC(P1Q~=rEE~bQlRf!$|NMYF_E$Ye~(k$P|*ASJ4Zt@S{Vh z;^yCynpbi1MN;!B{_-rTc@=-ZiPXGGs)f|NN(pWUHLvn(O{C^cs?0>;3S8KH*-_<# zxLxxWhD%tu^7uthF+d<guqr|Y^%eh$qNxNcueuOc`lu;>iJG7MF-8~=K4+-; p<(MVStore.java:404) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:241) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:254) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:273) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" +General error: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" [50000-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 51 more +Caused by: java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:705) + at org.h2.mvstore.MVStore.(MVStore.java:401) + ... 45 more +2023-05-15 22:40:22 database: opening D:/IP Labs/Лабораторная 1/backend/ipLab/data +org.h2.message.DbException: Файл поврежден при чтении строки: null. Возможные решения: используйте утилиту восстановления (recovery tool) +File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199] + at org.h2.message.DbException.get(DbException.java:194) + at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:205) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:173) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:241) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:254) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:273) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Файл поврежден при чтении строки: null. Возможные решения: используйте утилиту восстановления (recovery tool) +File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:617) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 46 more +Caused by: java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:705) + at org.h2.mvstore.MVStore.(MVStore.java:401) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + ... 43 more +2023-05-15 22:40:33 database: flush +org.h2.message.DbException: Внутренняя ошибка: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" +General error: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" [50000-199] + at org.h2.message.DbException.get(DbException.java:194) + at org.h2.message.DbException.convert(DbException.java:347) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:90) + at org.h2.mvstore.MVStore.handleException(MVStore.java:2787) + at org.h2.mvstore.MVStore.panic(MVStore.java:441) + at org.h2.mvstore.MVStore.(MVStore.java:404) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:241) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:254) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:273) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" +General error: "java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5]" [50000-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 51 more +Caused by: java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:705) + at org.h2.mvstore.MVStore.(MVStore.java:401) + ... 45 more +2023-05-15 22:40:33 database: opening D:/IP Labs/Лабораторная 1/backend/ipLab/data +org.h2.message.DbException: Файл поврежден при чтении строки: null. Возможные решения: используйте утилиту восстановления (recovery tool) +File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199] + at org.h2.message.DbException.get(DbException.java:194) + at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:205) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:173) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:241) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:254) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:273) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Файл поврежден при чтении строки: null. Возможные решения: используйте утилиту восстановления (recovery tool) +File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:617) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 46 more +Caused by: java.lang.IllegalStateException: The write format 2 is larger than the supported format 1, and the file was not opened in read-only mode [1.4.199/5] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:705) + at org.h2.mvstore.MVStore.(MVStore.java:401) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + ... 43 more +2023-05-15 22:42:22 database: wrong user or password; user: "SE" +org.h2.message.DbException: Неверное имя пользователя или пароль +Wrong user name or password [28000-210] + at org.h2.message.DbException.get(DbException.java:227) + at org.h2.message.DbException.get(DbException.java:203) + at org.h2.message.DbException.get(DbException.java:192) + at org.h2.engine.Engine.openSession(Engine.java:154) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:122) + at org.h2.Driver.connect(Driver.java:59) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:241) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:254) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:273) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:143) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Неверное имя пользователя или пароль +Wrong user name or password [28000-210] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:529) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) + ... 38 more +2023-05-15 22:43:16 jdbc[3]: exception +java.sql.SQLClientInfoException: Client info name 'ApplicationName' not supported. + at org.h2.jdbc.JdbcConnection.setClientInfo(JdbcConnection.java:1573) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.populateClientAppName(GenericDataSource.java:183) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:146) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.openConnection(H2DataSource.java:74) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:128) + at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.(GenericDataSource.java:109) + at org.jkiss.dbeaver.ext.h2.model.H2DataSource.(H2DataSource.java:43) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createDataSourceImpl(H2MetaModel.java:55) + at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1205) + at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1070) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70) + at org.jkiss.dbeaver.runtime.jobs.ConnectJob.runSync(ConnectJob.java:97) + at org.jkiss.dbeaver.ui.actions.datasource.DataSourceHandler.connectToDataSource(DataSourceHandler.java:115) + at org.jkiss.dbeaver.ui.actions.datasource.UIServiceConnectionsImpl.initConnection(UIServiceConnectionsImpl.java:87) + at org.jkiss.dbeaver.model.navigator.DBNDataSource.initializeNode(DBNDataSource.java:158) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:225) + at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1) + at org.jkiss.dbeaver.model.navigator.DBNUtils.getNodeChildrenFiltered(DBNUtils.java:80) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49) + at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +2023-05-15 22:43:44 jdbc[3]: exception +org.h2.jdbc.JdbcSQLSyntaxErrorException: Столбец "KEY_SEQ" не найден +Column "KEY_SEQ" not found [42122-210] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:521) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) + at org.h2.message.DbException.get(DbException.java:227) + at org.h2.message.DbException.get(DbException.java:203) + at org.h2.jdbc.JdbcResultSet.getColumnIndex(JdbcResultSet.java:3492) + at org.h2.jdbc.JdbcResultSet.getInt(JdbcResultSet.java:337) + at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCResultSetImpl.getInt(JDBCResultSetImpl.java:500) + at org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils.safeGetInt(JDBCUtils.java:110) + at org.jkiss.dbeaver.ext.generic.model.GenericUtils.safeGetInt(GenericUtils.java:84) + at org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel.createConstraintColumnsImpl(GenericMetaModel.java:819) + at org.jkiss.dbeaver.ext.h2.model.H2MetaModel.createConstraintColumnsImpl(H2MetaModel.java:178) + at org.jkiss.dbeaver.ext.generic.model.ConstraintKeysCache.fetchObjectRow(ConstraintKeysCache.java:98) + at org.jkiss.dbeaver.ext.generic.model.ConstraintKeysCache.fetchObjectRow(ConstraintKeysCache.java:1) + at org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCCompositeCache.loadObjects(JDBCCompositeCache.java:360) + at org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCCompositeCache.getObjects(JDBCCompositeCache.java:120) + at org.jkiss.dbeaver.ext.generic.model.GenericTableBase.getConstraints(GenericTableBase.java:222) + at org.jkiss.dbeaver.ext.generic.model.GenericTableBase.getConstraints(GenericTableBase.java:1) + at org.jkiss.dbeaver.model.virtual.DBVUtils.getAllConstraints(DBVUtils.java:310) + at org.jkiss.dbeaver.erd.model.ERDContentProviderDefault.fillEntityFromObject(ERDContentProviderDefault.java:76) + at org.jkiss.dbeaver.erd.ui.model.ERDContentProviderDecorated.fillEntityFromObject(ERDContentProviderDecorated.java:58) + at org.jkiss.dbeaver.erd.model.ERDUtils.makeEntityFromObject(ERDUtils.java:132) + at org.jkiss.dbeaver.erd.model.ERDDiagram.fillEntities(ERDDiagram.java:288) + at org.jkiss.dbeaver.erd.ui.editor.ERDEditorEmbedded.loadFromDatabase(ERDEditorEmbedded.java:225) + at org.jkiss.dbeaver.erd.ui.editor.ERDEditorEmbedded$1.evaluate(ERDEditorEmbedded.java:172) + at org.jkiss.dbeaver.erd.ui.editor.ERDEditorEmbedded$1.evaluate(ERDEditorEmbedded.java:1) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:88) + at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:72) + at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +2023-05-15 22:45:44 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.get(DbException.java:216) + at org.h2.message.DbException.convert(DbException.java:414) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:120) + at org.h2.mvstore.MVStore.handleException(MVStore.java:3296) + at org.h2.mvstore.MVStore.panic(MVStore.java:585) + at org.h2.mvstore.MVStore.(MVStore.java:461) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4056) + at org.h2.mvstore.db.Store.(Store.java:129) + at org.h2.engine.Database.(Database.java:324) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:122) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.getConnectionUrl(H2ConsoleAutoConfiguration.java:94) + at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) + at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) + at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) + at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) + at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) + at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) + at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) + at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) + at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.logDataSources(H2ConsoleAutoConfiguration.java:86) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.lambda$h2Console$0(H2ConsoleAutoConfiguration.java:69) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.withThreadContextClassLoader(H2ConsoleAutoConfiguration.java:78) + at org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration.h2Console(H2ConsoleAutoConfiguration.java:69) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:568) + at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) + at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) + at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:208) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:199) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:94) + at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:85) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:261) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:235) + at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52) + at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) + at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) + at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) + at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) + at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) + at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:252) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardService.startInternal(StandardService.java:430) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:926) + at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) + at org.apache.catalina.startup.Tomcat.start(Tomcat.java:485) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:123) + at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:104) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:486) + at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:210) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:578) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) + at com.example.ipLab.IpLabApplication.main(IpLabApplication.java:12) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:568) + at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:573) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) + ... 103 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004) + at org.h2.mvstore.FileStore.open(FileStore.java:163) + at org.h2.mvstore.MVStore.(MVStore.java:444) + ... 97 more +2023-05-15 22:45:46 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.get(DbException.java:216) + at org.h2.message.DbException.convert(DbException.java:414) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:120) + at org.h2.mvstore.MVStore.handleException(MVStore.java:3296) + at org.h2.mvstore.MVStore.panic(MVStore.java:585) + at org.h2.mvstore.MVStore.(MVStore.java:461) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4056) + at org.h2.mvstore.db.Store.(Store.java:129) + at org.h2.engine.Database.(Database.java:324) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:122) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:284) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:177) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:36) + at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:255) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:230) + at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) + at org.hibernate.boot.model.relational.Database.(Database.java:44) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:218) + at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:191) + at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:138) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) + at com.example.ipLab.IpLabApplication.main(IpLabApplication.java:12) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:568) + at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:573) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) + ... 64 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004) + at org.h2.mvstore.FileStore.open(FileStore.java:163) + at org.h2.mvstore.MVStore.(MVStore.java:444) + ... 58 more +2023-05-15 22:45:48 database: flush +org.h2.message.DbException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.get(DbException.java:216) + at org.h2.message.DbException.convert(DbException.java:414) + at org.h2.mvstore.db.Store.lambda$new$0(Store.java:120) + at org.h2.mvstore.MVStore.handleException(MVStore.java:3296) + at org.h2.mvstore.MVStore.panic(MVStore.java:585) + at org.h2.mvstore.MVStore.(MVStore.java:461) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4056) + at org.h2.mvstore.db.Store.(Store.java:129) + at org.h2.engine.Database.(Database.java:324) + at org.h2.engine.Engine.openSession(Engine.java:92) + at org.h2.engine.Engine.openSession(Engine.java:222) + at org.h2.engine.Engine.createSession(Engine.java:201) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:122) + at org.h2.Driver.connect(Driver.java:59) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) + at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) + at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:100) + at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) + at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) + at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:284) + at org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl.getIsolatedConnection(DdlTransactionIsolatorNonJtaImpl.java:41) + at org.hibernate.tool.schema.internal.exec.ImprovedExtractionContextImpl.getJdbcConnection(ImprovedExtractionContextImpl.java:63) + at org.hibernate.tool.schema.internal.exec.ImprovedExtractionContextImpl.getJdbcDatabaseMetaData(ImprovedExtractionContextImpl.java:70) + at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.processTableResultSet(InformationExtractorJdbcDatabaseMetaDataImpl.java:64) + at org.hibernate.tool.schema.extract.internal.AbstractInformationExtractorImpl.getTables(AbstractInformationExtractorImpl.java:564) + at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.getTablesInformation(DatabaseInformationImpl.java:122) + at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:71) + at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:225) + at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:126) + at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:284) + at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:143) + at java.base/java.util.HashMap.forEach(HashMap.java:1421) + at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:140) + at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:336) + at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:415) + at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1425) + at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) + at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) + at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) + at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) + at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) + at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) + at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) + at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) + at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) + at com.example.ipLab.IpLabApplication.main(IpLabApplication.java:12) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:568) + at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Внутренняя ошибка: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" +General error: "org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7]" [50000-210] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:573) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) + ... 68 more +Caused by: org.h2.mvstore.MVStoreException: The file is locked: D:/IP Labs/Лабораторная 1/backend/ipLab/data.mv.db [2.1.210/7] + at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004) + at org.h2.mvstore.FileStore.open(FileStore.java:163) + at org.h2.mvstore.MVStore.(MVStore.java:444) + ... 62 more diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/OrderedController.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/OrderedController.java index c1bf254..e2c1bfa 100644 --- a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/OrderedController.java +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/OrderedController.java @@ -1,12 +1,15 @@ package com.example.ipLab.StoreDataBase.Controllers; import com.example.ipLab.StoreDataBase.DTO.OrderedDTO; +import com.example.ipLab.StoreDataBase.Model.CustomUser; import com.example.ipLab.StoreDataBase.Model.Ordered; +import com.example.ipLab.StoreDataBase.Model.UserRole; import com.example.ipLab.StoreDataBase.Service.CustomerService; import com.example.ipLab.StoreDataBase.Service.OrderService; import com.example.ipLab.StoreDataBase.Service.ProductService; import com.example.ipLab.WebConfiguration; import jakarta.validation.Valid; +import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -30,10 +33,18 @@ public class OrderedController { } @GetMapping - public List getOrdereds(){ - return orderedService.getAllOrders().stream() - .map(OrderedDTO::new) - .toList(); + public List getOrdereds(@AuthenticationPrincipal CustomUser user){ + if (user.getRole() == UserRole.USER){ + return orderedService.getOrdersByCustomerId(user.getUserID()).stream() + .map(OrderedDTO::new) + .toList(); + } + else{ + return orderedService.getAllOrders().stream() + .map(OrderedDTO::new) + .toList(); + } + } @PostMapping diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/ProductController.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/ProductController.java index ba86444..acc71e5 100644 --- a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/ProductController.java +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Controllers/ProductController.java @@ -1,10 +1,13 @@ package com.example.ipLab.StoreDataBase.Controllers; import com.example.ipLab.StoreDataBase.DTO.ProductDTO; +import com.example.ipLab.StoreDataBase.Model.CustomUser; import com.example.ipLab.StoreDataBase.Model.Product; +import com.example.ipLab.StoreDataBase.Model.UserRole; import com.example.ipLab.StoreDataBase.Service.ProductService; import com.example.ipLab.WebConfiguration; import jakarta.validation.Valid; +import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -24,10 +27,18 @@ public class ProductController { } @GetMapping - public List getProducts(){ - return productService.getAllProducts().stream() - .map(ProductDTO::new) - .toList(); + public List getProducts(@AuthenticationPrincipal CustomUser user){ + if (user.getRole() == UserRole.USER){ + return productService.getAllProductsWithStores().stream() + .map(ProductDTO::new) + .toList(); + } + else{ + return productService.getAllProducts().stream() + .map(ProductDTO::new) + .toList(); + } + } @GetMapping("/getWithStores") diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Model/User.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Model/User.java index aeead35..c355db9 100644 --- a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Model/User.java +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Model/User.java @@ -18,7 +18,6 @@ public class User { @NotBlank private String password; @Column - @NotBlank private Long userId; private UserRole role; @@ -61,6 +60,10 @@ public class User { return role; } + public Long getUserId() { + return userId; + } + @Override public boolean equals(Object o) { if (this == o) return true; diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Service/UserService.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Service/UserService.java index 951735e..0e710f4 100644 --- a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Service/UserService.java +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/Service/UserService.java @@ -92,6 +92,6 @@ public class UserService implements UserDetailsService { throw new UsernameNotFoundException(username); } return new CustomUser( - userEntity.getLogin(), userEntity.getPassword(), Collections.singleton(userEntity.getRole()), userEntity.getId(), userEntity.getRole()); + userEntity.getLogin(), userEntity.getPassword(), Collections.singleton(userEntity.getRole()), userEntity.getUserId(), userEntity.getRole()); } } diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 869a6bc..fc8eb73 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1,10 +1,13 @@ import { useRoutes, Outlet, BrowserRouter } from 'react-router-dom'; +import { useState, useEffect } from 'react'; import Header from './components/common/Header'; import CustomerPage from './components/pages/customerPage'; import StorePage from './components/pages/storePage'; import ProductPage from './components/pages/productPage'; import OrderPage from './components/pages/orderPage'; -import AddToStorePage from './components/pages/addToStorePage' +import AddToStorePage from './components/pages/addToStorePage'; +import LoginPage from './components/pages/loginPage'; +import Logout from './components/pages/logout'; import './styleSite.css'; function Router(props) { @@ -13,14 +16,32 @@ function Router(props) { export default function App() { const routes = [ - { index: true, element: }, - { path: 'customer', element: , label:'Покупатели'}, + { index: true, element: }, + localStorage.getItem("role") === "ADMIN" && { path: 'customer', element: , label:'Покупатели'}, { path: 'store', element: , label: 'Магазины' }, { path: 'product', element: , label: 'Товары' }, { path: 'order', element: , label: 'Заказы'}, - { path: 'addToStore', element: , label: 'Доставка'} + localStorage.getItem("role") === "ADMIN" && { path: 'addToStore', element: , label: 'Доставка'}, + { path: '/login', element: }, + { path: '/logout', element: } ]; const links = routes.filter(route => route.hasOwnProperty('label')); + + const [token, setToken] = useState(localStorage.getItem('token')); + + useEffect(() => { + + function handleStorageChange() { + setToken(localStorage.getItem('token')); + } + + window.addEventListener('storage', handleStorageChange); + + return () => { + window.removeEventListener('storage', handleStorageChange); + }; + }, []); + const rootRoute = [ { path: '/', element: render(links), children: routes } ]; @@ -29,7 +50,7 @@ export default function App() { console.info('render links'); return ( <> -

+
diff --git a/frontend/src/checkLogin.jsx b/frontend/src/checkLogin.jsx new file mode 100644 index 0000000..4c926b3 --- /dev/null +++ b/frontend/src/checkLogin.jsx @@ -0,0 +1,24 @@ +import React from 'react' +import { useNavigate} from "react-router-dom"; +import { useEffect } from 'react'; + +const checkLogin = (Component) => { + const AuthenticatedComponent = (props) => { + const navigate = useNavigate(); + const token = localStorage.getItem('token'); + + useEffect(() => { + if (!token || token === 'undefined') { + navigate('/login'); + } + }, [navigate, token]); + + if (token && token !== 'undefined') { + return + } + return null; + } + return AuthenticatedComponent; +} + +export default checkLogin; \ No newline at end of file diff --git a/frontend/src/components/common/Header.jsx b/frontend/src/components/common/Header.jsx index e42ac22..46f13a9 100644 --- a/frontend/src/components/common/Header.jsx +++ b/frontend/src/components/common/Header.jsx @@ -10,7 +10,7 @@ export default function Header(props){ *