Where to find google app engine JCache dependencies - google-app-engine

The JCache documentation https://cloud.google.com/appengine/docs/java/memcache/usingjcache describes how to use the api, however there is no mention of where to find the dependencies. I guessed on
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.0.0</version>
</dependency>
which resolves all the classes except for CacheFactory. I found some old references to source forge but no mention of how to resolve these classes.
Maven error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project appengine-helloworld: Compilation failure: Compilation failure:
[ERROR] /Users/me/Google Drive/dev/app/src/main/java/com/example/appengine/helloworld/HelloServlet.java:[26,19] cannot find symbol
[ERROR] symbol: class CacheFactory

This problems seems to originate from the use of the helloworld sample app that is generated when you follow the Hello, World! in 5 minutes guide https://cloud.google.com/appengine/docs/java/
I created a new project with the mvn archetype command described here https://cloud.google.com/appengine/docs/java/tools/maven#maven_requirements This creates a skeleton project with the appengine jar and resolves the jcache stuff
https://cloud.google.com/appengine/docs/java/tools/maven#maven_requirements
Specifically, the dependency is
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.version}</version>
</dependency>

Related

Apache Flink table-walkthrough missing dependency?

I am following the steps from the documentation. When running mvn install for the table-walkthrough project I am getting however the error below:
org.apache.flink.table.api.ValidationException: Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath.
at org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:387)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.create(TableEnvironmentImpl.java:295)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.create(TableEnvironmentImpl.java:266)
at org.apache.flink.table.api.TableEnvironment.create(TableEnvironment.java:95)
at org.apache.flink.playgrounds.spendreport.SpendReportTest.testReport(SpendReportTest.java:52)
After manually adding this dependency, I am able to run the code and update the SpendReport#report method as requested.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
I believe this dependency needs to be added in the sample project (IDE or mvn command, both are failing without it).

Cucumber error - `Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/IGherkinDialectProvider`

Im getting this error while running a very basic feature file in Eclipse through Selenium in Java
Exception in thread"main"java.lang.NoClassDefFoundError: gherkin/IGherkinDialectProvider
Im using the following jars
cucumber-java-4.3.0 , cucumber-core-4.3.0 , gherkin-6.0.17 and junit-4.12
Any help is appreciated.
Your version of Gherkin doesn't match the one Cucumber 4.3.0 is using; replace it with gherkin-5.1.0. (See the pom.xml.)
In general, I'd recommend using a dependency manager (Maven or Gradle) to make sure you are getting the correct transitive dependencies. You can find which dependencies you need for Cucumber in the installation docs.
Please remove cucumber-core, cucumber-java, gherkin and Junit. They're transitive dependencies and will be provided by your dependencies.(You can add below set of dependency)
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>4.3.0</version>
<scope>test</scope>
</dependency>

owlapi-contract maven dependency missing test package

I'm trying the extend the TestBase class, but can't find the correct dependency for:
import org.semanticweb.owlapi.api.test.baseclasses.TestBase;
I'm not so familiair with Maven but added the following dependencies to my pom.xml:
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-contract</artifactId>
<version>5.1.10</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-apibinding</artifactId>
<version>5.1.10</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-distribution</artifactId>
<version>5.1.10</version>
</dependency>
I expected that the olwapi-contract dependency contained the test package. However, under my Maven dependencies I only see the following:
Am I missing a dependency, or is the owlapi-contract.jar incomplete?
You are not missing any dependency and the jar is complete.
The org.semanticweb.owlapi.api.test.baseclasses.TestBase class is in the src/test/java directory, so it's a test-related class and cannot be imported through a Maven dependency (basically, nothing in src/test is visible from a Maven dependency).
There are ways to overcome this, but they involve changes to the imported library packaging(owlapi-contracts in this case), so you would have to checkout the OWLAPI code itself.

Maven build on karaf - opendaylight

i am new to open daylight project.. i want to install open daylight controller and integrate my yang model with this .. so if i execute my POST query on controller it get responded.
i went through this tutorial
https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin::Running_controller_with_the_new_OF_plugin
to start karaf - but while building maven in the git clone ... cd
integration/distributions/extra/karaf mvn clean install.. step my
build is struck.. It remains in '[DEBUG] Using connector
WagonRepositoryConnector with priority 0 for
..nexus.opendaylight.org/content/repositories/public/ Downloading:
...nexus.opendaylight.org/content/repositories/public/com/h2database/h2/1.4.185/h2-1.4.185.jar'
and build get failed.
Please help me resolve this issue
I don't know if I have understood correctly your question, but you can clone opendaylight controller project repository from:
https://github.com/opendaylight/controller
Just try with:
git clone https://github.com/opendaylight/controller.git
and once it be downloaded, you can try to compile it executing:
mvn clean install
I will add controller to .m2 repository.
Anyway, if you want to add any controller feature into your project, you can add it into your features.xml file, as follows:
<repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
That will add mdsal feature to your project.
And modify features/pom.xml with the next dependency:
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>${mdsal.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
I hope that my info helps you. Let me know if you need more info.
Regards

AppEngine.iml pom.xml both list dependencies, what goes in which?

steps: New Project, Generate AppEngine
examine -AppEngine.iml and pom.xml in AppEngine module,
Following the https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/write_api
I added these imports:
import com.google.api.server.spi.config.Api;
import javax.inject.Named;
import java.util.ArrayList;
this would not compile (javax.inject not found) so I modified d20-AppEngine.iml
which did not help:
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
so I added to pom.xml:
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
and it compiles.
What is the happening with the .iml file and the pom.xml file? When would I add Maven information versus Gradle dependencies in pom.xml
thanks
.iml file is specific to Intellij. When describing dependencies you should only use the pom.xml or the equivalent of gradle.
The IDEA project files like .iml are generated off the pom.xml. This is a good thing because if you are working with another developer they can use an IDE of their choice. There is no special IDE properties they have to set.

Resources