Problem getting sessions from sessions.xml

I have been having difficulty getting a sessions.xml file deployed on our web application. I've found that if the file is not on the classpath, I do get an error indicating that the sessions.xml or Toplink properties file can not be found. But when I put the sessions.xml in the classpath and have checked to ensure that the projects referenced by the file are also in the classpath, I no longer get the error but for some reason sessions don't get populated by the SessionsManager. I've tried the code below both from within the webapp and also just from a main method in my IDE:
     SessionManager manager = SessionManager.getManager();      
     Hashtable sessions = manager.getSessions();
     System.out.println(sessions.size());
And when I run it I get 0 as my answer. Is there anything more I need to do than set the sessions.xml as well as the projects (we're using compiled Java classes) in the classpath?
Thanks in advance,
Mark

Ok, since the sessions are loaded lazily, I changed my code to the following below, but am now getting null when I specifically ask for 'ODSSession' in the code below.
SessionManager manager = SessionManager.getManager();
Session session = manager.getSession("ODSSession");
System.out.println("session = " + session);
Also, below is my sessions.xml with the database and login information changed for privacy purposes. The sessions.xml was setup using the workbench and I was able to map tables to the project using it. Am I missing something as to why I can't load the session?
Thanks,
Mark
<?xml version = '1.0' encoding = 'UTF-8'?>
<toplink-sessions version="10g Developer Preview 3 (10.1.3.0 )" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>ODSSession</name>
<server-platform xsi:type="oc4j-1013-platform"/>
<event-listener-classes/>
<primary-project xsi:type="class">sample.TestProject</primary-project>
<login xsi:type="database-login">
<platform-class>oracle.toplink.platform.database.oracle.Oracle9Platform</platform-class>
<user-name>user</user-name>
<password>password</password>
<external-connection-pooling>true</external-connection-pooling>
<external-transaction-controller>true</external-transaction-controller>
<sequencing>
<default-sequence xsi:type="table-sequence">
<name>Default</name>
</default-sequence>
</sequencing>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-url>jdbc:oracle:thin:@111.111.111.111:1521:ods</connection-url>
</login>
<connection-pools>
<read-connection-pool>
<name>ReadConnectionPool</name>
<max-connections>2</max-connections>
<min-connections>2</min-connections>
</read-connection-pool>
<write-connection-pool>
<name>default</name>
<max-connections>10</max-connections>
<min-connections>5</min-connections>
</write-connection-pool>
</connection-pools>
</session>
</toplink-sessions>

Similar Messages

  • HT2305 Have a problem getting a sync session to start with Itunes, can anyone help Itunes have no mention of this in thier so called help

    I have a problem where I can not sysnc , I get a comment that the sync is not able to start as a session can not be made. The Iphone is clearly shown but I have reloaded every bit of software. Why is it so difficult to get help from Itunes.

    Hi Shelady,
    Try downloading and reinstalling the latest version of iTunes from the first link below. If that doesn't do it, the suggestions in the second article should resolve the installation issue.
    Apple - iTunes - Download iTunes Now
    http://www.apple.com/itunes/download/
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/HT1923
    -Jason

  • Get username from session and retrieve records from database wit tat userna

    hello..
    i got a ChangePassword.jsp which i retrieve the username from session using bean to display on e page..
    <jsp:getProperty name="UsernamePassword" property = "username"/>
    but in my servlet, i wan to retrieve records from database with tat username..
    i tot of coding
    String username = (String)request.getSession().getAttribute("UsernamePassword");
    and then use tat username to retrieve records.. but is that e right way? The page did not display and i got a CastingException..
    Please help.

    If you are using the session inside a jsp, you can say "session" without having to declare it.String usernamePassword = (String) session.getAttribute("usernamePassword");However, right after you get this value, check if it is null:
    if(usernamePassword==null)
    // do sth like forward to error page
    else
    // continue processing
    If it is null, then you are probably not setting it right in the first place. Make sure that in your servlet A you create a session, and before you return or forward to a jsp, that you actually set this value in the session like saying
    session.setAttribute("usernamePassword", usernamePassword);
    and it is case sensitive for the key.

  • Problem getting video from firewire camera

    I've written a small app that gets video from camera and
    publishes it through FMS(2). It works well with any USB webcams I
    could find, but I have problems with firewire cameras. I can select
    the camera in Flash settings, and getCamera() returns the
    appropriate Camera object (e.g. it has the correct name, "Microsoft
    DV Camera", which is what's its name in Windows), but I get
    no/blank video.
    Code snippet:
    var myCam:Camera = Camera.getCamera();
    Alert.show("Using " + myCam.name);
    videoDisplay.attachCamera(myCam);
    The same code and the same camera seems to work on OS X. I've
    tried out two different firewire cameras on two different Windows
    (XP) machines, and they consistently didn't work. They do work in
    Flash Media Encoder (I'm not sure if it was written in Flash
    engine), or other programs that do capture in Windows; but my
    problem is that I need to inject metadata (stream.send()) into the
    stream so i can't just use FME :(
    Any ideas why this doesn't work? Do firewire cameras have
    issues with flash/flex (for the reference, I'm using Flex2/Flash9)
    on Windows XP, or am I doing something wrong here?
    Senko

    HI -
    MPEG Streamclip does not act as a connection device between your camera and Final Cut.
    It is a stand-alone application that converts the files from your camera into files that are useable in Final Cut.
    The reason Final Cut does not "see" your camera directly is that the files are not usable in Final Cut - as recorded by the camera. Those same files are seen and imported in iMovie because iMovie is designed to support a wide variety of consumer formats, and converts them automatically on import to a format the iMovie can use. FCE does not have this feature for .mpg movie files. But the format the iMovie converts to is one that is not optimal for FCE.
    Once you have converted the files that you want to use in MPEG Streamclip, you can store those converted files on your disk drive in a folder. Then open FCE an go to the menu File > Import > Files and navigate to where you have stored your converted files. Select them and the will be imported into FCE.
    It is preferable to import using the MPEG Streamclip method, because the files that iMovie makes, are borderline usable in FCE, and if possible, should be avoided.
    Hope this helps.
    MTD

  • ICloud sync problem - getting messages from one contact on two different phones

    My partner and I accidentally synced our phones to the same iCloud account and all of our contacts merged. We solved that problem but now we're both getting messages from one of my contacts at the same time. We've both deleted the contact and the message string, and that hasn't seemed to help. Any advice would be most appreciated.

    Reset iMessage by turning it off and then back on. You might have to restore phones as new because I message Registers the phone with the cloud.

  • Unable to get data from a xml file...

    hi everybody....
    i'm new with spry....can you tell me what's wrong with this
    code? I'm just unable to display the xml content from a
    database...thanks in advance for any help :)
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
    http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    <title>Documento senza titolo</title>
    <link href="css/thrColEls.css" rel="stylesheet"
    type="text/css" />
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var articoli = new Spry.Data.XMLDataSet("
    http://www.openweb.in/xml.php",
    "wp_posts/post");
    //-->
    </script>
    <link href="SpryAssets/SpryCollapsiblePanel.css"
    rel="stylesheet" type="text/css" />
    </head>
    <body class="thrColEls">
    <div id="container">
    <div id="sidebar1">
    <div id="articoli" spry:region="articoli">
    <ul>
    <li spry:repeat="articoli"><a href="note1.html"
    onclick="articoli.setCurrentRowNumber(0); return
    false;">{titolo}</a></li>
    </ul>
    </div>
    <!-- end #sidebar1 --></div>
    <div id="mainContent">
    <div id="CollapsiblePanel1" class="CollapsiblePanel"
    spry:detailregion="articoli">
    <div class="CollapsiblePanelTab"
    tabindex="0"><h3>{titolo}</h3></div>
    <div class="CollapsiblePanelContent">
    <p>{testo}</p></div>
    </div>
    <p> </p>
    <!-- end #mainContent --></div>
    <!-- Questo elemento di clearing deve seguire
    immediatamente il div #mainContent al fine di forzare il div
    #container a contenere tutti i float di livello inferiore
    --><br class="clearfloat" />
    <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var CollapsiblePanel1 = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
    //-->
    </script>
    </body>
    </html>

    ok, thanks!
    i'd like to ask one more thing, if you don't mind...
    i want to make a sliding panel where each link leads to a
    different article in the wml file....like in this page:
    http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html#Hor izontalSliding
    how to call the ID article from the xml?.....
    can you give a look to this code?....thanks a lot:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Sliding Panels Sample</title>
    <link href="
    http://labs.adobe.com/technologies/spry/widgets/slidingpanels/SprySlidingPanels.css"
    rel="stylesheet" type="text/css" />
    <link href="
    http://labs.adobe.com/technologies/spry/css/samples.css"
    rel="stylesheet" type="text/css" />
    <style type="text/css">
    hr, .clearAll {
    clear: both;
    .SlidingPanels {
    width: 300px;
    height: 300px;
    .SlidingPanelsContent {
    width: 300px;
    height: 300px;
    #example2.SlidingPanels {
    float: left;
    #example2 .SlidingPanelsContentGroup {
    float: left;
    width: 10000px;
    #example2 .SlidingPanelsContent {
    float: left;
    #example3.SlidingPanels {
    float: left;
    #example3 .SlidingPanelsContentGroup {
    float: left;
    width: 900px;
    #example3 .SlidingPanelsContent {
    float: left;
    #example3_nav.SlidingPanels {
    float: left;
    #example3_nav .SlidingPanelsContentGroup {
    float: left;
    width: 900px;
    #example3_nav .SlidingPanelsContent {
    float: left;
    </style>
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SprySlidingPanels.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var articoli = new Spry.Data.XMLDataSet("
    http://www.openweb.in/xml.php",
    "wp_posts/post");
    articoli.setColumnType("testo","html");
    //-->
    </script>
    </head>
    <body>
    <p>
    Navigate by id:
    <div id="articoli" spry:region="articoli">
    <ul>
    <li spry:repeat="articoli"><a href="#"
    onclick="sp2.showPanel('{ID}'); return
    false;">{titolo}</a></li>
    </ul>
    </div>
    <a href="#" onclick="sp2.showFirstPanel(); return
    false;">First</a> |
    <a href="#" onclick="sp2.showPreviousPanel(); return
    false;">Previous</a> |
    <a href="#" onclick="sp2.showNextPanel(); return
    false;">Next</a> |
    <a href="#" onclick="sp2.showLastPanel(); return
    false;">Last</a>
    </p>
    <p> </p>
    <div id="example2" class="SlidingPanels" tabindex="0"
    spry:detailregion="articoli">
    <div class="SlidingPanelsContentGroup">
    <div id="{ID}" class="SlidingPanelsContent p1">
    <h3>{titolo}</h3>
    <p>{testo}</p></div>
    </div>
    </div>
    <script type="text/javascript">
    var sp2 = new Spry.Widget.SlidingPanels('example2');
    </script>
    <p class="clearAll"> </p>
    <hr />
    </body>
    </html>

  • Problem getting photos from canon powershot

    Just recently I have not been able to get photos from my SanDisk card. When I put the card into my HP Photosmart printer, either nothing happens or I get an error message on the printer. I have an iMac (intel) and I recently upgraded everything to Snow Leopard.
    I then thought to bypass the printer altogether and go straight from the camera to the computer, but then I get a message "failed to initiate" . . . any ideas?
    Thanks in advance!
    Marcie

    Oh, I made a mistake: the message I get is "failed to initialize program"

  • Problem with JMS from session bean

     

    My guess is that in your effort to work around the
    clustering/ejb/jndi problems, you have a producer
    sending on one topic, and a consumer listening on
    another topic. You can check to see if they are the
    same destination using the (uncompiled) code snippets
    below at both the producer and consumer ends.
    import weblogic.jms.common.DestinationImpl;
    Topic topic;
    DestinationImpl destination = (DestinationImpl) topic;
    System.out.println("name = " + destination.getServerName() + "/" +
    destination.getName());
    System.out.println("back-end id = " + destination.getBackEndId());
    System.out.println("destination id = " + destination.getDestinationId());
    _sjz.
    "Malcolm Robbins" <[email protected]> wrote in message
    news:[email protected]...
    >
    This was also posted to the EJB newsgroup and was asked to post the secondissue
    here. Please focus on the second issue, but the first providesbackground.
    >
    >
    I have discovered two significant problems in WLS6.0 with JNDi and JMSthat do
    not occur in the Sun Reference implementation (1.3 Beta).
    Attached is some code you can try to see the problem.
    I have developed a JmsClient that simply looks up a session bean andpasses it
    a string to publish. The session bean is meant to publish to a JMS topic.
    However I have discovered two problems:
    1) In teh ejbCreate() method I look up the topic connection factory andtopic
    in JNDI. These are referenced as "java:comp/env/jms/JmsConnectionFactory"and
    "java:comp/env/jms/JmsTopic" respectively. Here's a fragment of theejb-jar
    descriptor
    <resource-ref>
    <description>The (probably durable) Topic Connection Factory to connectto</description>
    <res-ref-name>jms/JmsConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-env-ref>
    <description>The Jms Source Topic to publish to</description>
    <resource-env-ref-name>jms/JmsTopic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
    </resource-env-ref>
    As you can see they are resource references and resoruce environmentreferences
    respectively. The weblogic-ejb-jar maps these to the real JNDI names"TopicConnectionFactory"
    amd "SchemaTopic" respectively as shown below by the fragment:
    <weblogic-ejb-jar>
    ...etc...
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jms/JmsConnectionFactory</res-ref-name>
    <jndi-name>TopicConnectionFactory</jndi-name>
    </resource-description>
    <resource-env-description>
    <res-env-ref-name>jms/JmsTopic</res-env-ref-name>
    <jndi-name>SchemaTopic</jndi-name>
    </resource-env-description>
    </reference-descriptor>
    Now here's the first problem. When this is deployed the resourceenvironment
    "logical" name (JNDI linkref) for the topic is not defined. The code willhappily
    find the connection factory (presuming you've set these administeredobjects at
    the console).
    2) The second problem now arises. In the code I have ahcked it so thatwhen
    the JNDI lookup fails it tries looking up the real topic in JNDI(SchemaTopic)
    directly.
    This works and teh bean now appears to work, albeit with a directlyhardcoded
    JNDI reference in it. However, if you hook up a standard JMS consumer tothat
    topic it will not consuem the message that is published!!! While thestats clock
    up at the console the message appears to go into a black hole. I canprovdie
    a stadnard consumer if you need one.
    I have the code working fine as-is in teh Sun Reference implementation soI presume
    these are bugs with WL6.0.
    Can anyone advise workarounds and/or fix the problem?

  • Problems getting namespace from XML

    hi all....
    I'm trying to parse this XML using SAX.
    <soap: Envelope xmlns:..... (several namespaces)>
    <soap:Body>
    <GetResponse xmlns="http://altnamespace">
    <GetResult>data</GetResult>
    </GetResponse>
    </soap:body>
    </soap:Envelope>
    my problem is I can't get to the embedded altnamespace in GetReponse.
    here is a code snippet:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(httpConn.getInputStream());
    Element root = doc.getRootElement();
    Namespace ns = root.getNamespace();
    Element element = root.getChild("Body",ns)
    ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
    I've tried:
    Namespace altNamespace = element.getChild("GetResponse").getNamespace();
    but that returns null....
    I need it so that I can execute the following code to get the data:
    Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
    String data = dataElement.getText();
    any help would be appreciated..... forgive my ignorance....
    sean

    hi all....
    I'm trying to parse this XML using SAX.
    <soap: Envelope xmlns:..... (several namespaces)>
    <soap:Body>
    <GetResponse xmlns="http://altnamespace">
    <GetResult>data</GetResult>
    </GetResponse>
    </soap:body>
    </soap:Envelope>
    my problem is I can't get to the embedded altnamespace in GetReponse.
    here is a code snippet:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(httpConn.getInputStream());
    Element root = doc.getRootElement();
    Namespace ns = root.getNamespace();
    Element element = root.getChild("Body",ns)
    ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
    I've tried:
    Namespace altNamespace = element.getChild("GetResponse").getNamespace();
    but that returns null....
    I need it so that I can execute the following code to get the data:
    Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
    String data = dataElement.getText();
    any help would be appreciated..... forgive my ignorance....
    sean

  • Problem: variable disappears from Session after cfquery

    I have the following problem in my CFML script. I added a
    variable MyVariable in Session variable. Then I call
    <cfquery>. When the <cfquery> finishes, the variable
    MyVariable does not exist in the Session!

    In fact, name of the MyVariable was loginresult. The sequence
    was approximately as the following:
    <cfset Session["loginresult"] = 0>
    <cfif Session["loginresult"] eq 0>
    <cfquery ...>
    <cfif Session["loginresult"] eq 0>
    </cfif>
    </cfquery>
    </cfif>
    The problem happened on SECOND line "<cfif
    Session["loginresult"] eq 0>" - one that follows
    <cfquery>. The line produces exception :
    coldfusion.runtime.UndefinedElementException: Element
    loginresult is undefined in a Java object of type class
    coldfusion.runtime.MemorySessionScope referenced as
    What is most misterious, I have teh same CFM code on two
    computers (ColdFusion MX7 on both). One of them the code works OK;
    on other it causes the problem I described.

  • Getting attributes from session between two different applications

    I'm developing with JDK 1.3 and deploying my webapp at ORACLE 9iAS.
    I would like to jump between JSPs deployed at differents OC4J instances and
    keep session object. I've seen I can get sessionID and it's the same but the attributes have disapeared.
    I jump using JavaScript code (document.location.href).
    Should I use a <form> ?
    Should I use getServletContext() method ?
    I dont know even if it's possible and I don't want to loose my time looking for a solution that doesn't exist.
    NEED HELP, AN EXAMPLE OR WHATEVER USEFUL.
    ... THE SOON AS POSSIBLE
    THANX in advance
    PS..- I have already look for in this forum but I didn't get any info to solve my doubts. If I mistaken please let me know

    Ok.
    getServletContext().getContext() may return null in 'security conscious' servers. Apparently this is your case, therefore you wouldn't be able to use it to store global data...
    As for sharing sessions directly between different web apps, the servlet spec (since 2.2 at least) explicitely prohibits it.
    The link provided by tolmank about pseudo-sessions should address your issue, since it will allow you to distribute your session data on your different webapps.
    Some other alternatives would be :
    -store the session data in the DB (slow)
    -use java serialization
    -use RMI
    -use JNDI
    -if you're using Tomcat, you can implement single-signon accross multiple apps using cookies :
    http://www.ingrid.org/jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/singlesignon.html

  • Getting attributes from a XML File, stored in Oracle

    Hello,
    my problem is the following
    I have a xml file that looks like that:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
    <root path="H:\musik">
    <directory name="Bj�rk - Homogenic" path="H:\musik\Bj�rk - Homogenic">
    <file album="Homogenic" artist="Bjoerk" comment=""
    completename="Bjoerk - Hunter" genre="Techno"
    name="01 - Hunter.mp3"
    path="H:\musik\Bj�rk - Homogenic\01 - Hunter.mp3"
    title="Hunter" year="1997"/>
    <file album="Homogenic" artist="Bjoerk" comment=""
    completename="Bjoerk - Joga" genre="" name="02 - Joga.mp3"
    path="H:\musik\Bj�rk - Homogenic\02 - Joga.mp3" title="Joga" year="1994"/>
    </directory>
    <directory name="Blank & Jones - In Da Mix" path="H:\musik\Blank & Jones - In Da Mix">
    <file album="In da Mix" artist="Blank & Jones" comment=""
    completename="Blank & Jones - On a journey (Intro)"
    genre="Dance" name="01 - On a journey (Intro).mp3"
    path="H:\musik\Blank & Jones - In Da Mix\01 - On a journey (Intro).mp3"
    title="On a journey (Intro)" year="1999"/>
    <file album="In da Mix" artist="Blank & Jones" comment=""
    completename="Blank & Jones - Cream" genre="Dance"
    name="02 - Cream.mp3"
    path="H:\musik\Blank & Jones - In Da Mix\02 - Cream.mp3"
    title="Cream" year="1999"/>
    </directory>
    </root>
    This file I have stored in Oracle as table of XML Type.
    Now I have build a little Java Programm, that displays the XML File like the File structure in the Windows Explorer.
    I want, when I choose a file in the File structure, that the ID3 Informations like album artist a.s.o. can be displayed. My problem is, I couldn't get these informations e.g. in an array from the database. Any suggestions how I could realize this in Java?
    Thx for any comments
    Max

    Try this:
    select extract(xmltypefieldname, '//xpath/field@attribute').getStringVal() from yourtable where yourwhereclause
    You can also select elements that match certain attributes by using a predicate such as field[@attr = myval][@attr2 = myval2]...
    Hope this helps.

  • CS4 Problem getting text from Illustrator over to Photoshop.

    What a mess and why is  this so difficult. I finally figured out how to create my text on a curve and leave the letters going straight up and down. So I am trying to paste or drag and drop over to my bottle in Photoshop but what happens is that the text is in a clear area But then it creates a white box around that so I can't see my bottle. I have a lot of bottles I need to change the names on and no time to reshoot and knock them all out. Help please!!! I am going to try and attach images again but when I tried in  the Illustrator forum... the load button was greyed out.
    Now on top of it, I am trying to create an image to attach... and it's doing even more crazy stuff. I created an image with the full bottle on L and what is supposed to be the full bottle on the R = only instead for some reason.... my text is coming over from Illustrator with an additional white box blocking most my bottle... then on top of it.... I tried to just type in what was going on and then if I rasterize the text OR I just try to save.... it created a new black box blocking the bottom 1/2... now what do I do??? This is really a mess!!!!

    OK. The bottle on the L is what the bottle is supposed to look like.... minus the black box on the bottom. The L bottle is placed there in photoshop just to show what it is supposed to look like. Then the other layer had the bottle on the R or what is supposed to be the full bottle that I am trying to get my Eyelash Recovery text onto that one on that layer.
    The bottle on the R is the problem. The white box is the entire area around the small area of the bottle being shown. Yes, trying to bring just the text Eyelash Recovery over from Illustrator = it created the white box all by itself. (Create Outlines did not help at all)
    Note. I created the words Eyelash Recovery in text on a circle in Illustrator and then tried to drag and drop AND I tried to copy/paste into Illustrato = both ways. Both failed and created everything that is white around the R bottle that only shows the small area of the bottle. Anything around the small window of the bottle = which is actually a transparent area around the text Eyelash Recovery that allows the bottle on the L to show thru. So it came over as a small area of transparent window with the text in it (not centered as you can see) AND a white box around that window that I could not get rid of.
    But then, for some reason, it then also wanted to created the black blox on bottom out of the clear blue = where that came from I do not know.
    So I created the text Eyelash Recovery in Illustrator on the oval and placed it in position on the oval using the text on path tool. I then used the type > skew to get the text to bet straight up and down instead of curving into the oval. Then I tried 2 ways. 1 was to copy/paste into Photoshop on top of the bottle and the other was to drag and drop. It wanted to place it as pixels. So I allowed it to paste as pixels. And I allowed it to apply. In the layers palette however, it showed as a vector smart object = ???
    Then I tried to rasterize that layer which now said it wanted to rasterize the smart object (which I did not 1. place OR 2. drag and drop as a smart object).
    For some reason, instead of only coming over as the Eyelash Recovery text, it came over with just a small transparent window (which you can see on the L side above AND it created the rest as a white box around that that obliterated the rest of the image. Yes, I could move the Eyelash Recovery text and the transparent window around to show diff. parts of the bottle but only this amount as seen above. But I could not get rid of the white around the transparent window to see the bottle below in full and to place my Eyelash Recovery text.
    Then on top of it... for some reason, when I rasterized that layer, it created the black box you see on the bottom of the image above and there was no way to get rid of either the white area OR the black box area at bottom
    A mess?? Yes.

  • Problem getting data from a stored procedure

    On the Oracle DB there's a stored proc defined like:
    PROCEDURE pGetHashes ( iFrom IN NUMBER, iTo IN NUMBER, sHash1 OUT CHAR, sHash2 OUT CHAR );
    When I call this procedure from within my app, I only get a value for the sHash2 parameter. The value of the sHash1 parameter is always null. (Running the same stored proc from sqldeveloper gives a result for both hash values.)
    Underneath I have added the code which I use to call the stored proc. Does anybody see anything I might have done wrong?
    int iFrom = 0;
    int iTo = 1000;
    using (IDbCommand command = dbConnection.CreateCommand())
    OracleCommand orclCommand = command as OracleCommand;
    orclCommand.CommandText = "pGetHashes";
    orclCommand.CommandType = CommandType.StoredProcedure;
    orclCommand.Parameters.Clear();
    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclCommand.BindByName = true;
    orclCommand.ExecuteNonQuery();
    // after this the orclCommand.Parameters["sHash1"].Value is always null.
    // the orclCommand.Parameters["sHash2"].Value has the correct value.
    For extra documentation. Running the following PLSQL from within sqldeveloper results in both a value for Hash1 and Hash2:
    SET SERVEROUTPUT ON;
    DECLARE
    sHash1 CHAR(67);
    sHash2 CHAR(67);
    nFrom NUMBER := 0;
    nTo NUMBER := 1000;
    BEGIN
    pGetHashes( nFrom, nTo, sHash1, sHash2 );
    dbms_output.put_line('Hash1: '|| sHash1);
    dbms_output.put_line('Hash2: '|| sHash2);
    END;
    Thanks for any light you can shed on this problem.

    I can only assume that something is "going wrong" inside your procedure that is resulting in NULL actually being returned, although I don't see any reason the code should be causing it.
    Try the folllowing "pGetHashes2" procedure, and let me know if you see the same results with your code. It works fine for me anyway..
    Greg
    create or replace procedure pGetHashes2 (iFrom number, iTo number, sHash1 out char, sHash2 out char)
    as
    begin
    shash1 := 'foo';
    shash2 :='bar';
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    namespace otnpost
        class Program
            static void Main(string[] args)
                OracleConnection dbConnection = new OracleConnection("data source=orcl;user id=scott;password=tiger");
                dbConnection.Open();
                int iFrom = 0;
                int iTo = 1000;
                using (IDbCommand command = dbConnection.CreateCommand())
                    OracleCommand orclCommand = command as OracleCommand;
                    orclCommand.CommandText = "pGetHashes2";
                    orclCommand.CommandType = CommandType.StoredProcedure;
                    orclCommand.Parameters.Clear();
                    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
                    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
                    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclCommand.BindByName = true;
                    orclCommand.ExecuteNonQuery();
                    // after this the orclCommand.Parameters["sHash1"].Value is always null.
                    // the orclCommand.Parameters["sHash2"].Value has the correct value.
                    Console.WriteLine(orclCommand.Parameters["sHash1"].Value);
                    Console.WriteLine(orclCommand.Parameters["sHash2"].Value);
    }OUTPUT
    ==========
    foo
    bar
    Press any key to continue . . .

  • Problem getting arraylist from another class

    I am trying to call information about an arraylist from another class. I am using this code to call the size of an arraylist:
    import java.io.*;
    public class Test
        public static void main(String argv[]) throws IOException
    Echo03 thing = new Echo03();
    int y=thing.value();
    System.out.println(y);
    Echo03 thing2 = new Echo03();
    int x=thing2.percent.size();
    System.out.println(x);
    }from another file which starts like this:
    public class Echo03 extends DefaultHandler
    static ArrayList<String> percent = new ArrayList<String>();
    static ArrayList<String> text = new ArrayList<String>();
      int a;
    public int value(){
         return percent.size();
      public static void main(String argv[]) throws IOException
        {The second file is based on an example piece of code from the Java website. I havent posted the whole thing, but if it is relevant then please ask.
    Anyway when I run Echo03 by itself, the arraylist has a size of 2. But when I run it from the Test file, it says a size of 0. Is this because the data is not being transferred between the classes? Or is the Echo03 program not executing (and hence the arraylist is not filling up)?
    How can I fix this? I have tried 2 ways of calling the data (As seen in my Test file). Neither work.

    I didnt post the full bit of the code for the second one. Here it is:
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import java.util.ArrayList;
    import java.awt.*;
    import javax.swing.*;
    public class Echo03 extends DefaultHandler
    static ArrayList<String> percent = new ArrayList<String>();
    static ArrayList<String> text = new ArrayList<String>();
      int a;
      public static void main(String argv[]) throws IOException
            if (argv.length != 1) {
                System.err.println("Usage: cmd filename");
                System.exit(1);
            // Use an instance of ourselves as the SAX event handler
            DefaultHandler handler = new Echo03();
            // Use the default (non-validating) parser
            SAXParserFactory factory = SAXParserFactory.newInstance();
            try {
                // Set up output stream
       out = new OutputStreamWriter(System.out, "UTF8");
                // Parse the input
                SAXParser saxParser = factory.newSAXParser();
                saxParser.parse( new File(argv[0]), handler);
    for (int b=0; b<percent.size();b++){
         System.out.println(percent.get(b+1));
            } catch (Throwable t) {
            System.exit(0);
        static private Writer  out;
        public void startElement(String namespaceURI,
                                 String lName, // local name
                                 String qName, // qualified name
                                 Attributes attrs)
        throws SAXException
            if (attrs != null) {
    StringBuffer sb = new StringBuffer (250);        
    for (int i = 0; i < attrs.getLength(); i++) {
                    nl();
                    emit(attrs.getValue(i));
              sb.append (attrs.getValue(i));
    String sf = sb.toString ();
    percent.add(sf);
    System.out.println(" String: "+sf); a++;
        public void characters(char buf[], int offset, int len)
        throws SAXException
             emit(" ");
            String s = new String(buf, offset, len);
            if (!s.trim().equals("")) {text.add(s); emit(s);}
    //===========================================================
        // Utility Methods ...
        //===========================================================
        // Wrap I/O exceptions in SAX exceptions, to
        // suit handler signature requirements
        private void emit(String s)
        throws SAXException
            try {
                out.write(s);
                out.flush();
            } catch (IOException e) {
                throw new SAXException("I/O error", e);
        // Start a new line
        private void nl()
        throws SAXException
            String lineEnd =  System.getProperty("line.separator");
            try {
                out.write(lineEnd);
            } catch (IOException e) {
                throw new SAXException("I/O error", e);
    }

Maybe you are looking for