This kernel requires an x86-64 CPU, but only detected an i686 CPU

4,821

Found an answer!

All of the options were on. However the "trusted platform execution" needs to be off. As soon as I turn that off, it works.

If anyone can explain why that works, I'll award the answer.

Share:
4,821

Related videos on Youtube

Nicholas Begg
Author by

Nicholas Begg

Updated on September 18, 2022

Comments

  • Nicholas Begg
    Nicholas Begg over 1 year

    I am currently making an application that lets you create students, and then mark them absent. I want to be able to do this by adding it into a separate table called AbsentStudents. But with the jparepository or the crudreposotroy don't give me these options.

    I tried to create a new entity that was a replica of the students entity, then make the dao equal the findbyid of the student. it looked like this:

    dao.equals(repo.findById(id));
    

    Index.jsp:

    <body>
    <p> Add a student into the database:<p>
    <form action ="addStudent">
        <input type = "text" name = "ID"><br>
        <input type = "text" name = "Name"><br>
        <input type = "text" name = "Teacher"><br>
        <input type = "submit">
    </form>
    
    <p> Mark a Student Absent<p>
    <form action ="markAbsent">
        <input type = "text" name = "ID"><br>
        <input type = "submit">
    </form>
    
    </body>
    </html>
    

    Then the absentStudent, which is the same as student

    @Entity
    @Getter
    @Setter
    public class AbsentStudent
    {
        @Id
        private int id;
        public int getId() {
            return id;
        }
    }
    

    I then created the dao of both the student and absent.

    Finally, here is the controller. I left the autowired out.

    @RequestMapping("/addStudent")
    public String addStudent(Student student) {
    
        repo.save(student);
        return "index.jsp";
    
    }
    
    @RequestMapping("/markAbsent")
    public ModelAndView markAbsent(@RequestParam int id) {
        ModelAndView mv = new ModelAndView();
    
        dao.equals(repo.findById(id));
    
        mv.setViewName("absent.jsp");
        mv.addObject(dao);
    
    
    
        return mv;
    
    }
    

    }

    I was expecting a page in the end, which would fetch all the absent students from the database, and post them on a single page. But, I get an error page.

    the data didn't copy from student to absent student.

    • Nicholas Begg
      Nicholas Begg about 5 years
      Could I have some help?
    • Brandon G
      Brandon G about 5 years
      Can you show where you declare dao and provide the code for that class?
    • Nicholas Begg
      Nicholas Begg about 5 years
      public interface AbsentDao extends CrudRepository<AbsentStudent, Integer> { }
    • Nicholas Begg
      Nicholas Begg about 5 years
      I declare it at the top with @autowired.
    • Nicholas Begg
      Nicholas Begg about 5 years
      @autowired AbsentDao dao. (In the controller)
  • evandentremont
    evandentremont over 9 years
    Don't think, because the host OS and the virtual OS are the same. If it can run natively, why would virtually trip that?
  • Xen2050
    Xen2050 over 9 years
    VirtualBox is emulating the TPE, I don't know if your hardware bios has TPE enabled, I've read it's nothing but trouble for linux anyway, but VirutalBox must be doing too good of a job ;-) But why run the exact same linux image for real and emulated?
  • evandentremont
    evandentremont over 9 years
    One ubuntu server host, and a bunch of ubuntu server vm's. Want to play around with hhvm / laravel stack and not break anything
  • Nicholas Begg
    Nicholas Begg about 5 years
    Thanks, but which query should I use to copy from student to AbsentStudent, and where should I put it?
  • Robert
    Robert about 5 years
    In my opinion it will be better if you just add a new field into Student entity class (for example boolean absent, NUMBER(1,0) in database) and when you'll mark some student you will just update you students table using @Modifying @Query(value = "update student set absent = 1 where id = :id", nativeQuery = true) public void markAbsentStudent(@Param("id") Integer studentId);, and at the moment when you will need to get all absent students you will call another query @Query(value = "select * from student where absent = 1", nativeQuery = true) public List<Student> getAbsentStudents();
  • Robert
    Robert about 5 years
    @Modifying annotation says that this query will modify some table in the database. The code i write above should be inside the interface that implements the jparepository or the crudrepository (repository for student)
  • Robert
    Robert about 5 years
    nativeQuery attribute says that the code inside the value attribute is written in sql (it's jpql by default).
  • Nicholas Begg
    Nicholas Begg about 5 years
    Nvm. Got it. Thanks!