Merge pull request 'chore: Update branch' (#2) from Maradona/Backend:main into main

Reviewed-on: 3001291/Backend#2
pull/1/head
Tarik Gökmen 2024-10-31 12:39:12 +01:00
commit 6ededdcd52
5 changed files with 251 additions and 4 deletions

Binary file not shown.

View File

@ -66,3 +66,219 @@ INSERT INTO PROJECT (DESCRIPTION, END_DATE, NAME, START_DATE, WORKLOAD) VALUES
2024-10-30 22:45:07.317598+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "PRO" not found; SQL statement:
SELECT * FROM PRO [42102-224]
2024-10-31 10:44:56.565250+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT * FROM [*]USER"; expected "identifier"; SQL statement:
SELECT * FROM USER [42001-224]
2024-10-31 10:45:44.260616+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "YOUR_TABLE_NAME" not found; SQL statement:
INSERT INTO your_table_name (ID, D_END, D_START, EMPLOYEE_NR, FIRST_NAME, LAST_NAME, MAIL, AID)
VALUES
(1, '2024-12-31', '2024-01-01', 'E12345', 'John', 'Doe', 'john.doe@example.com', 1001) [42102-224]
2024-10-31 10:45:56.747961+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLDataException: Cannot parse "TIME" constant "2024-12-31"; SQL statement:
INSERT INTO EMPLOYEE (ID, D_END, D_START, EMPLOYEE_NR, FIRST_NAME, LAST_NAME, MAIL, AID)
VALUES
(1, '2024-12-31', '2024-01-01', 'E12345', 'John', 'Doe', 'john.doe@example.com', 1001) [22007-224]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:518)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.value.ValueTime.parse(ValueTime.java:94)
at org.h2.value.Value.convertToTime(Value.java:1909)
at org.h2.value.Value.convertTo(Value.java:1170)
at org.h2.value.Value.convertForAssignTo(Value.java:1113)
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:369)
at org.h2.table.Table.convertInsertRow(Table.java:936)
at org.h2.command.dml.Insert.insertRows(Insert.java:167)
at org.h2.command.dml.Insert.update(Insert.java:135)
at org.h2.command.dml.DataChangeStatement.update(DataChangeStatement.java:74)
at org.h2.command.CommandContainer.update(CommandContainer.java:169)
at org.h2.command.Command.executeUpdate(Command.java:256)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:262)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:231)
at org.h2.server.web.WebApp.getResult(WebApp.java:1345)
at org.h2.server.web.WebApp.query(WebApp.java:1143)
at org.h2.server.web.WebApp.query(WebApp.java:1119)
at org.h2.server.web.WebApp.process(WebApp.java:245)
at org.h2.server.web.WebApp.processRequest(WebApp.java:177)
at org.h2.server.web.JakartaWebServlet.doGet(JakartaWebServlet.java:129)
at org.h2.server.web.JakartaWebServlet.doPost(JakartaWebServlet.java:166)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalArgumentException: -12-31
at org.h2.util.TimeZoneProvider.ofId(TimeZoneProvider.java:139)
at org.h2.util.DateTimeUtils.parseTime(DateTimeUtils.java:422)
at org.h2.value.ValueTime.parse(ValueTime.java:92)
... 54 more
2024-10-31 10:47:35.182884+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLDataException: Data conversion error converting "DATE '2024-12-31' (EMPLOYEE: ""D_END"" TIME(6))"; SQL statement:
INSERT INTO EMPLOYEE (ID, D_END, D_START, EMPLOYEE_NR, FIRST_NAME, LAST_NAME, MAIL, AID)
VALUES
(1, DATE '2024-12-31', DATE '2024-01-01', 'E12345', 'John', 'Doe', 'john.doe@example.com', 1001) [22018-224]
2024-10-31 10:48:33.400902+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLDataException: Data conversion error converting "'E12345' (EMPLOYEE: ""EMPLOYEE_NR"" INTEGER)"; SQL statement:
INSERT INTO EMPLOYEE (ID, D_END, D_START, EMPLOYEE_NR, FIRST_NAME, LAST_NAME, MAIL, AID)
VALUES
(1, TIME '17:00:00', TIME '09:00:00', 'E12345', 'John', 'Doe', 'john.doe@example.com', 1001) [22018-224]
2024-10-31 10:50:14.788868+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "TITLE" not found; SQL statement:
INSERT INTO FORM_OF_ADDRESS (ID, TITLE)
VALUES
(1, 'Herr'),
(2, 'Frau') [42122-224]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:514)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:223)
at org.h2.message.DbException.get(DbException.java:199)
at org.h2.table.Table.getColumn(Table.java:759)
at org.h2.command.Parser.parseColumn(Parser.java:1190)
at org.h2.command.Parser.parseColumnList(Parser.java:1175)
at org.h2.command.Parser.parseInsert(Parser.java:1549)
at org.h2.command.Parser.parsePrepared(Parser.java:719)
at org.h2.command.Parser.parse(Parser.java:592)
at org.h2.command.Parser.parse(Parser.java:564)
at org.h2.command.Parser.prepareCommand(Parser.java:483)
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:639)
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:559)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1166)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:245)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:231)
at org.h2.server.web.WebApp.getResult(WebApp.java:1345)
at org.h2.server.web.WebApp.query(WebApp.java:1143)
at org.h2.server.web.WebApp.query(WebApp.java:1119)
at org.h2.server.web.WebApp.process(WebApp.java:245)
at org.h2.server.web.WebApp.processRequest(WebApp.java:177)
at org.h2.server.web.JakartaWebServlet.doGet(JakartaWebServlet.java:129)
at org.h2.server.web.JakartaWebServlet.doPost(JakartaWebServlet.java:166)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:1583)
2024-10-31 10:50:26.811361+01:00 jdbc[13]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "TITLE" not found; SQL statement:
INSERT INTO FORM_OF_ADDRESS (ID, TITLE)
VALUES
(1, 'Herr'),
(2, 'Frau') [42122-224]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:514)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:223)
at org.h2.message.DbException.get(DbException.java:199)
at org.h2.table.Table.getColumn(Table.java:759)
at org.h2.command.Parser.parseColumn(Parser.java:1190)
at org.h2.command.Parser.parseColumnList(Parser.java:1175)
at org.h2.command.Parser.parseInsert(Parser.java:1549)
at org.h2.command.Parser.parsePrepared(Parser.java:719)
at org.h2.command.Parser.parse(Parser.java:592)
at org.h2.command.Parser.parse(Parser.java:564)
at org.h2.command.Parser.prepareCommand(Parser.java:483)
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:639)
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:559)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1166)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:245)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:231)
at org.h2.server.web.WebApp.getResult(WebApp.java:1345)
at org.h2.server.web.WebApp.query(WebApp.java:1143)
at org.h2.server.web.WebApp.query(WebApp.java:1119)
at org.h2.server.web.WebApp.process(WebApp.java:245)
at org.h2.server.web.WebApp.processRequest(WebApp.java:177)
at org.h2.server.web.JakartaWebServlet.doGet(JakartaWebServlet.java:129)
at org.h2.server.web.JakartaWebServlet.doPost(JakartaWebServlet.java:166)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:1583)

View File

@ -2,12 +2,16 @@ package com.maradona.backend.controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import com.maradona.backend.entities.Project;
import com.maradona.backend.services.EmployeeService;
import com.maradona.backend.services.ProjectService;
import com.maradona.backend.services.PrimarySkillService;
import com.maradona.backend.services.SecondarySkillService;
@Controller
public class PageController {
@ -15,10 +19,37 @@ public class PageController {
@Autowired
private ProjectService projectService;
@Autowired
private EmployeeService employeeService;
@Autowired
private PrimarySkillService primarySkillService;
@Autowired
private SecondarySkillService secondarySkillService;
@GetMapping("/")
public String index(Model model) {
var projects = projectService.getAllProjects();
model.addAttribute("projects", projects);
return "index";
}
@GetMapping("/profile")
public String profile(Model model) {
var employeeData = employeeService.getEmployeeById(Long.valueOf(1));
System.out.println(employeeData);
model.addAttribute("employee", employeeData.orElse(null));
return "profile";
}
@GetMapping("/impressum")
public String impressum() {
return "impressum";
}
@GetMapping("/datenschutz")
public String datenschutz() {
return "datenschutz";
}
}

View File

@ -1,5 +1,5 @@
<footer>
<p>&copy INTER Versicherungsgruppe</p>
<a href="Impressumlelele">Impressum</a>
<a href="Datenschutzlelele">Datenschutz</a>
<a href="Impressum">Impressum</a>
<a href="Datenschutz">Datenschutz</a>
</footer>

View File

@ -10,10 +10,10 @@
<h2>Profile</h2>
<ul>
<li th:text="${employee.formOfAddress}">Form of Address</li>
<li th:text="${employee.formOfAddress.description}">Form of Address</li>
<li th:text="${employee.firstName}">First Name</li>
<li th:text="${employee.lastName}">Last Name</li>
<li th:text="${employee.email}">Email</li>
<li th:text="${employee.mail}">Email</li>
<li <p>6969420</p></li>
<!-- TODO: Add Profile Phonenumber -->
</ul>