aklakan / jenabean Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jenabean
Automatically exported from code.google.com/p/jenabean
What steps will reproduce the problem?
1. Check out source code
2. Build install via maven
3. Import in eclipse run text (ex Test1)
What is the expected output? What do you see instead?
Got Exception
javax.persistence.PersistenceException:
com.hp.hpl.jena.assembler.exceptions.NotUniqueException: the object
tws:filemodel has multiple values for the unique property
http://jena.hpl.hp.com/2005/11/Assembler#directory
doing:
root: http://www.thewebsemantic.com/filemodel with type: http://jena.hpl.hp.com/2005/11/Assembler#FileModel assembler class: class com.hp.hpl.jena.assembler.assemblers.FileModelAssembler
at thewebsemantic.jpa.JBProvider._createEntityManagerFactory(JBProvider.java:99)
at thewebsemantic.jpa.JBProvider.createEntityManagerFactory(JBProvider.java:80)
at thewebsemantic.jpa.JBProvider.createEntityManagerFactory(JBProvider.java:1)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:46)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:30)
at com.maarif.cube.core.service.helloworld.JenaBeanTest.test(JenaBeanTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.hp.hpl.jena.assembler.exceptions.NotUniqueException: the object
tws:filemodel has multiple values for the unique property
http://jena.hpl.hp.com/2005/11/Assembler#directory
doing:
root: http://www.thewebsemantic.com/filemodel with type: http://jena.hpl.hp.com/2005/11/Assembler#FileModel assembler class: class com.hp.hpl.jena.assembler.assemblers.FileModelAssembler
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.getUnique(AssemblerBase.java:60)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.getUniqueResource(AssemblerBase.java:42)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.getRequiredResource(AssemblerBase.java:77)
at com.hp.hpl.jena.assembler.assemblers.FileModelAssembler.getDirectoryName(FileModelAssembler.java:80)
at com.hp.hpl.jena.assembler.assemblers.FileModelAssembler.getFileName(FileModelAssembler.java:52)
at com.hp.hpl.jena.assembler.assemblers.FileModelAssembler.openEmptyModel(FileModelAssembler.java:25)
at com.hp.hpl.jena.assembler.assemblers.ModelAssembler.openModel(ModelAssembler.java:24)
at com.hp.hpl.jena.assembler.assemblers.ModelAssembler.open(ModelAssembler.java:31)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:118)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:105)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:69)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:37)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:34)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup.openModel(AssemblerGroup.java:23)
at thewebsemantic.jpa.JBProvider._createEntityManagerFactory(JBProvider.java:94)
... 30 more
What version of the product are you using? On what operating system?
jena bean -> 1.0.7
jpa4jena -> 0.7
Windows XP, OSX
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2013 at 2:55
In RdfProperty the example:
* <code>
* @RdfBean("http://example.org/demo#hasFriend")
* public getFriends() { ...
* </code>
should be changed into:
* <code>
* @RdfProperty("http://example.org/demo#hasFriend")
* public Friend[] getFriends() { ...
* </code>
HTH,
Maciej
Original issue reported on code.google.com by [email protected]
on 21 May 2008 at 12:03
What steps will reproduce the problem?
1. Use deep copy on object with very large array
2.
3.
What is the expected output? What do you see instead?
Expected decent serialization time. Instead, getting exponential growth on
runtime based on array size.
What version of the product are you using? On what operating system?
Version 1.0.7, Linux Ubuntu 11.10
Please provide any additional information below.
In Bean2RDF.java, I changed the class of the 'cycle' field to a HashSet<Object>
instead of an ArrayList. Since the major operation of this field is to
identify the presence of an object already serialized, the 'contains' and
'add' methods are the only methods used. For this, I think a HashSet would be
a much better data structure to use as we can get constant time performance on
both these operations.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2011 at 8:18
Hi, I got a
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to
java.lang.Class
at thewebsemantic.ValuesContext.getGenericType(ValuesContext.java:69)
When using field that's type is a List of generic types. I changed the code to
the following to make it work:
public Class<?> getGenericType(final ParameterizedType type) {
// unfortunately we don't have the TypeVariable information from the reference to this type,
// so some TypeVariable->Type mappings are missing
final Map<TypeVariable<?>, Type> typeVariableMap = new HashMap<TypeVariable<?>, Type>();
final Type actualType = type.getActualTypeArguments()[0];
return getClassForType(actualType, typeVariableMap);
}
public Class<?> getGenericType(final ParameterizedType type, final HashMap<TypeVariable<?>, Type> typeVariableMap) {
final Type actualType = type.getActualTypeArguments()[0];
return getClassForType(actualType, typeVariableMap);
}
private Class<?> getClassForType(final Type type, final Map<TypeVariable<?>, Type> typeVariableMap) {
if (type == null) {
return NullType.class;
}
if(type instanceof Class) {
return (Class<?>)type;
}
if(type instanceof ParameterizedType) {
final Type rawType = ((ParameterizedType) type).getRawType();
return getClassForType(rawType, typeVariableMap);
}
if(type instanceof GenericArrayType) {
final Type genericType = ((GenericArrayType) type).getGenericComponentType();
// find class object of type the array is of
final Class<?> arrayClass = getClassForType(genericType, typeVariableMap);
// didn't find another way to get Class for array of type arrayClass
return Array.newInstance(arrayClass, 0).getClass();
}
if(type instanceof TypeVariable<?>) {
final Type actualType = typeVariableMap.get(type);
// if we don't have mapping to actual type, we use most global class Object.class
if(actualType == null) {
return Object.class;
}
return getClassForType(actualType,typeVariableMap);
}
// don't know how to handle WildcardType and TypeVariable
throw new IllegalArgumentException();
}
public Map<TypeVariable<?>, Type> getGenericTypeMap(final Type type) {
final Map<TypeVariable<?>, Type> result = new HashMap<TypeVariable<?>, Type>();
findTypeVariableMappingsRecursive(type, result);
return result;
}
private void findTypeVariableMappingsRecursive(final Type type, final Map<TypeVariable<?>, Type> typeVariableMap) {
// mappings for current type
findTypeVariableMappings(type, typeVariableMap);
// now mappings for supertypes and generic interfaces
if(type instanceof Class<?>) {
final Class<?> clazz = (Class<?>) type;
final Type superType = clazz.getGenericSuperclass();
if(superType != null) {
findTypeVariableMappingsRecursive(superType,typeVariableMap);
}
final Type[] interfaceTypes = clazz.getGenericInterfaces();
for (Type interfaceType : interfaceTypes) {
findTypeVariableMappingsRecursive(interfaceType, typeVariableMap);
}
}
}
private void findTypeVariableMappings(final Type type,
final Map<TypeVariable<?>, Type> map) {
if (type instanceof ParameterizedType) {
final ParameterizedType parameterizedType = (ParameterizedType) type;
final GenericDeclaration genericDeclaration = (GenericDeclaration) parameterizedType.getRawType();
final TypeVariable<?>[] typeVariables = genericDeclaration.getTypeParameters();
final Type[] actualTypes = parameterizedType.getActualTypeArguments();
for (int i = 0; i < actualTypes.length; ++i) {
map.put(typeVariables[i], actualTypes[i]);
}
}
}
I did also add support for generic arrays, although the framework do not seem
to support arrays at the moment. Unfortunately the caller does not (and maybe
cannot) provide information which TypeVariables are mapped to which actual
types, or a ParameterizedType this information can be read from. I added
methods for retrieving this information from a Type (see getGenericTypeMap).
Original issue reported on code.google.com by [email protected]
on 8 Jun 2012 at 1:58
What steps will reproduce the problem?
1. create class that has BigDecimal datatype property
2. write a concrete instance, is written as xsd:double instead of xsd:decimal
3. reading the class leads to the return of a null value.
sample code:
controller:
public void performTest()
{
RDF2Bean modelReader;
Bean2RDF modelWriter;
Test newTest = null;
int idNumber = 0;
OntModel m = ModelFactory.createOntologyModel();
modelReader = new RDF2Bean(m);
modelWriter = new Bean2RDF(m);
modelReader.bind(Test.class);
idNumber = getRandom();
newTest = new Test();
newTest.setId(idNumber);
newTest.setValue(new BigDecimal(666.0));
modelWriter.save(newTest);
Test returnTest = (Test) modelReader.load(Test.class,idNumber);
System.out.println(returnTest.getValue());
}
testclass:
import thewebsemantic.Id;
import thewebsemantic.Namespace;
import java.math.*;
public class Test {
@Id
private int id;
private BigDecimal value;
public int getId() { return this.id; }
public BigDecimal getValue() { return this.value;}
public void setValue(BigDecimal pHasNativeValue) { this.value = pHasNativeValue;}
public void setId(int pId) {this.id = pId;}
}
What is the expected output? What do you see instead?
The expected output is the stored BigDecimal value. It should be stored as
xsd:decimal according to jena mapping.
Instead, it is stored as xsd:double value by jenabeans. therefore a
java.lang.Double class is returned which leads to a "null" value when querying
for the datatype property.
What version of the product are you using? On what operating system?
Version: jenabean-1.0.6.jar,
OS: Eclipse platform
Please provide any additional information below.
the property value is stored as xsd:double while xsd:decimal would be required.
Original issue reported on code.google.com by [email protected]
on 3 Feb 2011 at 10:15
groupId -> thewebsemantic
Original issue reported on code.google.com by [email protected]
on 4 Dec 2012 at 10:58
Attachments:
Hi,
I have a rdf file which defines many classes with complex relations.
If uses jenabean, must I code each class in Java by hand?
Or is there a tool that can automatically generate all java source classes?
Allen
Original issue reported on code.google.com by [email protected]
on 13 Aug 2009 at 5:47
Bean2RDF.deleteDeep()
as a jenabean user, I should be able to call deleteDeep(bean) and have
that bean and all related objects (in the bean object graph) deleted as
well.
Original issue reported on code.google.com by [email protected]
on 18 Jan 2008 at 10:21
Hi, if I have an attribute as short, for example
protected short gxTv_SdtCustomer_Customerage
when saving my Bean, such as
writer.save(myCust);
the following error occurs:
java.lang.NullPointerException
at com.hp.hpl.jena.rdf.model.impl.ModelCom.add(ModelCom.java:939)
at
com.hp.hpl.jena.rdf.model.impl.ResourceImpl.addProperty(ResourceImpl.java:245)
at thewebsemantic.Bean2RDF.saveOrUpdate(Bean2RDF.java:160)
at thewebsemantic.Bean2RDF.write(Bean2RDF.java:148)
at thewebsemantic.Bean2RDF._write(Bean2RDF.java:114)
at thewebsemantic.Bean2RDF.write(Bean2RDF.java:107)
at thewebsemantic.Bean2RDF.save(Bean2RDF.java:78)
I've tested with the 07-SNAPSHOT.jar file
Regards,
Luciano
Original issue reported on code.google.com by [email protected]
on 15 Jan 2009 at 8:46
What steps will reproduce the problem?
1. Create a Jenabean containing a com.hp.hpl.jena.rdf.model.Literal typed field
2. Annotate with @RdfProperty("http://www.w3.org/2000/01/rdf-schema#label")
3. RDF2Bean throws ClassCastException trying to cast String to Literal
What is the expected output? What do you see instead?
We would like to have the raw literal in order to be able to read additional
properties like the
language.
What version of the product are you using? On what operating system?
1.0.1, JVM 1.6.0
Please provide any additional information below.
Patch available at
http://bitbucket.org/fmancinelli/jenabean/changeset/858723a8d5ea/#chg-
src/main/java/thewebsemantic/JenaHelper.java
(A similar strategy should be implemented in Bean2RDF.toRDFNode() to handle raw
literal
serialization)
Original issue reported on code.google.com by [email protected]
on 6 Nov 2009 at 5:22
1. Ex. Query:
SELECT ?s
WHERE {
?s rdf:type :City .
FILTER regex(?s, "Cannes")
}
2. result:
<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
<head>
<variable name='s'/>
</head>
<results>
<result>
<binding
name='s'><uri>http://www.example.org/travel.owl#City/Cannes</uri></binding>
</result>
</results>
</sparql>
3. But I don't have this result assigned to the Collection<City>. Collection is
empty.
Collection<City> citySameName = Sparql.exec(model, City.class, queryStr);
(When I block a FILTER, I get the entire collection.)
Why?
Best regargs,
P.W.Więc
Original issue reported on code.google.com by [email protected]
on 2 Mar 2012 at 12:58
What steps will reproduce the problem?
1. Define a Bean with a property of type LocalizedString
2. When the model is used to generate RDF/XML A NullPointerException is
encountered in JenaHelper.toLiteral(Model m, Object o).
3. This is due to the fact that the Object of Type LocalizedString is not
handled in Writer. It is handled only in Rdf2Bean.
What is the expected output? What do you see instead?
The rdf shud contain the property with xml:lang attribute
<x:name xml:lang="en">test_en</x:name>
What version of the product are you using? On what operating system?
Jena 1.06 on Windows 7
Please provide any additional information below.
I have attached the changed file, please look out for the comment in the file
//Made changes by Chiths to handle xml:lang Literal
Original issue reported on code.google.com by [email protected]
on 18 Jul 2013 at 8:11
Attachments:
Hello,
Do you plan also to store also hierarchy of the classes, which are
instanciated in the Jena model.
What steps will reproduce the problem?
1. Compile the attached file (Test.java)
2. Observe the output
What is the expected output?
I expected there will appear a statement:
:B rdfs:subClassOf :A .
What do you see instead?
All but not the statement.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix daml: <http://www.daml.org/2001/03/daml+oil#> .
<http://thewebsemantic.com/javaclass>
a owl:AnnotationProperty .
<http://unimore.ecosystem.zombie.sensor/B/23894119>
a <http://unimore.ecosystem.zombie.sensor/B> .
<http://unimore.ecosystem.zombie.sensor/B>
a owl:Class ;
<http://thewebsemantic.com/javaclass>
"unimore.ecosystem.zombie.sensor.A$B" .
What version of the product are you using? On what operating system?
The last checkout from SVN
Best,
Maciej
Original issue reported on code.google.com by [email protected]
on 19 May 2008 at 4:54
Attachments:
Should fix https://code.google.com/p/jenabean/issues/detail?id=13
Original issue reported on code.google.com by [email protected]
on 14 Mar 2013 at 8:27
Attachments:
What steps will reproduce the problem?
In some runtime environments (eg. NetBeans Platform), JenaBean has a
separate ClassLoader from the application classes. Therefore,
Class.forName(..) is unable to locate those classes.
Spring has a similar problem with the NetBeans hierarchical ClassLoader.
What is the expected output? What do you see instead?
RDF2Bean.load(..) and loadDeep(..) throws ClassNotFoundException:
at
org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at thewebsemantic.RDF2Bean.declaredClass(RDF2Bean.java:528)
at thewebsemantic.RDF2Bean.javaclass(RDF2Bean.java:512)
at thewebsemantic.RDF2Bean.newInstance(RDF2Bean.java:490)
at thewebsemantic.RDF2Bean.applyProperties(RDF2Bean.java:439)
at thewebsemantic.RDF2Bean.testCycle(RDF2Bean.java:400)
at thewebsemantic.RDF2Bean.toObject(RDF2Bean.java:396)
at thewebsemantic.RDF2Bean.loadIndividuals(RDF2Bean.java:179)
at thewebsemantic.RDF2Bean.loadAll(RDF2Bean.java:173)
at thewebsemantic.RDF2Bean.load(RDF2Bean.java:157)
What version of the product are you using? On what operating system?
JenaBean 0.8 with NetBeans 6.7 and Sun JDK 1.6.0
Please provide any additional information below.
http://wiki.netbeans.org/DevFaqClassLoaders
http://wiki.netbeans.org/NetBeansPlatformWithSpring
Original issue reported on code.google.com by [email protected]
on 21 Dec 2009 at 2:14
Attachments:
Problem:
When creating a bean with Array-like attribute, it is correctly saved to the
model but cannot be properly removed. The statement containing the array is not
eliminated and the model is let with:
<rdf:Description rdf:nodeID="A0">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
</rdf:Description>
What steps will reproduce the problem?
1. Create a simple bean like the following:
public class Relation {
Entity[] members;
public Entity[] getMembers() {
return members;
}
public void setMembers(Entity[] members) {
this.members = members;
}
}
Where Entity is a random JenaBean.
2. Create entities and link them with relation
Model m = ModelFactory.createDefaultModel();
MyBean2RDF writer = new MyBean2RDF(m);
Entity e1 = Entity();
Entity e2 = Entity();
Relation r1 = Relation();
r1.setMembers(new Entity[]{e1,e2});
// save
writer.save(e1);
writer.save(e2);
writer.save(r1);
m.write(System.out);
// delete
writer.delete(e1);
writer.delete(e2);
writer.delete(r1);
m.write(System.out);
3. look at the output...
What is the expected output? What do you see instead?
Expected output:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:j.0="http://thewebsemantic.com/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
...
</rdf:RDF>
What i got instead:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:j.0="http://thewebsemantic.com/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
...
<rdf:Description rdf:nodeID="A0">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
</rdf:Description>
</rdf:RDF>
What version of the product are you using? On what operating system?
Using 1.0.6 multi platform (platform not relevant here).
Original issue reported on code.google.com by remi.barraquand
on 8 Jun 2010 at 12:35
What steps will reproduce the problem?
1. download jenabean-0.0.8.jar and jena 2.5.6
2. created Song.java and SimpleExample.java
import java.util.Collection;
import thewebsemantic.Id;
import thewebsemantic.RdfBean;
import thewebsemantic.binding.Jenabean;
public class Song extends RdfBean<Song> {
private String composer;
private String title;
public static Collection<Song> load() {
return Jenabean.load(Song.class);
}
@Id
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getComposer() {
return composer;
}
public void setComposer(String composer) {
this.composer = composer;
}
}
import java.util.Collection;
import thewebsemantic.binding.Jenabean;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
public class SimpleExample {
public static void main(String[] args) {
Model m = ModelFactory.createDefaultModel();
Jenabean.instance().bind(m);
Song s2 = new Song();
s2.setTitle("I.G.Y.");
s2.setComposer("Donald Fagen");
s2.save();
Collection<Song> songs = Song.load();
assert (songs.size() == 2);
for (Song song : songs)
System.out.println(song.getTitle());
m.write(System.out, "N3");
}
}
What is the expected output? What do you see instead?
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version
number in .class
file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at com.xx.jena.SimpleExample.main(SimpleExample.java:13)
What version of the product are you using? On what operating system?
jenabean 0.0.8, jena 2.5.6, on Mac Leopard with JVM1.5.0_13.
Here is my classpath entry when I run the example if that helps:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/antlr-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/arq-extra.jar"/>
<classpathentry kind="lib" path="lib/arq.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
<classpathentry kind="lib" path="lib/concurrent.jar"/>
<classpathentry kind="lib" path="lib/icu4j_3_4.jar"/>
<classpathentry kind="lib" path="lib/iri.jar"/>
<classpathentry kind="lib" path="lib/jena.jar"/>
<classpathentry kind="lib" path="lib/jenabean-0.0.8.jar"/>
<classpathentry kind="lib" path="lib/jenatest.jar"/>
<classpathentry kind="lib" path="lib/json.jar"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.12.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-2.0.0.jar"/>
<classpathentry kind="lib" path="lib/stax-api-1.0.jar"/>
<classpathentry kind="lib" path="lib/wstx-asl-3.0.0.jar"/>
<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Aug 2008 at 5:56
Attachments:
Hello,
First, I'd like to thank you for a brilliant idea of JenaBean. This is what
we are exactly looking for. Here are I one question:
Is there any particular reason classes are defined in OWL (as instances of
owl:Class) and properties in pure RDFS (as instances of rdf:Property, not
as owl:ObjectProperty or owl:DatatypeProperty) ?
> What is the expected output? What do you see instead?
For example you may see the following N3 output of Sensor2 class and
timestamp property.
<http://unimore.ecosystem.zombie.sensor/Sensor2>
a owl:Class ;
<http://thewebsemantic.com/javaclass>
"unimore.ecosystem.zombie.sensor.Sensor2" .
<http://ecosystem.it#timeStamp>
a <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
> What version of the product are you using? On what operating system?
The fresh checkout from SVN repository.
Best,
Maciej
Original issue reported on code.google.com by [email protected]
on 19 May 2008 at 4:37
Hi,
I would really like to try the library in my commercial product. But since the
last commit is a year ago, i wonder what happened in the meantime. Is this
porject still maintained? If not is there a successor?
Cheers,
Daniel
Original issue reported on code.google.com by [email protected]
on 28 Jun 2013 at 2:52
What steps will reproduce the problem?
1. trying to save my Jenabean class to RDF
2.
3.
What is the expected output? What do you see instead?
I expect it to save to Jena database, as my other Jenabean classes have
Please use labels and text to provide additional information.
I get this error. It seems to be a problem with my Jenabean class. Not
sure what I am doing wrong. Can you figure what would cause this
NullPointerException? My Jenabean class does have a lot of null values but
that shouldn't matter. It has a proper
@Namespace("http://inqle.org/ns/v1/") declaration. My getId() method
produces a string value and my Jenabean is of the expected class. It
receives the @Id attribute through a superclass. This has worked for me in
the past. Thanks if anything springs to mind.
java.lang.NullPointerException
at thewebsemantic.TypeWrapper.getAnnotation(TypeWrapper.java:122)
at thewebsemantic.TypeWrapper.uri(TypeWrapper.java:117)
at thewebsemantic.PropertyContext.uri(PropertyContext.java:26)
at
thewebsemantic.PropertyContext.existsInModel(PropertyContext.java:46)
at thewebsemantic.Base.toRdfProperty(Base.java:37)
at thewebsemantic.Bean2RDF.saveOrUpdate(Bean2RDF.java:167)
at thewebsemantic.Bean2RDF.write(Bean2RDF.java:161)
at thewebsemantic.Bean2RDF._write(Bean2RDF.java:120)
at thewebsemantic.Bean2RDF.write(Bean2RDF.java:113)
at thewebsemantic.Bean2RDF.saveDeep(Bean2RDF.java:99)
at
org.inqle.data.rdf.jenabean.JenabeanWriter.toString(JenabeanWriter.java:19)
Original issue reported on code.google.com by [email protected]
on 1 Mar 2008 at 4:06
What steps will reproduce the problem?
Follow the tutorial on the QuickStartReadingRDF wiki page
(http://code.google.com/p/jenabean/wiki/QuickStartReadingRDF) in a
haphazard manner, and leave the Bean in the default package.
What is the expected output? What do you see instead?
I get the following exception trace:
Exception in thread "main" java.lang.NullPointerException
at thewebsemantic.TypeWrapper.<init>(TypeWrapper.java:46)
at thewebsemantic.TypeWrapper.wrap(TypeWrapper.java:68)
at thewebsemantic.RDF2Bean.newInstance(RDF2Bean.java:437)
at thewebsemantic.RDF2Bean.applyProperties(RDF2Bean.java:425)
at thewebsemantic.RDF2Bean.testCycle(RDF2Bean.java:394)
at thewebsemantic.RDF2Bean.toObject(RDF2Bean.java:390)
at thewebsemantic.RDF2Bean.loadIndividuals(RDF2Bean.java:162)
at thewebsemantic.RDF2Bean.loadAll(RDF2Bean.java:155)
at thewebsemantic.RDF2Bean.load(RDF2Bean.java:140)
at thewebsemantic.RDF2Bean.load(RDF2Bean.java:106)
at thewebsemantic.binding.Jenabean.load(Jenabean.java:101)
at Test.main(Test.java:38)
The problem appears to be due to the use of Class.getPackage() in the
TypeWrapper constructor. getPackage() returns null when the class has no
package.
private <T> TypeWrapper(Class<T> c) {
...
Namespace nsa = c.getAnnotation(Namespace.class);
NS = (nsa != null) ? nsa.value() : "http://"
+ c.getPackage().getName() + '/';
No doubt adding a package name to my bean will resolve the problem, but it
took me a while to understand the exact problem. Checking the return value
of getPackage and either throwing a more helpful exception, or working
round the lack of package would be helpful.
What version of the product are you using? On what operating system?
Jenabean 0.0.4 on Windows Vista.
Original issue reported on code.google.com by [email protected]
on 29 Mar 2008 at 3:37
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.