Problem getting japplet static field

Hi,
i have a japplet where i have a static jlist field.
i'm trying to implement chat using sockets.
i have thread class. in this class, i want the selected index of jlist used in japplet.
the basic logic is....i run the server, i open 3 instances of japplet. the list will populate with number of clients connected....in this case...3. i select particular value from list and i retrive particular socket object out of a vector (used to store socket object) using this index.
so the problem is when i do ClietApplet.list.getSelectedIndex()...it gives -1
can anyone pls suggest me what would be the problem or what would be other way round ?

here is server and server thread
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class NewServer
     public ServerSocket serverSocket = null;
     BufferedReader input;
     String txt = "";
     static int list_val = 0;
     OutputStreamWriter outputstream = null;
     public NewServer()
          super();
          System.out.println("     in constructor ");
          startSocketWait();
     public void startSocketWait()
          try
               serverSocket = new ServerSocket(5090);
               while (true)
                    Socket client = serverSocket.accept ();
                    System.out.println ("Accepted from " + client.getInetAddress ());
                    list_val = list_val + 1;
                    System.out.println("list_val is "+ list_val);
                    ServerThread st = new ServerThread(client);
                    st.start();
          catch ( java.io.InterruptedIOException e )
               System.out.println("InterruptedIOException Occured");
               e.printStackTrace();
          catch(Exception e)
          System.out.println("error " + e);
     public static void main(String args[])
          NewServer server = new NewServer();
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.Vector;
import java.io.*;
import java.util.*;
class ServerThread extends Thread {
     protected Socket client;
     protected static int key;
     OutputStreamWriter outputstream = null;
          BufferedReader br;
          static String[] message_split;
     ServerThread(Socket client) {
     this.client = client;
     try
          outputstream = new OutputStreamWriter(client.getOutputStream());
          br = new BufferedReader(new InputStreamReader(client.getInputStream()));
     catch(Exception e5)
     //protected static HashMap map = new HashMap();
     protected static Vector handlers = new Vector ();
     public void run() {
     try
          handlers.addElement (this);
          //map.put(key,this);
               while (true)
                    String msg = br.readLine() + "\n";
                    broadcast (msg);
     catch (Exception e)
          e.printStackTrace();
     finally
          handlers.removeElement(this);
          try
          client.close();
          catch (Exception e2)
          System.out.println("Oh no! " +
          e2.toString());
     protected static void broadcast (String message)
     synchronized (handlers)
               Enumeration e = handlers.elements ();
               //while (e.hasMoreElements ())
               //ServerThread st = (ServerThread) e.nextElement ();
                    ServerThread st = (ServerThread) handlers.get(AppletClient.list.getSelectedIndex());
                    try
                         System.out.println("in try");
                         synchronized (st.outputstream)
                              System.out.println("in outputstream");
                              st.outputstream.write("Client : " + message);
                         st.outputstream.flush ();
                    catch (IOException ex)
     }// method broadcast ends
}// ServerThread ends
pls run the server...NewServer.java and open 3 or 4 instances of AppletClient....whenever the client selects any particular index from list...the message should go to that client
thanks in advance

Similar Messages

  • Problems getting a static ip working in solaris 10

    Hi,
    I hope this is the right forum for this question..
    I have a Broadcom BCME95751 ethernet adapter, interface bcme0, and the problem is that when i configure it using DHCP it works OK. But when I want a static ip by putting the ip in hostname.bcme0 it gives me this in bootup(pasted only the interesting bits):
    bcme0 : Broadcom NetXtreme Gigabit Ethernet BCM95751 (Copper) is detected
    NOTICE: bcme0 : No Link
    bcme0 is /pci@0,0/pci8086,2660@1c/pci1297,fb95@0
    svc.startd[7]: [ID 652011 daemon.warning] svc:/network/physical:default: Method "/lib/svc/method/net-physical" failed with exit status 96
    NOTICE: bcme0 : Link is Up (100Mbps, Full Duplex, Rx & Tx Flow Control ON)
    And after bootup when i type "ifconfig bcme0" it shows that it's plumbed but IP is 0.0.0.0
    If i do for example "ifconfig bcme0 192.168.1.10 netmask 255.255.255.0 up" after bootup, i can get it to work just fine! But for some reason it doesnt want to assign the ip during bootup.
    Is it possible that the link becomes active ("Link is Up") after a short delay, it fails to assign the IP? Is it possible to delay it somehow. DHCP works for some weird reason, maybe because it waits to get the IP?
    I hope someone would have some ideas on this, i'm new to solaris and pretty frustrated with this. Don't want to configure the interface by hand after every reboot :)
    Thanks!
    Teddie

    But when I want
    a static ip by putting the ip in hostname.bcme0 it
    gives me this in bootup(pasted only the interesting
    bits):As the filename hostname.bcme0 already suggests you don't enter an IP adress there but a hostname. The IP adres is then picked up by checking the hostname against /etc/inet/hosts.
    You might want to check out http://docs.sun.com/app/docs/doc/816-4554/816-4554#hic for more information on this matter.

  • Problem getting my jQuery inFieldLabels to fade.

    I would love to have some help.
    The website is
    http://sjcog.bc-hosting.net/members/member-login
    I am having a problem getting the In Field Labels to fade in my forms.
    Many thanks!
    Debra
    <form class="sidebar-form" name="catseczoneform49189" onsubmit="return checkWholeForm49189(this)" method="post" action="https://sjcog.worldsecuresystems.com/ZoneProcess.aspx?ZoneID=51&Referrer={module_siteUrl,true,true}&amp;OID={module_oid}&amp;OTYPE={module_otype}">
                <p>
                <label class="sidebar" for="SZUsername">Username<span class="req">*</span></label>
                <input type="text" name="Username" id="SZUsername" class="required" />
                </p>
                <p>
                <label class="sidebar" for="SZPassword">Password<span class="req">*</span></label>
                <input type="text" name="Password" id="SZPassword" class="required" />
                </p>
                <div class="form">
                <div class="item">
                <input type="checkbox" name="RememberMe" id="RememberMe" />  <label for="RememberMe">Remember Me</label></div>
                 <br />
                <span class="clear"></span>
                <button name="Log in" id="submit" type="submit" class="lrg-btn-login" value="Log in"></button>
                <span class="clear"></span>
                <p><br />
                </p>
                <p><a href="/_System/SystemPages/PasswordRetrieveRequest">Lost password?</a></p>
                <p><a href="/members/members-registration">Register an account</a></p>
                <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
                <script type="text/javascript">
    //<![CDATA[
    function checkWholeForm49189(theForm){var why = "";if (theForm.Username) why += isEmpty(theForm.Username.value, "Username");if (theForm.Password) why += isEmpty(theForm.Password.value, "Password");if (why != ""){alert(why);return false;}theForm.submit();return false;}
    //]]>
    </script>
                <div style="display: none;" id="hiddenlpsubmitdiv"></div>
                <script>try{for(var lastpass_iter=0; lastpass_iter < document.forms.length; lastpass_iter++){ var lastpass_f = document.forms[lastpass_iter]; if(typeof(lastpass_f.lpsubmitorig2)=="undefined"){ lastpass_f.lpsubmitorig2 = lastpass_f.submit; lastpass_f.submit = function(){ var form=this; var customEvent = document.createEvent("Event"); customEvent.initEvent("lpCustomEvent", true, true); var d = document.getElementById("hiddenlpsubmitdiv"); for(var i = 0; i < document.forms.length; i++){ if(document.forms[i]==form){ d.innerText=i; } } d.dispatchEvent(customEvent); form.lpsubmitorig2(); } } }}catch(e){}</script>
                </div>
            </form>
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css" media="all" />
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
    <!--[if IE 7]><link rel="stylesheet" href="/assets/css/ie/ie7.css" type="text/css" media="all" /><![endif]-->
    <!--[if gt IE 7]><link rel="stylesheet" href="/assets/css/ie/ie.css" type="text/css" media="all" /><![endif]-->
    <link rel="stylesheet" type="text/css" href="/nivo-slider/nivo-slider.css" media="screen" /> <!-- Base Nivo CSS -->
    <link rel="stylesheet" href="/nivo-slider/themes/default/default.css" type="text/css" media="screen" /> <!-- If using default theme -->
    <!-- Javascript -->
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <!-- Make sure you have the latest jQuery -->
    <script>jQuery.noConflict();</script>
    <script type="text/javascript" src="/nivo-slider/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript" src="/assets/js/jquery.infieldlabel.min.js"></script>
    <script type="text/javascript" src="/assets/js/settings.js"></script>
    <!-- IE PNG FIX -->
    <!--[if lt IE 7]><script type="text/javascript" src="/assets/js/unitpngfix.js"></script>
    <![endif]-->
    <script type="text/javascript">
    jQuery(window).load(function() {
       jQuery('#slider').nivoSlider({
            effect: 'fade',
            animSpeed: 500,
            pauseTime: 10000,
    </script>
    <script type="text/javascript">
                        $j(document).ready(function(){
                                  sm_fancy()
                        $j("label.sidebar").inFieldLabels({fadeOpacity: 0.6});
              </script>

    Hi
    I am afraid, at this stage Menu widget cannot be set to appear in full width. You may file a feature request here :  Ideas for features in Adobe Muse

  • Problem getting the # of instances in Numeric Field

    Hi there,
    I've created a form on which a user can add / duplicate the subform.  That subform is located in another subform.
    SO the hierarchy is like:
    Subform 1
         Subform 2
              Table with fields
         Delete button
    Add button
    Numeric Field
    The numeric field has to display the number of instances of Subform 2.
    I selected the field and added the code:
    Subform2.instancaManager.count;
    But that doesn't work at all. The field doesn't display anything.
    The subform has a minimal count of 1. So in my logic it should display 1. But I ain't a scripter at all...so frankly I must think of it in a wrong way.
    Can someone help me get this numeric field to calculate the subform2 instances? In dummy language please :-)

    Hi,
    Since the numeric field is outside Subform1, you have not provided a full enought reference from the numeric field to Subform2. See here for a description: http://assure.ly/kUP02y.
    This should work in the calculate event of the numeric field:
    this.rawValue = Subform1.Subform2.instanceManager.count;
    If the subform did not have a minimum count, then you would use the underscore shortcut for instanceManager _:
    this.rawValue = Subform1._Subform2.count;
    Both options are JavaScript. I prefer using the _ shortcut everytime I am working with repeating instances. 
    Hope that helps,
    Niall

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How can I share a static field between 2 class loaders?

    Hi,
    I've been googling for 2 days and it now seems I'm not understanding something because nobody seems to have my problem. Please, somebody tell me if I'm crazy.
    The system's architecture:
    I've got a web application running in a SunOne server. The app uses Struts for the MVC part and Spring to deal with business services and DAOs.
    Beside the web app, beyond the application context, but in the same physical server, there are some processes, kind of batch processes that update tables and that kind of stuff, that run once a day. Theese processes are plain Java classes, with a main method, that are executed from ".sh" scripts with the "java" command.
    What do I need to do?
    "Simple". I need one of those Java processes to use one of the web app's service. This service has some DAOs injected by Spring. And the service itself is a bean defined in the Spring configuration file.
    The solution is made-up of 2 parts:
    1. I created a class, in the web app, with a static method that returns any bean defined in the Spring configuration file, or in other words, any bean in the application context. In my case, this method returns the service I need.
    public class SpringApplicationContext implements ApplicationContextAware {
         private static ApplicationContext appContext;
         public void setApplicationContext(ApplicationContext context) throws BeansException {
              appContext = context;
         public static Object getBean(String nombreBean) {
              return appContext.getBean(nombreBean);
    }The ApplicationContext is injected to the class by Spring through the setApplicationContext method. This is set in the Spring configuration file.
    Well, this works fine if I call the getBean method from any class in the web app. But that's not what I need. I need to get a bean from outside the web app. From the "Java batch process".
    2. Why doesn't it work from outside the web app? Because when I call getBean from the process outside the web app, a different class loader is executed to load the SpringApplicationContext class. Thus, the static field appContext is null. Am I right?
    So, the question I need you to please answer me, the question I didn't find in Google:
    How can I share the static field between the 2 class loaders?
    If I can't, how can I load the SpringApplicationContext class, from the "Java batch process", with the same class loader my web app was started?
    Or, do I need to load the SpringApplicationContext class again? Can't I use, from the process, the class already loaded by my web app?
    I' sorry about my so extensive post...
    Thank you very much!

    zibilico wrote:
    But maybe, if the web service stuff gets to complicated or it doesn't fulfill my needs, I'll set up a separate Spring context, that gets loaded everytime I run the "Java batch process". It'll have it's own Spring configuration files (these will be a fragment of the web app's config files), where I'll define only the beans I need to use, say the service and the 2 DAOs, and also the DB connection. Additionally, I'll set the classpath to use the beans classes of the web app. Thus, if the service and DAOs were modified in the app server, the process would load the modified classes in the following execution.You'll almost certainly have to do that even if you do use RMI, Web services etc. to connect.
    What I suggest is that you split your web project into two source trees, the stuff that relates strictly to the web front end and the code which will be shared with the batch. The latter can then be treated as a library used by both the batch and web projects. That can include splitting Spring configuration files into common and specific, the common beans file can be retrieved from the classpath with an include. I regularly split web projects this way anyway, it helps impose decoupling between View/Controller and Model layers.
    On the other hand, you might consider running these batch processes inside the web server on background threads.

  • The static field should be accessed in a static way

    Hello,
    I am developing a java app in eclipse and I am getting the error message:
    The static field Calendar.DAY_OF_WEEK should be accessed in a static way
    I am trying to get the first day of the first week in the current month, here is my code:
    GregorianCalendar firstDayOfThisMonthCalendar = new GregorianCalendar(Calendar.YEAR, Calendar.MONTH, 1);
    int firstDayOfThisMonth = firstDayOfThisMonthCalendar.DAY_OF_WEEK;I though the problem was that I'm supposed to write the code like this:
    firstDayOfThisMonthCalendar.get(Calendar.DAY_OF_WEEK); but then I get the wrong value back

    That's what I critice about u people, always ready to
    complain, It's not complaining. It's pointing out problems with your code. You should thank him.
    but do u put the code in here the way that
    someone could read it ? Easy to say 'use
    simpleDateFormat. Oh, careful, January returns 0, not
    1'.Using SimpleDateFormat is an easier and more correct way to do it. Trying to use the numerical value of the month constants is incorrect coding. You should thank him for educating you.
    Why can't u write the code in here so there's no
    chance that somebody will ask again.Such code is not possible. No matter what code you write, somebody can misunderstand it.
    If you write the code correctly--using SimpleDateFormat--then the code will be correct (which is the most important criteria) and clear (which is important, but not as important as correctness).
    But if you prefer to think that your way is always perfect and are afraid to admit your mistakes and learn from them, that's your prerogative.

  • StreamTokenizer static fields

    Maybe this is a stupid question but why does this compile without problems:
    Reader r = new BufferedReader(new InputStreamReader(System.in));
    StreamTokenizer tok = new StreamTokenizer(r);
              // StreamTokenizer tok = new StreamTokenizer(System.in);
              try{
                   while (tok.nextToken() != StreamTokenizer.TT_EOF){
                        switch (tok.ttype) {        // ttype is token type
                             case StreamTokenizer.TT_NUMBER: 
                                  System.out.println("number " + tok.nval);
                                  break;
         ....But this:
    Reader r = new BufferedReader(new InputStreamReader(System.in));
    StreamTokenizer tok = new StreamTokenizer(r);
              // StreamTokenizer tok = new StreamTokenizer(System.in);
              try{
                   while (tok.nextToken() != StreamTokenizer.TT_EOF){
                        switch (tok.ttype) {        
                             case tok.TT_NUMBER:  // nval is numeric value
                                  System.out.println("number " + tok.nval);
                                  break;
         ....                    gives the following compiling error:
    constant expression required
        case tok.TT_NUMBER:  value
               ^
    1 errorI thought static fields can be access both through the name of the class and objects of it.
    The version that doesn't compile comes from a book which makes it slightly more confusing.

    excuse my wording. I have been using >= mostly, though
    I do know that > exists. If I replace the >
    with >= and compile there are no errors. But I also
    get the following errors with the >
    # javac TestLight.java
    TestLight.java:13: ')' expected
    if (a.KWH_PRICE > 0)
    ^
    TestLight.java:13: not a statement
    if (a.KWH_PRICE > 0)
    ^
    TestLight.java:13: ';' expected
    if (a.KWH_PRICE > 0)
    ^
    TestLight.java:13: cannot resolve symbol
    symbol : variable gt
    location: class TestLight
    if (a.KWH_PRICE > 0)
    ^
    4 errorsYou really get errors then ?
    Very strange, I don't get any.....

  • How to schedule multiple reports with different local to change static field language ?

    Hi all,
    we have requirement that we will place multiple schedule request on same server ,This schedule request will be different local setting with parameter value like: en-GB,en-US,Chinese...etc .We used translation Manager for this and it takes this parameter and change report language for static fields.
    problem is that ,on server it is not working properly,we tested for one report .if we pass prompt value to change local setting in report the we need to log off and login again in CMC to reflect new local or on BI Launchpad we need to refresh page then it shows new language.
    How we can do this with multiple scheduled report which will have different local value like en-GB,en-US,Chinese,German....?These schedule request are getting placed in server by one user .
    Please help us with sample code.
    Thanks
    Madan

    Hi,
    The only approach I can think of is to create a template report which uses variables
    For each column you would need to variable
    v_columnAName and v_columnAValue
    v_columnAName would have a if statement in it
    =if([client]="clientA" or [client]="clientC";NameOf([firstName]);if([client]="clientB";NameOf([SSN]);NameOf([lastName]));
    v_columnA would have a if statement in it
    =if([client]="clientA" or [client]="clientC";[firstName];if([client]="clientB";[SSN],[lastName]));
    This would only work when you had a small set of clients.
    This might be more managable if it was done in the universe
    Regards
    Alan

  • Problem getting correct data from MS Access after doing an Update

    Hi all,
    I have a problem getting correct data after doing an update. This is the scenario
    I am selecting some(Eg: All records where Column X = �7� ) records and update a column with a particular value (SET Column X = �c� ) in all these records by going through a while loop. In the while loop I add these records to a vector too, and pass it as the return value.
    After getting this return value I go through a for loop and get each record one by one from the DB and check if my previous update has actually happened. Since No errors were caught while updating DB, I assume all records are updated properly but my record set shows one after another as if it has not been updated. But if I open the DB it is actually updated.
    This does not happen to all records, always it shows like this
    1st record     Mode = �c�
    2nd record     Mode = �7�
    3st record     Mode = �c�
    4nd record     Mode = �7�
    9th record     Mode = �c�
    10th record     Mode = �7�
    I am relatively new to java and this is someone elses code that I have to modify,So I am not sure if there some thing wrong in the code too
    //Here is the method that gets records and call to update and add to vector
    public static Vector getCanceledWorkOrders() throws CSDDBException{
    //Variable declaration
      try {
        objDBConn = DBHandler.getCSDBCon();
        strSQL  = "SELECT bal bla WHERE [Detailed Mode])=?)";
        objStmt = objDBConn.prepareStatement(strSQL);   
        objStmt.setString(1, '7');
        objWOPRs = objStmt.executeQuery();
        while (objWOPRs.next()) {
         //Add elements to a vector by getting from result set
          //updating each record as PROCESSING_CANCELLED_WO(c)
          iRetVal = WorkOrderDetailingPolicy.updateRecordStatus(objPWODP.iWorkOrderNumber, objPWODP.strPersonInformed, EMSConstants.PROCESSING_CANCELLED_WO);
          if (iRetVal == -1) {
            throw new NewException("Updating failed");
      catch (Exception e) {
        vecWONumbers = null;
        throw new CSDDBException(e.getMessage());
      }finally{
        try {
          objWOPRs.close();
          objStmt.close();
          DBHandler.releaseCSDBCon(objDBConn);
        catch (Exception ex) {}
      //return vector
    //here is the code that actually updates the records
    public static int updateRecordStatus(int iWONumber, String strPerInformed , String strStatus) throws CSDDBException{
       PreparedStatement objStmt = null;
       Connection objDBConn  = null;
       String strSQL = null;
       int iRetVal = -1;
       try{
         objDBConn  = DBHandler.getCSDBCon();
         objDBConn.setAutoCommit(false);
         strSQL = "UPDATE Table SET [Detailed Mode] = ? WHERE bla bla";
         objStmt = objDBConn.prepareStatement(strSQL);
         objStmt.setString(1, strStatus);    
         objStmt.execute();
         objDBConn.commit();
         iRetVal = 1;
       }catch(Exception e){
         iRetVal = -1;
       }finally{
         try{
           objStmt.close();
           DBHandler.releaseCSDBCon(objDBConn);
         }catch(Exception ex){}
       return iRetVal;
    //Here is the code that call the records again
      public static WorkOrderDetailingPolicy getWorkOrders(int iWorkOrderNo) throws CSDDBException{
        Connection objDBConn = null;
        PreparedStatement objStmt = null;
        ResultSet objWOPRs = null;
        WorkOrderDetailingPolicy objPWODP = null;
        String strSQL = null;
        try {
          objDBConn = DBHandler.getCSDBCon();    
          strSQL = "SELECT * FROM [Work Order Detailing] WHERE [Work Order No] = ?";
          objStmt = objDBConn.prepareStatement(strSQL);
          objStmt.setInt(1, iWorkOrderNo);
           objWOPRs = objStmt.executeQuery();
          if (objWOPRs.next()) {
            objPWODP = new WorkOrderDetailingPolicy();
            objPWODP.iWorkOrderNumber = objWOPRs.getInt("Work Order No");
            //......Get Record values
        catch (Exception e) {
          objPWODP = null;
          throw new CSDDBException(e.getMessage());
        }finally{
          try {
            objWOPRs.close();
            objStmt.close();
            DBHandler.releaseCSDBCon(objDBConn);
          catch (Exception ex) {}
        return objPWODP;
      }

    Hello,
    Can you put an example of your problem online?
    Are you sure you're not having problems with case sensitive data?
    Thanks,
    Dimitri

  • Problems setting up static routing

    HI
    I'm having a problem setting up static routing.  I keep getting the message "invalid static route".   I have an E1550 router and my frimware is up to date.  I have tried a few different gateway addresses ie 192.168.1.1,  127.0.0.1 and my router's address on the net, but I keep getting the same message.  Has anyone else had this problem and been able to fix it?

    I think the E1550 router supports LAN to LAN routing provided that you have two local networks. If you only have a plain modem and the E1550, I believe you can't do Static routing on that type of setup. Found this link that might help: http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=12a84336a124498eb5d6f0204b85191e_17589.xml&pid=80&...

  • Problem with Non-English Fields Output to PDF by JASPER in JDev10.1.3

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

    I am using jsprx files(designed in i-report) to generate pdf reports out of an oracle database.
    The non-English fields are shown correctly when I output the report into an HTML or when I view it with JasperView.
    If I try making PDF files (JasperExportManager.exportReportToPdfFile) the static fields containing e.g.Arabic/Chineese characters won't be displayed and dynamic fields from the database with non-English contents will be shown as ??? or null.
    I received some suggestions about using PARAMETERS to feed the report instead of FIELDS, which I think can not be helpful in this case and in general.
    I think this should be a common problem. These are the components I am using:
    itext-1.4.7. jar
    commons-digester- 1.7.zip
    jasperreports- 1.2.8.jar
    Any comment or help is appreciated.
    Thanks
    Farbod

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • Is read-only access to a static field correct without volatile/locking?

    Hello,
    I wonder wether the following code is safe:
    static UnicomServerCentral instance;
         public static void setInstance(UnicomServerCentral central)
              synchronized (UnicomServerCentral.class)
                   instance = central;
         public static UnicomServerCentral getInstance()
              UnicomServerCentral central = thisinstance;
              if (central == null)
                   synchronized (UnicomServerCentral.class)
                        central = this.instance;
              return central;
         }The static field instance is already guaranteed to be set. Is this safe?
    Thank you in advance, lg Clemens

    It might be safe in a particular context if there is
    additional synchronization involving the construction
    of the the "central" object and the execution of any
    threads that might call getInstance.Well if getInstance() returns null I simply spin as long as I get a non-null value back - so the only circumstance I could get here null is initialization.
    Since this example is a perfect does-not-work-dcl example I'll search the net for exmplanations.
    Thanks a lot, lg Clemens

  • Finder's "Get Info" Creator field not the same as "Creator Code"??

    Can someone explain what the difference is between the "Creator Code" associated with a file, and what the Finder's "Get Info" shows as the "Creator" (in the "More Info" section)?? I have a program that will not process a file unless a specific application has created the file. But if I change the "Creator Code" with a utility like "Type & Creator Changer" from AlphaOmega, the "Get Info" command shows no difference in the "Creator" field of the "Get Info" window.
    What is going on? What is the difference between these two "Creator" pieces of information of a file?
    How can one change what is in the "Get Info" "Creator" field??
    Thanks for your help...
    -Bob

    I don't think what you are talking about is the same as what I asked. I looked at the file that works with HexEdit and there is some other info about "CreatorTool" and "Creator" that in the case of the file that works is set to "ScanSnap Manager" and this is what appears in the "Creator" field of "Get Info" (in the "More Info" part of the GetInfo window). This is what I am guessing the Abbyy FineReader program is looking for to allow it to process the file. Without it it will not convert a PDF image file to a searchable text PDF file. Files that work and don't work can both have the "Open With" set to the same thing, so don't think that this has anything to do with the issue. Both can have the same "CreatorCode" too, so this is not it.
    In fact I just verified that if I change the "Creator" info in a file that works, the FineReader software will not process it. But the problem is that just changing the "Creator" info in a file to "ScanSnap Manager" is not enough. Bummer...
    So my dilemma is I can print a PDF file onto paper, then turn right around and scan it on the ScanSnap scanner and then FineReader will process it. But this is silly to have to print a file I already have the PDF of, let alone kill a few trees for the paper to print it on, in order to do the FindReader processing. Any suggestions??
    So, the question still is, what exactly is the FineReader looking for and how do I change a PDF file to have it so that FineReader will process it??? Is there a utility that will add/edit this other CreatorTool and/or Creator info in the file???
    Thanks...
    -Bob

Maybe you are looking for

  • Bizarre! One-Way Audio all of a sudden.

    I have a 7940 connected to an ASA5505 version 9.1(4) (originally connected on a DOCSIS 3 cable modem)  which has a site-to-site VPN tunnel that terminates on a Cisco 1841 and CCM 6.1 it's been working perfectly forever. Recently I switched to a fibre

  • Table View crashing when trying to use UITableViewCell from NIB

    Hi All, I have narrowed down my issue to a simple piece of code. I have a simple NIB file which only contains a UITableViewCell with a label on it. In the NIB i set the cell class to StatCell, which is a UITableViewCell class I created, and set the i

  • Anyone sent in there g550w and gotten it back?

    I have one of the faulty g550w systems that has failed on many others. I tried contacting creative customer service but the email folks were very unhelpfull and seemed incapable of answering my question. Tried calling on the phone and they said that

  • IDOC or BAPI to create Purchasing Rebate Agreements (Transaction MEB1)

    Hi everybody, Iu2019m using SAP Retail ECC 6.0 and I need to create Purchasing Rebate Agreements (migration and also in a Z program). When we do it manually these agreements are created in Transaction MEB1. Does any one know if there is an IDOC or a

  • Rendering Workspace Before Burning a DVD

    When I first bring in video to the workspace and timeline I always render the workspace. This gets me nice smooth playback during the editing process and I get the nice green line in the timeline. After editing the green line turns to red so do I nee