SQLite3 in Adobe Plugin extensions - adobe

I have developed a plugin for Adobe Illustrator and I am trying to use sqlite3 or better-sqlite3 node packages instead of mySQL. But I am getting following errors on Mac and Windows.
Windows (using sqlite3)
Uncaught Error: A dynamic link library (DLL) initialization routine failed.
Mac (using better-sqlite3)
Uncaught Error: dlopen(...): no suitable image found.
Did find: [...] code signature in (...) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
Is it possible to use sqlite3 or better-sqlite3 in Adobe plugins?

Welcome here,
This is not possible because Sqlite3 and all its wrapper uses Node C++ Addon and not js package. C++ addons are not supported by CEP as per the official word.
Link for the reference
https://github.com/Adobe-CEP/CEP-Resources/issues/70

Related

Adding new paths for native libraries at runtime in Java9

I have an app that includes some native code. In an effort to make things easy for users to install and run, I have been extending the private field ClassLoader.sys_paths at runtime as described in this previous question: Adding new paths for native libraries at runtime in Java. With this hack the app can run with a simple unadorned java -jar app.jar command and the native objects will be located correctly in the installation directory.
This technique no longer works in Java 9 (see How to solve InaccessibleObjectException ("Unable to make {member} accessible: module {A} does not 'opens {package}' to {B}") on Java 9?). This article describes the changes to Java 9 and suggests a solution (adding arguments to the command line to open the module), but this defeats my original intent of allowing a simple execution of the java command.
Is there any way to change the native library search path at runtime, or is this considered too much of a loaded gun to leave lying around?

Building NaCl SDK from source for ARM-32

I am trying to build Native Client SDK from source code following instructions on: www.chromium.org/nativeclient/how-tos/building-and-testing-gcc-and-gnu-binutils. After I run make clean build-with-newlib -j16, I get errors. When I saw the contents of Makefile, I realized that CROSS_ARCH was set to x86_64. Changing it to arm32 threw different kind of errors. What are the settings to generate binaries for ARM platform?

java.lang.UnsatisfiedLinkError: no db_java-4.2 in java.library.path

I'm trying to access a Berkeley DB database file (say Test.db) from the java code and then want to read all the pairs from it. I'm using the com.sleepycat.db.* and com.sleepycat.bdb.* packages ( NOTE: Not Oracle Berkeley DB JE )to do this task. For the implementation, I did exactly as described in this BerkeleyDB Java API Tutorial
So, when I run this project from eclipse I got this error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no db_java-4.2 in java.library.path
and from the stack trace, source for this exception occured from this line
env = new DbEnv(0);
I tried to set it from the java command
$java -D<name>=<value>
but still it didn't work.
My goal is to export this project into a jar file and use it to read BDBs anywhere . Anyone who knows how to get out of this, I appreciate your help. It would be great if I can be redirected to any working tutorial for accessing Berkeley DBs from java code too. Thanks !!
SOLUTION: After a lot of work, I found out that the Sleepycat API that I'm working on is using native libraries that are written in C/C++ through the JNI. Berkeley DB that is installed on my PC didn't have the shared object file db_java-4.2 (to be accurate, file name is libdb_java-4.2) which means that this BDB is not configured for java APIs.
So, the solution is to start the installation of BDB from scratch again by enabling the java configuration.
I had the same problem.
Like kK_Pulla mentioned, the sleepycat API using native libraries written in C/C++ through the Java Native Interface. So making Sleepycat API calls means the java code is ultimately going to call compiled C/C++ code.
If you are getting the "java.lang.UnsatisfiedLinkError: no db_java-4.2 in java.library.path" error then it is likely that, at least it was in my case, you have not included the relevant native libraries in your project.
I would describe what I did to fix it in my case. Firstly let me describe my environment.
IntelliJ maven Java project on a linux machine.
Built Berkeley DB version 18.1.40.
The Berkeley build included the --enable-java switch in the configuration phase.
I included the db.jar (found in the build_unix directory) as a module dependency through the Intellij menus File> Project Structure. I selected Modules under Project settings on the left pane and then under the dependencies tab I added the db.jar file as a dependency.
This was the state of my project before I encountered the UnsatisfiedLinkError. To fix that I added the native libraries (found in the unix_build/.libs directory) to the project. You can do this by selecting the File menu> then Project Structure. On the left pane under project settings select Libraries and then click the + sign on the right pane to add the directory for the native libs.
This fixed my problem.

postMessage not declared in this scope error when building nativeClient plugin

When I am trying to build the plugin module using .\scons it is raising me errors. What might cause these types of errors...? Error is
postMessage() was not declared in this scope.
I am using pepper_16 version. Here is the procee I did
Installed Python and gave the path required(Installed in D drive as I do not have privileges).
Downloaded nacl_sdk.zip extracted in the same folder where I have installed python and updated the tools with nacl_sdk.bat update
Enabled NativeClient form about:flags window and executed the server using httpd.py file.
And created project in Pepper_16/examples/TestApp using init_project.
Written the code as it is in the Getting started tutorial to test.
Then using ./scons in the same project folder in cmd mode I have tried to build
The above process worked fine for me where I have admin privileges. But the same procedure and same code not working where I do not have admin privileges.
Please let me know if any further details are required.
which source file was being compiled? a lengthier cut-n-paste of the output around the error message would help to give context.
also, when you say the plugin module, are you referring to NaCl itself or your own PPAPI plugin? normally NaCl's plugin is built into Chromium using gyp, and while scons can be used to build the NaCl plugin it is typically only used for testing, via the --register-pepper-plugin command line argument to chrome.

Runtime error when compiling flex application with ANT

I'm using a licensed version of Flex Builder Pro to develop an application.
I compiled the swc and generated swf successfully using ANT tasks.
It contains an Advanced Data Grid also. When this application is accessed, I get a runtime error and it fails to load.
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at mx.controls::AdvancedDataGridBaseEx/getSeparator()
at mx.controls::AdvancedDataGridBaseEx/createHeaderSeparators()
at mx.controls::AdvancedDataGrid/createHeaderSeparators()
at mx.controls::AdvancedDataGridBaseEx/drawSeparators()
at mx.controls::AdvancedDataGridBaseEx/updateDisplayList()
at mx.controls::AdvancedDataGrid/updateDisplayList()
at mx.controls.listClasses::AdvancedListBase/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()
I'm adding datavisualization.swc and datavisualization_rb.swc in the build paths.
How can I successfully compile the application without any runtime errors?
Please help.
Include the swcs in the library path as shown here.
Maybe this helps: http://kb2.adobe.com/cps/403/kb403121.html
By coincidence I had the same error a couple of days ago. The source of this problem was a library against I built, which was linked statically against an older version of the datavisualization libraries. Normally libraries should only be compiled against other libraries using the external-library-path compiler option, but this library was compiled incorrectly.
So that library contained older parts of datavisualization that were referenced by code in the library, while my code referenced newer parts from the datavisualization library itself. The result was a mix of older and newer datavisualization classes at runtime.
So check the SWCs that you include in your library path. You can extract these with a ZIP tool. You will then find a catalog.xml file in there. Search for mx/controls/AdvancedDataGrid in this file. In case you can see it included in the catalog, you've found the bogus library.

Resources