Search:

Type: Posts; User: jocdrew21

Page 1 of 18 1 2 3 4

Search: Search took 0.15 seconds.

  1. Thread: DELETED

    by jocdrew21
    Replies
    0
    Views
    140

    DELETED

    DELETED DUE TO NO RESPONSE
  2. Replies
    7
    Views
    215

    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...
  3. Replies
    20
    Views
    308

    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...
  4. Replies
    20
    Views
    308

    Re: Java Test Failing

    Yes:
    It just says:


    java.lang.AssertionError:
    Expected :2
    Actual :1
  5. Replies
    20
    Views
    308

    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}",
    ...
  6. Replies
    20
    Views
    308

    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...
  7. Replies
    20
    Views
    308

    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...
  8. Replies
    20
    Views
    308

    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...
  9. Replies
    20
    Views
    308

    Re: Java Test Failing

    Component
    public class MaterialEJB {

    @Inject
    private MaterialRepository materialRepository;

    public MaterialEJB(){

    }
  10. Replies
    20
    Views
    308

    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 =...
  11. Replies
    20
    Views
    308

    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 =...
  12. Replies
    20
    Views
    308

    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...
  13. Replies
    20
    Views
    308

    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...
  14. 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...
  15. 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:
    ...
  16. 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.
  17. 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...
  18. Re: java.lang.NullPointerException: null when using getResourceAsStream

    It gave the following output:



    Classpath: null
    ...
  19. 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: "+...
  20. Re: java.lang.NullPointerException: null when using getResourceAsStream

    3722

    Yes... I think this is what you mean...
  21. 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");
  22. java.lang.NullPointerException: null when using getResourceAsStream

    I have an excel file that is located in my resources folder. However it is returning null when I try to access it. The below class gets the file:



    public JobOrderGenerator(List<ShopOrder>...
  23. [SOLVED] Re: JPQL error: unexpected token: part near line 1, column 140

    @Query("SELECT NEW com.htd.domain.ShopOrder(po.id, po.po_number, "
    + "po.due_date, po_part.id, po_part.part_quantity, "
    + "part.id, part.part_number, part.part_description, "
    ...
  24. Replies
    0
    Views
    132

    Inport jHipster import jetbrains

    Has anyone has issue with importing jHipster projects into jetbeans intelij? I imported it as a maven project and when I tried to run it it says it is missing a springboot file. However the same...
  25. [SOLVED] JPQL error: unexpected token: part near line 1, column 140

    I am trying to initialize a class (ShopOrder) using JPQL like so:



    @Query("SELECT new ShopOrder(po.id, po.po_number, "
    + "po.due_date, po_part.id, po_part.part_quantity, "
    +...
Results 1 to 25 of 438
Page 1 of 18 1 2 3 4