openjpa-2.2.1-r422266:1396819 nonfatal user error 발생
어제 로컬에서 띄운 것을 확인하고 오늘와서 띄워보니 아래와 같은 오류가...
javaagent: "
org.apache.james.domainlist.jpa.model.JPADomain
org.apache.james.user.jpa.model.JPAUser
org.apache.james.rrt.jpa.model.JPARecipientRewrite".
구글링을 해보니 아래와 같은 해결책을 찾을 수 있었다.
http://djitz.com/neu-mscs/getting-started-using-apache-openjpa/
...
4. Run the Main class (right click the Main.java > Run As > Java Application).
If you followed everything correctly, you will see that OpenJPA creates the Patient table automatically. However, it will throw an Exception afterwards, and it goes like:
Exception in thread "main" <openjpa-2.0.1-r422266:989424 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: "com.djitz.model.Patient".
This happens because the OpenJPA fails to run enhanced the entity file (Patient.java) we created. What the OpenJPA (and also Hibernate) does is putting some more code in our Patient class after it is compiled. These code lines enable the OpenJPA to do some “magic”.
Now we need to add some lines on the run configuration to apply this enhancement.F. Add run configuration for Enhancement
1. Right click the Main class > Run As > Run configurations
2. Open the “Arguments” tab
3. Paste the following in the VM arguments box:
-javaagent:[path-to-extraced-openjpa-zip-file]/openjpa-2.0.1.jar
4. Re-run the Main.java, there should be no error by now....
검색한대로 Java VM 에 아래의 파라미터를 추가하니 정상 동작합니다. (경로는 제 개발환경 기준...)