Simple asymmetry in XOR-type encryption

Hi there.
In my never-ending quest for knowledge, I've decided to implement a (very) simple and (very) weak encryption algorithm, to teach myself the extreme basics of cryptography. What I decided to do is this:
Take a byte array, which could represent a file, or user input, or whatever, and XOR each byte with a byte from an encryption key provided by the user.
This produces a garbled set of bits that represent the encrypted message. This also has the (dis)advantage that decryption is the same process as encryption, since XOR is symmetric. So in order to decrypt an encrypted message, you simply supply the same encryption key, and re-encrypt it. This is the code:
public static byte[] encryptOrDecrypt(byte[] key, byte[] data)
     byte[] digest = new byte[data.length];
     for (int i = 0; i < data.length; i++)
          digest[i] = new Integer(key[i % key.length] ^ data).byteValue();
     // wipe the arrays for security.
     Arrays.fill(key, (byte) 0x00);
     Arrays.fill(data, (byte) 0x00);
     return digest;
}Note also that I am blanking the key and data arrays so they do not remain in memory. Perhaps overkill for such a simple encryption, but it seems like a good habit to get into.
Now that works just fine; the encryption and decryption produce the proper output. However, I would like the encryption and decryption processes to be different, so that if the user wanted to double-encrypt a file, it wouldn't produce just a decrypted file as output. My idea was this:
First encrypt with a static array of nothing-up-my-sleeve bytes (which I called a Rubicon), then encrypt with the user's encryption key.
Thus to decrypt, just decrypt with the user's encryption key, then with the Rubicon.private static byte[] RUBICON = {0x08, 0x29, 0x3A, 0x4B, 0x5C, 0x6D, 0x7E, 0x0F};
public static byte[] encrypt(byte[] key, byte[] data)
     byte[] digest = new byte[data.length];
     for (int i = 0; i < data.length; i++)
          digest[i] = new Integer(RUBICON[i % RUBICON.length] ^ data[i]).byteValue();
     for (int i = 0; i < data.length; i++)
          digest[i] = new Integer(key[i % key.length] ^ digest[i]).byteValue();
     // wipe the arrays for security.
     Arrays.fill(key, (byte) 0x00);
     Arrays.fill(data, (byte) 0x00);
     return digest;
// and the decrypt method would work in the reverse
I thought I was being pretty clever. Turns out that because of the symmetry of XOR, it doesn't matter whether you use the Rubicon or user's key first, you'll get the same output.
I am trying to think of a way that is simpler than RSA-level algorithms, but more realistically secure than a Caesar cipher (example: shifting 1 byte right on encryption, then 1 byte left on decryption is way too simple). Any ideas for methods to differentiate between encryption and decryption, while staying simple but not too simple?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Well, what I m searching for is something like:
needs-client-auth="if-cert-exists"
(i.e. when I set my secure-web-site.xml settings, in the ssl-config entity.)
I'm new to OC4J and got no idea if this possible. I know that this can be at least done in Tomcat and Weblogic.
By applying the settings as:
Tomcat => clientAuth="want"
and
Weblogic => Two Way Client Cert Behavior = "Client Certs Requested But Not Enforced"
Please advice, how to solve this in Oracle products ?
Thank you

Similar Messages

  • EasyLoader,be more stronger,more simple!load all types of files in one way!

    Hi,guys!Very happy to announce to the world,my easyLoader project was updated to 1.012.
              this class can be used to load sound,video,txt,xml,image,swf,event dae and on.and you guys can add custom file type for easyLoader.
              author :liuyi email:[email protected],
    Home and document online!:http://www.ourbrander.com/easyloader/
    Google code:https://code.google.com/p/easyloader/
              What is easyLoader?
              This work is use load all the assets of  website or game,it is an good assets manager.
              People can use it to load sound,video,txt,xml,image,swf,dae and any custom  types of files.
              Why we need it?
              -easy of use
                       Every method have a good naming,you can use it likes speak to an friend.Only need several lines to complete the work.
              -never be lost items
                load items one by one.
              -excellent memory manage
                       Using it continually more than 24 hours,memory do not increase without limit.item can be destoried,easyLoader Object(include all assets) too.
              -flexible
                      User can add custom file type to loading.
              -dynamic add items for easyLoader
               EasyLoader can add and load new assets anytime and anywhere,although all the items were loaded.
              -Updates
               will updates according to user's requirements.
              How to use?
              Realy only need several lines:
              step1:
              new a easyLoader Object
              line1: var _assetsManager = new EasyLoader();
              step2:
              add some necessary event Listener
              line2: _assetsManager.addEventListener(EasyLoaderEvent.COMPLETED,assetsLoaded)
              step3:add the assetsLoaded function
              line2:private function assetsLoaded(e:EasyLoaderEvent) {
               line3:     //put some code to here like init()
               line4:}
               step4:load assets according to config xml
               line5:_assetsManager.loadConfig("assets.xml")
               ok,this is all!
    Public Methods
    EasyLoader()              
    addFile(path:String, alias:String = "", loadTip:String = "", autoRemove:Boolean = false, method:String = "text"):void             
    addType($type:String, $name:String):Boolean     
    dispose():void             
    disposeFileByAlias(alias:String):Boolean             
    disposeFileByName(name:String):Boolean             
    getFileByAlias(alias:String):LoadedItem              
    getFileByIndex(number:uint):LoadedItem             
    getFileByName(name:String):LoadedItem
    init(obj:* = null, $autoLoad:Boolean = true, $ignoreError:Boolean = true):Boolean    
    loadConfig(str:String):void
    pause():void
    removeFileByAlias(alias:String):Boolean
    removeFileByName(name:String):Boolean    
    start():void     
    unPause():void

    Further note: I have uninstalled this stupid program now THREE different times, including using a registry cleaner, which then deleted my DVD drive, thankyouverymuch. And even after I got the DVD drive back so I could reinstall the program, it was like I'd never uninstalled it (with the exception of the custom brushes still being missing) right down to the canvas size and paint color I had been using when all this started.
    So uninstalling it does nothing, resetting preferences does nothing... I can not save my work, period. I've been fighting with this for about 8 hours and I am so frustrated I could just throttle someone with my bare hands for putting me through this crap.
    For a product that came bundled with a $200 graphics tablet, it sure isn't worth a damn. Anybody got any ideas? I'm at my wits' end here.

  • Simple OWB 10g R2 Example for Type 2 Dimensions Needed

    Hello,
    Does someone have a simple example of a Type 2 dimension on OWB 10g R2? That I can run and test. The ideal would be an MDL file that includes all the elements, so I only have to install and run it?
    I have been trying to make this work for far too long now. All of this was not a problem in OWB 9i but I'm having trouble getting OWB 10g R2 to work like I'm used to.
    Thanks
    Eric
    [email protected]

    Sutirtha
    FYI, with my configuration of having separate database instances for target and OWB repository I ran into a bit of an issue when deploying a map:
    'RPE-01012: Cannot deploy PL/SQL maps to the target schema because it is not owned by the Control Center' error.
    Even though I could do deploy tables, views, MVs et all but for some reason I couldn't deploy my mapping. Solution to get around this problem is to:
    * create new OWB repository in the target environment using the REPOSITORY ASSISTANT
    * add target schema as an OWB user using OWBREPowner (Global Explorer panel/Security/Users), check user as 'target schema' option
    * start control center service against the target warehouse using target schema credentials
    * delete previously created separate dedicated OWB repository
    Now mappings can be deployed successfully.
    My only concern now is if this is a valid legit configuration? I would hate to run into problems in the future once my environment becomes bigger.
    What are your thoughts on this?

  • Encrypted string is too long

    hi,
    I have to en/decrypt a lot of text for storing in a database. all crypt.classes I found put out an encrypted string which is much longer then the original string. that may be good for passwords, but not for real text and a limited amount of chars in the database-field.
    does someone know a class for en/decryption that holds the initial number of chars (more or less)?
    thank you
    gammloop

    How strong of encryption do you need? If you just want to make sure that some data isn't read by admins then use a simple substitution or XOR scheme, then your ciphertext length will equal your plaintext length. If you need something strong then you're going to have to deal with larger text lengths. I think block ciphers will just pad to some multiple of the block length.
    Good Luck
    Lee

  • Encryption vs performance

    As a laptop user I have always felt attracted by the use of encryption but as the laptop I am using is quite old (T23 - 1.13 Ghz / 256 RAM) I wonder if the gain of security would come at a too high price in terms of performance.
    Someone has used or is using encryption for a similar (or old in general) laptop and can share his/her experience in terms of gain/loss?
    Thanks in advance for any input.

    @fledermann
    No worries. Thanks anyway for the info.
    @Strike0
    I totally forgot about that. A kernel update came along and I thought 'Well, will reply after rebooting and paste it' but as usual new things started crossing my mind afterwards and in the end I did not include the results in my reply.
    The results are as follows:
    # Tests are approximate using memory only (no storage IO).
    PBKDF2-sha1 51522 iterations per second
    PBKDF2-sha256 46545 iterations per second
    PBKDF2-sha512 17210 iterations per second
    PBKDF2-ripemd160 75851 iterations per second
    PBKDF2-whirlpool 22080 iterations per second
    # Algorithm | Key | Encryption | Decryption
    aes-cbc 128b 21,6 MiB/s 30,7 MiB/s
    serpent-cbc 128b 12,8 MiB/s 16,5 MiB/s
    twofish-cbc 128b 36,1 MiB/s 38,1 MiB/s
    aes-cbc 256b 23,5 MiB/s 23,7 MiB/s
    serpent-cbc 256b 12,9 MiB/s 16,5 MiB/s
    twofish-cbc 256b 36,0 MiB/s 38,2 MiB/s
    aes-xts 256b 30,7 MiB/s 29,8 MiB/s
    serpent-xts 256b 12,9 MiB/s 16,4 MiB/s
    twofish-xts 256b 37,4 MiB/s 37,0 MiB/s
    aes-xts 512b 23,7 MiB/s 23,3 MiB/s
    serpent-xts 512b 13,0 MiB/s 16,3 MiB/s
    twofish-xts 512b 37,1 MiB/s 37,0 MiB/s
    As for ewaller's example I understood it both as an simple example of a possible encryption scheme and as the suggestion of using more than one security 'layer' depending on the needs. Taking into account your comment I presume I should disregard the example and focus more on the suggestion.
    Regarding the access of 'other legitimate users' I didn't mean to refer specifically to a spouse, partner etc. which I consider to be part of a trustworthy circle but to 3rd persons that ocassionally may use the equipment. Like a guest who wants to check his mail or the tech support in case something is wrong with the computer. Especially in the later case I have personal 1st hand experience of the technicians being at the same time (or even more) interested in going through the user's personal data (the client was a girl) and fixing the problem the computer had.
    Taking this into account you will understand that I don't consider myself the provider of any content for this or similar kind of people even if it the most harmless one can think of (still private in the end though).
    The size of the 'private container' is indeed a tricky thing, just like it is when thinking of how to setup the different partitions when installing a Linux distro.
    The size drcouzelis suggested looks fine to me, even, to some extent, excessive but I presume it is better to overestimate than to underestimate.
    As for 'excluding' the home partition from a general disk encryption setup, well, as long as it works as it should I wouldn't mind trying that out but as you yourself state it indeed sounds trickier to setup. Thus I would be tempted to first try out the secure directory setup as explained in the wiki. But I understand, at least I think I do, the idea of your suggestion. Once I go through the documentation available I will most likely end up more or less convinced.
    Just as with regards to a specific/'personalized' encryption for the home partition in terms of using a different filesystem I wonder if it wouldn't come to the considerations of using X filesystem for X type of files just as one does when choosing the filesystem for the partitions. I mean filesystem A might show better performance because the encrypted files are of type B which it handels best.
    Therefore wouldn't I end up being a 'hostage' of those type of files when the data to be encrypted would be of 'mixed nature' (larger, lighter etc.)?

  • How to delete the material records related to storage type

    Dear SAP guru's,
    I got a situation that if the material "XXXXXX" exists in two different storage type (let say 001 & 002 ) and the material needs to be removed out of one (Let say 002) to avoid the picking and putaway in future.
    Inorder to accomplish an above requirement we tried the below cases
    Case 1: By flagged the material "XXXXXX" under storage type 002 in MM06 transaction.But it didn't restrict the system on allocating and removing the stock from /to to the storage type 002.
    Case 2:After we flagged the material for deletion under storage type 002 ,we used to MM71 transaction to archive & delete the material record that assocaited with the storage type 002 completely.
    I am kind of queiries to know if there is any other method or procedure available to delete the storage type associated material records in SAP.
    Please guide me with the other options.Thanks.
    Regards,
    John.

    Hi John,
    Its very simple, remove the Storage type indicators from the material master - Warehouse View 1 at Stock placement & Stock removal section, with this it won't pickup or place the materials in the concerned storage type.
    If you have extended this materials to more than 1 storage type, you need to do the same for all the storage types.
    Reward if it is helpful.

  • DBSequence entity attribute type not available

    Hi OTN,
    I want to set an entity attribute type to DBSequence. But there's no such type in a drop-down list, only Java types.
    I tried to set the type in source manually but at runtime framework doesn't assign a negative integer to the attribute at Create operation.
    In simple test application DBSequence type is available and negative integers get assigned.
    I have found a proper thread (Re: DBSequence type no longer available for entity attributes? but the solution there is to recreate the whole datamodel. That isn't suitable for me.
    Maybe there is a better solution now?
    Jdeveloper 11.1.1.2, ADF BC
    Thanks.

    I logged Bug 9380578 - "SQL FLAVOUR" AND "TYPE MAP" CAN BE CHANGED IN "PROJECT PROPERTIES"
    (published in My Oracle Support).
    NB: in JDeveloper 9.x, it was possible to change the "SQL Dialect" (as it was called at that time), but the ADF BC objects and the custom code weren't changed;
    hence it was decided to gray out that choice after the Project creation.
    Regards,
    Didier.

  • Simple Transformation from Adobe Form XML document to Dictionary structures

    I have an XML document that I am receiving via email (the XML document is generated from an Adobe Interactive form). I would like to write a simple transformation that will map that XML document to a structure and internal table in my ABAP program. I am new to Simple Transformations and I am having trouble working out how to write a simple transformation for this type of XML document. I would prefer to write a custom transformation rather than using the identity transformation (ID). I would appreciate any help you can provide.
    Please refer to the below for an example of the XML file.
    This maps directly to 2 dictionary structures that exist within our system containing all of the same components. PIM_REQUEST_HDR has a corresponding SAP dictionary structure Y_REQUEST_HDR and PIM_REQUEST_ITEMS has a corresponding SAP dictionary structure Y_REQUEST_ITEMS.
    Can anyone help with some instructions or examples of how to create the simple transformation?
    Thanks for your help! We are using ECC 6.0
    Sample XML to be transformed:
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <SFPSY>
      <DATE>2007-07-03</DATE>
      <TIME>07:25:21</TIME>
      <USERNAME>TLCITY</USERNAME>
      <SUBRC>0</SUBRC>
      </SFPSY>
    <PIM_REQUEST_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>blah blah blah</REQ_DESC>
      <PROC_AREA>CTC</PROC_AREA>
      <REQUESTED>2007-07-03</REQUESTED>
      <REQUIRED>2007-07-03</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note manual changes</MOD_TYPE>
      <SAPNOTE_NUM>59549656</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT />
      <REASON />
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>2861655161</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </PIM_REQUEST_HDR>
    <PIM_REQUEST_ITEMS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RSDIJOIJSDOIF</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RRRSDIJOIJS03</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </PIM_REQUEST_ITEMS>
      </data>

    I have solved this one with the help of another collegue.
    To simplify, we changed the XML to be as follows:
    [code]
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <PIM_REQUEST>
    <REQ_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>Key required for pricing routines</REQ_DESC>
      <PROC_AREA>SD</PROC_AREA>
      <REQUESTED>2007-07-30</REQUESTED>
      <REQUIRED>2007-08-02</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note: Manual Changes</MOD_TYPE>
      <SAPNOTE_NUM>0000000000</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT>TS-2498 Pricing Routines</TECH_SCRIPT>
      <REASON>New pricing routines required</REASON>
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>029</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </REQ_HDR>
    <KEY_DETAILS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT902</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT901</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </KEY_DETAILS>
      </PIM_REQUEST>
      </data>
    [/code]
    This maps directly to 1 dictionary structure that exists within our system containing all of the same components. PIM_REQUEST has a corresponding SAP dictionary structure Y_REQUEST_HDR which is a deep structure and has within it a structure REQ_HDR and a table KEY_DETAILS.
    The corresponding simple transformation we have then used is as follws:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <tt:copy ref="root"/>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Alternatively the following 2 options also work:
    Option 2:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <tt:copy ref="root.REQ_HDR"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop name="KEY_DETAILS" ref="root.KEY_DETAILS">
                <DATA>
                  <tt:copy ref="$KEY_DETAILS"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Option 3:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <MANDT tt:value-ref="root.REQ_HDR.MANDT"/>
              <REQ_NUM tt:value-ref="root.REQ_HDR.REQ_NUM"/>
              <REQ_DESC tt:value-ref="root.REQ_HDR.REQ_DESC"/>
              <PROC_AREA tt:value-ref="root.REQ_HDR.PROC_AREA"/>
              <REQUESTED tt:value-ref="root.REQ_HDR.REQUESTED"/>
              <REQUIRED tt:value-ref="root.REQ_HDR.REQUIRED"/>
              <REQUESTOR tt:value-ref="root.REQ_HDR.REQUESTOR"/>
              <MOD_TYPE tt:value-ref="root.REQ_HDR.MOD_TYPE"/>
              <SAPNOTE_NUM tt:value-ref="root.REQ_HDR.SAPNOTE_NUM"/>
              <SAPMSG_NUM tt:value-ref="root.REQ_HDR.SAPMSG_NUM"/>
              <TECH_SCRIPT tt:value-ref="root.REQ_HDR.TECH_SCRIPT"/>
              <REASON tt:value-ref="root.REQ_HDR.REASON"/>
              <DEV_ENV tt:value-ref="root.REQ_HDR.DEV_ENV"/>
              <INSTALL_NO tt:value-ref="root.REQ_HDR.INSTALL_NO"/>
              <BASIS_REL tt:value-ref="root.REQ_HDR.BASIS_REL"/>
              <REG_STATUS tt:value-ref="root.REQ_HDR.REG_STATUS"/>
              <REJ_REASON tt:value-ref="root.REQ_HDR.REJ_REASON"/>
              <APP_DATE tt:value-ref="root.REQ_HDR.APP_DATE"/>
              <REJ_DATE tt:value-ref="root.REQ_HDR.REJ_DATE"/>
              <APPROVER tt:value-ref="root.REQ_HDR.APPROVER"/>
              <REGISTRATOR tt:value-ref="root.REQ_HDR.REGISTRATOR"/>
              <REG_DATE tt:value-ref="root.REQ_HDR.REG_DATE"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop ref="root.KEY_DETAILS" name="KEY_DETAILS">
                <DATA>
                  <MANDT tt:value-ref="$KEY_DETAILS.MANDT"/>
                  <REQ_NUM tt:value-ref="$KEY_DETAILS.REQ_NUM"/>
                  <PGMID tt:value-ref="$KEY_DETAILS.PGMID"/>
                  <OBJECT tt:value-ref="$KEY_DETAILS.OBJECT"/>
                  <OBJ_NAME tt:value-ref="$KEY_DETAILS.OBJ_NAME"/>
                  <ACCESSKEY tt:value-ref="$KEY_DETAILS.ACCESSKEY"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]

  • exception-type in web.xml does not appear to work

    WLS 60 SP1 (#101616)
              <exception-type> in web.xml does not appear to work. WLS shows standard
              "Internal error 500" page instead of a custom error page. The custom error
              page is shown if <error-code> is used instead of <exception-type>.
              Any ideas? Thanks
              

    Can you show me some of your code? This works for me.
    Also, you say that you are working with 6.0sp3. Are you sure? sp3 hasn't been
    released yet, except in a very limited beta. (I believe only internally, but I
    could be wrong about that.)
    David
    [email protected] wrote:
    Hi all,
    I have created a very simple servlet and an index.html file with a link
    to it, then packaged it into a WAR file with the appropriate web.xml and
    ias-web.xml files. I then created an application.xml file referencing
    only this servlet and adding a context root. After deployment via
    "iasdeploy deployapp simple.ear" and cycling the web server, I can reach
    the welcome file (index.html) correctly
    -"http://localhost/NASApp/simple". When I attempt to follow the link to
    the servlet ("simple servlet") the URL ends
    up as "http://localhost/NASApp/SimpleServlet" whereas it should be
    http://localhost/NASApp/simple/SimpleServlet If I type that url in, the
    servlet executes fine.
    I've deployed this into Tomcat and get the behavior I expect. It appears
    that the element in the application.xml file is ignored by
    iAS.
    I'm using iAS SP3 on Win2k (same problem on NT).
    This is such a basic behavior that I can't believe this is an existing
    bug. I must be doing something wrong...
    Any ideas?
    Thanks in advance,
    -Glen
    Files are attached.
    Name: simple.ear
    simple.ear Type: application/x-unknown-content-type-ear_auto_file
    Encoding: base64
    Description: filename="simple.ear"

  • What happened to the type tool in Photoshop CS5?

    In previous versions of Photoshop, when the type tool hovered over text I could edit, it switched to just the up and down type cursor tool...and when it was over a region where I could click to create a new text layer, the cursor would show up with a little bounding box around it. Now in CS5, it is showing up as the simple up and down type tool whether I am hovered over text or not....so no way of knowing if a click is going to take me into an editable text layer, or if it is going to create a new type layer..until I actually click..
    Has anyone else run into this problem? Any idea the cause, or the solution, or is it just a bug, or something that they changed for some reason?
    Thanks!

    Hello!
    Did you try to reset the text tool? (hit T, then right-click the tool preset icon in the Option bar, and select reset tool)
    Usually, to make sure that I can create a new text layer, even if there is already some text, one can hold down the shift key to force the creation of a new text layer.

  • Casting DataHandler to complex user type.

    Hi guys,
    I am beginner and I have met a problem during invoking my Web Service. To create and run it I have used Axis2 v 1.4, Eclipse tools and Tomcat 6. I found out the problem are complex invoking parameters because when I run simple WS with basic type parameter like String everything works fine.
    What is wrong with my implementation?
    Service class:
    public class AccessLevelService implements AccessLevelContract {
         private AccessLevelDAO accessLevelDAO;
         public AccessLevelService() {
              String [] path = {"com/applicationContext.xml"};
              ApplicationContext applicationContext = new ClassPathXmlApplicationContext(path);
              accessLevelDAO = (AccessLevelDAO) applicationContext.getBean("accessLevelDAO");
         @Override
         public void add(AccessLevel entity) {
              accessLevelDAO.add(entity);
         @Override
         public List<AccessLevel> getAll() {
              return accessLevelDAO.getList(new AccessLevel());
         @Override
         public void modify(AccessLevel entity) {
              accessLevelDAO.modify(entity);
         @Override
         public void remove(AccessLevel entity) {
              accessLevelDAO.remove(entity);
    }Here is my AccessLevel class:
    public class AccessLevel implements Serializable{
         private int id;
         private String level;
         public AccessLevel() {
         public AccessLevel(String level) {
              this.level = level;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getLevel() {
              return level;
         public void setLevel(String level) {
              this.level = level;
    }Exception:
    [ERROR] javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevel
    java.lang.ClassCastException: javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevel
         at com.rejkowicz.ws.AccessLevelService.add(AccessLevelService.java:1)
         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.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
         at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:63)
         at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
         at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Thread.java:619)
    [ERROR] org.apache.axis2.AxisFault: javax.activation.DataHandler cannot be cast to com.rejkowicz.dataobject.AccessLevelBy,
    Luke

    Matthew,
    Edward has the right approach, though somewhere you two mis-communicated.
    You can create either a dynamic or static LOV within HTML DB that is not part of the "database end".
    If I'm understanding what you are saying correctly, using a static LOV (where within HTML DB you define the 4='Temp" relationship), on the form itself you'd basically be saying:
    select temp display_field, type_code return_value from your_LOV.
    HTML DB's LOV will display pretty much whatever you want (the display_field), and then return pretty much whatever you want (the return_value). Sometime's it's a little limited, only showing the one display_field, but you can sometimes work around it with some decode and concatenation.
    So, if you define a static LOV where you define the display value 'Temp' returns the number 4, everything should work fine.
    Bill Ferguson

  • Condition Types : Calculation Type Change from A (percentage) to B (fixed )

    Dear All,
    We created a condition type (Calculation Type : A (percentage) ) and assigned access sequence and maintained in pricing procedure but later decided to change the calculation type to B (Fixed Amount) on this condition type.
    I am wondering, what impact it will have ?? Can I simple change the calculation type on this condition type or should I take care of any thing else ??
    Let me know, What things I have to take care of.  Thanking you.
    Anu.

    Hi Anu,
    No need of worry if it is independent condition type, means other conditions are not depending on it OR it is not depending on others.
    Also check the condition records if they have any impact.
    Else not a big issue, simply go ahead.

  • How to bind complex input/output types in web service data control

    Hi,
    I have created data control using external web service for simple input & output data type and its working fine.
    But I don't know how it can be done for complex data types.
    My external Web services have complex input & output types. Such as java object which contains another java object again it contains another java object or arry or java collection etc.
    Each my service has one complex input data type and for this no user input is require so how I can do it without using any component for it.
    I want to bind my page components with this input & output type.
    What is the best approach to do this and how to bind screen component.
    Regards,
    Devang

    Hi,
    Thanks frank.
    I already check this link before posting this so if you have any other link then kindly reply.
    Regards,
    Devang

  • AppleScript Call Soap Data types

    I am using AppleScript to issue SOAP requests via built-in the 'call soap' function. The server to which I am connecting uses both simple and complex data types. It's pretty straight forward issuing the basic parameters for simple data types, but if the remote method requires a complex data type, such as a double set of parameters, I can't see how to get it done.
    Anyone have any experience sending SOAP requests with AppleScript that involved complex data types, which include multiple parameters, rather than just simple flat parameter lists?

    Hi,
    not exactly sure what you mean by placeholder data types?
    Surely it would be better to evaluate off a sample employee/departments or predefined database schema if you want to see what the UI / design process is like?
    The design process is very smooth and elegant in JDev 11g if you use the business components from tables wizard in the model and then design pages.
    Brenden

  • OracleConnection.createARRAY: Unable to resolve type

    Hi All,
    for some good reasons (don't ask ...) I need to implement a solution where a directory listing, on the DB server machine, can be gotten via an sql query.
    I have to say I am not very experienced with Java in Oracle, please forgive the newbie mistakes.
    Environment: 11gR2 on Win7, SQLDeveloper as front-end.
    In order to do this, I created a simple Java class, DB types and PL/SQL wrappers as follows:
    CREATE OR REPLACE TYPE T_FS_ENTRY AS OBJECT (
      is_dir CHAR( 1 )
    , entry_name VARCHAR2( 4000 )
    , entry_size NUMBER
    , last_modified NUMBER );
    CREATE OR REPLACE TYPE T_FS_ENTRY_TAB IS TABLE OF T_FS_ENTRY;
    I then created the Java class
    CREATE OR REPLACE AND COMPILE java source named FSEntryReturn
    as
      import java.sql.*;
      import java.util.*;
      import java.io.File;
      import oracle.jdbc.*;
      import oracle.sql.*;
      public class FSEntryReturn implements ORADataFactory, ORAData {
        private CHAR is_dir;
        private CHAR entry_name;
        private NUMBER entry_size;
        private NUMBER last_modified;
        public FSEntryReturn( OracleConnection conn
                            , String is_dir
                            , String entry_name
                            , long entry_size
                            , long last_modified )
        throws SQLException
            this.is_dir = new CHAR( is_dir, oracle.sql.CharacterSet.make( conn.getStructAttrCsId() ) );
            this.entry_name = new CHAR( entry_name, oracle.sql.CharacterSet.make( conn.getStructAttrCsId() ) );
            this.entry_size = new NUMBER( entry_size );
            this.last_modified = new NUMBER( last_modified );
        public FSEntryReturn( CHAR is_dir
                            , CHAR entry_name
                            , NUMBER entry_size
                            , NUMBER last_modified )
        throws SQLException
            this.is_dir = is_dir;
            this.entry_name = entry_name;
            this.entry_size = entry_size;
            this.last_modified = last_modified;
        public FSEntryReturn( Object[] attributes )
        throws SQLException {
          this( (CHAR)attributes[0]
              , (CHAR)attributes[1]
              , (NUMBER)attributes[2]
              , (NUMBER)attributes[3] );
        public FSEntryReturn( Datum d ) throws SQLException {
          this( ( (STRUCT)d).getOracleAttributes() );
        public ORAData create( Datum d, int sqlType ) throws SQLException {
          if(d == null) return null;
           else return new FSEntryReturn( d );
        public STRUCT toSTRUCT( Connection conn ) throws SQLException  {
          StructDescriptor sd = StructDescriptor.createDescriptor( "T_FS_ENTRY", conn );
          Object[] attributes = { is_dir, entry_name, entry_size, last_modified };
          return new STRUCT( sd, conn, attributes );
        public Datum toDatum( Connection conn ) throws SQLException {
          return toSTRUCT( conn );
        public static List<FSEntryReturn> getDirListImpl( OracleConnection conn, final String dirPath )
        throws SQLException
          List<FSEntryReturn> ret = new ArrayList<FSEntryReturn>();
          File dir = new File( dirPath );
          if( dir.isDirectory() ) {
            for( String fileName : dir.list() ) {
              File f = new File( dir, fileName );
              FSEntryReturn fsr = new FSEntryReturn( conn
                                                   , (f.isDirectory() ? "1" : null)
                                                   , fileName
                                                   , f.length()
                                                   , f.lastModified() );
              ret.add( fsr );
                } else
            throw new RuntimeException( "Path " + dirPath + " is not a directory" );
          return ret;
        public static ARRAY getDirList( final String dirPath )
        throws SQLException, ClassNotFoundException
          // initialize the connection
          OracleConnection conn = null;
          conn = (OracleConnection) ( new oracle.jdbc.OracleDriver() ).defaultConnection();
          FSEntryReturn[] retArray = getDirListImpl( conn, dirPath ).toArray( new FSEntryReturn[0] );
          // Map the java class to the Oracle type
          Map map = conn.getTypeMap();
          map.put("T_FS_ENTRY", Class.forName( "FSEntryReturn" ) );
          // ArrayDescriptor retArrayDesc = ArrayDescriptor.createDescriptor( "FPL_XSD.T_FS_ENTRY", conn );
          // create an Oracle collection on client side to use as parameter
          // ARRAY oracleCollection = new ARRAY( retArrayDesc, conn, retArray );
          ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
          return oracleCollection;
    Finally the wrapper:
    create or replace PACKAGE QAO_SUPPORT
    AS
      FUNCTION get_dir_list( p_dir IN VARCHAR2 )
      RETURN t_fs_entry_tab;
    END QAO_SUPPORT;
    create or replace PACKAGE BODY QAO_SUPPORT
    AS
      FUNCTION get_dir_list( p_dir IN VARCHAR2 )
      RETURN t_fs_entry_tab
      AS LANGUAGE JAVA
      NAME 'FSEntryReturn.getDirList( java.lang.String ) return oracle.sql.ARRAY';
    END QAO_SUPPORT;
    At last I granted privileges on a directory:
    BEGIN dbms_java.grant_permission( 'FPL_XSD', 'SYS:java.io.FilePermission', 'C:\-', 'read,write,execute' ); END;
    COMMIT;
    When I test this as FPL_XSD user, the same schema where the type, package and source are defined:
    select * from table( QAO_SUPPORT.get_dir_list( 'C:\\TEMP' ) );
    I get the following error (sorry for the dutch stuff, basically, "uncaught java exception: error in creation of descriptor:..."):
    ORA-29532: Java-aanroep is afgesloten door niet-onderschepte Java-uitzondering: java.sql.SQLException: Maken van descriptor is mislukt.: Unable to resolve type: "FPL_XSD.T_FS_ENTRY".
    ORA-06512: in "FPL_XSD.QAO_SUPPORT", regel 30
    Even if it is not exactly stated the error happens at the line:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
    Note that when logged in as FPL_XSD, desc T_FS_ENTRY returns the type description.
    I searched everywhere and consulted the documentation. I think it should work. I am out of ideas, but I have a suspect the problem might be with the connection configuration, maybe?
    Any help or hint is greatly appreciated.
    Kindly,
    Andrea

    Hi All,
    I insisted trying and I found out what the problem was. In:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
    The first argument is an Oracle type name, I wrongly used the RECORD (OBJECT) type name - T_FS_ENTRY -, not the name of the nested table T_FS_ENTRY_TAB.
    So the code should look like:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY_TAB", retArray );
    Which works.
    //Andrea

Maybe you are looking for

  • How do connect my sony bravia tv as a monitor screen for mac pro

    How do I connect my Sony Bravia tv as a monitor for my MacBook Pro? I have an hdmi lead with an adapter to the computer and get a picture of factory setting cosmos with some of the folders of my desktop going off the side of the tv screen.

  • Cached Podcast Password needs to be changed!

    I have a podcast that uses a password that I saved via iTunes. Now the password has changed and I cannot find any way to change the password. I tried removing the feed, then adding it again, but it appears to have cached it because it just brings up

  • Using decode for range of data

    hi experts i want to dicode distance which are between 1 to 50 51 to 100 101 to 150 i am using this query but it is giving some error please tell me that how should solve this problem select a.fr_wh,a.to_wh,nvl(a.distance,0) distance, DECODE(a.distan

  • Tracking with iphone remote

    i have a new mac mini using with a 32" samsung tv. I am using my iphone as a wireless input device using Snatch & rowmote pro as the wireless input device. My problem is that the tracking on track pad is very 'jerky'. the kb is fine when typing. I ha

  • Capture SOAP Traffic in Webcenter Spaces

    Dear All, I am trying to solve a problem regarding a portlet that is deployed in my spaces. I'd like to capture the SOAP traffic between my portlet and the response from the server but I am unable to get it. I am trying a tool called wireshark but it