Trouble about Element

I was doing something with SOAP JAVA, and ODBC. I want to send the information selected from database back to client, use Element. but the element transmit back is null, seems the information couldnt add to the Element.
public class checkData{
public Element GetStudentPInfo(String arg1) throws IllegalArgumentException{
     Element result=null;
     if (arg1 == null)
throw new IllegalArgumentException("Parameter wrong");
String url="jdbc:odbc:Registry";
String cs="select * from student where ID = '" arg1 "'";
Connection con;
Statement stmt;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException:");
System.err.println(e.getMessage());
try {
con=DriverManager.getConnection(url);
stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(cs);
result.setAttribute("name",rs.getString("Name"));
result.setAttribute("id",arg1);
result.setAttribute("telephone",rs.getString("Telephone"));
result.setAttribute("address",rs.getString("Address"));
result.setAttribute("email",rs.getString("EMAIL"));
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: "+ex.getMessage());
return result;
}

the element transmit back is nullThat's because you created it that way, in this line of code:Element result=null;That code later, where you do "result.setAttribute(...)", will throw a NullPointerException if it is ever executed, because result is a null reference. You need to create an Element object. I don't know anything about your Element class but maybeElement result=new Element();would work.

Similar Messages

  • Trouble with Elements 8

    I'm unable to open Organizer in Elements 8. I'm also having trouble opening Edit. It seemed to start when I couldn't upload photos to Shutterfly.

    Windows version.
    It just starts trying to load and stops. It has been working fine until last week. After tryiing to upload photos to Shutterfly, it stopped uploading and said it was unable to finish.
    After that, the next time I tried to open PSE8 it just wouldn't work.
    Thanks for the response.
    Date: Sun, 13 May 2012 11:55:21 -0600
    From: [email protected]
    To: [email protected]
    Subject: Trouble with Elements 8
    Re: Trouble with Elements 8 created by photodrawken in Photoshop Elements - View the full discussion
    OS version?
    What happens when you try to launch PSE8?  Any error messages?
    Did it ever work?
    Ken
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4403329#4403329
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4403329#4403329. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Having trouble updating Elements Organizer 11

    Having trouble updating Elements Organizer 11.  I started it using Administrator priveleges, disabled firewall but keep getting "The update server is not responding. The server might be offline".  I am using Windows 8.1 x64.  My current version is 11.0.0.0.  I read that you may need to go into Adapter Settings and disable:
    Microsoft Virtual WiFi Miniport Adapter
    Microsoft Wi-Fi Direct Virtual Adapter
    Microsoft Hosted Network Virtual Adapter
    but I didn't see those listed! Help!

    Very frustrated!  What do you mean by "focusing on my host files"?  Every other reputable software company I know of has direct downloadable updates in case their "update manager" doesn't work, so I'm not sure why Version 11 of PSE doesn't have this capability.  I need to get my software updated!  Please help me (and I'm not the only one) get this working so I can move on to greater things.  Please be specific (I'm pretty good with computers so don't be shy).

  • I have photoshop elements 12 and it shows elements 11 on my icons and also when hitting about elements it states 11 and not 12 ? however the cd shows 12 , I'm confused

    i have photoshop elements 12 installed and it shows elements 11 on my icons and also when hitting about elements it states 11 and not 12 ? however the cd shows 12 , I'm confused as why it shows elements 11 and not 12...

    Where did you buy the CD? Was it a boxed, seal unbroken?

  • I am having trouble w/ Elements 12 I just purchased this morning.  Installation was "successful".  B

    I am having trouble w/ Elements 12 I just purchased this morning.  Installation was "successful".  But when I tried to open organizer on my MAC, I received an error message: Adobe Elements 12 Organizer cannot be opened because of a problem.  Check w/ the developer to make sure Adobe Elements 12 Organizer works with this version of Mac OS X.  P.S.  I ran a system update before I installed the Adobe Elements 12.

    what osx version?

  • Trouble loading Elements 10

    I run windows 8 and have trouble loading elements 10. I get this error message as displayed in this screen dump. Any idea how to fix it?

    Sorry the cut and paste didn't get included. Here it is
    OMP: Error #15: Initializing libiomp5mt.lib, but found libiomp5md.dll already in itialized
    Hopefully this will help.

  • FAQ: I opted out of marketing email from Adobe. Why did I get an email about Elements membership?

    Q: I opted out of marketing email from Adobe. Why did I get an email about Elements membership?
    A: The email you received was an operational notice regarding changes to Elements membership. Only users who may be affected by these changes received this email.

    Hi Steve,
    I can personally ensure you get it if after waiting the 60 days you still haven't recieved it yet.
    You would also want to ensure:
    - You have the annual (yearly) Creative Cloud plan
    - You log into the Creative Cloud website from within 3 of the Adobe Touch Apps from the tablet using your Adobe ID associated with your membership
    If all this looks correct and you don't recieve an email after the 60 days, send me a private message and I'll ensure you get it.
    -Dave

  • I am having trouble launching elements 6.  i click on it but nothing happens

    i am having trouble launcing elements 6.  I click on it but nothing happens?am i doing something worng?

    You haven't told us very much. Windows or mac? What are you clicking on, a shortcut or the actual program file? If windows, editor, organizer, or welcome screen?

  • Big trouble about my order

    hi folks
    i have a big trouble about my order don't have any serial number so what's going on ?
    We received your payment - thank you! Here are the details about that order for your records:
    Order Details:
    Creative Cloud single-app membership for Adobe Premiere Pro (one-year) US$19.99 per month
    Order # AD015556514 US$2.99 tax
    Total payment today:   US$22.98
    thx

    We are not Adobe. This is a user to user forum.  We are consumers just like you.
    You will need to contact Adobe:
    https://www.google.com/search?q=contact+Adobe&oq=contact+Adobe&aqs=chrome..69i57j69i65j69i 60l3j69i59&sourceid=chrome&es_…

  • Old photoshop user having trouble using elements

    Been using an ancient copy of Photoshop for years. Got a new computer, and figured it was time for an upgrade, so I bought Elements. I've been working with it for a few days and having tons of troubles.
    1) Dell sold me Elements 8 instead of Elements 9. I did not know at the time I was getting an older version. Are there enough differences in the new version I should complain that I got an old version?
    2) I'm having a terrible time with the "Panel Bin" and "Project Bin" resetting every time I open the application. I'll get all the windows set up just the way I like them, and then when I restart the app they're scrambled or missing. I DO have "Save Panel Locations" checked in the preferences, and I would have thought that was enough. Am I missing something?
    3) Is there a way to turn off the stripe at the bottom with the Tips and Tricks icon? It's a waste of space.
    4) The Favorites panel seems handy, but so far all I've been able to add is some effects. Is there a way to add other things I use regularly, like Image Size, Canvas Size, Brightness/Contrast, and Hue/Saturation? Or is this really only "favorite effects" rather than favorite anything?
    5) After using the same grayscale tool bar since about 1993, the color icons on the tool bar now look cartoony and just plain weird. I guess I'll get used to them eventually, but is there any way to turn on the old icons?
    Sorry that's a mass of questions at once. I'm just feeling a little lost in the new interface. Thanks in advance for any help.

    Some thoughts
    1. You could download the trial of pse9 and see if the hassle is worth it.
       Some things are better and some are worse.
    2. Are you docking the panels or trying to keep them free floating like
       your older version of photoshop did?
    3. Yes that happens when start elements with your internet on.
        See this page
    4. You can only add things from the effects and content panels to the favorites panel
        like effects(actions), frames, layer styles etc.
    5. The only change in the interface is light or dark:Preferences>General.
    MTSTUNER

  • Trouble Opening Elements Video in Quicktime

    I am having trouble with saving my elements video to be viewed in Quicktime. I can save it fine, but when it iopens in
    Quicktime the video is out of sync a little with the audio.
    I am taking video classes and it is required to be able to open them in Quicktime. I almost tend to think it is a compression issue of some sort,
    but from what I understand they should be compatible.
    Any ideas...........anyone???
    Jennie

    Jennie,
    Going back to the source footage, do you know the details of those files?
    If necessary, you can use the great, free utility, G-SPOT to gather all of the details. G-Spot will give you details about both the Video and the Audio in those files. As you really have two sources, I'd run each type (the stock) and the other student's files through G-Spot and post a screen-cap of the program's screen, so that we can see those details. There might well be something there, that will point to the issue.
    Also, when you start a Project, you are prompted to define a New Project. What are the specs. of that Project? The settings in the Project should match the specs. of the source footage 100%, or one will have issues.
    Now, back in that Project, in PrE, when you play the Timeline, I assume that you have the full Audio, which is in sync. Is that correct?
    I notice that the FPS = 15. Going back to the source footage, does that match the FPS of that source footage? Above, I suggest how to find out those details. If this does not match the FPS of the source footage, is there a compelling reason to alter this?
    I understand outputting (Export/Share) to a different Frame Size (so long as it is the same Aspect Ratio), and that should not be part of the issue.
    Last, some users (PrE and PrPro) have had issues with Apple's H.264 CODEC. That is probably the most common one, as it is installed with Apple's QT Player. As a bit of background, the CODEC is the device for both encoding and decoding AV files. For more background, this ARTICLE might be useful. There are a couple more, very popular H.264 CODEC's, that seem to give fewer problems, Lead and MainConcept.
    Good luck,
    Hunt

  • Trouble installing elements 12 on mac maverick.

    I have a MacBook Pro with 10.9.4 OS.  Just purchased Adobe Photoshop Elements 12 and I am having trouble installing.  I put the disk in my computer and my Mac just spits it back out.  I tired everything I can think of and nothing seems to get the disk to read.  Has anyone else had any problems getting Elements to install?  Can anyone tell me how to fix this problem or point me in the right direction of where to find the answer? 

    download the installation file and use your serial number to activate,
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.4 (win) 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Question about elements in ABAP programming. Please see..

    Hi all,
    I want to know what is the way to find more info about an element eg SPOS in the structure ALV_S_SORT.  The short description doesnt tell much. When I was reading a word file (tutorial on ALV reports) I came to know that this is used to provide sort criteria for the different fields. But I don't know what should be the value of SPOS? I see that it is a NUMC2 (length=2) type data.  This info is used in the function call REUSE_ALV_LIST_DISPLAY, but no info on what values to give to it?
    Please let me know what is the right approach to tackle such issues at clients place.. Should I ask at this forum each time.. Please let me know about the field spos and how did you find out.
    Thanks,
    Charles.

    Hello Charles
    If you want to start with ALV programming but are not yet comfortable enough with class-based ALV list (CL_GUI_ALV_GRID, CL_SALV_TABLE) then I highly recommend to use fm REUSE_ALV_GRID_DISPLAY_LVC. The interface of the fm is very similar (if not identical) to method SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID.
    In order to understand the function of its parameters have a look at the excellent tutorial [An Easy Reference For ALV Grid Control|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]
    The tutorial is intended for OO-based ALV lists but using the fm I suggested you can use this documentation as well.
    Regards
      Uwe

  • Trouble installing Elements 11 on Windows 8 64-bit

    Are there any problems with installing Elements 11 on Window 8 - 64 bit?

    Thank you.  I think I;ll take your advice and buy the product.  HOwever like you I really hope Windows 8.1 will solve many of the problems/issues that have been experienced or talked about since its launch!!
    I've selected PSE 11 as I wasnt 'sold' on PSE 12 having recently read the article in the Photoshop magazine.  Although it scored 91% there were still aq couple of megatives.  And only being a beginner I didnt want to run before I can walk!!
    Reagrds David.

  • Trouble installing Elements 10

    I purchased Adobe Photoshop Elements 10 and have had trouble installing it on my PC (Windows 7)
    The process and progress I encountered was as follows:
    I uninstalled the trial version I had been testing;
    I inserted Disc 1 and followed the prompts detailing location and serial number and un-ticking Load a Trial version;
    After a period of downloading I received the message (via a pop up box) to insert Disc 2;
    At this stage the disc tray did not open automatically (nor could I open it) and it appeared that there were files still being downloaded (I could see a frame with download activity);
    Attempts to close the prompt box resulted in an incomplete installation;
    After three attempts (uninstalling prior to each attempt) with the same thing happening I finally got a message that download had been completed.
    This occurred notwithstanding that I did not have an opportunity to load Disc 2 & 3;
    Whilst the program is working I am concerned that some of the features will not work as I never got to upload anything off Discs 2 & 3.
    Can I check if the program has downloaded correctly and fully?
    Should I uninstall and start again?
    If I do and encounter the problem of not being able to load Disc 2 etc is there a solution?
    Thanks for any comments or suggestions.

    Thanks Ken
    That is the answer I was hoping to hear.
    Appreciate your help.
    John

Maybe you are looking for