I'm having some trouble importing the SimpleCRM example app (vaadin-jpa-app) found at the bottom of the Vaadin Blog post titled "A recipe for a data centric rich internet application" on January 20 ( Link: https://vaadin.com/blog/-/blogs/a-recipe-for-a-data-centric-rich-internet-application )
After git cloning the repository from https://hub.jazz.net/git/vaadin/vaadin-jpa-app as described in the README.md, I have tried to import the project as a Maven project into Eclipse Luna but unfortunately receive the following errors related to the pom.xml file:
vaadin-maven-plugin:7.3.7:resources vaadin-maven-plugin:7.3.7:update-theme vaadin-maven-plugin:7.3.7:update-widgetset
I have tried to deploy the application to my WebSphere Liberty Profile Server anyway but get a "Context Root Not Found" error.
I have also noticed that in my server.xml file under WebSphere Application Server Liberty Profile, I see warnings mentioning that the elements "jdbcDriver" and "dataSource" are "not enabled by the available features" after copying the relevant code outlined in the "Local development" section of the README.md ( from https://hub.jazz.net/project/vaadin/vaadin-jpa-app/overview )
Can someone more familiar with this process walk me through what I should be doing? It would be much appreciated. Thanks!
(Begin procedure)
Preparation:
1) In Eclipse, I installed the WebSphere Application Server Liberty Profile via Eclipse Marketplace ( http://marketplace.eclipse.org/content/ibm-websphere-application-server-liberty-profile-developer-tools-luna-0 )
2) Under the Enterprise Explorer in Eclipse, in WebSphere Application Server Liberty Profile | servers | defaultServer | server.xml, I have added the JDBC Driver configuration snippet as outlined in the Readme. I also modified the code according to the snippet you posted.
3) I added a derby.jar file into the appropriate directory as mentioned in the Readme
4) I installed the m2e-wtp connector (http://marketplace.eclipse.org/content/maven-java-ee-integration-eclipse-wtp-luna)
5) Using Git Shell, I git clone https://hub.jazz.net/git/vaadin/vaadin-jpa-app
Deploying the application:
6) Afterwards, in Eclipse, I import the vaadin-jpa-app directory I just cloned as an "Existing Maven Project". This creates a vaadin-jpa-app project as well as a vaadin-jpa-applicationEAR project in the Eclipse Enterprise Explorer.
7) At this point, the three "errors" I described earlier are rectified by choosing "Do Not Execute (add to pom)" as the action for each of the "errors". (Description: Places metadata which tells m2e to ignore the execution in the pom(s) that adds the Maven plugin to the build.)
8) I right-click the "vaadin-jpa-application [vaadin-jpa-app master]" project and select Run As | Maven Install.
9) I right-click the "vaadin-jpa-application [vaadin-jpa-app master]" project and select Run As | Run On Server.
10) I select the WebSphere Application Server Liberty Profile under localhost and ensure that only the vaadin-jpa-application (and not the vaadin-jpa-applicationEAR) is under the "Configured:" column. This produces a 404 error.
(Begin console output)
Launching defaultServer (WebSphere Application Server 8.5.5.4/wlp-1.0.7.cl50420141211-1039) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_25-b18 (en_US)
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[ERROR ] SRVE9990E: The class org.vaadin.presentation.Servlet has a @WebServlet annotation but does not implement the javax.servlet.http.HttpServlet interface.
[ERROR ] SRVE9991E: The class org.vaadin.presentation.CompressionFilter has a @WebFilter annotation but does not implement the javax.servlet.Filter interface.
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWNEN0049W: Resource annotations on the methods of the org.vaadin.backend.CustomerService class will be ignored. The annotations could not be obtained because of the exception : <openjpa-2.2.3-SNAPSHOT-r422266:1595313 nonfatal general error> org.apache.openjpa.util.GeneralException: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
[ERROR ] CNTR4006E: The CustomerService enterprise bean in the vaadin-jpa-application.war module of the vaadin-jpa-application application failed to start. Exception: <openjpa-2.2.3-SNAPSHOT-r422266:1595313 nonfatal general error> org.apache.openjpa.util.GeneralException: Lcom/vividsolutions/jts/geom/Point;
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:164)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:126)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:290)
at com.ibm.ws.jpa.management.JPAPUnitInfo.transformClass(JPAPUnitInfo.java:1380)
at [internal classes]
Caused by: java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2575)
at java.lang.Class.getDeclaredFields(Class.java:1908)
at org.apache.openjpa.lib.util.J2DoPrivHelper$7.run(J2DoPrivHelper.java:297)
at org.apache.openjpa.lib.util.J2DoPrivHelper$7.run(J2DoPrivHelper.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.openjpa.persistence.PersistenceMetaDataDefaults.determineImplicitAccessType(PersistenceMetaDataDefaults.java:366)
at org.apache.openjpa.persistence.PersistenceMetaDataDefaults.determineAccessType(PersistenceMetaDataDefaults.java:334)
at org.apache.openjpa.persistence.PersistenceMetaDataDefaults.populate(PersistenceMetaDataDefaults.java:276)
at org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:920)
at org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:905)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getMetaData(AnnotationPersistenceMetaDataParser.java:752)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:545)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:415)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:260)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:586)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:396)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:388)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:286)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:257)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:146)
... 4 more
Caused by: java.lang.ClassNotFoundException: Could not find class 'com.vividsolutions.jts.geom.Point' as resource 'com/vividsolutions/jts/geom/Point.class'
... 29 more
[AUDIT ] CWWKT0016I: Web application available (default_host): http://localhost:9080/vaadin-jpa-application/
[AUDIT ] CWWKZ0001I: Application vaadin-jpa-application started in 4.171 seconds.
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWNEN0049W: Resource annotations on the methods of the org.vaadin.backend.CustomerService class will be ignored. The annotations could not be obtained because of the exception : <openjpa-2.2.3-SNAPSHOT-r422266:1595313 nonfatal general error> org.apache.openjpa.util.GeneralException: Lcom/vividsolutions/jts/geom/Point;
[WARNING ] CWWJP9991W: openjpa.Enhance: Warn: An exception was thrown while attempting to perform class file transformation on "org.vaadin.backend.domain.Customer":
Exception : java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: Lcom/vividsolutions/jts/geom/Point;