Retrieving xsd-attributes in Java...

i want to use attributes in the XSD like
<element name="ProcessRequest">
<complexType>
<attribute name="attribute1" type="string"/>
</complexType>
</element>
i tried
((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable", "payload", "/client:ProcessRequest/client:input/element1/@attribute1")).getFirstChild().getNodeValue();
i am not able to retrieve the value...

Hi,
just to clarify:
i do not have a namespace problem!
<element name="ProcessRequest2" type="xsd:string">
<complexType>
<sequence>
<element name="attribute1" type="string"/>
</sequence>
</complexType>
</element>
i am able to retrieve the value with
((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable", "payload", "/client:ProcessRequest/client:input/attribute1")).getFirstChild().getNodeValue();

Similar Messages

  • JAZN-LDAP : retrieve inetOrgPerson attributes from principal object

    Hello.
    I 've extended callerInfo demo (in OC4J distrib :j2ee/home/jazn/demo) :
    1. use of JAZN-LDAP
    2. now the servlet prints the "HttpServletRequest.getUserPrincipal()" object attributes (class implementation : oracle.security.jazn.oc4j.JAZNUserAdaptor) : the servlet prints LDAP attributes like user DN, subscriber name, groups member, ....
    Is it possible to retrieve other attributes of the LDAP object user (like description, businessCategory) by the java.security.Principal interface ?
    Thanks.

    Try this
    public String getCompanyByUserDN(String userDN) throws Exception
    String result = null;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://<<LDAP HOST>>:<<LDAP PORT>>");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, <<User DN>>);
    env.put(Context.SECURITY_CREDENTIALS, <<User Password>>);
    DirContext dirCtx = new InitialDirContext(env);
    DirContext userCtx = (DirContext)dirCtx.lookup(userDN);
    Attributes attrs = userCtx.getAttributes("", new String[] {"o"});
    result = (String)attrs.get("o").get();
    return result;
    }

  • Read Filename form Adapter-Specific Message Attributes in Java Mapping

    Hi,
    I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
    in java mapping.
    Thank you and Best regards
    Fernand

    Hello Fernand,
    Are u using DOM or SAX parser?
    In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
    Just put this code in ur java mapping
    As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
    public class YourClass implements StreamTransformation
         private Map map;
    public void setParameter(Map param)
         map = param;
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException
                   DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // read value
    File = conf.get(KEY_FILENAME);
    Now just call File in the mapping program,
    Should help u out 
    Regards,
    Tauseef

  • "LPX-00601: Invalid token in:" when retrieving namespaced attribute

    I'm trying to retrieve an attribute value from an XML document as follows:
    declare
       l_url varchar2(500);
       l_xml xmltype;
    begin
       l_xml := xmltype('<WMT_MS_Capabilities version="1.1.1">
                          <Capability>
                             <Layer>
                               <Layer>
                                  <Style>
                                    <Name>default</Name>
                                    <Title>default</Title>
                                    <LegendURL width="233" height="141">
                                       <Format>image/png</Format>
                                       <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
                                                       xlink:type="simple"
                                                       xlink:href="http://very_long_url"/>
                                    </LegendURL>
                                  </Style>
                              </Layer>
                              </Layer>
                              </Capability>
                          </WMT_MS_Capabilities>');
       select extractvalue(l_xml
                          ,'//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
                          ,'xmlns:xlink="http://www.w3.org/1999/xlink"')
         into l_url
         from dual;
         dbms_output.put_line(l_url);
    end;This code executes fine in a 9.2.0.5 database but on Oracle 10.2.0.4 I get:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
    ORA-06512: at line 26What am I doing wrong?

    Found the bug. there is a / missing before the @ in the xpath expression. 9R2 does not seem to care about this.
    Correct path=
    '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource/@xlink:href'

  • Retrieve all attributes for a specific objectClass using ldapsearch

    Hi everybody,
    Question : is it possible to retrieve all attributes for a specific objectClass (by example person) using ldapsearch tool ?
    I tried something like that, but it doesn't work :
    ldapsearch -v -h XXX -p XXX -b "cn=schema" -s base "objectclass=person" attributetypes
    Thanks a lot,
    Franck

    Ok, Thanks for you help,
    But my question is : For a specific objectClass, by example, I would like to have all attributes for the objectClass called "inetOrgPerson"
    something like that :
    ldapsearch -D "cn=Directory Manager" -w pwd -h host ...objectClass="inetOrgPerson"
    and the response could be :
    audio || businessCategory || departmentNumber || displayName || givenName || initials || jpegPhoto || labeledUri || manager || mobile || pager || photo || preferredLanguage || mail || o || roomNumber || secretary || userPKCS12
    I dont't know how to do ????
    Thanks
    Franck

  • Failed to retrieve technical system: QEM_NABP~JAVA

    Hi,
    I am configuring Solution manager Diag. with J2EE engine ( xEM system ). I executed tx.code solman_setup and then selected managed system configuration. Executed Diagnostic prerequisites and then received error Failed to retrieve technical system: QEM_NABP~JAVA
    Then I selected maintain technical system in related links but QEM system is maintained user Java system.
    Can you please let me know what would be the issue.
    Best Regards,
    Tushar.
    Edited by: TusharC Chavan on Nov 4, 2009 11:19 AM

    Hi,
    What worked for me:
    go to SMSY – Landscape Components – Product System (select system) – Product Instance Selection (tab) – (check) Technical System Assigment and fill in the “Technical system” and “System type” tab
    Best Regards,
    Catalin

  • How to update OID oblogintrycout attribute through java code

    Hi Team,
    As per my requirement ,i need to update OID oblogintrycout attribute through java code. could you please help me on this.
    where can i get the java code.
    Regards,
    Ravi.

    As always, Google is your friend.
    Follow the bouncing link.
    http://www.google.com/search?hl=en&q=VisualSourceSafe+%2B+Java+API
    PS.

  • XMLBeans: Mapping xsd:int to Java int

    hello,
    I have the following problem with the XMLBean xsd:int to Java Mapping:
    An xsd:int element maps to the Java type int, in the normal case this mapping is ok. But when the xsd:int element is defined as nilable="true" or minoccurs="0" shouldn't it be mapped to the Java Class Integer (because there is no null value for Java int)?
    Is there a way to change the XMLBean mapping to the Integer Class in that case?
    thanks for your help!
    Edited by: mriedo on Jun 10, 2008 2:37 AM
    Edited by: mriedo on Jun 10, 2008 3:22 AM

    Hi danielamadei,
    I'm assuming you are using a project with the schema builder facet enabled. If so, this can be done by using adding an xsdconfig file to your schemas folder with contents like the following:
    ==someFile.xsdconfig==
    <?xml version="1.0" encoding="UTF-8"?>
    <xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
    < ! - - (comments get hidden)  this will change the package from noNamespace to foo.bar.baz when no namespace exists -->
    <xb:namespace uri="##any">
      <xb:package>org.openuri.easypo.xsdconfig</xb:package>
    </xb:namespace>
    < ! - - (comments get hidden) this is an alternate way to do this -->
    <xb:namespace>
        <xb:package>foo.bar.baz</xb:package>
    </xb:namespace>
    < ! - - (comments get hidden)  this will change the package name for all elements and types in the namespace http://some.namespace -->
    <xb:namespace uri="http://some.namespace">
        <xb:package>bam.bazzle</xb:package>
    </xb:namespace>
    </xb:config>==
    Here is a link to the xmlbeans FAQ on the subject
    http://wiki.apache.org/xmlbeans/XmlBeansFaq#configPackageName
    Hope this helps,
    -jacobd
    Edited by jacobd at 09/06/2007 4:06 PM

  • How to read and XSD file in java prospective in NWDS

    Hi !!
    anybody can help me that
    how to read and XSD file in java prospective in Netweaver developer Studio
    Regards
    Abhishek Agrahari

    I guess you can make it more clear...

  • Setting "model" attribute from java

    Hi!
    I want to write this uix code in java:
    <                                                  <table model="${bindings.DepartmentsView1}">
                                                           <contents>
                                       <column>                                                            
                                                                     <columnHeader>ss                                                                      
                                                                     </columnHeader>
                                                                     <contents>
                                                                          <textInput>                                                                           
                                                                          </textInput>
                                                                     </contents>
                                                                </column>
                                                           </contents>
                                                      </table>
    Can anybody tell me what should i write here?
                   table.setAttributeValue(table.MODEL_ATTR,???);
    ??? = ${bindings.DepartmentsView1}
    Thanx in advance: Gabor Nyerges

    setting the model attribute in java is not supported.
    The model attribute is a parse time property. At parse time it is resolved to individually bind the "real" properties.

  • Problem with XSD validation in Java 5

    Hi everyone,
    my application creates in memory schema using JDOM. In Java 6 validation runs fine, but in Java 5 (which is the target platform currently) it fails.
    I tried a second test with just parsing an existing XSD document (not created using JDOM) and that works.
    The textual representation of both (file and JDOM generated) are identical. If I replace the XSD file with the JDOM output, the "file test" runs fine, too.
    Here's the test code:
        protected void assertXsdValid(Source xsdSource, InputSource xmlInputSource) throws SAXException, ParserConfigurationException, IOException {
            isValid = true;
            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            sf.setErrorHandler(myErrorHandler);
            Schema schema = sf.newSchema(xsdSource); // <<--------- THIS LINE FAILS IN JAVA 5
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            dbf.setSchema(schema);
            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setErrorHandler(myErrorHandler);
            db.parse(xmlInputSource);
            assertTrue(isValid);
        }This is the XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://some.org/metamodel" elementFormDefault="qualified">
      <xs:element name="system">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="name" type="xs:string" />
            <xs:element name="vendor" type="xs:string" />
            <xs:element name="version" type="xs:decimal" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>This is the error message I get:
    ERROR: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared.
    This is how I call the test code in the JDOM test:
            assertXsdValid(new JDOMSource(xsdDoc), new JDOMSource(xmlDoc).getInputSource());If I change the code to parsing not the JDOMSource, but a StreamSource reading the textual representation of the XSD, it works fine!
            assertXsdValid(new StreamSource(new ByteArrayInputStream(new XMLOutputter().outputString(xsdDoc).getBytes())), new JDOMSource(xmlDoc).getInputSource());But this is not what I want (I expect suboptimal performance with large XSD documents). So, if it works with Java 6, then why doesn't it work with Java 5?
    How can I use the Java 6 JAXP in Java 5?
    Thank you.

    A new user name?
    I can think of ways round your problem but can you first provide a reference that indicates that byte 0x80 is the MS936 encoding for the Euro?
    P.S. This is a forum and the vast majority of participants, including me, have no direct relationship with Oracle so getting definitive answers from Oracle via this forum is unlikely. If you think you have found a bug in 1.5 and/or 1.6, and I am not convinced you have, you need to report it via the bug database. If it is a bug then the response time for a fix is likely to be months rather than days.
    P.P.S No I can't explain why it works in 1.7!

  • Re: Retrieve user role using Java

    Dear all,
    I have defined a role, says "Operator" in the Sun one Server. I tried to write a Java program to retrieve the role for my web application, but not successful. It only displayed the attribtues shown in Custom Editor such as givenName, cn and etc. But the attribute "nsrole" was shown in Generic Editor which I cannot retrieve in the Java Program.
    How can I retrieve it using Java Program with using standard Java API only?
    Regards,
    Calvin

    That attribute is an operational attribute. You must specify it in the list of attributes to retrieve in your search command.

  • Re: Retrieve operational attributes

    Dear all,
    Do you have any concrete Java program example using standard Java API provided by JDK1.3.1 to retrieve the operational attributes of a entry stored in Sun One Directory Server?
    Thanks!
    Calvin

    There is no "+" pseudo attribute name that will retrieve all operational attributes in an entry, like OpenLDAP has. You must specify all of the operational attributes you want to get back in your search attribute list. If you need to get a list of all possible operational attributes, you have to query the schema - the attribute definition will tell you if the attributeType is operational.

  • Error in retrieving session attribute for ejb remote in clustered env

              We store EJB remote object in session and differnt clients retrieve it from sessionbefore
              making a business method call. This seems to work in most cases but sometimes
              it gives the exception attached. This happens only in a clustered environment.What
              has been observed is that if we put the remote object inside a hashtablewhich
              in-turn is stored in session retrieval from hashtable does not give thisproblem.
              Any suggestion / solution would be greatly appreciated.
              Regards,
              Shilpa
              The exception Stack trace is attachedjava.rmi.NoSuchObjectException: Unable to
              locate EJBHome: 'BalconHome' on server:'t3://176.19.183.6,176.19.183.15:9616 at
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80) at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:395)
              at com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(AccountInfoAccessor.java:362)
              at com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311)
              at com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88) at
              com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              at jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs_mm_tgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:482)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:308)
              at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116) at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              at com.epicentric.template.Style.execute(Style.java:538) at com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              at jsp_servlet.__index._jspService(__index.java:560) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:242)
              at com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatcherServlet.java:195)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

              The EJB is stateful session EJB. Have seen some posts pointing to problems
              with
              stateful session EJB and cluster and the suggested solution was SP4 (we are
              on 6.1 SP3).
              Hope this gets more clarity (and some solutions!!!).
              regards,
              Rajesh / Shilpa
              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > It's probably caused by the fact that the session attributes get
              serialized
              > when they are in a cluster. (Something to do with ser/deser process?)
              >
              > Peace,
              >
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com/coherence.jsp
              > Tangosol Coherence: Clustered Replicated Cache for Weblogic
              >
              >
              > "Shilpa" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > We store EJB remote object in session and differnt clients retrieve it
              > from sessionbefore
              > > making a business method call. This seems to work in most cases but
              > sometimes
              > > it gives the exception attached. This happens only in a clustered
              > environment.What
              > > has been observed is that if we put the remote object inside a
              > hashtablewhich
              > > in-turn is stored in session retrieval from hashtable does not give
              > thisproblem.
              > > Any suggestion / solution would be greatly appreciated.
              > >
              > > Regards,
              > > Shilpa
              > >
              > > The exception Stack trace is attachedjava.rmi.NoSuchObjectException:
              > Unable to
              > > locate EJBHome: 'BalconHome' on
              > server:'t3://176.19.183.6,176.19.183.15:9616 at
              > >
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80)
              > at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              > > at
              >
              weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:
              > 395)
              > > at
              >
              com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(Acco
              > untInfoAccessor.java:362)
              > > at
              >
              com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311
              > )
              > > at
              > com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88)
              at
              > > com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at
              > com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              > > at
              >
              jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs
              > mmtgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:482)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:308)
              > > at
              weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
              > at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              > > at com.epicentric.template.Style.execute(Style.java:538) at
              >
              com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              > > at jsp_servlet.__index._jspService(__index.java:560) at
              > weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
              > l.java:242)
              > > at
              >
              com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatch
              > erServlet.java:195)
              > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              > ntext.java:2546)
              > > at
              >
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              > :2260)
              > > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at
              > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              

  • Problems for retrieving image attributes

    Hi,
    I am a new user for Oracle interMedia and i have following problem.
    I have wroten ein java programm to retrieve the image properties. At First, the images (jpg, tif) are stored as BLOB in the table, then i use the function setProperties() to set the image attributes.
    PreparedStatement pstmt = con.prepareStatement("INSERT INTO btable VALUES(?, ORDSYS.ORDImage.init())");
    for (int ef=1; ef<=anzahl_summe; ef++){
    pstmt.setInt(1, ef);
    pstmt.execute();
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM btable WHERE bid = " + ef + " FOR UPDATE");
    while(rs.next()) {
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    imgObj.loadDataFromFile(f_location[ef]);
    imgObj.setProperties();
    OraclePreparedStatement orpstmt = (OraclePreparedStatement)con.prepareStatement("UPDATE btable SET bild = ? WHERE bid =" + ef);
    orpstmt.setCustomDatum(1,imgObj);
    orpstmt.execute();
    orpstmt.close();
    Now if i use the functions getHeight(), getFormat(), ... for querying the properties, i will get just only the values for the image height, width and size. The other attribute values i get either null or ???. I don't understand why. The Bildforamte(jpg, tif)are supported by Oracle.
    Can you tell me what shall i do?
    thank you very much and greeting from germany
    rabbit

    Hi larry,
    thank you for your help. I have set autocommit off and commit in the end of the programm. I think, that is not a problem.
    I use the following table:
    CREATE TABLE bildtable_intern(bild_id int PRIMARY KEY not null, bild ORDSYS.ORDImage)
    My java programm:
    public class OracleBild_intern {
    public Connection connect() throws Exception{
    //thin driver is used
    conn.setAutoCommit(false);
    public void bildmessung(Connection con) throws Exception{
    PreparedStatement pstmt = con.prepareStatement("INSERT INTO bildtable_intern VALUES(?, ORDSYS.ORDImage.init())");
    for (int ef=1; ef<=10; ef++){
    pstmt.setInt(1, ef);
    pstmt.execute();
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM bildtable_intern WHERE bild_id = " + ef + " FOR UPDATE");
    while(rs.next()) {
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    //I have also tried to use loadDataFromInputStream() and loadDataFromByteArray()
    imgObj.loadDataFromFile(f_location[ef]);
    imgObj.setProperties();
    OraclePreparedStatement orpstmt = (OraclePreparedStatement)con.prepareStatement("UPDATE bildtable_intern SET bild = ? WHERE bild_id =" + ef);
    orpstmt.setCustomDatum(1,imgObj);
    orpstmt.execute();
    orpstmt.close();
    pstmt.close();
    retrieveattr(con);
    public long retrieveattr(Connection con) throws Exception{
    OracleResultSet rs = (OracleResultSet)stmt.executeQuery("SELECT * FROM bildtable_intern");
    while (rs.next()){
    OrdImage imgObj = (OrdImage)rs.getCustomDatum(2, OrdImage.getFactory());
    System.out.println("bild_id = " + rs.getInt(1));     
    System.out.println("bild_height = " + imgObj.getHeight());
    System.out.println("bild_width = " + imgObj.getWidth());
    System.out.println("bild_size = " + imgObj.getContentLength());
    System.out.println("bild_format = " + imgObj.getFormat());
    System.out.println("contentformat = " + imgObj.getContentFormat());
    System.out.println("compressionformat = " + imgObj.getCompressionFormat());
    System.out.println("mimetyp = " + imgObj.getMimeType());
    public static void main(String[] args) throws Exception{
    //call the methode connect()
    con.commit();
    con.close();
    I try again, but i get always only the values for image height, width and contentlength. Can you tell me, what ist wrong with this programm?
    Thank you very much and greeting aus germany!
    rabbit

Maybe you are looking for

  • How to download photos from an old phone to camera...

    Hi there, Got a bit of an issue gaining access to all the old photos off my old Lumia 920. Basically when I log into skydrive online using my microsoft email, I can see all the old pictures in the camera roll, however, when I try to access them on my

  • How to install BootCamp5 (Windows) on Mac?

    Hi everyone I want to install windows on my macbook and I found these instructions from Apple: The download file is a .zip file. Double click it to uncompress it,  if it is not automatically uncompressed.           • Double-click the Boot Camp5 folde

  • Alerts to Approver on PO creation & to vendor on PO approval

    Hi, Requirement is to send the alerts to the approver on PO creation and on approval - the alert should be sent to the vendor. Can anyone please help me out as to how can we handle both these requirements ? Thanks in Advance to All !!!! Regards, Laxm

  • How do I fix error installing IIS features

     I try to install an IIS component (IIS Management Service), I keep getting the error that states..."An error has occured. Not all of the features were successfully changed." This is on a 64bit Windows7 machine. Does anyone have an idea on how to fix

  • No Service = constant restart

    We had two LG phones, and I got an iPhone about 3 weeks ago. My wife decided to stay with the LG. Both use 3G. We used to get good reception in the house, but since the iPhone, BOTH phones can't keep a service connection. Stranger, when we leave the