I am integrating ngx-admin(3.0.0) with jhipster. It's not loading the dashboard and showing spinner only.
I followed https://github.com/fstepho/dashboard to do the upgrade.
Committed my code to https://github.com/chaitut715/dashboard
There are no error messages.
Generated a new JHipster application using v5.3.0 with Elasticsearch
I'm using the same JDL that I used with the previous version of JHipster which worked successfully but could not deploy.
I generate successful. No errors. No problems.
When I open the application and try CRUD with my entities...works normally.
For one of my entities, the Elasticsearch search returns a 500 server error.
Again, this is just after generating the application. I haven't changed anything.
This JDL worked in the last version. The failing entity works fine for all CRUD operations...just throws the error when doing a search. All the other entities work fine doing a search.
The JSON response mentions "failed to map to source...to class".
The generator created that mapping without errors. Why would it being failing during a search?
Why do the other entities work OK?
Any ideas? Anybody else have problems?
Bug in JHipster 5.3.0 generator.
See https://github.com/jhipster/generator-jhipster/issues/8222
I'm very new to coding world so I hope I will be clear in my request.
I would like to know if in an Jhipster generated app, I can change the prodDatabaseType from PostgreSQL to MySQL directly in the file .yo-rc.json without the need to generate de novo an other JHipster app?
I have another naive question. Does Spring JPA handle the request for MySQL and PostgreSQL the same way?
Re-generating with MySQL (after modifying .yo-rc.json) will change few properties in application*.yml, pom.xml or build.gradle, docker files, Liquibase xml changelogs and ID generation type in JPA entities.
Knowing this, you should be able to easily merge these changes using git.
I am using Jhipster and added few entity to my application. Now I want to add row lock feature in few of the transaction to my db. In Hibernate its being done by using session factory as given http://javacompleteexamples.blogspot.in/2009/07/how-db-locking-system-works-in.html but I am not getting beginTransaction and session.get methord using Jhipster code
Not really a JHipster question but rather a Spring Data question.
You could use the #Lock annotation on some method of your repository.
My problem is this exception:
Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "
I'm trying to get an very simple java application with jsf and jpa running, but there seems to be a problem with the enhancement of my entities. As far as I know, tries OpenJPA to enhance my entities at runtime, which are listet in the persistence.xml, however there is no agent to do this. The keyword for this is: Enhancing at Runtime, right?
I thought the enhancement will automatically done by the application server at deployment? How can I configure this?
My exactly environment:
Glassfish 3.1.1
Derby, which is integrated in Glassfish
OpenJPA 2.1.1
Mojarra JSF 2.1.3
Update #1:
After some comments I've added the following lines to my persistence.xml:
<property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
It works now, but OpenJPA throw this warning:
SEVERE: 52 myApp WARN [http-thread-pool-8080(5)] openjpa.Enhance - Creating subclass for "[class myApp.model.entities.AbstractEntity, class myApp.model.entities.Post]".
This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
I think this can't be the solution.
Update #2:
Refer to fvu's answer, I've tried to define the -javaagent jvm parameter in the domain.xml and over the web admin console. After a restart appeared the problem again.
Update #3:
Refer to update #2, I've played a bit around. There must be thrown an error, when the -javaagent parameter is used, but the file is missing, right?. Yes, there it is:
Waiting for domain1 to start .Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /tmp/openjpa.jar
If I copying the agent to this location, this error doesn't appear, but openjpa could still not enhance my entities!
If you're still having issues... I'd highly recommend biting the bullet and setting up build time enhancement. You'll be much happier in the long run if you get that going.
A couple of ideas:
add the Java agent for enhancement to GF's JVM option, see this link for an example of how to install a javaagent and OpenJPA's doc 5.2.3, enhancing at runtime. That emulates enhancer activation in desktop apps as closely as possible IMO.
However, when I read chapter 5.2.4 of the OpenJPA docs it might be capable of picking up the correct enhancer automatically. Try copying openjpa.jar to the domain's library directory, and check what happens after a server restart.