Use Infinite Graph without installing the Product - graph-databases

I am currently writing a Infinite Graph Database Scanner where user can connect to remote InfiniteGraph by providing *.boot file. I am using Blueprint implementation of the InfiniteGraph
i.e. com.tinkerpop.blueprints.impls.ig.IGGraph.
Now the code works perfectly when the machine already has installed version of InfiniteGraph, but fails in other cases. I tried to bundle the bin folder from the installation directory with in my project, but it still fails.
The code I am using :
IGGraph graph = new IGGraph("D:\\PROPERTY_GRAPH_TEST.boot");
for (Vertex vertex : graph.getVertices()) {
System.out.println("vertex.toString() = " + vertex.toString());
}
The exception I am gettings :
Exception in thread "main" java.lang.RuntimeException: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:67)
at com.globalids.test.TestIGGraph.main(TestIGGraph.java:13)
Caused by: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.objy.pm.ErrorManager.exceptionToThrow(Unknown Source)
at com.objy.pm.ErrorManager.interpretKernelErrors(Unknown Source)
at com.objy.pm.ErrorManager.checkRegisteredErrors(Unknown Source)
at com.objy.pm.ExternalInterface.localErrorCheck(Unknown Source)
at com.objy.pm.ExternalInterface.checkedLong(Unknown Source)
at com.objy.pm.ExternalInterface.QueryScanItr(Unknown Source)
at com.objy.pm.QueryScanItr.<init>(Unknown Source)
at com.objy.db.internal.Query.execute(Unknown Source)
at com.infinitegraph.impl.ConnectionManager.verifyCompatability(ConnectionManager.java:211)
at com.infinitegraph.impl.ConnectionManager.connect(ConnectionManager.java:98)
at com.infinitegraph.GraphFactory.openGraph(GraphFactory.java:227)
at com.infinitegraph.GraphFactory.open(GraphFactory.java:86)
at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:62)
... 1 more
Can anyone help regarding this problem ??
Thank you in advance.

Thanks for your question. In fact the distribution requires more than just the "bin" copied over to run successfully. Can you make sure that the "etc" and "plugins" directory are each copied into the same directory as your "bin" directory? This is due to the fact that InfiniteGraph uses the location of the "bin" directory to find the other configuration files in the "etc" and "plugins" directories (where the file, objectivity.crg, and other required files are located). You can email support#objectivity.com if you have any further questions. Thanks!

Related

Unable to subscribe to change data capture event due to timeout error

I am trying to consume Salesforce Change data capture events. I am following this article :https://trailhead.salesforce.com/content/learn/modules/change-data-capture/subscribe-to-events
I have followed following steps:
To get a local copy of the EMP-Connector GitHub repository:
$ git clone https://github.com/forcedotcom/EMP-Connector.git
To build the EMP-Connector tool:
$ cd EMP-Connector
$ mvn clean package
The mvn command generates JAR files in the target folder in the EMP-Connector project directory.
The generated JAR file, target/emp-connector-0.0.1-SNAPSHOT-phat.jar, includes the connector and the LoginExample functionality. The JAR contains all the dependencies for the connector, so you don’t have to download them separately.
To run EMP Connector against your Developer Edition or Trailhead Playground org,
type this command and supply your Trailhead Playground org or Salesforce org login credentials and the channel to subscribe to. In this example, the channel is /data/Employee__ChangeEvent.
$ java -jar target/emp-connector-0.0.1-SNAPSHOT-phat.jar <username> <password> /data/Employee__ChangeEvent
After last step, I am getting following error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Connect Timeout
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101)
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:683)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:124)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:100)
at com.salesforce.emp.connector.LoginHelper.login(LoginHelper.java:92)
at com.salesforce.emp.connector.example.LoginExample.lambda$main$0(LoginExample.java:48)
at com.salesforce.emp.connector.example.BearerTokenProvider.login(BearerTokenProvider.java:24)
at com.salesforce.emp.connector.example.LoginExample.main(LoginExample.java:56)
Caused by: java.net.SocketTimeoutException: Connect Timeout
at org.eclipse.jetty.io.ManagedSelector$Connect.run(ManagedSelector.java:801)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I see a similar issue is opened on github page https://github.com/forcedotcom/EMP-Connector/issues/99
Please provide suggestion to fix this issue

wso2 AM identitfy folder and script missing from dbscripts folder version 2.1.0

I am trying to configure the latest version of WSO2 AM 2.1.0 using a Microsoft SQL Server for its database on a windows server.
The databases have been created with user accounts and trying to start up the application with the start up flag auto create the tables.
the command I am running is: wso2server.bat -Dsetup
Some of the tables are created for the product but receive the following error during the start up on the console window. I have checked and the folder is missing from the distribution. Any help on a way forward?
[2017-08-09 11:24:47,614] ERROR - IdentityCoreServiceComponent Error occurred while populating identity configuration properties
org.wso2.carbon.identity.base.IdentityRuntimeException: java.io.FileNotFoundException: D:\Software\2.1\wso2am-2.1.0\bin\..\dbscripts\identity\mssql.sql (The system cannot find the path specified)
at org.wso2.carbon.identity.base.IdentityRuntimeException.error(IdentityRuntimeException.java:71)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.executeSQLScript(IdentityDBInitializer.java:273)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.createIdentityDatabase(IdentityDBInitializer.java:141)
at org.wso2.carbon.identity.core.persistence.JDBCPersistenceManager.initializeDatabase(JDBCPersistenceManager.java:112)
at org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.activate(IdentityCoreServiceComponent.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:514)
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.io.FileNotFoundException: D:\Software\2.1\wso2am-2.1.0\bin\..\dbscripts\identity\mssql.sql (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.executeSQLScript(IdentityDBInitializer.java:235)
... 30 more
Thanks,
Gary
You have 2 options.
1) Run database scripts manually on created databases, and start server without -Dsetup.
2) Go to <APIM_HOME>/dbscripts/. Make a copy of apimgt and name it as identity. Then start server with -Dsetup.

ERROR [QueryResource] Cannot get excel for query

I executed a query in Saiku and tried to export it to Excel. It throws error page.
Below are the error logs :::
10:05:22,885 ERROR [QueryResource] Cannot get excel for query (01976CF4-EB20-DE88-94CA-E8E8F2A74EA5)
java.lang.NullPointerException
at sun.font.FontManager.getDefaultPlatformFont(FontManager.java:3409)
at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:263)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:164)
at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:254)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Please assist in resolving this.
You need to have the system fonts installed on your box, I'm guessing you're running a headless Linux system?

Running Flink Program on a Remote Cluster

I have a program in Apache Flink. I tested and ran it on the local machine and every thing works fine. To run the program on a remote cluster, I did necessary changes as mentioned in Apache Flink Official Website.
I did the following changes:
The two points below
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment("taskManagerName",
portNo,paralelismNo);
Fixing the necessary paths to read input files and write outputs.
Generate a thin jar out of the program and put the necessary jar
libraries into a folder besides my project jar file called
myproj.jar.
copying the data and the jar library and myproj.jar into the cluster
and run the following command remotely on the cluster:
java -cp pathToJarLib \\* -jar myproj.jar
But, I get the below error and I don't have any clue to fix the issue. There are no relevant log files which can aid me in fixing this issue.
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/api/common/functions/MapFunction
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getMethod0(Class.java:2813)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.api.common.functions.MapFunction
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Your classpath is obviously not complete. Try to submit via bin/flink run myproj.jar. This sets up the classpath correctly.

Run time java jar file with jython exceptions

I have a big application that worked perfect inside eclipse, I create an executable jar file for my application, My application use jython to define some resources. Also I create `the following .bat file to run the file:
# echo off
java -Xms64m -Xmx512m -Xincgc -Dpython.home=jython-2.1 -Dpython.path=jython-2.1/Lib/alice -Djava.library.path=lib/win32;externalLib/win32; -jar MyProg23.jar
When execute the .bat file an exception appeared, this is a part of this exception:
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at edu.cmu.cs.stage3.alice.authoringtool.JAlice.main(JAlice.java:163)
Caused by: Traceback (innermost last):
File "C:\MyWork\AliceDev\Alice test\resources\Alice Style.py", line 23, in ?
File "C:\MyWork\AliceDev\Alice test\resources\common\StandardResources.py", li
ne 181, in ?
AttributeError: java package 'javax' has no attribute 'vecmath'
at org.python.core.Py.AttributeError(Py.java)
at org.python.core.PyObject.__getattr__(PyObject.java)
at org.python.pycode._pyx1.f$0(C:\MyWork\AliceDev\Alice test\resources\c
ommon\StandardResources.py:181)
at org.python.pycode._pyx1.call_function(C:\MyWork\AliceDev\Alice test\r
esources\common\StandardResources.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.__builtin__.execfile_flags(__builtin__.java)
at org.python.core.__builtin__.execfile(__builtin__.java)
at org.python.core.__builtin__.execfile(__builtin__.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.pycode._pyx0.f$0(C:\MyWork\AliceDev\Alice test\resources\A
lice Style.py:23)
at org.python.pycode._pyx0.call_function(C:\MyWork\AliceDev\Alice test\r
esources\Alice Style.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.__builtin__.execfile_flags(__builtin__.java)
at org.python.core.__builtin__.execfile(__builtin__.java)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.loadReso
urcesPy(AuthoringToolResources.java:199)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.<clinit>
(AuthoringToolResources.java:108)
... 3 more
The vecmath.jar file and other external lib are founded inside a folder called externalLib which in the same folder of the Myprog23.jar and .bat files
How to solve the problem and what is need to be set?
You need to add all jars used in program to classpath. So, in your case all jars present in externalLib directory should be added in classpath.
For adding jars in classpath you may refer Setting multiple jars in java classpath
I am assuming that you have correctly set your CLASSPATH variable. Also assuming you have correctly installed JyThon. You should really make sure to TEST JyThon hello world OUTSIDE of your application environment as well. You need to take this step by step, Alice is a complex system, and so it is difficult to debug your issue without making sure basic structure of libraries is in place.
With these assumptions, you can proceed with JyThon documentation FAQ:
Jython cannot find your Java class, even though it exists in the class path.
Jython cannot find your Java class, even though it exists in the class
path. This shows up as "ImportError: cannot import name xxx" or
"AttributeError: java package xxx' has no attribute 'yyy'"
This happens when Jython is installed as a Java extension (i.e. when
jython.jar is installed in java\jre\lib\ext) and your classes are
installed in the classpath.
The reason is Java extensions can only see other extensions, not other
classes defined in the CLASSPATH or passed in to java using the
--classpath option.
There are two ways to fix this:
Move your classes to the java\jre\lib\ext directory.
Remove jython.jar from the java\jre\lib\ext directory and put
jython.jar in the CLASSPATH or use the java --classpath option.

Resources