java.lang.ExceptionInInitializerError
Причина: java.lang.RuntimeException: Некомпилируемый исходный код – Пакет com.toshiba.mwcloud.gs не существует
вgriddbconnection.Sample.(Sample.java:6)
Header скриншот:

Я попробовал приведенный ниже пример кода из GridDB:
Код: Выделить всё
import java.util.Properties;
import java.util.Date;
import com.toshiba.mwcloud.gs.Collection;
import com.toshiba.mwcloud.gs.GSException;
import com.toshiba.mwcloud.gs.GridStore;
import com.toshiba.mwcloud.gs.GridStoreFactory;
import com.toshiba.mwcloud.gs.Query;
import com.toshiba.mwcloud.gs.RowKey;
import com.toshiba.mwcloud.gs.RowSet;
public class Sample {
static class Person {
@RowKey
String name;
int age;
}
static class HeartRate {
@RowKey
Date ts;
int heartRate;
String activity;
}
public static void main(String[] args) {
Properties props = new Properties();
props.setProperty("notificationAddress", "239.0.0.1");
props.setProperty("notificationPort", "31999");
props.setProperty("clusterName", "defaultCluster");
props.setProperty("user", "admin");
props.setProperty("password", "admin");
try {
GridStore store = GridStoreFactory.getInstance().getGridStore(props);
Collection people = store.putCollection("PEOPLE", Person.class);
Query
query = people.query("select * where name = 'John'");
RowSet rs = query.fetch(true);
while (rs.hasNext()) {
// Update the searched Row
Person person1 = rs.next();
System.out.println("Name: " + person1.name + " Age: " + person1.age);
}
store.close();
} catch (GSException e) {
System.err.println(e);
}
}
}

Я также добавил его в переменную среды пути к классам:

Любые ваши предложения будут оценены!
Подробнее здесь: https://stackoverflow.com/questions/783 ... -not-exist
Мобильная версия