Search:

Type: Posts; User: jocdrew21

Page 1 of 18 1 2 3 4

Search: Search took 0.29 seconds.

  1. No mapping found for HTTP request with URI [/spring/index] in DispatcherServlet with name 'offers'

    I have been at this for hours and I cannot figure out why this is not working. I keep getting a 404 error in my browser and a error message in the console saying


    No mapping found for HTTP...
  2. Re: Adding global exception handling using JSF 2.x ExceptionHandler

    This site is not very good for posting questions about frameworks. However it is great for JavaSE questions of general theory. I would suggest asking this on Stack overflow.

    I do not know JSF's...
  3. [SOLVED] Re: The element type "meta" must be terminated by the matching end-tag "". Using Thymeleaf and Spring-Boot

    There were several issues here!

    1) I had to close the <meta> tags ie.

    <meta charset="UTF-8" />

    2) I have to commit out the login page because it was not ready to be rendered and lucky for...
  4. [SOLVED] The element type "meta" must be terminated by the matching end-tag "". Using Thymeleaf and Spring-Boot

    I am making a simple app that is suppose to display a Index.html page which has a href that redirects to a form. However spring security intercepts it and has the user log in. Once they are logged in...
  5. Thread: DELETED

    by jocdrew21
    Replies
    0
    Views
    230

    DELETED

    DELETED DUE TO NO RESPONSE
  6. Replies
    7
    Views
    294

    Re: Compiling on the command line on my mac

    An IDE is your best friend. Knowing unix/linux terminal commands are very useful especially when it comes to using things like GIT, frameworks or looking deeper into you system. However you don't...
  7. Replies
    20
    Views
    365

    Re: Java Test Failing

    I have plenty of other tests written and no I have not tested the findone method directly. I have however printed out what it is returning on this current test. The findone method is an out of the...
  8. Replies
    20
    Views
    365

    Re: Java Test Failing

    Yes:
    It just says:


    java.lang.AssertionError:
    Expected :2
    Actual :1
  9. Replies
    20
    Views
    365

    Re: Java Test Failing

    I am able to test the query but calling it in the rest controller:



    /**
    * GET /materials/:id -> get the "id" material.
    */
    @RequestMapping(value = "/materials/{id}",
    ...
  10. Replies
    20
    Views
    365

    Re: Java Test Failing

    See example 10.4
    https://openjpa.apache.org/builds/1.2.3/apache-openjpa/docs/jpa_overview_query.html

    I used the query in the rest controller and it worked, this is why I am confused. I even tried...
  11. Replies
    20
    Views
    365

    Re: Java Test Failing

    Ok so I confirmed the update query is working but the test is still failing. I tried your suggestion and it still failed with the same error


    java.lang.AssertionError:
    Expected :2
    Actual :1...
  12. Replies
    20
    Views
    365

    Re: Java Test Failing

    JPA can calls collections on entity beans which maps the database tables.


    I know you have admin right, can you move this thread? I just thought this area would be correct since the test was not...
  13. Replies
    20
    Views
    365

    Re: Java Test Failing

    Component
    public class MaterialEJB {

    @Inject
    private MaterialRepository materialRepository;

    public MaterialEJB(){

    }
  14. Replies
    20
    Views
    365

    Re: Java Test Failing

    Norm that is what is perplexing about this. My query looks fine;



    @Modifying(clearAutomatically = true)
    @Transactional
    @Query("UPDATE Material m SET m.inventory_count =...
  15. Replies
    20
    Views
    365

    Re: Java Test Failing

    yes Correct the query is return the wrong value INSIDE the test:



    @Modifying(clearAutomatically = true)
    @Transactional
    @Query("UPDATE Material m SET m.inventory_count =...
  16. Replies
    20
    Views
    365

    Re: Java Test Failing

    assertEquals(UPDATED_INVENTORY_COUNT, material.getInventory_count());


    Is the code in question. I am using JavaEE/JPA and Spring. I am expecting 2 and 2 however I am getting the expected value as...
  17. Replies
    20
    Views
    365

    Java Test Failing

    I have having a hard time figuring out why my test is failing.




    public class MaterialEjbTest {

    private static final String DEFAULT_MATERIAL_NUMBER = "SAMPLE_TEXT";
    private static...
  18. Re: java.lang.NullPointerException: null when using getResourceAsStream

    I spent days working on this issue and was not able to figure it out. I reverted to just creating a file, writing to it and returning it to the front-end.

    Thank you for the help and sorry for...
  19. Breaking up a class using the Singleton method:

    I have tried several ways to break up this class below to several other classes but have had real issues. You can see what I posted on Stack Over Flow here for the previous code:
    ...
  20. Re: java.lang.NullPointerException: null when using getResourceAsStream

    No, this is how I put the file in the resource file before I posted. I am still having the issue.
  21. Re: java.lang.NullPointerException: null when using getResourceAsStream

    I cut and pasted the excel file into the resources folder, then:



    private InputStream inputStream = this.getClass().getResourceAsStream("/resources/Shop-Order.xlsx");


    to load and use the...
  22. Re: java.lang.NullPointerException: null when using getResourceAsStream

    It gave the following output:



    Classpath: null
    ...
  23. Re: java.lang.NullPointerException: null when using getResourceAsStream

    I decided to look at the absolute class path by doing the following:



    ClassLoader classLoader = JobOrderGenerator.class.getClassLoader();
    System.out.println("Path the file is: "+...
  24. Re: java.lang.NullPointerException: null when using getResourceAsStream

    3722

    Yes... I think this is what you mean...
  25. Re: java.lang.NullPointerException: null when using getResourceAsStream

    37213721

    It is in the resources folder and I am asking for it by:



    private InputStream inputStream = this.getClass().getResourceAsStream("/resources/Shop-Order.xlsx");
Results 1 to 25 of 442
Page 1 of 18 1 2 3 4