MyEclipse 2019 and Websphere 8.5 do not deploy JPA properlly

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #623555 Reply


    We have a project that used to work just fine on MyEclipse 10.7.1 Blue using Java 6 and WebSphere 8.5.
    Now we are upgrading to Java 8 and MyEclipse 2019. We have tried to migrate the old projects to the new format (using the wizard) and also to import them from maven and neither options worked. It seems that deploying it to WebSPhere using MyEclipse it is not loading the JPA settings. Specially the named queries on orm.xml.
    I have set the facets to JPA 2 and stil nothing. Is there anything else that nees to be setup on this new MyEclipse version?

    #623560 Reply

    Brian Fernandes

    Sorry to hear the migration has not been straightforward.
    1) Is the application deploying successfully to WebSphere, and when it starts, do you notice any application related errors in the console?
    2) Specifically coming to JPA, is persistence working in your application other than the named queries?
    3) Any changes to the server you are deploying to? Are you deploying to exactly the same WebSphere server and profile? Also, when you say Java 8, did you migrate just WAS to run with Java 8, or has your application been upgraded as well?
    4) Could you share any details on the actual errors or error messages you’re seeing?

    MyEclipse typically does not do anything special for JPA deployment, so especially if you see the other bits of persistence in your application working, this is more likely to be an application / configuration issue. We should be able to move forward based on your answers. Thanks!

    #623561 Reply


    Thank you for replying back in such a short notice Brian!
    Here are some answers:
    1) The application didn’t change. We migrated to Java 8 on WebSphere and every build with Jenkins works successfully as well as deployments to WebSphere on several environments.
    2) JPA and named queries are working fine on all environments other then the upgraded IDE.
    3) It is the same setup we have in place for the integrated environemnts and that were being used with the previous MyEclipse install. We have already upgraded WebSphere to run on Java8 as well as changing the CI environment to use Java 8 for compilation. The last step was upgrading the IDE.
    4) THis is the Exception we get after deployment is done and application started:
    [9/6/19 15:38:24:376 BRT] 000000bd BusinessExcep E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method “findAll” on bean “BeanId(scimEAR#isiPersistence-1.0-SNAPSHOT.jar#AppPropertyManager, null)”. Exception data: <openjpa-2.2.3-SNAPSHOT-r422266:1764177 fatal user error> org.apache.openjpa.persistence.ArgumentException: There is no query with the name “AppProperty.findAll” defined for any of the known persistent classes: null.

    Thank you!

    #623884 Reply

    Brian Fernandes

    Thank you for providing detailed answers to all our questions – an odd problem, so I have a few more questions:

    1) What deployment mode are you using with WebSphere? Is it the classic mode or in-workspace? Can you try in-workspace if that isn’t what you are already using?

    2) I believe the error you see is caused by the fact that the persistence classes haven’t been scanned at all, so it is more than just named queries that would ultimately fail.

    Typically when the application is being deployed (or started, I cannot be sure) – there are log messages from the JPA provider (OpenJPA in this case) which state some configuration info, as well as the result of the process where it scans for JPA entities (depending on the scanning method chosen). Are you seeing any such output? Any messages from OpenJPA in the console output?

    On a related note, can you share with us the entire console output from the deployment / application start processes? You can mail it to support@genuitec.com if you prefer that to responding here.

    #624110 Reply



    I have tried all possible deployment strategies – Classic (Exploded and Packaged) and in-workspace. I am starting to think the way the application is deployed is damaging the classpath, since I see several ClassNotFound exceptions, even though the files are there (on the classic exploded deployment at least)
    I am attaching the full console output for the startup and deployment.

    And about what you mentioned about JPA setup, this is a log from where I deployed a Jenkins built EAR to my local WebSphere:

    [9/10/19 12:24:14:462 BRT] 0000009b Runtime       I   CWWJP9990I: openjpa.Runtime: Info: Starting OpenJPA 2.2.3-SNAPSHOT
    [9/10/19 12:24:14:469 BRT] 0000009b jdbc_JDBC     I   CWWJP9990I: openjpa.jdbc.JDBC: Info: Using dictionary class "com.ibm.ws.persistence.jdbc.sql.OracleDictionary" (Oracle Oracle Database 11g Enterprise Edition Release - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options ,Oracle JDBC driver
    [9/10/19 12:24:14:505 BRT] 0000009b DataCache     W   CWWJP9991W: openjpa.DataCache: Warn: You have specified the openjpa.DataCache property "Types", but using that property is not recommended. Use the JPA 2.0 shared-cache-mode element "ENABLE_SELECTIVE" in conjunction with the javax.persistence.Cacheable annotation instead.
    [9/10/19 12:24:15:097 BRT] 0000009b MetaData      W   CWWJP9991W: openjpa.MetaData: Warn: Found duplicate query "OrgKeyValue.findByProfileAssociateId" in " [Location: Line: 1,445, C: 66]".  Overriding previous definition.
    [9/10/19 12:24:15:098 BRT] 0000009b MetaData      W   CWWJP9991W: openjpa.MetaData: Warn: Found duplicate query "AssociateUser.findAssociateDetailsByLoginId" in " [Location: Line: 1,527, C: 73]".  Overriding previous definition.
    [9/10/19 12:24:15:569 BRT] 0000009b Runtime       I   CWWJP9990I: openjpa.Runtime: Info: The Entity "com.adp.ilink.persistence.entities.ApplicantUserSecQuest" was enhanced at level "2", but the current level of enhancement is "1,591,681".
    [9/10/19 12:24:15:572 BRT] 0000009b Runtime       I   CWWJP9990I: openjpa.Runtime: Info: A down level Entity was detected and logged. Please enable RUNTIME trace to see all down level Entities.

    Comparing to the attached file, it seems that ut doesn’t even load persistance.xml

    You must be logged in to view attached files.
    #624282 Reply

    Brian Fernandes

    Yes, the CNF exceptions do appear to be at the core of what is going wrong, and would cascade into nearly everything else. Clearly you’ve tried quite a bit to get this working, but unfortunately this is a problem that’s going to be hard to fix without having access to your project + environment. I still have a couple of suggestions though.

    1) Can you examine the project’s Deployment Assembly? You can find it at Project Properties > Deployment > Deployment Assembly. We added this post MyEclipse 10 to allow users finer grained control over how they wanted their projects to be deployed and perhaps something is not correctly set up here. You can read about it in our documentation here: https://www.genuitec.com/docs/servers/deployment-assembly/

    2) Another way of ascertaining what is different with the MyEclipse deployment, is to export the EAR from within MyEclipse (this would use the same logic that is used for deployment) and compare the extracted contents of that EAR, with the EAR that you build externally. This may seem like a lot to compare, but differences like missing libraries or differences in configuration files are often easy to spot (ignore .class file differences for instance)

    #625029 Reply

    Brian Fernandes

    Just checking in – were you able to make any progress with the suggestions above? It should definitely work with 2019, and if there’s a bug we’d like to get it fixed ASAP.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: MyEclipse 2019 and Websphere 8.5 do not deploy JPA properlly

You must be logged in to post in the forum log in