Storing Java Types????

Hi Iam fairly new to Java, and maybe this is a really stupid question, but I am going to ask it anyway.
Q. I have seen many examples how to create and store java types in a db, what is the purpose. what is it good for??.
(practical example??)

Thanks again for the reply.
My question was that I dont�t see any point to the following example or am I missing something?
Is this example just to show how to use statements or does it have any other use that you can see??
thanks for your time
//This example creates a MySQL table called mysql_all_table to store Java types.
    try {
        Statement stmt = connection.createStatement();
        String sql = "CREATE TABLE mysql_all_table("
            + "col_boolean       BOOL, "              // boolean
            + "col_byte          TINYINT, "           // byte
            + "col_short         SMALLINT, "          // short
            + "col_int           INTEGER, "           // int
            + "col_long          BIGINT, "            // long
            + "col_float         FLOAT, "             // float
            + "col_double        DOUBLE PRECISION, "  // double
            + "col_bigdecimal    DECIMAL(13,0), "     // BigDecimal
            + "col_string        VARCHAR(254), "      // String
            + "col_date          DATE, "              // Date
            + "col_time          TIME, "              // Time
            + "col_timestamp     TIMESTAMP, "         // Timestamp
            + "col_asciistream   TEXT, "              // AsciiStream (< 2^16 bytes)
            + "col_binarystream  LONGBLOB, "          // BinaryStream (< 2^32 bytes)
            + "col_blob          BLOB)";              // Blob (< 2^16 bytes)
        stmt.executeUpdate(sql);
    } catch (SQLException e) {

Similar Messages

  • Custom Java Type persistence with JDO

    Hello,
    I have a question regarding KodoJDO.
    We have a class called "CBOCountry", CBOCountry is a type that has some
    behaviors.
    Each CBOCountry has only one field, an integer.
    We have a class called Person, this class must be persisted in the DB !
    Also, Person has a file of type CBOCountry, so, we need to persist in the
    DB the integer field of the CBOCountry.
    It is possible with JDO ?
    You can call me at +352 295665 280
    (Can you also send me a list of prices for KodoJDO ?)
    Thanks
    Demez Christophe

    Christophe,
    Ah! It seems to be that I recall some discussion of serialization on
    this list and if I recall right, it is possible to serialize an object
    as a field, but then you would lose the ability to query on those
    fields, I'm pretty sure. What you want is CBOCountryValue to be a
    second class object stored in PERSONX table.
    So let's see what the others have to say.
    David
    -------- Original Message --------
    Subject: Re: Custom Java Type persistence with JDO
    Date: Tue, 14 Aug 2001 14:00:28 +0200
    From: [email protected]
    To: [email protected]
    Thanks David, but ...
    I have 2 tables and only one table is usefull.
    In fact, what I need is a table PERSONX with a field CBOCOUNTRYVALUE !
    In our object model, every field is a specific class ( a CBO), and we do
    not want to create a table by field or even by kind of field.
    Thanks , I appreciate your answer
    Christophe
    David
    Ezzio
    <dezzio@ysoft To:
    [email protected]
    .com>
    cc:
    Subject: Re: Custom Java
    Type persistence with JDO
    08/14/01
    02:01
    PM
    Christophe,
    The short answer is yes. Both Person and CBOCountry would be
    enhanced to PersistenceCapable objects with entries in the XML metadata
    (package.jdo) and either entries in the database or in system.prefs.
    When the schematool is run you end up with a PERSONX table in the DB and
    a CBOCOUNTRYX table in the database. The names can be tweaked if
    necessary. Each table will have a column for each persistent field in
    the corresponding object. Which fields are persistent and which are not
    are identified by defaults and by the XML metadata.
    David

  • Custom Template for Third Party Balance Summary Report(Java type executable

    Hi Al,l we have a requirment to have a layout with some of the fields from
    Third Party Balance Summary Report( Which is a Java type executable and
    Data definition has Data Template attached(.xml)).
    I tried in below way.
    Coppied the Third Party Balance Summary Report program with same application and parameters
    with. Then defined a Datadefinition with my concurrent prog short name
    attached the same standard .xml file(Not sure what it is) and developed a custom template with
    a custom rtf(excel output type), and submitted the program
    the output is generated in excel but my custom .rtf layout is not getting applied
    rather it is showing same layout as in standard.
    Some thing I am missing here or else it is not the way of changing the
    template.
    If any one know how to do this please let me know.
    My client want only some files from the standard report(no need of new fileds)
    with output type xls.
    Thanks in Advance.
    The same content is posted in Custom Template for Third Party Balance Summary Report(Java type executable sorry for duplicating the thread, just for increase the visibility for my issue I did this.

    I gave up on using a different font or figuring out if I could use Times New Roman's built-in fractions visible in Font Book (as unicodes) and did a work-around based on Michael Wasley's tips in this discussion.
    https://discussions.apple.com/message/11622842#11622842
    I adapted it however and think it looks a little better.
    Font: Times New Roman 12 point
    I used the fraction bar in 12-point (Shift-Option-1) for automatic kerning.
    For the numerator, I changed the font style to superior (12-point).
    For the denominator, I changed the font style to subscript (Shift-Command-hyphen) and reduced the font size to half, or 6-point using the short-cut Shift-Command-<.
    When the fractions occured in my footnotes (9-point), I used 4-point in the denominator; 10- and 11-point, I used 5-point in the denominator. This seemed to produce the best result when printing.
    Thank you, Michael.
    -Dottie

  • Weblogic 10.0 Parsing Failure in config.xml: failed to load java type

    Hello,
    I've just installed a Weblogic 10.0 on a Linux server and when i try to start it, by :
    bash$ : sudo -u weblogic ./startWebLogic.sh
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=128m
    WLS Start Mode=Production
    CLASSPATH=:/opt/weblogic/10.0/patch_wls1002/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/patch_cie640/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/jdk150_15/lib/tools.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic_sp.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.jar:/opt/weblogic/10.0/modules/features/weblogic.server.modules_10.0.2.0.jar:/opt/weblogic/10.0/modules/features/com.bea.cie.common-plugin.launch_2.1.2.0.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/webservices.jar:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/weblogic/10.0/modules/net.sf.antcontrib_1.0b2.0/lib/ant-contrib.jar::/opt/weblogic/10.0/weblogic10.0/common/eval/pointbase/lib/pbclient51.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/xqrl.jar::
    PATH=/opt/weblogic/10.0/weblogic10.0/server/bin:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/bin:/opt/weblogic/10.0/jdk150_15/jre/bin:/opt/weblogic/10.0/jdk150_15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http://hostname:port/console *
    starting weblogic with Java version:
    java version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
    Starting WLS with line:
    /opt/weblogic/10.0/jdk150_15/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=128m -da -Dplatform.home=/opt/weblogic/10.0/weblogic10.0 -Dwls.home=/opt/weblogic/10.0/weblogic10.0/server -Dweblogic.home=/opt/weblogic/10.0/weblogic10.0/server -Dwli.home= -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/opt/weblogic/10.0/patch_wls1002/profiles/default/sysext_manifest_classpath:/opt/weblogic/10.0/patch_cie640/profiles/default/sysext_manifest_classpath -Dweblogic.security.providers.authentication.LDAPDelegatePoolSize=50 -Dweblogic.management.username=system -Dweblogic.management.password=admin9424 -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.policy weblogic.Server
    <Jun 7, 2010 9:49:12 AM CEST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    /opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n-schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/wlp_services.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-client.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-common.jar>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Server VM Version 1.5.0_15-b04 from Sun Microsystems Inc.>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.0 MP2 Sat Apr 25 01:45:38 EDT 2009 1213942 >
    i got the following error messages :
    *<Jun 7, 2010 9:49:14 AM CEST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing Failure in config.xml: failed to load java type corresponding to e=domain@http://www.bea.com/ns/weblogic/920/domain>*
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
    <Jun 7, 2010 9:49:14 AM CEST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    If i start the server as root, it boots but i cant deploy anything.
    Any idea about this behavior ?

    Hi,
    It is the problem in prasing the DTD of config.xml file
    It look like this
    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://www.bea.com/ns/weblogic/920/domain" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90/security/xacml http://www.bea.com/
    ns/weblogic/90/security/xacml.xsd http://www.bea.com/ns/weblogic/90/security http://www.bea.com/ns/weblogic/90/security.xsd http://www.bea.com/ns/weblogic/92
    0/domain http://www.bea.com/ns/weblogic/920/domain.xsd http://www.bea.com/ns/weblogic/90/security/wls http://www.bea.com/ns/weblogic/90/security/wls.xsd">
    Please change your DTD to this lines and start the server.
    Regards
    Ravi D

  • Invalid stored Object Types with Constructor Function

    hi folks,
    i created a stored object type on database 10.2. but it is invalid.
    it has a constructor function and a number of member functions.
    SQLPlus the only feddback is
    Warning: Type Body is compiled with errors.
    Toad 9.0.0 gives no error message.
    how can i find out what kind of error there is? and where?
    thx for help
    joerg

    In SQL*Plus, when you get a warning that you've created an object with compilation errors, you can type
    SQL> show errorsto see the list of errors.
    Justin

  • AES Algorithm error when trying to encrypt using stored Java class.

    Dear All,
    We have a specific reuirement where in we cannot use DBMS_CRYPTO package to encrypt/decrypt data using AES Algorithm
    So I am trying to use a stored Java class and I am getting "AES algorithm not available".
    I am using Oracle 10gR2 standard edition.
    Below is my code
    1. Stored Java class
    2. Stored function to access the above Java class.
    3. Test anonymus PL/SQL to test above code.
    Please help me finding the problem why I am getting "AES algorithm not available" error when I call stored Java class in Oracle.?
    **** If I use "DES" algorithm, it works. Also the Java code works well if I execute it as normal Java class from Eclipse.
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.
    I appreciate your help.
    Thanks,
    Priyanka
    Step1: Stored java class to encrypt and decrypt data
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "EncryptUtil" AS
    import java.security.Key;
    import javax.crypto.Cipher;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.spec.SecretKeySpec;
    public class EncryptUtil
         public static String encrypt(String inStr)
         String outStr = "Test data 123";
    try
    KeyGenerator kgen = KeyGenerator.getInstance("AES");
    kgen.init(128);
    SecretKey skey = kgen.generateKey();
    byte[] raw = skey.getEncoded();
    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
    byte[] encrypted =
    cipher.doFinal(inStr.getBytes());
    outStr =new String(encrypted);
    catch (Exception e)
         outStr = outStr + "exception thrown::" + e.getMessage();
    e.printStackTrace();
    return outStr;
    Step2: Stored function to access above stored java class.
    CREATE OR REPLACE FUNCTION SF_ENCRYPTUTIL(
    pKey1 VARCHAR2
    ) RETURN VARCHAR2 AS
    LANGUAGE JAVA NAME 'EncryptUtil.encrypt(java.lang.String ) return java.lang.String';
    Step3: Test encryption and descryption
    DECLARE
    outstr VARCHAR2(2000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('outstr-->' || SF_ENCRYPTUTIL('12345'));
    END;
    Below code example using DBMS_CRYPTO. This works, but we do not want to use this.
    declare
    l_in_val varchar2(2000) := 'Test data 123';
    l_mod number := dbms_crypto.ENCRYPT_AES128
    + dbms_crypto.CHAIN_CBC
    + dbms_crypto.PAD_PKCS5;
    l_enc raw (2000);
    l_enc_key raw (2000);
    l_dec raw (2000);
    begin
    l_enc := dbms_crypto.encrypt
    UTL_I18N.STRING_TO_RAW (l_in_val, 'AL32UTF8'),
    l_mod,
    HEXTORAW('156ae12300ccfbeb48e43aa016febb36'),
    HEXTORAW('001122230405060708090a0b0c0d0e0f')
    dbms_output.put_line ('Encrypted='||l_enc);
    end;
    Edited by: user5092433 on Sep 10, 2009 12:26 AM

    I guess I'd be a bit curious about why you can't use a DBMS_CRYPTO solution that provides identical output. It seems odd to want to have a procedure running inside Oracle and then dictate that it has to be Java and not PL/SQL...
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.Which java.security file are you talking about? The JVM that is inside the Oracle database does not and can not use configuration files that are outside the database. I suspect when you talk about files and paths that you're looking at a JVM outside the database, which is not the JVM that your Java stored procedure would be using.
    Looking at the error, my assumption is that some JAR file needs to be loaded into the internal JVM in order for the AES algorithm to be available. But I'm unfortunately not familiar enough with these classes to say what that would be.
    Justin

  • Error during invokation of webservices: "error: unknown java type:"

    hi,
    I'm having issues with invoking a webservice from the "WebLogic Test Client". The webservice exposes the methods from a stateless session EJB and Weblogic Workshop was used to create the webservice controls
    Weblogic version: 10.0 mp1
    Pls. advise.
    Error message ...
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header />
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>error: unknown java type: com.margin.engine.entity.ClientSet</faultstring>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">com.bea.xml.XmlRuntimeException: error: unknown java type: com.margin.engine.entity.ClientSet
    at com.bea.staxb.runtime.internal.FailFastErrorHandler.add(FailFastErrorHandler.java:45)
    at com.bea.staxb.runtime.internal.MarshalResult.addError(MarshalResult.java:265)
    at com.bea.staxb.runtime.internal.AnyTypeRuntimeBindingType.determineActualRuntimeType(AnyTypeRuntimeBindingType.java:84)
    at com.bea.staxb.runtime.internal.RuntimeBindingProperty.getActualRuntimeType(RuntimeBindingProperty.java:110)
    at com.bea.staxb.runtime.internal.PushMarshalResult.walkRankOneSoapArray(PushMarshalResult.java:570)
    at com.bea.staxb.runtime.internal.PushMarshalResult.walkSoapArray(PushMarshalResult.java:534)
    at com.bea.staxb.runtime.internal.PushMarshalResult.visit(PushMarshalResult.java:437)
    at com.bea.staxb.runtime.internal.SoapArrayRuntimeBindingType.accept(SoapArrayRuntimeBindingType.java:59)
    at com.bea.staxb.runtime.internal.PushMarshalResult.writeContents(PushMarshalResult.java:192)
    at com.bea.staxb.runtime.internal.PushMarshalResult.marshalTopType(PushMarshalResult.java:93)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalBindingType(MarshallerImpl.java:302)
    at com.bea.staxb.runtime.internal.MarshallerImpl.marshalType(MarshallerImpl.java:435)
    at weblogic.wsee.bind.runtime.internal.LiteralSerializerContext.marshalType(LiteralSerializerContext.java:70)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.internalSerializeType(BaseSerializerContext.java:175)
    at weblogic.wsee.bind.runtime.internal.BaseSerializerContext.serializeType(BaseSerializerContext.java:95)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodePart(SoapEncoder.java:284)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeReturn(SoapEncoder.java:205)
    at weblogic.wsee.codec.soap11.SoapEncoder.encodeParts(SoapEncoder.java:192)
    at weblogic.wsee.codec.soap11.SoapEncoder.encode(SoapEncoder.java:119)
    at weblogic.wsee.codec.soap11.SoapCodec.encode(SoapCodec.java:128)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.encode(CodecHandler.java:103)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleResponse(CodecHandler.java:50)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:236)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:220)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.callHandleResponse(ServerDispatcher.java:135)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:108)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:257)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    </bea_fault:stacktrace>
    </detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>

    Olivier, thank you so much
    SOAMANAGER does not exist in my system (sp level 8), so node "/sap/bc/soap/rfc" should be active. Actually, it is active.
    I think the problem is related to user rights/profiles.
    I have tried to create another WS after assigning role SAP_BC_WEBSERVICE_ADMIN. The same error when trying to activate it, but now, I can see this WS in SE80 (under "Enterprise Services->Service Definition"). It is not active there and if I try to activate it, a success message appears indicating that user "is not authorized to use function netzwerkadministration". I cannot see any new services in SICF...
    Probably the new entry in SICF will be created after activating WS in SE80...
    Do u know what user profile should I add in order to properly activate the WS in SE80?
    Thank you very much!
    Vicente

  • Calling stored java-procedure in Oracle9i Lite from ODBC

    I've got a problem:
    I try to call a stored java-procedure through ODBC. The stored
    java-procedure in Oracle 9i Lite is called successfully from
    server console (MSQL). When I call my stored java-procedure from
    my web-application (ASP) through ODBC connection (ODBC drivers
    are from Oracle 9i Lite set V3.51) the server returns an error
    (Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [POL-
    8000] could not start the Java Virtual Machine),
    however 'select' without java-procedure calls works
    successfully. PATH and CLASSPATH variables are properly set up.
    File jvm.dll is present.
    Can anybody help me?

    Pass String[] as an argument to mainbook():
    create or replace PROCEDURE openpdffile
    AS LANGUAGE JAVA
    NAME 'pdfopenbook.mainbook(java.lang.String[])';Have you posted it on the Database forum?
    Regards,
    Nick

  • Java static variables in Stored Java

    I'm wondering if someone in Oracle could relate their thinking with regards to static variables in stored java and why were these implemented as they were. The aspect I'm referring to specifically is how these are basically working as PLSQL package variables, i.e. with state maintained for the life of the session.
    Outside the database, in the "normal" Java world, statics will only live as long as the program is running. But in the Oracle DB world, the static continues to live as long as the session. With this in mind, doesn't this difference compromise the idea of just inserting working Java code into the Database? i.e. static variables now have to be initialized every time a method is called, and cannot be assumed to have default values. Does that not seem like a rather large departure from what a non-DB java programmer would be doing?
    Thanks in advance for your thoughts on this.
    Joe Tseng

    It should generally be the case that all calls in a session see the same static variable values. Some actions will terminate the java session (and lose the static variable state) without ending the RDBMS session, such as calling System.exit from java, but normally this can't happen within a single RDBMS call. Perhaps if you give more details on how you are making the call from java to PLSQL one could say more. In particular, if the call happens to be via the JDBC thin driver then the session running in the JDBC connection will be distinct from the calling session.

  • OWS-00102 Reason for not creating a custom Java type: simple or mixed conte

    Hi ,
    I am generating the java proxies from a WSDL file in Jdeveloper and I am getting the below warning.
    WARNING: OWS-00102 Mapped {http://xmlns.fmr.com/systems/dev/aar/requests}ViewRequestStatusResult to javax.xml.soap.SOAPElement ViewRequestStatusResult. Reason for not creating a custom Java type: simple or mixed content is not supported.
    I have tried using Jpub as well, but it does not work as well.
    I am very new to JAVA and It seems some java code needs to be created. can any one please help me how to resolve this issue.
    Thanks and Regards,
    Vineet

    var cResponse = app.response({
    cQuestion: "Enter the section number to appear in the stamp.",
    cTitle: "Section Number",
    cLabel: "Section Number:"
    if (cResponse == null) {
    event.value = '*INVALID*";
    else
    event.value = cResponse;
    You can only remove the 'Warning JavaScirpt" is by creating a special application folder script for the 'app.response' method that uses the 'trustedFuncton' to suppress this security warning. Then in you form, you will need to test for this function and either issue a warning about the missing function or run the 'app.response' code and live with the warning. Each system will need the special application folder script installed on it.

  • Mapping Java Types to XML Types

    Hi, I have a small doubt in web services,
    1)  how a java data type can match with xml data type in wsdl,
    2)  how and where the java program can find the matching java
        data type to xml data type and vice versa
    3)  whether any mechanism is available for this data conversion?
    4)  where can i find that one?
    Please advice me
    Regards
    Marimuthu.N

    Hi Marimuthu.N,
    My answers for your question, Kindly let me know if you need some more inputs.
    +1) how a java data type can match with xml data type in wsdl,+
    In SOAP 1.1 you have the following data types which is in XSD(XML Schema Definition), the same data type is also available in Java. For example (string, normalizedstring in xml is available as java.lang.String)
    The complete list can be found in the table below.
    XSD to Java Mapping.
    XSD Type--------------------------------Java Type
    base64Binary----------------------------byte[]
    hexBinary---------------------------------byte[]
    boolean------------------------------------Boolean
    byte-----------------------------------------Byte
    dateTime----------------------------------java.util.Calendar
    date-----------------------------------------java.util.Calendar
    time-----------------------------------------java.util.Calendar
    decimal------------------------------------java.math.BigDecimal
    double-------------------------------------Double
    float-----------------------------------------Float
    hexBinary---------------------------------byte[]
    int--------------------------------------------Int
    unsignedShort---------------------------Int
    integer--------------------------------------java.math.BigInteger
    long------------------------------------------Long
    unsignedInt-------------------------------Long
    QName-------------------------------------javax.xml.namespace.QName
    short----------------------------------------Short
    unsignedByte---------------------------Short
    string---------------------------------------java.lang.String
    anySimpleType-------------------------java.lang.String
    +2) how and where the java program can find the matching java+
    data type to xml data type and vice versa
    Here is my WSDL which has a method getHello --> Pass Input as String --> Get Response as String.
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://zackria.googlepages.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://zackria.googlepages.com" xmlns:intf="http://zackria.googlepages.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.4
    Built on Apr 22, 2006 (06:55:48 PDT)-->
    <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://zackria.googlepages.com" xmlns="http://www.w3.org/2001/XMLSchema">
       <element name="getHello">
        <complexType>
         <sequence>
          <element name="s" type="xsd:string"/>
         </sequence>
        </complexType>
       </element>
       <element name="getHelloResponse">
        <complexType>
         <sequence>
          <element name="getHelloReturn" type="xsd:string"/>
         </sequence>
        </complexType>
       </element>
      </schema>
    </wsdl:types>
       <wsdl:message name="getHelloResponse">
          <wsdl:part element="impl:getHelloResponse" name="parameters"/>
       </wsdl:message>
       <wsdl:message name="getHelloRequest">
          <wsdl:part element="impl:getHello" name="parameters"/>
       </wsdl:message>
       <wsdl:portType name="Test">
          <wsdl:operation name="getHello">
             <wsdl:input message="impl:getHelloRequest" name="getHelloRequest"/>
             <wsdl:output message="impl:getHelloResponse" name="getHelloResponse"/>
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="TestSoapBinding" type="impl:Test">
          <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <wsdl:operation name="getHello">
             <wsdlsoap:operation soapAction=""/>
             <wsdl:input name="getHelloRequest">
                <wsdlsoap:body use="literal"/>
             </wsdl:input>
             <wsdl:output name="getHelloResponse">
                <wsdlsoap:body use="literal"/>
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="TestService">
          <wsdl:port binding="impl:TestSoapBinding" name="Test">
             <wsdlsoap:address location="http://localhost:8080/TestWebService/services/Test"/>
          </wsdl:port>
       </wsdl:service>
    </wsdl:definitions>I use apache axis for the client side code. I also suggest to start using this to get quickly into SOA(Service Oriented Architecture)
    package com.googlepages.zackria;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    * TestClient for Webservice
    * @author $author$Mohammed Zackria
    * @version $Revision$1.00
    public class TestClient {
         * main method
         * @param args pass nothing as far now
        public static void main(String[] args) {
            try {
                String endpoint = "http://localhost:8080/TestWebService/services/Test";
                Service service = new Service();
                Call call = (Call) service.createCall();
                call.setTargetEndpointAddress(new java.net.URL(endpoint));
                call.setOperationName(new QName("http://zackria.googlepages.com", "getHello"));
                //String Conversion
                String ret = (String) call.invoke(new Object[] { "Zack" });
                System.out.println("Sent 'Zack', got '" + ret + "'");
            } catch (Exception e) {
                System.err.println(e.toString());
    }+3) whether any mechanism is available for this data conversion?+
    Check the above code which has the following portion
    //String Conversion
    String ret = (String) call.invoke(new Object[] { "Zack" });
    By default APACHE Axis returns Object Array which can be Casted to your WSDL defined data type.
    +4) where can i find that one?+
    [Eclipse Webservice|http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html]
    Hope this helps out, Kindly Let me know if you need some more or if i have not answered your question.
    Regards,
    Zack
    Edited by: zack on Nov 22, 2008 1:47 PM
    Edited by: zack on Nov 22, 2008 1:49 PM

  • The JNI defines a mapping of Java types and native (C/C++) types.

    As per the tutorial
    The JNI defines a mapping of Java types and native (C/C++) types.Does the above sentence mean that I can use dll written in C/C++ only and not dll written in Pearl.
    Could anyone please give me the solution.

    Please do tell me how can I call a dll file created in Perl ....And I will point out again that I doubt that it is possible to create a dll that has the following characteristics
    1. Is in fact a dll.
    2. Is in fact intended to run anywhere outside of the perl engine.
    Step 2 means that you run perl, not a "perl dll" via C.
    You can do that or at least in the past you could. And that has nothing to do with java nor JNI. So you would learn about it on a perl site.
    And I can only note that when I did that a number of years ago it was very difficult. Certainly much harder than getting JNI to work. And you had better have quite a bit of C/C++ experience before you attempt it.

  • Java Types Conversting & Casting .

    Hi All !
    Really i do have two questions regarding Java Type Conversion and Casting
    and hope i would find (good) answers :
    [Q1:]
    why it's legal to convert(implicitly) from ( long --> float ) and this is
    said to be a widening conversion even if the size of long is longer than float
    and hence there a possible loss of information ?
    [Q2:]
    why it's legal to cast(explicitly) from ( byte --> char ) and how compiler will deal
    with byte as singed and char as unsigned during type casting (this is said to be
    a narrowing converstion and it is really is ) ?
    for [Q2:] i did the follwing code :
    public class TestNarw
         public TestNarw()
              byte bBefore=-100; // change this value to whatever negative number that is to fit in a byte.
              char c=(char)bBefore;
              byte bAfter=(byte)c;
              System.out.println(bBefore);
              System.out.println(c);
              System.out.println(bAfter);
         public static void main(String args[])
              new TestNarw();
               the SURPRISE on the code above is that the output is :
    -100
    -100
    and when i change the value of "bBefore" to any negative number that is to fit in a
    byte it (e.g: -10) it gives the same value for the variable "c" (character)which is ASCII "63" ="?"
    but when i test it with a suitable postive number , it works fine and the character (c) represents that number
    so how it deals with converstion from negative byte to char ?
    Thanks ...

    Q1: you can always cast between primitive types (numbers, not boolean). The only problem is you lose precision in certain directions. A long to float isn't necessarily going to change the value, but it really depends on the long value. If it's out of range of float, it'll basically be wrapped around to the negative side. (at least that's what long to int would do, not sure if float or double behave different in that regard).
    Q2: The value -100 converted to a char would probably be 65436, which prints as "?" because DOS can't print that character. Then when you cast back, 65436 is out of range for a byte, so it rolls back around to -100.
    Try this:
    byte b = 127;
    System.out.println(b);
    System.out.println((byte)b+1);
    System.out.println((byte)0xFF); // 255 in hex
    It'll print 127, then -128, then -1. When you go out of range, it just wraps around. For this reason, you often have to be carefull what size you store things as.

  • WEB-AS JAVA type TS not removable from SLD

    Hi Experts,
    I have a peculiar issue where In I have a ECC 6.0 ( SID :- RD1) added in my SLD of PI 7.0 as WEB-AS ABAP Type Technical System.
    I was able to work with the corresponding Business System in my ID( configuration). But two days back when I logged in to view my SLD , I could see that in my Technical System category there are two instances of RD1 one WEB-AS ABAP and other WEB-AS JAVA . Now I suppose WEB-AS JAVA type TS for RD1 was created by mistake. But now when I am removing it from the TS category and also removing the instances created under BCSystem and SAP JAVA cluster in content maintainence. I see the WEB-AS JAVA type TS appearing again in the TS after some time. I repeated the same several times and also start/stop  the SLD server but then after sometime again the WEB-AS JAVA type TS for RD1( ECC 6.0 - not required) appearing in the list of TS.
    I  am unable to understand this absurd behaviour. I have carefully removed all the instances from the content maintainence but still it appears after sometime.
    Are there any other possible places where there can be instance created for the WEB-AS JAVA type TS in SLD server where from I am supposed to remove it ???
    Regards
    Nishant

    Hi Nishant,
    You question is little confusing
    Case1. Are you saying : You made TS (Say XYZ) for ABAP part of an SAPECC system and next day you found a TS with the same name (XYZ) for the same SAPECC system, but the component was JAVA  In short you have two TS one for each ABAP  & Java Part of the same systems.
    Case2 :1. Are you saying : You made TS (Say XYZ) for ABAP part of an SAPECC system and next day you found a TS with the some other name (ABC) for the same SAPECC system, but the component was JAVA  In short you have a TS for each ABAP  & Java Part of the same system.  If this is the case then, how is this possible both cannot have same name
    Regards
    Suraj

  • (262119469) Q DBC-17 How is data mapped from SQL-type to Java-type?

    Q<DBC-17> Is there any documentaion for the data mapping between the "java type" and
    the "sql type"
    A<DBC-17> The data types are the standard JDBC mappings. Check the javadoc for the
    java.sql package.

    Hi,
              If you are seeing last 3 fields coming as empty.... then you need to check the seperator type which correctly seperats one fields from another during mapping to BW infoobject.
    Thanks
    Kishore Kusupati

Maybe you are looking for

  • Query Regarding Multi-Message Mapping in Interface Mapping.

    Hi All, I've a query that can we use Multi-Message Mapping in Interface Mapping if: One mapping structure is simple one-2-one mapping and Second mapping is calling a stored procedure. Please give me some links if the answer is YES. Thanks in Advance.

  • I want to add another device.

    Under manage cloud devices on iTunes, I want to add another device. How do I add another device to authorize for purchased downloads? Am I allowed only a certain number of devices authorized to my apple ID?

  • Issue with Taiwanese characters display in SQL*Plus/Toad

    Hi all, I have an issue about displaying the Taiwanese characters either in SQl*Plus or Toad tool. Able to view all territory characters properly except it. Whenever i tried to view these characters from Toad, diplay like square box('⃞'), where as it

  • My handycam to IMovie..few questions

    Hey all, So I hook my handycam up to my iMac. it appears to DL the clips onto iMovie. Here are my questions... 1) How do I control what gets put into iMovie from the handycam? do I have the choice? 2) How do I speed up the DL to the iMac? It DLs at n

  • How can I get help in using this service.?  I am totally new to this service.

    Do you have any simple tutorials I can get to use this service?