jpod error, where is the FileLocator? - pdf

I am trying to evaluate the jPod PDF library, the import line:
import de.intarsys.tools.locator.FileLocator;
says it cannot be resolved. I have jPod.JAR and iscommon.jar, What other JARs do I need to get the FileLocator?

Related

cannot find symbol error: cannot find symbol import com.google.ads.mediation.facebook.FacebookAdapter;

I am getting this error "cannot find symbol import com.google.ads.mediation.facebook.FacebookAdapter" while trying to execute app in android studioenter code here
The problem is cause by 'com.google.ads.mediation:facebook:6.12.0.0'.
Google removed 2 classes: FacebookAdapter and FacebookExtras on version 6.12.0.0.
I don't know why they are remove them (maybe replace for a new API or maybe just a mistake). You can temporary resolve this by downgrade the package version to 6.11.0.0.

I created a updatesite.nsf from updatesite.ntf template and trying to import a feature

I created a updatesite.nsf from updatesite.ntf template and trying to import a feature and I get an error says "LS2J Error: Java constructor failed to execute in (#304)..." And a long message. Notes and Domino are 12.0.02 both 64 bit...Need help in this . Why am I getting this error ? Nothing in Activity logs either in the updatesite.nsf.
The developer tried to create a JAR and trying to import it the Feature into the updatesite,nsf database and it errors out as above. It should import as I am expecting.

How to import ErrorUtils in React Native

RN version: 0.50
Testing on Android, haven't tested on iOS
I am trying to use ErrorUtils.setGlobalHandler as described in this github issue: https://github.com/facebook/react-native/issues/1194
However, what is not clear from the issue is how to import ErrorUtils. It's not in the react documentation: https://facebook.github.io/react-native/docs/0.50/getting-started.html
Previously, in RN 0.41, I was able to import ErrorUtils with import ErrorUtils from "ErrorUtils"; However, in 0.50 I am getting a red react popup with the following message when I try to import ErrorUtils like this:
com.facebook.react.common.JavascriptException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.bundle?platform=android&dev=true&minify=false' failed to load.
I've also tried import { ErrorUtils } from 'react-native'; but it doesn't seem to exist there. The error is:
Cannot read property 'setGlobalHandler' of undefined
How do I properly import ErrorUtils in RN 0.50?
ErrorUtils is a global variable, therfore it doesn't need to be imported. You can verify this with console.log(global.ErrorUtils)
However it is exported as module anyways (here). The comment there also has more information why it is done this way.
You can import the module like this:
import ErrorUtils from 'ErrorUtils';
For anyone on RN61+, you should no longer import the module as you will experience the following error in the running metro bundler:
Error: Unable to resolve module `ErrorUtils`
Instead, just use the module without importing as this is a global variable, as stated by leo
I did created a global.d.ts to define a global variable,
interface Global {
ErrorUtils: {
setGlobalHandler: any
reportFatalError: any
getGlobalHandler: any
}
}
declare var global: Global
then, at where you are trying to use it, simply
global.ErrorUtils.setGlobalHandler(xxxx)

Why can't I access Jython access stdlib modules when called from tomcat?

I can take an application with the following code in it:
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("import os");
interpreter.exec("import mylib");
Where the following is resources/Lib/mylib/__init__.py:
from __future__ import print_function
from . import myfriend as thing
import os
print("Yep, everything works")
and compile it using maven, producing a my-app-with-dependencies.jar
I can easily run it with java -jar my-app-with-depenendencies.jar and it works just fine, hooray!
Here's where the sad part comes in. I can put this exact same code inside a Spring handler:
#RequestMapping("/doesnotwork")
public #ResponseBody String sadness() {
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec("import os");
interpreter.exec("import mylib");
return "Quoth the Java, nevermore";
}
and magically this no longer works. Not one little bit.
I can however move my file from resources/Lib/ to webapp/WEB-INF/lib/Lib/ and import mylib works. But within mylib I can no longer import from __future__ or os. I can import sys, and my sys.path looks like this:
['/path/to/my/webapp/WEB-INF/lib/Lib', '__classpath__', '__pyclasspath__/']
My sys.path_importer_cache looks like this:
{'__classpath__': <type 'org.python.core.JavaImporter'>,
'/path/to/my/webapp/WEB-INF/lib/Lib': None,
'/path/to/my/webapp/WEB-INF/lib/Lib/mylib': None,
'__pyclasspath__/': <ClasspathPyImporter object at 0x2>}
What am I doing wrong that I can't import the stdlib? /path/to/my/webapp/WEB-INF/lib contains both jython-2.7-b1.jar and jython-standalone-2.7-b1.jar. I've even tried inserting those jar files into my path and still no dice.
I can import java classes from .jar files present in the folder, except for ones found in the jython .jars. For instance, inside jython-2.7-b1.jar are org/python/apache/xml/serialize/Serializer.class. I can import org.python but there only exists org.python.__name__.

FlashBuilder won't import

I am using FlashBuilder 4.6.
My relevant directory structure is as follows:
>src
+(default package)
pandorica.as
pandorica.mxml
+assets
+com
comBrowse.as
comBrowse.mxml
comLoad.as
comLoad.mxml
comSave.as
comSave.mxml
In the pandorica.as file I have the code:
import com.comBrowse;
import com.comLoad;
import com.comSave;
For some reason the compiler throws the errors:
1172: Definition com:comLoad could not be found.
1172: Definition com:comSave could not be found.
The files definitely exist and are in the exact same format as the com.comBrowse file (which the compiler sees).
Any suggestions as to what could be the matter??
Thanks for your constructive answers.
After playing around with this for FAAAAAAR too long I figured out a fix but still have no clue as to why it was happening. Flex was not allowing me to have the .as and .mxml files in the same directory. I ended up having to change the directories as follows:
>src
+(default package)
pandorica.as
pandorica.mxml
+assets
+com
+as
comBrowse.as
comLoad.as
comSave.as
comBrowse.mxml
comLoad.mxml
comSave.mxml