can anyone tell me how you can put serialized java objects into tamino ? In the XPlorer, I created a Mapped Non-XML Doctype, and a simple text-element where i want to put my serialized instance.
When - using the java API - I try to put a serialized instance into the taminocollection using the TNonXMLObjectAccessor and so on, I get Nullpointer exceptions.
Does anyone has some samplecode to do this ?
Any help would be appreciated !
Thanks in advance…
I’ve only tried inserting nonXML objects such as bitmaps and text objects into Tamino and it works for me. What does the stack trace say? Could you post some code?
Well, to be honest, I don’t think it has something to do with the code we wrote ('cause we got some sample code from Tamino) but I think the problem is that I don’t know how to ‘configure’ or ‘set up’ the proper schema’s for it.
Maybe you can help me to do that in a step-by-step way (schema editor tool I presume?) ? Would be very appreciated !
I’ll attach the samplecode anyway, maybe it helps to find what the problem is.
Thanks in advance !
NonXMLGreeting.java (3.78 KB)
there is another new tread “NonXML Objects in Tamino” in this forum dealing with the same topic (in case you haven’t seen yet).
I’m very sorry, but there was a little misunderstanding … the post you mentioned is from one of my collegues here who’s working on the same problem, so we did post a “parallel” question on the forum in 2 different threads.
Sorry for this, if you reply to one of the threads it’s ok, we’ll monitor them both
I tried the sample code here and it works, the only change I made was the URL of the database. I also changed the code slightly to use a specific schema for storing non XML in a collection other than ino:etc and the program still works. So I am not sure why you are getting the null pointer exception. Can you post the stack trace? The other possibility is that there is something in the classpath causing a problem:
- I used no IDE
- the classpath contains just: TaminoAPI4J.jar, jdom.jar; log4j-core.jar; xerces.jar (all from the SDK\TaminoAPI4J\lib directory of my Tamino installation).
- and the java environment is 1.3.1_02
well, that’s just the thing, we try to define a new Collection in Tamino using a new schema that really resembles the ino:collection but I get an error from Tamino saying that I cannot define schema’s that are defined for system usage, do you define the tsd using a text-editor or do you make use of the Tamino schema-editor? We tried both and neither of them works. I attached the beginning of the tsd of which I try to define a collection. What is wrong with this?
sample.txt (1.21 KB)
For storing nonxml you need a very simple schema that defines a doctype for storing nonxml. There does not need to be any elements or anything declared. The schema that I created for non XML is as following which should help. In this example I called the collection and the doctype “nonxml”. Here’s the schema:
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “http://www.w3.org/2001/XMLSchema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
<tsd:schemaInfo name = “nonxml”>
<tsd:collection name = “nonxml”></tsd:collection>
<tsd:doctype name = “nonxml”>
tnx a lot, defining the Collection works
FWIW along similar lines …
A while ago I played around with the implementation of a classloader which loaded classes located in a Tamino database.
Worked quite well.