Unexpected token < when invoking an adapter - ibm-mobilefirst

I've just started the tutorial courses of IBM Mobile First Platform (https://mfp.help/canteenpos-hybrid-1-day-pot/) but I'm having a problem with my adapter.
After pushing my adapter to my local MFP server, I tried to invoke my adapter using the "mfp invoke" command. However I keep getting this error message:
C:\workspaces\canteen\canteenPOSwl>mfp invoke
Invoking 'getMenu', the only procedure available for 'canteenAdapter' adapter.
? Enter the comma-separated parameters:
undefined:1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.
^
SyntaxError: Unexpected token <
at Object.parse (native)
at IncomingMessage.<anonymous> (C:\Program Files\ibm\MobileFirst-CLI\mobilefirst-cli\lib\invoke.js:301:38)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:486:13)
The lab where I cannot invoke the adapter: https://mfp.help/2015/10/04/lab-7-3/

This seems to be an issue related to latest CLI version. Please provide details about the version you are using.
I also suggest to follow this topic Issue accessing MobileFirst adapters
and downgrade to previous release.

Related

Forge 1.7.10 : Error while "gradlew setupDecompWorkspace"

I was trying to setup my modding environement and when i did 'gradlew setupDecompWorkSpace', this happen :
WARNING: You are using an unsupported version of ForgeGradle.
Please consider upgrading to ForgeGradle 4 and helping in the efforts to get old versions working on the modern toolchain.
See https://gist.github.com/TheCurle/fe7ad3ede188cbdd15c235cc75d52d4a for more info on contributing.
#################################################
ForgeGradle 1.2.2-g2ea0336
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:extractMcpData UP-TO-DATE
:getVersionJson
Unexpected reponse 403 from http://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/1.7.10.json
:extractUserDev UP-TO-DATE
:genSrgs SKIPPED
:extractNatives UP-TO-DATE
:getAssetsIndex
Unexpected reponse 403 from https://s3.amazonaws.com/Minecraft.Download/indexes/1.7.10.json
:getAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':getAssets'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.862 secs
C:\Users\Dimitri\eclipse-workspace\forge-1.7.10-10.13.4.1614-1.7.10-src>
I've tried to change the gradle version into the gradle-wrapper.properties from 2.0 to 2.6, It just lasted longer.
I'm not a professional in this but my workaround when I had this problem was replacing forge gradle with anatawa12's fork. I think what happened was some urls changed in one of the forge updates and forge 1.7.10 wasn't considered in the change.
New gradle: https://github.com/anatawa12/ForgeGradle-1.2
How to fix the Problem Method 1:
Follow: https://github.com/anatawa12/ForgeGradle-example#how-to-replace-forgegradle-12-with-anatawa12s-fork
Edit Gradle wrapper to use gradle 4.4.1 or higher.
How to fix the Problem Method 2:
Download and use anatawa12's example gradle template (same commands for cmd):
https://github.com/anatawa12/ForgeGradle-example/archive/master.zip

Ethereum: Error: *** Deployment Failed *** "Migrations" -- invalid sender

I am trying to deploy a smart contract on a private blockchain on ethereum network. But it gives me this error" Error: *** Deployment Failed ***
"Migrations" -- invalid sender."
Now I have done some reading and saw the problem is with the version of "truffle hdwallet provider".
This is the response that I get after installing npm inside directory which shows that hdwallet is installed but still i get this error.
Even if i install another version of hdwallet provider I get the same error as seen below:
I dont understand what am i missing here. If someone can help i will be greatfull. Thanks
Problem solved. It was not actually the problem with truffle hdwallet but the version of truffle. Truffle 5.2.6 was giving me that error and it works fine with truffle 5.0.0.

Internal server error when trying to build and deploy to AEM

My local AEM instance suddenly stopped working when I switched branches in git and installed the package with
mvn clean install -PautoInstallPackage.
The build failed with [ERROR] Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Internal Server Error
My error log shows the following errors:
25.10.2018 11:52:33.607 *ERROR* [127.0.0.1 [1540504353564] POST /crx/packmgr/service.jsp HTTP/1.1] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login.
25.10.2018 11:52:33.607 *ERROR* [127.0.0.1 [1540504353564] POST /crx/packmgr/service.jsp HTTP/1.1] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name a9dea3b044e912071cbffd4839016d2e. Will not be used for login.
25.10.2018 12:00:30.005 *INFO* [sling-default-2-Registered Service.1079] com.adobe.granite.taskmanagement.impl.jcr.TaskArchiveService archiving tasks at: 'Thu Oct 25 12:00:30 HST 2018'
25.10.2018 12:00:58.610 *ERROR* [127.0.0.1 [1540504858546] POST /crx/packmgr/service.jsp HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
java.io.IOException: Unable to get component of class 'interface org.apache.sling.rewriter.Generator' with type 'htmlparser'.
I've tried adding <useProxy>false</useProxy> to my parent POM file as suggested on a similar thread posted here but that also did not work. I've tried recloning the repo and starting over but since it's a server error that did nothing.
Additional Info:
Running on Windows 10
AEM 6.4
Any assistance will be greatly appreciated.
Thanks!
Thanks for your help. The issue actually happened when I switched branches and installed and deployed the package over the existing package in AEM. By removing the quickstart folder and restarting the JAR file, thus creating a new AEM directory, I was able to install and deploy the correct branch without error.

Liberty JAX-RS 2.0 client unmarshalling not working after deploying in IBM Bluemix

I have a REST client code working OK locally in a server but failing to unmarshall JSON into Java when packaged and deployed to Bluemix with same Liberty versiĆ³n (8.5.5.9). Failing code:
Response response = get("/v0.1/path/" + var + "/path/" + var2);
return response.readEntity(MyClass.class);
In bluemix I get this exception:
2016-05-29T13:32:26.16+0200 [App/0] ERR Caused by:
java.lang.NullPointerException 2016-05-29T13:32:26.16+0200 [App/0]
ERR at
org.apache.cxf.jaxrs.impl.tl.ThreadLocalProviders.getContextResolver(ThreadLocalProviders.java:50)
2016-05-29T13:32:26.16+0200 [App/0] ERR at [internal classes]
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider._locateMapperViaProvider(JacksonJsonProvider.java:206)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:853)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:764)
2016-05-29T13:32:26.16+0200 [App/0] ERR at
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1356)
2016-05-29T13:32:26.16+0200 [App/0] ERR ... 13 more
The REST result by the server is OK. In fact, if I get that JSON code as String and use a Jackson mapper to unmarshall it , it works ok, but not if I do it the standard JAX-RS 2.0 client way:
return response.readEntity(MyClass.class);
which will fail with error above.
Edit:
Liberty Versions used:
The build pack wee run locally (JAX-RS 2.0 client requests working OK) is:
(WebSphere Application Server 8.5.5.9/wlp-1.0.12.cl50920160227-1523) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_77-b03 (en_US)
The one in BlueMix (JAX-RS 2.0 client requests throwing NPE at CXF class):
(WebSphere Application Server 2016.5.0.0/wlp-1.0.13.20160430-1625) on IBM J9 VM, version pxa6480sr3-20160428_01 (SR3) (en_US)
Thanks for any help
We currently experience the same problem with our application and Liberty Buildpack Version: v2.9-20160519-1249
It must be a problem with the current buildpack version, because we didn't change our application code and it was working fine with previous deployments to Bluemix.
As a workaround you can explicitly specify a previous liberty buildpack version when deploying your app to Bluemix. Either by using the '-b' parameter on the 'cf push' command or by defining the 'buildpack:" property in your manifest.yml file. Have a look at the following links for details:
new-console.ng.bluemix.net/docs/cfapps/byob.html
docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#buildpack
You can find out the name of the liberty buildpacks available either via 'cf buildpacks' command or here: bpversions.mybluemix.net
Unfortunately, even the previous version liberty_for_java_v2_8-20160430-1011 seems to have the problem described in this thread. Only the oldest version available liberty-for-java_v2_3-20151208-1311 from December last year, is not affected by this problem.
So currently, the only option seems to be to deploy your app via:
$ cf push MYAPP -b liberty-for-java_v2_3-20151208-1311
We are aware of this issue and it's being worked through a Support Ticket. Will update when we have more info.
IBM has recommended us to use the OpenSource Liberty build pack. It is based on 8.5.5.9, the same official download version, and also seems to have solved the problem. To do this we use this manifest.yml
buildpack: https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack.git
env:
IBM_JVM_LICENSE: L-PMAA-A3Z8P2
IBM_LIBERTY_LICENSE: L-MCAO-9SYMVC
JBP_CONFIG_IBMJDK: "version: 1.8.+"
Until they fix the issue I like this workaround as allows to make sure the version deployed in BlueMix is the someone as the one we use locally to develop and test.

Can't use SpeechKit Titanium module from iOS in my app

I want want to use Speechkit SDK in my app, since I found it recognize words better than the native tool did.
I found a Titanium module on GitHub but it is designed to work with Titanium SDK 3.1.3.GA . I am currently working with SDK 5.0.0.GA.
What am I supposed to do to import this module in my mobile app ? I updated the titanium.xcconfig file to reflect the version of my SDK. I also put my credentials into it and build the project. Then I compressed it and installed it via Help Menu > Install Mobile Module. I finally added it to the tiapp.xml file.
When I try to run the project, this is what I get :
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld Build/Intermediates/Hello5.build/Debug-iphoneos/Hello5.build/Objects-normal/arm64/Hello5 normal arm64
[ERROR] : Ld Build/Intermediates/Hello5.build/Debug-iphoneos/Hello5.build/Objects-normal/armv7/Hello5 normal armv7
[ERROR] : (2 failures)
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/feeder/.appcelerator/install/5.0.1/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
at ChildProcess.emit (events.js:117:20)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
I tried to create a new module by hand and drag-and-drop files into it, and also tried to install globally vs project-specific, I can't come with an idea for making it work. Thank you in advance if you could share an idea ;)
I have the same error and looking the console using Trace appears "framework SpeechKit not found".
I've successfully resolved this error by packaging the module to your project directly selecting "Mobile App Project" given that Module.xcconfig sets "FRAMEWORK_SEARCH_PATHS" to find SpeechKit framework on "assets" folder from the project directly.