IBM JSONStore API return's "INVALID_SEARCH_FIELD' when used with OFFSET options - ibm-mobilefirst

We are using JSONStore API below in our Project and this was returning perfect values untill we have updated to the new IBM MFP plugin
cordova-plugin-mfp-jsonstore 8.0.2017082110
var options = {limit : 24 , offset : 24 };
WL.JSONStore.get(STORENAME).findAll(options).then(function(res){console.log(res)}).fail(function(err){console.log(err)});
The above code starts returning errors now after the update as follow
> ErrorObject {src: "find", err: 22, msg: "INVALID_SEARCH_FIELD", col:
> "STORENAME", usr: "jsonstore", …}col: "Assets"doc: {}err: 22msg:
> "INVALID_SEARCH_FIELD"res: {}src: "find"usr: "jsonstore"__proto__:
> Object
This after a long struggle found out its because of the "OFFSET" which we are using in options, if that gets removed it returns perfect values.
This i have tested only in ANDROID Devices.

This issue is appeared in android environment and will be fixed in the upcoming release of cordova-plugin-mfp-jsonstore release.
For time being you can use the following fix which will resolve the issue :
https://ibm.box.com/s/ws4zwy0jqlh84ag1wf7yshrdsxgig4ll
Steps to apply test fix :
Replace ibmmobilefirstplatformfoundationjsonstore.jar in your application project.
Rebuild and run the application.

Related

I need help upgrading OroCommerce to 4.1.1

I just upgraded from 3.1.17 to 4.1.1 and I'm finding a problem with my shopping lists.
When I get to /customer/shoppinglist/5064 I see this:
Looking at my log files from production I see:
[2020-06-23 17:42:56] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedMethodError: "Attempted to call an undefined method named "getDigitalAsset" of class "Proxies\__CG__\Oro\Bundle\AttachmentBundle\Entity\File"." at /usr/share/nginx/html/oroapp/vendor/oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php line 47 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Attempted to call an undefined method named \"getDigitalAsset\" of class \"Proxies\\__CG__\\Oro\\Bundle\\AttachmentBundle\\Entity\\File\". at /usr/share/nginx/html/oroapp/vendor/oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php:47)"} []
I went to look at the code and I see that in fact there is no method getDigitalAsset in oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php, nor in the proxy... how can this be?
I checked this on my VM (where the problem is not happening) and I see that there's this definition in the proxy class:
/**
* {#inheritDoc}
*/
public function getDigitalAsset()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getDigitalAsset', []);
return parent::getDigitalAsset();
}
But again, I don't see a method called getDigitalAsset in the parent class.
I had some issues when doing the upgrade (I realized my nodejs wasn't upgraded as I thought it was), could that have anything to do with the issue?
Thanks
Edit:
I went through my platform upgrade again and found that there were some problems that prevented it from finishing completely.
This is what I found:
> loading Oro\Bundle\CMSBundle\Migrations\Data\ORM\LoadImageSlider
In LoadImageSlider.php line 117:
Attempted to call an undefined method named "setMainImage" of class "Oro\Bundle\CMSBundle\Entity\ImageSlide".
I commented out the loop inside the load method and re-run the upgrade. Then I got:
> loading Oro\Bundle\CMSBundle\Migrations\Data\ORM\LoadImageSlider
In QueryException.php line 65:
[Semantical Error] line 0, col 117 near 'digitalAsset': Error: Class Oro\Bundle\AttachmentBundle\Entity\File has no association named digitalAsset
In QueryException.php line 43:
SELECT file, digitalAsset, sourceFile FROM Oro\Bundle\AttachmentBundle\Entity\File file INNER JOIN file.digitalAsset digitalAsset INNER JOIN digitalAsset.sourceFile sourceFile WHERE file.parentEntityClass = :parentEntityClass
AND file.parentEntityId = :parentEntityId AND file.parentEntityFieldName =
:parentEntityFieldName
Finally I was able to complete the upgrade by commenting out the whole body of the load method
I had some issues when doing the upgrade (I realized my nodejs wasn't upgraded as I thought it was), could that have anything to do with the issue?
It looks like you have multiple versions of nodejs installed. To make an application use the right one, you can provide the absolute path to the executable with the AssetBundle configuration, like:
# config/config.yml
oro_asset:
nodejs_path: /usr/local/node
npm_path: /usr/local/npm

Weblogic Exception after deploy: java.rmi.UnexpectedException

Just encountered a similar issue as described in the below article:
Question: Article with similar error description
java.rmi.UnmarshalException: cannot unmarshaling return; nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.rmi.server.ExportException: Failed to export class
I found that the issue described is totally unrelated to any Java update and is rather an issue with the Weblogic bean-cache. It seems to use old compiled versions of classes when updating a deployment. I was hunting a similar issue in a related question (Question: Interface-Implementation-mismatch).
How can I fix this properly to allow proper automatic deployment (with WLST)?
After some feedback from the Oracle community it now works like this:
1) Shutdown the remote Managed Server
2) Delete directory "domains/#MyDomain#/servers/#MyManagedServer#/cache/EJBCompilerCache"
3) Redeploy EAR/application
In WLST (which one would need to automate this) this is quite tricky:
import shutil
servers=cmo.getServers()
domainPath = get('RootDirectory')
for thisServer in servers:
pathToManagedServer = domainPath + "\\servers\\" + thisServer.getName()
print ">Found managed server:" + pathToManagedServer
pathToCacheDir = pathToManagedServer + "\\" + "cache\\EJBCompilerCache"
if(os.path.exists(pathToCacheDir) and os.path.isdir(pathToCacheDir) ):
print ">Found a cache directory that will be deleted:" + pathToCacheDir
# shutil.rmtree(pathToCacheDir)
Note: Be careful when testing this, the path that is returned by "pathToCacheDir" depends on the MBean-context that is currently set. See samples for WLST command "cd()". You should first test the path output with "print domainPath" and later add the "rmtree" python command! (I uncommented the delete command in my sample, so that nobody accidentially deletes an entire domain!)

ALIZE/LIA_RAL Toolkit 3.0 Tutorial

I am trying get started with ALIZE/LIA_RAL Toolkit. Tried to run ALIZE3.0 Tutorial 02_i-vector_system_with_ALIZE3.0 on my system. But there might be some problem with data. Data folder with the I-vector system is empty and I have used data you provided with GMM-UBM tutorial. IvTest_WCCN_Cosine.log file is showing the following error -
[ Exception 0x77ce00 ]
message = "Matrix is not positive definite"
source file = DoubleSquareMatrix.cpp
line number = 177
Can you please help me out to fix this problem?

IBM Worklight - "getSkinName is not defined"

I am trying to define a new android.tablet skin. I am testing with a Nexus 7 running KitKat.
I did this:
Added the Skin
updated getSkinName() function
I can see in LogCat the function getSkinName() being called
However, there is a confusing message:
"default" skin will be used, because skin named android.tablet was not
found. Add a skin or change android/js/skinLoader.js to return
existing skin.
Am I missing something?
04-01 17:03:32.969: D/CordovaNetworkManager(4481): Connection Type:
wifi 04-01 17:03:32.969: D/CordovaActivity(4481):
onMessage(networkconnection,wifi) 04-01 17:03:32.969:
D/CordovaLog(4481):
file:///android_asset/www/default/js/skinLoader.js: Line 18 :
screen.width 800 04-01 17:03:32.969: I/chromium(4481):
[INFO:CONSOLE(18)] " screen.width 800", source:
file:///android_asset/www/default/js/skinLoader.js (18)
04-01 17:03:32.969: D/CordovaLog(4481): file:///android_asset/www/default/js/skinLoader.js: Line 23 :
returned skinName is android.tablet 04-01 17:03:32.969:
I/chromium(4481): [INFO:CONSOLE(23)] " returned skinName is
android.tablet", source:
file:///android_asset/www/default/js/skinLoader.js (23) 04-01
17:03:32.969: W/WLDroidGap(4481): "default" skin will be used,
because skin named android.tablet was not found. Add a skin or change
android/js/skinLoader.js to return existing skin. ... ... ... 04-01
17:03:34.779: D/CordovaLog(4481):
file:///android_asset/www/default/worklight/cordova.js: Line 1034 :
processMessage failed: Error: ReferenceError: getSkinName is not
defined
Looks like you're right, Worklight Skins fail to load - at least on the first load of the application; if you load it a second time, it does work.
I've opened a defect for this issue.
If you are an IBM business partner or customer, please open a PMR so that once fixed you'll be able to receive this in the form of an iFix release.
Here's what I've done:
Created a new project and application
Added the Android environment
Added an application skin, android.skin, to the Android environment
Added a main.css to my-app\android.skin\css with body {background-color:red}
Changed getSkinName() in my-app\android\js\skinLoader.js' to return "android.skin"
Run As > Run on Worklight Development Server
Run As > Android application
The first load indeed loads the "default" skin instead of "android.skin". The second time I loaded the app (from the device, not by re-installing the app), it did load the "android.skin"...
So anyway, there's a defect. But you can continue developing your application albeit in a somewhat inconvenient way...

ScalaQuery with play2.1.4

I am migrating play2.0 app to play2.1 which has a lot of scalaquery implemented .
with all the migration changes its finally compiled ( not using anorm) the scalaqueries are still there .
play compile and stage is successful but its giving following error
java.lang.NoClassDefFoundError: scala/Right
org.scalaquery.ql.basic.BasicImplicitConversions$class.queryToQueryInvoker(BasicImplicitConversions.scala:26)
org.scalaquery.ql.extended.MySQLDriver$$anon$1.queryToQueryInvoker(MySQLDriver.scala:13)
models.SynonymMappings$$anonfun$updateCommonSynonymMappingTable$1.apply(SynonymMapping.scala:234)
models.SynonymMappings$$anonfun$updateCommonSynonymMappingTable$1.apply(SynonymMapping.scala:224)
org.scalaquery.session.Database.withSession(Database.scala:38)
models.SynonymMappings$.updateCommonSynonymMappingTable(SynonymMapping.scala:224)
Global$.onStart(Global.scala:48)
play.api.GlobalPlugin.onStart(GlobalSettings.scala:175)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:85)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:85)
scala.collection.immutable.List.foreach(List.scala:309)
play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:85)
play.api.Play$$anonfun$start$1.apply(Play.scala:85)
play.api.Play$$anonfun$start$1.apply(Play.scala:85)
play.utils.Threads$.withContextClassLoader(Threads.scala:18)
play.api.Play$.start(Play.scala:84)
SynonymMappings.scala
This is where i am getting error
def updateCommonSynonymMappingTable = database.withSession { implicit db: Session =>
val q = for (m <- SynonymMappings) yield m.skill ~ m.synonyms ~ m.function ~ m.industry
Logger.debug("Q for getting common syn mapping: " + q.selectStatement)
var table: java.util.concurrent.ConcurrentHashMap[String, scala.Array[String]] = EfoundrySynonymEngine.getCommonSynonymMappingTable()
var i = 0
Logger.debug("Q for getting common syn mapping: " + q.selectStatement)
var domainSpWords = 0
form this line trace goes to org.scalaquery.session.Database.withSession
As of Play Framework 2.1, ScalaQuery is deprecated, as it, along with Play Framework 2.0, only supports Scala 2.9.
Play Framework 2.1 supports Scala 2.10. The replacement for ScalaQuery is Slick, which also supports/requires Scala 2.10.
Slick web site: http://slick.typesafe.com/
It's a much cooler web site, so you should be happy.
So include that library in your web app and get rid of ScalaQuery, which should help you along on your migration effort.
And if you're curious, that class not found error is because scala.Right is now scala.util.Right :)