Missing every swing element in java in netbeans, project correpted - user-interface

I don't know why this class shows errors in every line. This was fine but suddenly i close and open my netbeans IDE and it shows every-line error.
I tried to figure out where the problem is, but i can't. I notice that every button,table,label are missing, otherwise variable, database connection is ok.
My imports are:
import javax.swing.*;
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import Main.SqlConnection;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
import Main.Check;
import java.awt.Color;
import java.awt.event.KeyEvent;
Errors look like this image .
How do i solve this ?
Do i need to recover my project ?

add try{ block just before following line
private void btn_SaveActionPerformed(java.awt.event.ActionEvent evt) {

Your solution as follows
Consider following method. It don't contain a try keyword. add try keyword there. Then it will be fixed.
private void btn_SaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try { //this line is not present in your code. add this
StringBuffer stringBuffer = new StringBuffer();
if (value_for_show_table == 61) {
stringBuffer.append("insert into class6a where ");
} else if (value_for_show_table == 62) {
stringBuffer.append("insert into class6b where ");
} else if (value_for_show_table == 71) {
stringBuffer.append("insert into class7a where ");
} else if (value_for_show_table == 72) {
stringBuffer.append("insert into class7b where ");
} else if (value_for_show_table == 81) {
stringBuffer.append("insert into class8a where ");
} else if (value_for_show_table == 82) {
stringBuffer.append("insert into class8b ");
}
stringBuffer.append("where '" + txt_Username.getText() + "','" + txt_roll.getText() + "','" + txt_Bangla1st.getText() + "',"
+ "'" + txt_Bangla2nd.getText() + "','" + txt_English1st.getText() + "','" + txt_English2nd.getText() + "',"
+ "'" + txt_Math.getText() + "','" + txt_Social.getText() + "','" + txt_Religion.getText() + "',");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Roll number can't be duplicate");
}
}
Additionally It may happen according to many reasons. There are one of them.
When project cannot find the JDK location or when missing core library of java
When using a reserved word as a parameter or class name

Related

Jmeter - Inline evaluation error in Beanshell Assertion

I am getting this error, and cannot figure out what wrong I am doing:
Error invoking bsh method: eval In file: inline evaluation of: ``import java.util.Set; import java.util.Map; import java.util.List; try { // Map . . . '' Encountered "String" at line 17, column 9.
This is the code that I am using:
import java.util.Set;
import java.util.Map;
import java.util.List;
try
{
// Map<String,List<String>> map = new HashMap<String,List<String>>();
// map = vars.getObject("headerMap");
boolean isHeaderValid = false;
// String apiKeySent = "${x_api_key}"
// String clientIdSent = "${X_IBM_Client_id}"
// String clientSecretSent = "${X_IBM_Client_Secret}"
String apiKeySent = vars.get("x_api_key")
String clientIdSent = vars.get("X_Client_id")
String clientSecretSent = vars.get("X_Client_Secret")
log.info("apiKeySent: " + vars.get("x_api_key"))
log.info("clientIdSent: " + vars.get("X_Client_id"))
log.info("clientSecretSent: " + vars.get("X_Client_Secret"))
if(apiKeySent != "")
{
apiKeyRec = vars.get("apiKeyRec")
isHeaderValid = apiKeySent.equals(apiKeyRec)
}
Failure = isHeaderValid
}
catch(Exception e)
{
log.debug("Error in verification: ",e)
}
Could anyone please help me in figuring this out? Have been stuck at this for ages.
You need to add semicolons like this
import java.util.Set;
import java.util.Map;
import java.util.List;
try
{
// Map<String,List<String>> map = new HashMap<String,List<String>>();
// map = vars.getObject("headerMap");
boolean isHeaderValid = false;
// String apiKeySent = "${x_api_key}"
// String clientIdSent = "${X_IBM_Client_id}"
// String clientSecretSent = "${X_IBM_Client_Secret}"
String apiKeySent = vars.get("x_api_key");
String clientIdSent = vars.get("X_Client_id");
String clientSecretSent = vars.get("X_Client_Secret");
log.info("apiKeySent: " + vars.get("x_api_key"));
log.info("clientIdSent: " + vars.get("X_Client_id"));
log.info("clientSecretSent: " + vars.get("X_Client_Secret"));
if(apiKeySent != "")
{
apiKeyRec = vars.get("apiKeyRec");
isHeaderValid = apiKeySent.equals(apiKeyRec);
}
Failure = isHeaderValid;
}
catch(Exception e)
{
log.debug("Error in verification: ",e);
}
Since JMeter 3.1 you should be using JSR223 Test Elements and Groovy language for scripting so consider migrating to JSR223 Assertion and Groovy
Your script can be simplified to
AssertionResult.setFailure(vars.get('x_api_key') == vars.get('apiKeyRec'))
And you don't even need any scripting for comparing 2 variables, it can be done using "normal" Response Assertion
It looks like you are forgetting to end all of your statements with semicolons from line 12 on. Add semicolons and let me know how that works!

JSR223 Sampler Optimatization

I have the following JSR223 Sampler which reads the image changes it a bit and sends a POST multipart/form-data request. I see that it is extensively using CPU compared to HTTP Sampler but I can't use HTTP sampler as it doesn't support changing the image without saving to file system.
Appreciate if anyone has any input to optimize the script in JSR223 sampler so it doesn't extensively lot of CPU.
import org.apache.http.HttpHeaders
import org.apache.http.client.config.RequestConfig
import org.apache.http.client.methods.HttpUriRequest
import org.apache.http.client.methods.RequestBuilder
import org.apache.http.conn.ssl.NoopHostnameVerifier
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
import org.apache.http.conn.ssl.TrustStrategy
import org.apache.http.entity.StringEntity
import org.apache.http.impl.client.HttpClients
import org.apache.http.ssl.SSLContextBuilder
import org.apache.http.util.EntityUtils
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.HttpMultipartMode;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.awt.Graphics;
import java.io.ByteArrayOutputStream;
import org.apache.http.entity.ContentType;
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
List<String> sendRequest(String url, String method, String body) {
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(40000)
.setSocketTimeout(50000)
.build();
BufferedImage image = ImageIO.read(new File("/home/4567/loadtest/Bank.JPG"));
Graphics graphics = image.getGraphics();
graphics.setFont(graphics.getFont().deriveFont(16f));
graphics.drawString("User " + ctx.getThreadNum() + &apos;-&apos; + Math.random() +"; iteration: " + ctx.getVariables().getIteration(), 50, 50);
graphics.dispose();
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ImageIO.write(image, "jpg", bytes);
final MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create();
multipartEntity.setMode(HttpMultipartMode.STRICT);
multipartEntity.addBinaryBody("File", bytes.toByteArray(),ContentType.IMAGE_JPEG, "Bank.JPG");
HttpUriRequest request = RequestBuilder.create(method)
.setConfig(requestConfig)
.setUri(url)
.setHeader("x-ibm-client-id","248a20f3-c39b-45d0-b26a-9019c26e9be8")
.setHeader("X-Client-Id","2861D410-773B-4DD9-AE74-882116B08856")
.setHeader("ResponseMinLatencyMs","45")
.setHeader("ResponseMaxLatencyMs","55")
.setEntity(multipartEntity.build())
.build();
// String req = "REQUEST:" + "User " + ctx.getThreadNum() + "; iteration: " + ctx.getVariables().getIteration() + " " + request.getRequestLine() + "\n";
def builder = new SSLContextBuilder();
builder.loadTrustMaterial(null, new TrustStrategy() {
#Override
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
return true;
}
});
def trustAllFactory = new SSLConnectionSocketFactory(builder.build(), new NoopHostnameVerifier());
HttpClients.custom().setSSLSocketFactory(trustAllFactory).build().withCloseable { httpClient ->
httpClient.execute(request).withCloseable { response ->
// String res = "RESPONSE:" + "User " + ctx.getThreadNum() + "; iteration: " + ctx.getVariables().getIteration() + " " + response.getStatusLine() + (response.getEntity() != null ? EntityUtils.toString(response.getEntity()) : "") + "\n";
// log.info(req + "\n" + res);
// return Arrays.asList(req, res);
response.close()
}
httpClient.close()
}
image.flush()
bytes.flush()
bytes.close()
}
sendRequest("https://test-server.com/upload", "POST", "");
I believe normal HTTP Request sampler doesn't change the images before sending the request that's why it is not that CPU intensive.
Looking into Beanshell vs JSR223 vs Java JMeter Scripting: The Performance-Off You've Been Waiting For! article it seems that Java it still the best choice in terms of performance and resources usage so you might want to re-implement your code in Java and use JUnit or Java request samplers
If you run up above 85% of CPU on your JMeter machine most probably you won't get accurate results because JMeter won't be able to send requests fast enough, consider going for Distributed Testing

JMeter SocketTimeout and OutofMemoryErrors

I have the following code in JSR223 Sampler and I get following errors when I run this jmeter command. Can anyone please advise if something is wrong with my code? I'm basically reading a image and changing it little bit and sending a multipart/form-data POST request.
jmeter -n -Jthreads=20 -Jrampup=30 -Jduration=60 -Jiterations=-1 -t script.jmx
javax.script.ScriptException: java.net.SocketTimeoutException: Read timed out
Uncaught Exception java.lang.OutOfMemoryError: Java heap space in thread Thread[Thread Group 1-10,5,main]
import org.apache.http.HttpHeaders
import org.apache.http.client.config.RequestConfig
import org.apache.http.client.methods.HttpUriRequest
import org.apache.http.client.methods.RequestBuilder
import org.apache.http.conn.ssl.NoopHostnameVerifier
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
import org.apache.http.conn.ssl.TrustStrategy
import org.apache.http.entity.StringEntity
import org.apache.http.impl.client.HttpClients
import org.apache.http.ssl.SSLContextBuilder
import org.apache.http.util.EntityUtils
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.HttpMultipartMode;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.awt.Graphics;
import java.io.ByteArrayOutputStream;
import org.apache.http.entity.ContentType;
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
List<String> sendRequest(String url, String method, String body) {
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(2000)
.setSocketTimeout(3000)
.build();
BufferedImage image = ImageIO.read(new File("C:/Users/bd3249/Pictures/5.JPG"));
Graphics graphics = image.getGraphics();
graphics.setFont(graphics.getFont().deriveFont(16f));
graphics.drawString("User " + ctx.getThreadNum() + '-' + Math.random() +"; iteration: " + ctx.getVariables().getIteration(), 50, 50);
graphics.dispose();
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ImageIO.write(image, "jpg", bytes);
final MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create();
multipartEntity.setMode(HttpMultipartMode.STRICT);
multipartEntity.addBinaryBody("File", bytes.toByteArray(),ContentType.IMAGE_JPEG, "5.JPG");
HttpUriRequest request = RequestBuilder.create(method)
.setConfig(requestConfig)
.setUri(url)
.setHeader("x-ibm-client-id","248a20f3-c39b-45d0-b26a-9019c26e9be8")
.setHeader("X-Client-Id","2861D410-773B-4DD9-AE74-882116B08856")
.setEntity(multipartEntity.build())
.build();
String req = "REQUEST:" + "User " + ctx.getThreadNum() + "; iteration: " + ctx.getVariables().getIteration() + " " + request.getRequestLine() + "\n";
def builder = new SSLContextBuilder();
builder.loadTrustMaterial(null, new TrustStrategy() {
#Override
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
return true;
}
});
def trustAllFactory = new SSLConnectionSocketFactory(builder.build(), new NoopHostnameVerifier());
HttpClients.custom().setSSLSocketFactory(trustAllFactory).build().withCloseable { httpClient ->
httpClient.execute(request).withCloseable { response ->
String res = "RESPONSE:" + "User " + ctx.getThreadNum() + "; iteration: " + ctx.getVariables().getIteration() + " " + response.getStatusLine() + (response.getEntity() != null ? EntityUtils.toString(response.getEntity()) : "") + "\n";
log.info(req + "\n" + res);
return Arrays.asList(req, res);
}
}
}
List test1 = sendRequest("https://test.com/upload", "POST", "");
The error you're getting clearly indicates that you don't have sufficient Java Heap space, by default JMeter 5.3 comes with 1 GB of heap and depending on your image size and response size it might be not enough for your test.
Use i.e. Active Threads Over Time listener to see how many virtual users were online when the error occurs and increase the heap size proportionally.
More information: 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure

Drools 6.5 Final CEP (Fusion) stability and performance problems

I am trying to see the max EPS capacity of Drools CEP. I am using 8 core 2.6 GHz CPU with 16 GB RAM. I am testing just 200 EPS with 2 rules. Drools starts good but later (within 5 to 15 minutes) it stucks or starts NOT TO FIRE
I have tested with fireAllRules and fireUntilHalt.
My Test Code:
package com.anet.correlation;
public class TestRealCase {
public static void main(String[] args) {
Main.initTest();
RulesRegistery.starttime = System.currentTimeMillis();
if (RuleRunTimeRegistery.isFireuntilHalt) {
Thread t = new Thread(new FT());
t.start();
}
int i = 0;
if (Main.ruleEngine != null) {
while (true) {
GeneralCorrelationObject ao1 = new GeneralCorrelationObject();
ao1.setLOGTYPE("Firewalls");
ao1.setSourceMachine("1.2.3.4" + (i % 500));
ao1.setDestinationPort(i);
Main.ruleEngine.evaluate(ao1);
i++;
if (i % RulesRegistery.EPS == 0)
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
My DRL File
import com.anet.correlation.*;
import java.util.*;
import com.anet.ntLog.collector.*;
import com.anet.alarm.*;
import com.anet.util.*;
import com.anet.correlation.operators.*;
import com.anet.correlation.utils.*;
declare GeneralCorrelationObject
#role(event)
#expires( 1200s )
end
rule "Port Scan_Port Scan_16"
salience 0
no-loop
when
$map1: Map()
from accumulate(
generalcorrelationobject1:GeneralCorrelationObject(LOGTYPE=='Firewalls') over window:time( 1m )
,init( Map m = new HashMap();Hashtable ht= new Hashtable(); ),
action(
if(generalcorrelationobject1.getSourceMachine()==null)
{
return;
}
String key="SourceMachine="+generalcorrelationobject1.getSourceMachine();
List list = (List)m.get(key);
if( list == null )
list = new ArrayList();
Object val1=generalcorrelationobject1.getDestinationPort();
String value1;
if (val1 instanceof Integer)
value1=val1+"";
else
value1=(String)val1;
String not_key=value1;
if (ht.containsKey(key)){
Hashtable ht_hash=(Hashtable)ht.get(key);
Object ht_val=ht_hash.get(not_key);
String ht_value;
if (ht_val instanceof Integer)
ht_value=ht_val+"";
else
ht_value=(String)ht_val;
if (!not_key.equalsIgnoreCase(ht_value)){
ht_hash.put(not_key, not_key);
ht.put(key, ht_hash);
list.add( generalcorrelationobject1 );
}
}
else{
Hashtable ht_hash=new Hashtable();
ht_hash.put(not_key, not_key);
ht.put(key, ht_hash);
list.add( generalcorrelationobject1 );
}
m.put(key,list);),
result( m )
)
then
/*
if ((new CheckListSize()).check($map1,10)){
System.out.println("Done");
}
*/
Iterator s = $map1.keySet().iterator();
while (s.hasNext()) {
String key = (String) s.next();
List list = (List) $map1.get(key);
System.out.println(key+" : "+list.size());
}
end
rule "Port eee Scan_161"
salience 100
no-loop
when
ee:GeneralCorrelationObject()
then
if (RulesRegistery.numberofsingleruleexecution % RulesRegistery.printEPS == 0) {
System.out.println(ee.getSourceMachine());
}
RulesRegistery.numberofsingleruleexecution++;
end
RuleEngine Code
package com.anet.correlation;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Date;
import org.kie.api.KieBase;
import org.kie.api.KieBaseConfiguration;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
import org.kie.api.builder.KieFileSystem;
import org.kie.api.builder.Message;
import org.kie.api.builder.ReleaseId;
import org.kie.api.conf.EventProcessingOption;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieSessionConfiguration;
import org.kie.internal.builder.conf.RuleEngineOption;
import org.kie.internal.KnowledgeBase;
import org.kie.internal.KnowledgeBaseFactory;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.internal.io.ResourceFactory;
import org.kie.api.io.ResourceType;
public final class RulesEngine {
KieSession ksession;
KieBuilder kbuilder;
public static String header = null;
public RulesEngine(boolean b) {
KieServices ks = KieServices.Factory.get();
KieFileSystem kfs = ks.newKieFileSystem();
kfs.write("src/main/resources/bench.drl", getRule());
this.kbuilder = ks.newKieBuilder(kfs);
this.kbuilder.buildAll();
if (this.kbuilder.getResults().hasMessages(new Message.Level[] { Message.Level.ERROR })) {
throw new IllegalArgumentException(this.kbuilder.getResults().toString());
}
ReleaseId relId = this.kbuilder.getKieModule().getReleaseId();
KieContainer kcontainer = ks.newKieContainer(relId);
KieBaseConfiguration kbconf = ks.newKieBaseConfiguration();
kbconf.setOption(EventProcessingOption.STREAM);
kbconf.setOption(RuleEngineOption.PHREAK);
// kbconf.setOption(RuleEngineOption.RETEOO);
System.out.println("KB " + kbconf.getProperty("drools.ruleEngine"));
KieBase kbase = kcontainer.newKieBase(kbconf);
KieSessionConfiguration ksconf = ks.newKieSessionConfiguration();
this.ksession = kbase.newKieSession(ksconf, null);
}
String readFile(String fileName) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(fileName));
try {
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line != null) {
sb.append(line);
sb.append("\n");
line = br.readLine();
}
String rule = (sb.toString());
System.out.println("New Final");
System.out.println(rule);
return rule;
} finally {
br.close();
}
}
public String getRule() {
try {
return readFile(".." + File.separator + "rules" + File.separator + "all.drl");
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public void evaluate(GeneralCorrelationObject message) {
if (message == null) {
System.out.println("message null ");
return;
}
if (ksession == null) {
System.out.println("ksession null ");
return;
}
try {
Long n = System.currentTimeMillis();
if (RulesRegistery.numberofrules % RulesRegistery.printEPS == 0) {
System.out.println("Inserting Objects " + RulesRegistery.numberofrules + " EPS : "
+ (RulesRegistery.numberofrules / ((n - RulesRegistery.starttime) / 1000)) + " : Total time "
+ ((n - RulesRegistery.starttime) / (1000 * 60)) + " : " + new Date());
}
ksession.insert(message);
if (RulesRegistery.numberofrules % RulesRegistery.printEPS == 0) {
System.out.println("Inserted Objects " + RulesRegistery.numberofrules + " EPS : "
+ (RulesRegistery.numberofrules / ((n - RulesRegistery.starttime) / 1000)) + " : Total time "
+ ((n - RulesRegistery.starttime) / (1000 * 60)) + " : " + new Date());
}
if (!RuleRunTimeRegistery.isFireuntilHalt) {
if (RulesRegistery.numberofrules % RulesRegistery.printEPS == 0) {
System.out.println("Running Rules " + RulesRegistery.numberofrules + " EPS : "
+ (RulesRegistery.numberofrules / ((n - RulesRegistery.starttime) / 1000))
+ " : Total time " + ((n - RulesRegistery.starttime) / (1000 * 60)) + " : "
+ new Date());
}
ksession.fireAllRules();
if (RulesRegistery.numberofrules % RulesRegistery.printEPS == 0) {
System.out.println("Runned Rules " + RulesRegistery.numberofrules + " EPS : "
+ (RulesRegistery.numberofrules / ((n - RulesRegistery.starttime) / 1000))
+ " : Total time " + ((n - RulesRegistery.starttime) / (1000 * 60)) + " : "
+ new Date());
}
}
RulesRegistery.numberofrules++;
RuleRunTimeRegistery.lasttiem = n;
} catch (Exception ee) {
ee.printStackTrace();
}
}
}
Unless I've missed it: there isn't a retract statement in your code. This means that you keep inserting objects, with the usual result, after some time.
Retract facts as soon they aren't needed any more in any of your rules.

How to save a file as rdf in Protege 4.3?

I have made an ontology on Protege. it has . owl extension. I am trying to import this ontology in oracle 12c using jena. but model. Read method requires an rdf file. I am giving the code as well as error. Kindly help me in this case.
error
Exception in thread "main" com.hp.hpl.jena.shared.JenaException: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
at oracle.spatial.rdf.client.jena.Oracle.<init>(Oracle.java:207)
at test.TestClass.main(TestClass.java:26)
code package test;
import java.io.InputStream;
import com.hp.hpl.jena.rdf.model.*;
import oracle.spatial.rdf.client.jena.GraphOracleSem;
import oracle.spatial.rdf.client.jena.ModelOracleSem;
import oracle.spatial.rdf.client.jena.Oracle;
import oracle.spatial.rdf.client.jena.OracleUtils;
import com.hp.hpl.jena.graph.GraphUtil;
import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.util.FileManager;
public class TestJena{
public static void main(String[] args) throws Exception
{
//String szJdbcURL = args[0];
//String szUser = args[1];
//String szPasswd = args[2];
//String szModelName = args[3];
// in memory Jena Model
Model model = ModelFactory.createDefaultModel();
InputStream is = FileManager.get().open("E:/abcd.owl");
model.read(is, "", "RDF/XML");
is.close();
Oracle oracle = new Oracle("jdbc:oracle:oci8:#", "c##hr_admin","Hira123");
ModelOracleSem modelDest = ModelOracleSem.createOracleSemModel(oracle,"M1");
GraphOracleSem g = modelDest.getGraph();
g.dropApplicationTableIndex();
int method = 2; // try bulk loader
String tbs = "SYSAUX"; // can be customized
if (method == 0) {
System.out.println("start incremental");
modelDest.add(model);
System.out.println("end size " + modelDest.size());
}
else if (method == 1) {
System.out.println("start batch load");
g.getBulkUpdateHandler().addInBatch(
GraphUtil.findAll(model.getGraph()), tbs);
System.out.println("end size " + modelDest.size());
}
else {
System.out.println("start bulk load");
g.getBulkUpdateHandler().addInBulk(
GraphUtil.findAll(model.getGraph()), tbs);
System.out.println("end size " + modelDest.size());
}
g.rebuildApplicationTableIndex();
long lCount = g.getCount(Triple.ANY);
System.out.println("Asserted triples count: " + lCount);
model.close();
OracleUtils.dropSemanticModel(oracle, "M1");
oracle.dispose();
}
}
You can rename the file to RDF: under the assumption that the format you used for the ontology is RDF/XML (the default), all that is needed is changing the file extension.
Regarding the error you post, you are missing a binary library. You need to set java.library.path to point at the folder containing the library mentioned in the error.
See for example how to set java library path for processing for how to do this.

Resources