Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle Jena Adaptor

Mannamal-OracleNov 9 2007 — edited Nov 12 2007
We are pleased to announce the availability of the Oracle Jena Adaptor, that will enable the use of the Jena framework with Oracle RDF. Jena is an Open Source framework developed by Hewlett-Packard and is available under a BSD-style license; see http://jena.sf.net for details.

The Jena adaptor software implements the well-known Jena Graph and Model APIs. It extends the capabilities of Oracle semantic data management (Oracle 10gR2 RDF and Oracle 11gR1 RDF/OWL) with a set of easy-to-use Java APIs. Enhancements have been done to the server side to accommodate those APIs.

You can download the Oracle Jena Adaptor by visitng the Oracle Semantic Technologies page at http://www.oracle.com/technology/tech/semantic_technologies/index.html and clicking on 'Software' in the column on the right.

Melli Annamalai
Oracle Database Semantic Technologies

Comments

843810
The '\' character in Java 'escapes' the character that follows it. It is very often used to signify tab ('\t'), line feed ('\n') and carriage return ('\r') characters in a string.

If you want to represent '\' as a character in itself, you need to include it twice, i.e. '\\'.

In you code, you have a line:
C2rs1 = C2s1.executeQuery("Spool c:\C2.txt");
and similar. If you replace all single backslashes with double, you should be fine:
C2rs1 = C2s1.executeQuery("Spool c:\\C2.txt");
For your information as well: Although Windows uses '\' where UNIX and Linux use '/' for directory and file paths, Java will allow you to use either on either operating system so you could actually replace each '\' with a '/':
C2rs1 = C2s1.executeQuery("Spool c:/C2.txt"); 
Hope this rambling makes sense!

Good luck...

Chris.
843810
blur,

ChrisBoy hit it dead on. That's the problem. The answer to your other question is that "spool" is an Oracle extension to SQL, so it should work for you, but it won't work if you change to different database. Doesn't sound like a problem, but something you might want to be aware of.

Dave
Although Windows uses '\' where
UNIX and Linux use '/' for directory and file paths,
Java will allow you to use either on either operating
system so you could actually replace each '\' with a
'/':
C2rs1 = C2s1.executeQuery("Spool c:/C2.txt");
As stated that is incorrect. "Java" doesn't do anything. That particular driver might do something with it. And there might be some classes in the Java API which do this, but java itself does not handle that.
843810
Chris...thanks for your help. I tried both ways and it works. Now there's no compilation error but there is runtime error. The information was not save to a file when i run them. This is my driver:

public class SaveApp
{
public static void main(String [] args)
{
//SaveButton frame = new SaveButton("Saving Tables");
//frame.setVisible(true);
SaveData s = new SaveData();
s.saveC1();
//s.saveL1();
}
}

The result when i run the driver: C1 Table not saved. (It gives the SQLException result.)

Why is it so? If I use the same SQL statements and execute in the SQL Plus, it is able to save to a file. Could it be the conection to the database?
843810
Chris...thanks for your help. I tried both ways and it works. Now there's no compilation error but there is runtime error. The information was not save to a file when i run them. This is my driver:

public class SaveApp
{
public static void main(String [] args)
{
//SaveButton frame = new SaveButton("Saving Tables");
//frame.setVisible(true);
SaveData s = new SaveData();
s.saveC1();
//s.saveL1();
}
}

The result when i run the driver: C1 Table not saved. (It gives the SQLException result.)

Why is it so? If I use the same SQL statements and execute in the SQL Plus, it is able to save to a file. Could it be the conection to the database?
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 10 2007
Added on Nov 9 2007
3 comments
3,319 views