We have moved our DataAccess logic to Microservice and it is currently implemented as gRPC with C++ and we are able to utilize that in C# client and C++ client.
Now we have to make use of this DataAccess grpc in Matlab client(legacy). So, i'm trying to find a way to access gRPC from Matlab and found that there is no official support for this.
I found two solutions,
Using Java
I have tried as suggested in this thread. i have created a sample grpc client java using Eclipse. but when i try to access that class/methods from matlab, i'm facing below issue,
Java exception occurred:
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V
at io.grpc.Metadata$Key.validateName(Metadata.java:630)
at io.grpc.Metadata$Key.<init>(Metadata.java:638)
at io.grpc.Metadata$Key.<init>(Metadata.java:568)
at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:743)
at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:738)
at io.grpc.Metadata$Key.of(Metadata.java:594)
at io.grpc.Metadata$Key.of(Metadata.java:590)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:84)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:83)
at io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:37)
at io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:23)
at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:37)
it was discussed here,and it says it is not possible anymore. Can anyone let me know whether this is possible now or i am missing something?
Using Matlab Proto Compiler [Farsounder]
Next i have tried to use Farsounder solution v2.5.0 for creating stub files based on this.
Only after creating protoc.exe, I realized it was for Proto V2. So, now i'm trying use Protov3Matlab.
But the build instructions are not clear here and it has one cmake file and i dont know how to run it. Can anyone help me build this for windows environment?
I'm new to Java and Matlab, sorry if i have missed any obvious things.
Thanks in advance.
I was able to create protoc.exe.
Steps:
Checked out latest protobuf source.
Updated the source with farsounder matlab source and cmake file.
Followed https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md build the source.
Related
So i have a excel file on my GitHub that needs to be updated so i plan to update it using a application
How do I push the updated excel file to GitHub directly from the app using a button
(Java language)
Could someone point me in the right direction
Mostly when i search this question the results are about how to push the code to GitHub
If you are using Java you maybe use Gradle(Usually used with android) or Maven as your project builder tool. I just googled quicly "Java git library" for you and JGit came up wich seems to be a fairly simple library to use. Here is a tutotrial on it.
You probably have to initialize the repo as ususal from code or seperately I suggest from code. And you need to implement file handling as well seperatelly from this simple git client implmentation. You might use this other source helpful for that.
But on native android there might be some different library for handling files as well as you should look into intents for passing differernt files or data between applications.
I hope it helps. :)
Does anybody knows a link or site that I could find this Java library?
The problem is there is a Java program that my employer needs me to fix a bug but the problem is that the person that was the author of the program is not anymore working with him so he needs me to fix it but the IDE is looking for a library that is javafx.mail.jar and so far as I was searching the web there were no answers of this kind of file type.
Can someone knows about this type? Thank you in advance
FYI: I'm new in Java so please be nice :)
I'm pretty sure1 you should be looking for the JAR file for javax.mail, not javafx.mail.
You can get the JAR file from Maven Central, from Oracle or from GitHub, depending on what version you need.
1 - The Oracle javafx product has nothing to do with email. Either you have misread something, or the code you are trying to fix is currently referring to something that doesn't exist ... and you need to fix that. The javafx package tree is reserved for the use of the javafx product line itself. 3rd party libraries should not define packages in that tree.
I want to use PDFbox with PHP/Java bridge, because the only other option after a lot of research involves XPDF and my host won't allow shell_exec(). I have managed to setup the PHP/Java bridge and I have downloaded the PDFbox library but I have no idea what to do with the library to be able to use its API in PHP - how do I include it?
The current folder structure I have with the bridge is:
JavaBridge
java (containing Java.inc and JavaProxy.php)
WEB-INF
index.php (containing the code to test that I can use the bridge)
I have no idea how Java works in details, I just want to use the APIs to parse PDF documents (something similar to this example but parsing instead of merging). So do I need to build, do I need to just copy the files in one of the folders...?
And a second question: following the instructions on the PHP/Java bridge I've setup tomcat. But it only works on localhost so far, when I copy the JavaBridge folder on my PHP server I get the following error:
Fatal error: Uncaught Could not connect to the JEE server 127.0.0.1:8080. Please start it. Or define('JAVA_HOSTS',9267); define('JAVA_SERVLET',false); before including 'Java.inc' and try again.
How do I get a JEE server then? If I use a java host will I be able to connect to it?
Thanks in advance!
I am trying to connect to the bing api through my java application and query bing programmatically. And I found this page online that gives me sample code to just get a feel of how to go about the entire process. But I am unable to compile and run that code because it has two imports namely
com.microsoft.schemas.livesearch._2008._03.search.LiveSearchServiceStub;
com.microsoft.schemas.livesearch._2008._03.search.LiveSearchServiceStub.*;
Could anybody give me a link to get these jar files.
I already googled it, checked sourceforge and everything. So If anyone knows of another site that definitely has this jar file, or if you have a copy of these two jar files please do let me know how I can obtain them. It would be a great help.
Thanks.
By the names of those classes they are just Stub classes, meaning they are just dummy-versions of the classes without any real functionality. You can probably just create your own easily.
Bing provides it search services via Web Services. You can access them from any language that provides a web services interface (or just web access).
Bing API
I just needed to create a little interface for a project. So I decided to take given code and to run it on Google AppEngine. My problem is, that I'm experienced in JavaScript and got some basic knowledge of Java, but I got no clue how a Java webapp has to be structured. I started Eclipse and installed the AppEngine-addon, downloaded Rhino and env.js (which is necessary for the bunch of code I need to run) but then found me in the situation of sitting on this files not knowing where to put them.
It would be great if someone could tell me in which directory to put which files for Rhino (I assume it's "/war/WEB-INF/lib/"), how to add the env.js-file and how to access all these files inside the .java-file which is the index of the app.
I don't know about app engine in particular, but I have had good success using Rhino jsc to compile script files which extend the Servlet API. The end result is a nice WAR file which you can deploy in any servlet container, and perhaps App Engine as well. See here for my relevant blog post about this technique, and here for a sample Eclipse project.
Have you taken a look at this tutorial on running Rhino on GAE?
It's a link from the official "Will it play in App Engine?" thread.
http://www.appenginejs.org/ may be of interest as well.