Comments (13)
Yes Yoichiro - your assessment is on point. I am looking at a solution where I mark the dependency on libactions_lib_java and libdialogflow_lib_java as "provided" as it is provided in the actions-on-google library jar file. Should have an update on this soon.
from actions-on-google-java.
This is fixed in MavenCentral. Source will be pushed to github along with the next patch release.
from actions-on-google-java.
Also, I found that it compiles right if you have the dependency as a system scope with the jar in the project folder, like this:
<dependency>
<groupId>com.google.actions</groupId>
<artifactId>actions-on-google</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath> /Users/(YourUsername)/Documents/Coding/Java/Projects/HabitGame/actions-on-google-1.0.0.jar</systemPath>
</dependency>
from actions-on-google-java.
I have same problem on my simple project. In my pom.xml
file, a compiling is successful. However, for example, when launching of Jetty server with jetty-maven-plugin
and sending a first request, a ClassNotFoundException
is thrown.
Caused by: java.lang.ClassNotFoundException: kotlin.TypeCastException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass (WebAppClassLoader.java:556)
at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
...
When I confirmed my maven local repository at this time, I could not find org.jetbrains.kotlin:kotlin-stdlib
library and other dependent libraries in my repository. That is, my maven task could not download these dependent libraries because the pom.xml
in the AoG Java/Kotlin Client Library is invalid, I guess.
There are some sample projects in the actions-on-google GitHub organization. However, all projects use Gradle. not Maven. Well, I guess that this library was released without any tests on Maven.
My pom.xml
file is: https://gist.github.com/yoichiro/da973424eb957626fba7ca88611a6c40
from actions-on-google-java.
We are looking into this. Will post back results here.
from actions-on-google-java.
[ERROR] 'dependencies.dependency.systemPath' for com.google.actions.v2:google-actions-bindings:jar must specify an absolute path but
is ${project.basedir}/lib/libactions_java_lib.jar @
[ERROR] 'dependencies.dependency.systemPath' for com.dialogflow.bindings:dialogflow-bindings:jar must specify an absolute path but
is ${project.basedir}/lib/libdialogflow_java_lib.jar @
Basically, I think that the cause is that the current implementation refers two jar files (libactions_java_lib.jar and libdialogflow_lib_java.jar) using the "system" scope at the following definitions:
<dependency>
<groupId>com.google.actions.v2</groupId>
<artifactId>google-actions-bindings</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/libactions_java_lib.jar
</systemPath>
</dependency>
<dependency>
<groupId>com.dialogflow.bindings</groupId>
<artifactId>dialogflow-bindings</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/libdialogflow_java_lib.jar
</systemPath>
</dependency>
Actually, all classes of these two library are included into the actions-on-google-1.0.0.jar
file by the following definition:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>prepare</id>
<phase>validate</phase>
<configuration>
<tasks>
<echo message="prepare phase"/>
<unzip dest="target/classes"
src="${project.basedir}/lib/libactions_java_lib.jar"/>
<unzip dest="target/classes"
src="${project.basedir}/lib/libdialogflow_java_lib.jar"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
That is, actually the two "dependency" definitions above are NOT necessary. At least, they should not be included in the updated pom.xml
file to Maven Central repository.
To solve this situation, I guess that there are the following solutions:
- If the two libraries (libactions_lib_java.jar and libdialogflow_lib_java.jar) can be registered as each independent library to Maven central repository, the actions-on-google-java library can refer them without using the "system" scope. This is a good solution in the case that you don't want to publish these source files.
- If you can publish these source files, they can be included in the
src
directory instead to refer the two jar files. - If you want to not change anything, you can specify a customized pom.xml file (that doesn't have the two dependency definitions with the "system" scope) at deploying to Maven Central repository. https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-customed-pom.html
My recommendation is 1 or 2.
from actions-on-google-java.
I have fixed the pom.xml on MavenCentral. Can you please try using the 1.0.1 version as shown below?
<dependency>
<groupId>com.google.actions</groupId>
<artifactId>actions-on-google</artifactId>
<version>1.0.1</version>
<type>pom</type>
</dependency>
from actions-on-google-java.
@kishores Ok, I will test the new version. Give me a few hours.
from actions-on-google-java.
@kishores Great! The new version 1.0.1 works fine! I tested the following dependency definition:
<dependency>
<groupId>com.google.actions</groupId>
<artifactId>actions-on-google</artifactId>
<version>1.0.1</version>
</dependency>
BTW, I think that the <type>pom</type>
is unnecessary. Actually, if the type element specified, some errors occur (Compilation Failure).
from actions-on-google-java.
Okay, so @yoichiro, should the <type>
tags be removed?
from actions-on-google-java.
should the tags be removed?
@TrianReallyHard Yes. The <type>pom</type>
is used for specifying a BOM project.
from actions-on-google-java.
Where would one be looking for these dependencies:
<dependency>
<groupId>com.google.actions</groupId>
<artifactId>actions-bindings</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.actions</groupId>
<artifactId>dialogflow-bindings</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
They don't seem to be available on search.maven.org and instead went to sonatype repo as pointed here: https://stackoverflow.com/questions/54585915/which-jar-houses-com-google-api-services-actions-fulfillment-v2-model-packag. Why the inconsistency?
from actions-on-google-java.
Those two files should originate as jar files that are embedded in the library source, and aren't hosted directly on Maven.
from actions-on-google-java.
Related Issues (20)
- Allow deserializing a request and serializing a response using streams HOT 5
- Support noInputPrompts HOT 3
- vendored googleapis proto cause duplicate-dependency-class issues
- consider dropping JSONObject from the smarthome API surface HOT 1
- SyncResponse.Payload is missing errorCode
- Smarthome integration should expose DisconnectResponse HOT 3
- report state need a Integer value type HOT 4
- Intermittent error while while calling reportState in Java HOT 1
- Smarthome integration should allow setting arbitrary data on ExecuteResponse HOT 1
- Not able play video from hls direact link into chromecast using google smart home action
- Missing features on java AoG library
- Regarding the 'NOT_FOUND: Requested Entity was not Found' error log
- Exception when the server reports the status
- How to enrich messages with content? HOT 4
- ManagedChannelImpl was not shutdown properly HOT 3
- Support for Actions on Google Console HOT 3
- why there is no field `notificationSupportedByAgent` ? HOT 4
- German umlauts (ä, ö and ü) not properly displayed and spoken. HOT 3
- FATAL EXCEPTION: java.lang.AssertionError getResourceResolver after gradle and kotlin version updated in Android project
- Security Policy violation Binary Artifacts HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actions-on-google-java.