Compilation error on Solaris  2.6  using SUn Workshop 4.2(Rogue wave STL)

Hello,
I am facing a problem while using Rogue wave STLs on SOlaris 2.6 using Sun WOrkshop pro 4.2
I am using Hash table implementation in the source. It throws the following error:
---->Error: "," expected instead of "const_iterator".
I found it to be problem in a declaration of pair for the class.
Before modification:
typedef pair<mytmp::iterator,int> interator;
Modified to:
typedef mytmp::iterator myitr
typedef pair<myitr,int> interator;
Now the above compilation error seems to be gone. Can anyone please help me in understanding this problem???????????????
Also after compiling few files now i am facing new problem. It throws signal 11 in iterator header file of std STL.
Help m e !!!!!!!!!!
For your reference options of compilation are:
/opt/SUNWspro/bin/CC -c -O -mt -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D__EXTENSION
S__ -DRWSTD_MULTI_THREAD -D_RWBUILDSHARED -DRWSTD_COMPILE_INSTANTIATE -
DRWSTD_SHARED_BUILD --I/opt/mylib/common/include/Std  mydemo.cc                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

I solved my own problem.
It seems that the C++ XML Parser cannot be used with earlier versions of Oracle. My ORACLE_HOME env variable was pointing to v734. Once I changed that to point to the later version of v816, It was a smooth parse.
null

Similar Messages

  • Microsoft JScript compilation error alert on initial load using IE7

    I have noticed that a javascript alert window is displayed whenever an Applet is initially launched using IE7.
    This does not happen using IE8 (or FF, SF, Chrome, etc).
    I thought it was our implementation, but the alert is also shown launching any Applet from the following;
    http://java.sun.com/applets/jdk/
    There are typically 2 alerts and after pressing OK, the Applets appear to run successfully.
    The specific error is;
    Alert title: Microsoft JScript compilation error.
    Alert content: Expected ')' in regular expression.
    I don't always remember this error using IE7.
    Maybe it's related to the JRE?
    I am currently using: (build 1.6.0_26-b03)
    Any solution out there?

    879129 wrote:
    ..I thought it was our implementation, but the alert is also shown launching any Applet from the following;
    http://java.sun.com/applets/jdk/
    I just had a look at the source of two of the pages from the 1.4 section of that page (Animator (1) & ArcTest) & saw some very questionable HTML for the <tt>applet</tt> element, as well as two seemingly unrelated scripts. What do you get for (instead of those), the GIF Animator (the applet form)? It uses <tt>deployJava.js</tt>, which is about the only deployment option that Oracle cares about at the moment.

  • Got compilation error about 'create instance activity' using file adapter

    Hi,
    I am creating a very simple bpel process using file adapter. in my 'Receive' activity, I selected 'create instance' , as the tutorial says.
    I got this compilation error during deploying.
    'Error(31): [Error ORABPEL-10051]: multiple create instance activity [Description]: in line 31 of "D:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELPractices\FileAdapterTest2\FileAdapterTest2.bpel", Conflicting createInstacne="yes". Instance is already created by another activity. [Potential fix]: Remove createInstance="yes" attribute from this activity. '
    Several people had the same problem in my team. I wonder if this is a common issue. how to fix it?
    Thanks,
    Kate

    You must be having another receive/pick activity within the same process that has "createInstance" set to yes.
    Thats why its complaining.

  • Error while authenticating BPEL WorklistApplication using sun java server

    Hi,
    I have got a situation where i need to use sun java server to authenticate users and groups who can log into the BPEL worklist application.
    This is what i have done.
    I went to middleware services,BPEL,orabpel and to hw services.
    There i changed the Security provider to thrid party LDAP Server.
    the LDAP connection is successfull.
    But when i m loggin onto the Worklist App it says Username invalid .Somehow it autheticates against systemjazndata.xml file .But it's not supposed to do so and validate against the ldap.
    Any help is highly appreciated..

    Hi,
    I have got a situation where i need to use sun java server to authenticate users and groups who can log into the BPEL worklist application.
    This is what i have done.
    I went to middleware services,BPEL,orabpel and to hw services.
    There i changed the Security provider to thrid party LDAP Server.
    the LDAP connection is successfull.
    But when i m loggin onto the Worklist App it says Username invalid .Somehow it autheticates against systemjazndata.xml file .But it's not supposed to do so and validate against the ldap.
    Any help is highly appreciated..

  • Error when trying to build using sun studio compiler

    Hi ,
    When i try to build my appliation-1 and application-2 , I am experiencing below given errors
    OS:
    SUSE Linux Enterprise Server 10 (x86_64)
    VERSION = 10
    PATCHLEVEL = 1
    Compiler Version:
    cc: Sun Ceres C 5.10 Linux_i386 2008/03/24
    usage: cc [ options] files. Use 'cc -flags' for details
    Application1:
    Error:
    CC: Cannot find /comp/sun/sunstudioceres/bin/ccfe
    Application2:
    Error:
    cc: Warning: cannot open inline file /gan/q2/comp/sun/sunstudioceres/lib/amd64/libm.il
    cc: Can't exec /comp/sun/sunstudioceres/bin/acomp
    Please share your thoughts on how to solve this problem
    Regards,

    [http://forum.java.sun.com/thread.jspa?threadID=5307985]

  • Compile errors with Solaris 5.8 and Studio 11 with latest patches

    I asked sa to patch my studio 11, and they applied patches 121023-04, 121015-04, 121017-08, 122142-03, 120761-03, 120760-11 and 122135-02. Then, I compiled my boost_1_33_1 again. It built some, but not all libraries. It stil spit out the following errors. Is this expected?
    "/home/vcheng/boost_1_33_1/libs/filesystem/build/../src/operations_posix_windows.cpp", line 126: Error: readdir_r is not a member of file level.
    ...failed sunpro-C++-action build_sunos/bin/boost/libs/filesystem/build/libboost_filesystem.a/sunpro/debug/operations_posix_windows.o...
    sunpro-C++-action build_sunos/bin/boost/libs/wave/build/libboost_wave.a/sunpro/debug/instantiate_cpp_exprgrammar.o
    "/home/vcheng/boost_1_33_1/boost/spirit/core/composite/epsilon.hpp", line 76: Error: complex expression not allowed in dependent template argument expression.
    "/home/vcheng/boost_1_33_1/boost/iostreams/device/file_descriptor.hpp", line 79: Warning: close_on_exit hides boost::iostreams::file_descriptor::impl::close_on_exit.
    1 Warning(s) detected.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 42: Error: BZ_CONFIG_ERROR is not defined.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 106: Error: The function "BZ2_bzCompressEnd" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 107: Error: The function "BZ2_bzDecompressEnd" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 113: Error: The function "BZ2_bzCompress" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 118: Error: The function "BZ2_bzDecompress" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 143: Error: The function "BZ2_bzCompressInit" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/iostreams/build/../src/bzip2.cpp", line 147: Error: The function "BZ2_bzDecompressInit" must have a prototype.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 97: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 100: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 110: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 349: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 383: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 437: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 458: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 477: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/cmdline.cpp", line 495: Warning: args hides boost::program_options::detail::cmdline::args.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/config_file.cpp", line 35: Warning: allowed_options hides boost::program_options::detail::common_config_file_iterator::allowed_options.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 311: Error: Could not find a match for std::count<std::InputIterator, std::T, std::Size>(char*, char*, char) needed in::format_paragraph(std::ostream &, std::string, unsigned, unsigned).
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 378: Error: Too few arguments for template std::reverse_iterator.
    "/.automount/opt/Forte/sunstudio11_patch1/SUNWspro/prod/include/CC/Cstd/rw/iterator", line 432: Error: "friend" declaration is incompatible with function template.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 378: Where: While specializing "std::reverse_iterator<const char*>".
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 378: Where: Specialized in non-template code.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 379: Error: Too few arguments for template std::reverse_iterator.
    "/home/vcheng/boost_1_33_1/libs/program_options/build/../src/options_description.cpp", line 387: Error: Could not find a match for std::distance<std::ForwardIterator, std::Distance>(const char*, const char*) needed in::format_paragraph(std::ostream &, std::string, unsigned, unsigned).

    You can take Boost 1.34 but you have to use CVS and you have to modify Boost configuration files to use -library=stlport4 option.
    Or you can take Boost 1.32, read this article http://blogs.sun.com/roller/page/sga?entry=boost_mini_howto and apply this patch http://blogs.sun.com/roller/resources/sga/boost_1_32_0.patch.
    As you can see here http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/summary.html Sun C++ is in a good shape.

  • Getting Error while Publishing Web Application using weblogic workshop 10.2

    Hi all,
    I am trying to create a simple webapplication using the weblogic workshop studio for weblogic. I have created a domain using the configration wizard.
    when i am trying to deploy the newly created dynamic web project EAR in to the server, its throwing a error
    !MESSAGE Referenced library module 'weblogic-controls-10.0#[email protected]' failed to deploy.
    !SUBENTRY 2 com.bea.workshop.wls.core 4 4000 2008-05-21 15:32:06.117
    !MESSAGE java.net.MalformedURLException: no protocol: 10.2/wlserver_10.0/platform/lib/p13n/p13n_common.jar
    !STACK 0
    java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
         at com.bea.workshop.wls.core.server.internal.WlsJ2EEDeploymentHelper$DeploymentProgressListener.watch(WlsJ2EEDeploymentHelper.java:1459)
         at com.bea.workshop.wls.core.server.internal.WlsJ2EEDeploymentHelper.deployLibrary(WlsJ2EEDeploymentHelper.java:1200)
         at com.bea.workshop.wls.core.server.internal.WlsJ2EEDeploymentHelper.deployLibraryModules(WlsJ2EEDeploymentHelper.java:1079)
         at com.bea.workshop.wls.core.server.internal.WlsJ2EEDeploymentHelper.deployAllLibraryModules(WlsJ2EEDeploymentHelper.java:1046)
         at com.bea.workshop.wls.core.server.internal.WlsJ2EEDeploymentHelper.deploy(WlsJ2EEDeploymentHelper.java:710)
         at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1195)
         at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:657)
         at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:486)
         at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:875)
         at org.eclipse.wst.server.core.internal.Server.publish(Server.java:863)
         at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:142)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    Caused by: java.net.MalformedURLException: no protocol: 10.2/wlserver_10.0/platform/lib/p13n/p13n_common.jar
         at java.net.URL.<init>(URL.java:567)
         at java.net.URL.<init>(URL.java:464)
         at java.net.URL.<init>(URL.java:413)
         at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
         at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
         at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
         at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
         at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
         at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
         at javax.management.remote.rmi.RMIConnectionImpl$6.run(RMIConnectionImpl.java:1595)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.management.remote.rmi.RMIConnectionImpl.unwrap(RMIConnectionImpl.java:1586)
         at javax.management.remote.rmi.RMIConnectionImpl.access$600(RMIConnectionImpl.java:81)
         at javax.management.remote.rmi.RMIConnectionImpl$7.run(RMIConnectionImpl.java:1631)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.management.remote.rmi.RMIConnectionImpl.unwrap(RMIConnectionImpl.java:1627)
         at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:766)
         at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Any help on this is welcomed
    Thanks and regards
    Vishnu

    If you don't mind can you please provide a more step-by-step instructions to reproduce.

  • Cannot compile a prog in C++ using Sun WS 5.0 on Solaris 8

    I am getting errors while compiling a helloworld program in C++ using Sun Workshop 5.0 on Solaris 8. The error messages are given below.
    The command I use for compiling my program is :
    CC Hello.cpp
    Is there anything wrong with the installation of the compiler?
    (All my C is code is compiling perfectly)
    Do I need to make some settings?
    Is the Sun compiler 5.0 incompatible with Solaris 8?
    In addition to this, if I want to use the list and vector classes, what headers can I use? What should the compilation command be?
    Thanks,
    Puneet Singhal
    I am getting these error messages:
    "/usr/include/iso/wchar_iso.h", line 100: Error: Multiple declaration for mbstate_t.
    "/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 51: Error: The name mbstate_t is ambiguous, std::mb
    state_t and std::mbstate_t.
    "/opt/SUNWspro/SC5.0/include/CC/./iosfwd", line 78: Error: The name mbstate_t is ambiguous, std::mb
    state_t and std::mbstate_t.
    "/opt/SUNWspro/SC5.0/include/CC/rw/iotraits", line 56: Error: The name mbstate_t is ambiguous, std:
    :mbstate_t and std::mbstate_t.
    4 Error(s) detected.
    The program listing of Hello.cpp:
    ----------------------------------------------------#include<iostream.h>
    int main()
    cout << "Hello World";
    return 0;

    I've been able to compile this program fine on Solaris 8 with Forte Developer 6 Update 2. The exact version+patches is: CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-04 2001/12/13
    I've also compiled with Workshop 5.0, and the code works fine. This is on Solaris 8 with the following compiler version+patches:
    CC: WorkShop Compilers 5.0 01/12/04 C++ 5.0 Patch 107311-16
    Let me know if you have any questions.
    -Moazam

  • Compilation Error while using string (Please help)

    Hi,
    I am using "Sun WorkShop Compiler C++ SPARC Version 5.000". Compiling code which contains a "string variable" throws the following error:
    "/opt/WS5/SC5.0/include/CC/./new", line 32: Error: The prior declaration for ope
    rator new(unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 34: Error: The prior declaration for ope
    rator delete(void*) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 36: Error: The prior declaration for ope
    rator new[](unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 38: Error: The prior declaration for ope
    rator delete[](void*) has no exception specification.
    4 Error(s) detected.
    The command used for compilation is :
    /opt/WS5/bin/CC -compat=4 -I/opt/WS5/SC5.0/include/CC -features=%all try.cpp
    Would help if I could get some comments on the above.
    Thanks and Regards,
    M Shetty

    There is a requirement that I use the Workshop 5.0
    compilere with option "-compat=4".
    The program I am trying to compile contains:
    #include <string>
    int main()
    string test = "aaa";
    return 0;
    There is no "string" in "-compat=4". You need to
    do something like this:
    // --- start test.cc ---
    #include <rw/cstring.h>
    int main()
    RWCString test = "aaa";
    return 0;
    // --- end test.cc ---
    CC -compat=4 -library=rwtools7 test.cc

  • Error on solaris

    Can anyone help me with this
    Hi all,
    I was facing a strange error while trying to run build after the "make depend" and "make all" was sucessful in solaris 5.4.
    When I tried to attach dbx and run the build on solaris 5.4 release , it shows a wrong a memory address which is cascaded and dumps . Neither of the memory is freed.
    dbx: cannot access address 0xffffffffffffffd4
    When I tried to run with purify it shows:
    UMR: Uninitialized memory read:
    * This is occurring while in:
    _writev [libc.so.1]
    ts_tcp_writev [ts_tcp.c:401]
    ts_send [trans.c:512]
    check_pending_writes [perm.c:956]
    PermPoll [perm.c:2233]
    flush_perm [cfg.c:839]
    * Reading 2092 bytes from 0xff322fdc (misaligned) between the heap and the stack (2060 bytes at 0xff322ffc uninit).
    * Address 0xff322fdc is global variable "pack_buff".
    This is defined in perm.c.
    SBW: Stack array bounds write:
    * This is occurring while in:
    memcpy [rtlib.o]
    smcallback [mgmt_sm.c:2415]
    MakeCallback [perm.c:1814]
    client_read [perm_client.c:295]
    ts_poll [ts_poll.c:336]
    PermPoll [perm.c:2263]
    * Writing 2000 bytes to 0xffbed130.
    * Frame pointer 0xffbed530
    * Address 0xffbed130 is local variable "mymsg" in function smcallback.
    MSE: Memory segment error:
    * This is occurring while in:
    MakeCallback [perm.c:1826]
    * Accessing a memory range that crosses a memory segment boundary.
    Addressing 0xffffffdc for 4 bytes ending at 0xffffffe0,
    which is neither in the heap nor the main stack.
    COR: Fatal core dump:
    * This is occurring while in:
    MakeCallback [perm.c:1826]
    * Received signal 11 (SIGSEGV - Segmentation Fault)
    * Faulting address = 0xffffffdc
    * Signal mask: (SIGSEGV)
    * Pending signals:
    Purify: Searching for all memory leaks...
    Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)
    Purify Heap Analysis (combining suppressed and unsuppressed blocks)
    Blocks Bytes
    Leaked 0 0
    Potentially Leaked 1 8200
    In-Use 282 970327
    Total Allocated 283 978527
    Can anybody please let me know :
    1.why this happens and why this error occurs.
    Accessing a memory range that crosses a memory segment boundary.
    Addressing 0xffffffdc for 4 bytes ending at 0xffffffe0,
    which is neither in the heap nor the main stack.
    2. Why this cascading of memory address is happening.
    null

    What compiler are you using?
    The Calendar SDK (9.0.4.2) is built and certified using Sun Workshop 5.0. It's possible (even likely) that using a compiler with a different major version number will cause problems due to the different runtime environments.
    Graham

  • Deprecated API compilation error

    Please help. Attached is my source code. I'm receiving a compilation error that reads 'RnrBooksApp.java uses or overrides a deprecated API. Recompile with -deprecation for details.' I'm very new to Java, so I appreciate any assistance. Thank you!
    //ClassName: RnrBooksApp
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    public class RnrBooksApp extends Frame implements ItemListener, ActionListener
         //Declare database variables
         Connection conBook;
         Statement cmdBook;
         ResultSet rsBook;
         boolean blnSuccessfulOpen = false;
         //Declare components
         Choice lstBooks               = new Choice();
         TextField txtISBN          = new TextField(13);
         TextField txtTitle          = new TextField(50);
         TextField txtAuthor = new TextField(30);
         TextField txtPublisher     = new TextField(30);
         Button btnAdd      = new Button("Add");
         //Button btnUpdate = new Button("Update");
         Button btnEdit     = new Button("Save");
         Button btnCancel = new Button("Cancel");
         Button btnDelete = new Button("Delete");
         Label lblMessage = new Label(" ");
         public static void main(String args[])
              //Declare an instance of this application
              RnrBooksApp thisApp = new RnrBooksApp();
              thisApp.createInterface();
         public void createInterface()
              //Load the database and set up the frame
              loadDatabase();
              if (blnSuccessfulOpen)
                   //Set up frame
                   setTitle("Books Database");
                   addWindowListener(new WindowAdapter()
                                  public void windowClosing(WindowEvent event)
                                  stop();
                                  System.exit(0);
                   setLayout(new BorderLayout());
                   //Set up top panel
                   Panel pnlTop = new Panel(new GridLayout(2, 2, 10, 10));
                   pnlTop.add(new Label("ISBN"));
                   lstBooks.insert("Select a Book to Display", 0);
                   lstBooks.addItemListener(this);
                   pnlTop.add(lstBooks);
                   pnlTop.add(new Label(" "));
                   add(pnlTop, "North");
                   //Set up center panel
                   Panel pnlMiddle = new Panel(new GridLayout(5, 2, 10, 10));
                   pnlMiddle.getInsets();
                   pnlMiddle.add(new Label("ISBN"));
                   pnlMiddle.add(txtISBN);
                   pnlMiddle.add(new Label("Title"));
                   pnlMiddle.add(txtTitle);
                   pnlMiddle.add(new Label("Author"));
                   pnlMiddle.add(txtAuthor);
                   pnlMiddle.add(new Label("Publisher"));
                   pnlMiddle.add(txtPublisher);
                   setTextToNotEditable();
                   Panel pnlLeftButtons = new Panel(new GridLayout(0, 2, 10, 10));
                   Panel pnlRightButtons = new Panel(new GridLayout(0, 2, 10, 10));
                   pnlLeftButtons.add(btnAdd);
                   btnAdd.addActionListener(this);
                   pnlLeftButtons.add(btnEdit);
                   btnEdit.addActionListener(this);
                   pnlRightButtons.add(btnDelete);
                   btnDelete.addActionListener(this);
                   pnlRightButtons.add(btnCancel);
                   btnCancel.addActionListener(this);
                   btnCancel.setEnabled(false);
                   pnlMiddle.add(pnlLeftButtons);
                   pnlMiddle.add(pnlRightButtons);
                   add(pnlMiddle, "Center");
                   //Set up bottom panel
                   add(lblMessage, "South");
                   lblMessage.setForeground(Color.red);
                   //Display the frame
                   setSize(400, 300);
                   setVisible(true);
              else
                   stop(); //Close any open connection
                   System.exit(-1); //Exit with error status
         public Insets insets()
              //Set frame insets
              return new Insets(40, 15, 15, 15);
         public void loadDatabase()
              try
                   //Load the Sun drivers
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              catch (ClassNotFoundException err)
                   try
                   //Load the Microsoft drivers
                   Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
                   catch (ClassNotFoundException error)
                   System.err.println("Drivers did not load properly");
              try
                   //Connect to the database
                   conBook = DriverManager.getConnection("jdbc:odbc:Book");
                   //Create a ResultSet
                   cmdBook = conBook.createStatement();
                   rsBook = cmdBook.executeQuery(
                        "Select * from Book;");
                   loadBooks(rsBook);
                   blnSuccessfulOpen = true;
              catch(SQLException error)
                   System.err.println("Error: " + error.toString());
         public void loadBooks(ResultSet rsBook)
              //Fill ISBN list box
              try
                   while(rsBook.next())
                   lstBooks.add(rsBook.getString("ISBN"));
              catch (SQLException error)
                   System.err.println("Error in Display Record." + "Error: " + error.toString());
         public void itemStateChanged(ItemEvent event)
              //Retrieve and display the selected record
              String strISBN = lstBooks.getSelectedItem();
              lblMessage.setText(""); //Delete instructions
              try
                   rsBook = cmdBook.executeQuery(
                        "Select * from Book where [ISBN] = '"
                        + strISBN + "';");
                   txtISBN.setText(strISBN);
                   displayRecord(rsBook);
                   setTextToEditable();
              catch(SQLException error)
                   lblMessage.setText("Error in result set. " + "Error: " + error.toString());
         public void displayRecord(ResultSet rsBook)
              //Display the current record
              try
                   if(rsBook.next())
                        txtTitle.setText(rsBook.getString("Title"));
                        txtAuthor.setText(rsBook.getString("Author"));
                        txtPublisher.setText(rsBook.getString("Publisher"));
                        lblMessage.setText("");
                   else
                        lblMessage.setText("Record not found");
                        clearTextFields();
              catch (SQLException error)
                   lblMessage.setText("Error: " + error.toString());
         public void actionPerformed(ActionEvent event)
              //Test the command buttons
              Object objSource = event.getSource();
              if(objSource == btnAdd && event.getActionCommand () == "Add")
                   Add();
              else if (objSource == btnAdd)
                   Save();
              else if(objSource == btnEdit)
                   Edit();
              else if(objSource == btnDelete)
                   Delete();
              else if(objSource == btnCancel)
                   Cancel();
         public void setTextToNotEditable()
              //Lock the text fields
              txtISBN.setEditable(false);
              txtTitle.setEditable(false);
              txtAuthor.setEditable(false);
              txtPublisher.setEditable(false);
         public void setTextToEditable()
              //Unlock the text fields
              txtISBN.setEditable(true);
              txtTitle.setEditable(true);
              txtAuthor.setEditable(true);
              txtPublisher.setEditable(true);
         public void clearTextFields()
              //Clear the text fields
              txtISBN.setText("");
              txtTitle.setText("");
              txtAuthor.setText("");
              txtPublisher.setText("");
         public void Add()
              //Add a new record
              lblMessage.setText(" ");     //Clear previous message
              setTextToEditable();                //Unlock the text fields
              clearTextFields();                //Clear text field contents
              txtISBN.requestFocus ();
              //Set up the OK and Cancel buttons
              btnAdd.setLabel("OK");
              btnCancel.setEnabled(true);
              //Disable the Delete and Edit buttons
              btnDelete.setEnabled(false);
              btnEdit.setEnabled(false);
         public void Save()
                        //Save the new record
                        // Activated when the Add button has an "OK" label
                        if (txtISBN.getText().length ()== 0 || txtAuthor.getText().length() == 0)
                             lblMessage.setText("The ISBN or Author is blank");
                        else
                             try
                                  cmdBook.executeUpdate("Insert Into Book "
                                            + "([ISBN], [Title], [Author], [Publisher]) "
                                            + "Values('"
                                            + txtISBN.getText() + "', '"
                                            + txtTitle.getText() + "', '"
                                            + txtAuthor.getText() + "', '"
                                            + txtPublisher.getText() + "')");
                                  //Add to name list
                                  lstBooks.add(txtISBN.getText());
                                  //Reset buttons
                                  Cancel();
                             catch(SQLException error)
                                  lblMessage.setText("Error: " + error.toString());
         public void Delete()
                        //Delete the current record
                        int intIndex = lstBooks.getSelectedIndex();
                        String strISBN = lstBooks.getSelectedItem();
                        if(intIndex == 0)          //Make sure a record is selected
                                                      //Position 0 holds a text message
                             lblMessage.setText("Please select the record to be deleted");
                        else
                             //Delete the record from the database
                             try
                                  cmdBook.executeUpdate(
                                       "Delete from Book where [ISBN] = '" + strISBN + "';");
                                  clearTextFields();               //Delete from screen
                                  lstBooks.remove(intIndex);          //Delete from list
                                  lblMessage.setText("Record deleted");     //Display message
                             catch(SQLException error)
                                  lblMessage.setText("Error during Delete."
                                       + "Error: " + error.toString());
         public void Cancel()
                        //Enable the Delete and Edit buttons
                        btnDelete.setEnabled(true);
                        btnEdit.setEnabled(true);
                        //Disable the Cancel button
                        btnCancel.setEnabled(false);
                        //Change caption of button
                        btnAdd.setLabel("Add");
                        //Clear the text fields and status bar
                        clearTextFields();
                        lblMessage.setText("");
         public void Edit()
                        //Save the modified record
                        int intIndex = lstBooks.getSelectedIndex();
                        if(intIndex == 0)          //Make sure a record is selected
                                                      //Position 0 holds a text message
                             lblMessage.setText("Please select the record to change");
                        else
                             String strISBN = lstBooks.getSelectedItem();
                             try
                                  cmdBook.executeUpdate("Update Book "
                                       + "Set [ISBN] = '" + txtISBN.getText() + "', "
                                       + "[Title] = '" + txtTitle.getText() + "', "
                                       + "[Author] = '" + txtAuthor.getText() + "', "
                                       + "[Publisher] = '" + txtPublisher.getText() + "' "
                                       + "Where [ISBN] = '" + strISBN + "';");
                                  if (!strISBN.equals(txtISBN.getText()))
                                       //Last name changed; change the list
                                       lstBooks.remove(intIndex); //Remove the old entry
                                       lstBooks.add(txtISBN.getText()); //Add the new entry
                             catch(SQLException error)
                                  lblMessage.setText("Error during Edit. " + "Error: " + error.toString());
         public void stop()
              //Terminate the connection
              try
                   if (conBook != null)
                   conBook.close();
              catch(SQLException error)
                   lblMessage.setText("Unable to disconnect");

    How DO you compile then?
    If you don't type "javac", you must be using an IDE.
    In your IDE there should be some kind of configuration
    tab or option for "compiler options" or compilation options
    or compiler arguments... something like that.
    put "-deprecation" in that text box and recompile.
    Your compiler should tell you all about which methods
    are deprecated -- you then go to your trust JavaDocs
    and lookup those methods in the API and read WHY they
    are deprecated (i.e. OLD, outdated, defunct, no longer used)
    and what you should use instead. Then, correct your
    code to no longer use the deprecated methods and instead
    do things as suggested in the deprecation comments.

  • Install OpenSSH using Sun SSH

    Hi.
    I have been asked to determine whether the following is possible:
    1) Remote connect to a Solaris 10 box using Sun SSH 1.1.3
    2) Install OpenSSH 5.9 on the Solaris 10 box
    3) Connect to the box using OpenSSH
    4) Uninstall Sun SSH 1.1.3
    So before I start....
    Does anyone know if this is (im)possible ?
    Does anyone think that this is (im)possible ?
    I have found some info. about installing two different versions of
    OpenSSH on the one box.
    Thanks,
    Brett Morgan

    Thanks for all your help.
    It is a requirement for a vendor's software.
    I do not know why but it may be because of the usage of the svcadm interface for Solaris 10 SunSSH.
    Their software may expect scripts in /etc/init.d, files /etc/hosts.allow, /etc/hosts.deny etc.
    Incidentially how do you use svcadm to allow/deny hosts that can/cannot ssh (SunSSH) connect ?
    I know that SunSSH is supposed to "respect" the files /etc/hosts.allow and /etc/hosts.deny which I think means read them if they are there ?
    Does the SunSSH sshd need to be restarted to pick up changes to /etc/hosts.allow and /etc/hosts.deny ?
    Can you use svcadm and have no /etc/hosts.allow or /etc/hosts.deny ? (but for SunSSH only)
    I have got the error "ssh_exchange_identification" connecting to the OpenSSH sshd using port 8082 which I am hoping is an /etc/hosts.allow or /etc/hosts.deny issue so I shall create these files for OpenSSH sshd.
    So I am curious how SunSSH sshd handles host allow/deny.
    Does SunSSH use tcp_wrappers ?
    If not, I need to install tcp_wrappers for OpenSSH.
    Could the installation of tcp_wrappers break SunSSH ?
    I shall have at look at the Solaris 10 SystemAdministration Guide: Security Services doco.
    Thanks again for all your help.

  • Redirecting java compilation errors to a file

    Hi,
    How do I redirect java compilation errors to a file while using a dos environment ? Help needed asap.
    Gayathri

    javac FileName.java 2> errorFileName

  • SUN Workshop 6U2 Debugger Problem

    Hi,
    I am using SUN Solaris 8 platform for our Application Prog. Development with SUN Forte 6 U2 C Compiler. However after successful build, whenever I am trying to run & debug any of the Application Prog. using SUN Workshop 6U2 dbx tool (using Xterm GUI Env), it is always throwing the following error and getting aborted:
    (dbx) debug - 21314 <-- this is one of our application prog PID
    There might be too many LWP's in this process.
    See `help dbxenv' under mt_scalable.
    dbx: Cannot open lwpstatus.
    detaching from process 21314
    However any of the application prog.s if I run without dbx is running successfully. I also tried to set the dbxenv parameter "mt_scalable" to "on" (which by default is always set to "off") but it didn't work. And I have verified that, all the "lwpstatus" files are there properly in the "/proc/<PID>/lwp/..." path for every process that I tried to debug.
    It would be great if anyone can help me out on how to resolve this issue while trying to use Sun dbx 6�.
    Thanks.

    Hi,
    I am using SUN Solaris 8 platform for our Application Prog. Development with SUN Forte 6 U2 C Compiler. However after successful build, whenever I am trying to run & debug any of the Application Prog. using SUN Workshop 6U2 dbx tool (using Xterm GUI Env), it is always throwing the following error and getting aborted:
    (dbx) debug - 21314 <-- this is one of our application prog PID
    There might be too many LWP's in this process.
    See `help dbxenv' under mt_scalable.
    dbx: Cannot open lwpstatus.
    detaching from process 21314
    However any of the application prog.s if I run without dbx is running successfully. I also tried to set the dbxenv parameter "mt_scalable" to "on" (which by default is always set to "off") but it didn't work. And I have verified that, all the "lwpstatus" files are there properly in the "/proc/<PID>/lwp/..." path for every process that I tried to debug.
    It would be great if anyone can help me out on how to resolve this issue while trying to use Sun dbx 6�.
    Thanks.

  • Compilation error while building boost 1_44_0 on Solaris (Sun Studio 10)

    Hi All, I am trying to build boost version 1_44_0 on Solaris.The Solaris box has Sun Studio 10 installed.
    The compiler details are
    bash-2.05$ CC -V
    CC: Sun C++ 5.7 2005/01/07
    I am using the following command to build boost libraries
    *bash-2.05$ bjam --build-dir=/export/home/dfdev/Boost_1_44_0/boost_1_44_0/tmp/build-boost toolset=sun stage*
    But i get the below compilation errors, not even one of the projects build
    sun.compile.c++ /export/home/dfdev/Boost_1_44_0/boost_1_44_0/tmp/build-boost/boo
    st/bin.v2/libs/iostreams/build/sun/release/stdlib-sun-stlport/threading-multi/fi
    le_descriptor.o
    Notice: The Early Access serial number will expire in -7 days.
    In order to purchase the product, visit http://www.sun.com/forte/buy.html
    or contact your Forte Tools reseller.
    "libs/iostreams/src/file_descriptor.cpp", line 352: Error: Could not find boost:
    :shared_ptr<boost::iostreams::detail::file_descriptor_impl>::shared_ptr(boost::i
    ostreams::detail::file_descriptor_impl*) to initialize pimpl_.
    "libs/iostreams/src/file_descriptor.cpp", line 355: Error: Could not find boost:
    :shared_ptr<boost::iostreams::detail::file_descriptor_impl>::shared_ptr(boost::i
    ostreams::detail::file_descriptor_impl*) to initialize pimpl_.
    "libs/iostreams/src/file_descriptor.cpp", line 360: Error: Could not find boost:
    :shared_ptr<boost::iostreams::detail::file_descriptor_impl>::shared_ptr(boost::i
    ostreams::detail::file_descriptor_impl*) to initialize pimpl_.
    "libs/iostreams/src/file_descriptor.cpp", line 380: Error: Could not find boost:
    :shared_ptr<boost::iostreams::detail::file_descriptor_impl>::shared_ptr(boost::i
    ostreams::detail::file_descriptor_impl*) to initialize pimpl_.
    "libs/iostreams/src/file_descriptor.cpp", line 385: Error: Could not find boost:
    :shared_ptr<boost::iostreams::detail::file_descriptor_impl>::shared_ptr(boost::i
    ostreams::detail::file_descriptor_impl*) to initialize pimpl_.
    "libs/iostreams/src/file_descriptor.cpp", line 393: Error: Using static_cast to
    convert from boost::iostreams::file_descriptor_flags to boost::iostreams::detail
    ::file_descriptor_impl::flags not allowed.
    6 Error(s) detected.
    "CC" -library=stlport4 -xO4 -mt -erroff=%none -KPIC -DBOOST_ALL_NO_LIB=1 -DB
    OOST_IOSTREAMS_DYN_LINK=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG -I"." -c -o
    "/export/home/dfdev/Boost_1_44_0/boost_1_44_0/tmp/build-boost/boost/bin.v2/libs/
    iostreams/build/sun/release/stdlib-sun-stlport/threading-multi/file_descriptor.o
    " "libs/iostreams/src/file_descriptor.cpp"
    ...failed sun.compile.c++ /export/home/dfdev/Boost_1_44_0/boost_1_44_0/tmp/build
    -boost/boost/bin.v2/libs/iostreams/build/sun/release/stdlib-sun-stlport/threadin
    g-multi/file_descriptor.o...
    sun.compile.c++ /export/home/dfdev/Boost_1_44_0/boost_1_44_0/tmp/build-boost/boo
    st/bin.v2/libs/iostreams/build/sun/release/stdlib-sun-stlport/threading-multi/ma
    pped_file.o
    Notice: The Early Access serial number will expire in -7 days.
    In order to purchase the product, visit http://www.sun.com/forte/buy.html
    or contact your Forte Tools reseller.
    "./boost/type_traits/is_array.hpp", line 41: Error: Multiple declaration for boo
    st::is_array.
    "./boost/type_traits/is_array.hpp", line 42: Error: Multiple declaration for boo
    st::is_array.
    "./boost/type_traits/is_array.hpp", line 43: Error: Multiple declaration for boo
    st::is_array.
    "./boost/type_traits/is_array.hpp", line 44: Error: Multiple declaration for boo
    st::is_array.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 95: Error: The type
    of specialized argument boost::mpl::aux::F<boost::mpl::aux::P1> is dependent on
    another argument.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 95: Error: Partial s
    pecialization parameter Tag is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 112: Error: Partial
    specialization parameter F is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 172: Error: The type
    of specialized argument boost::mpl::aux::F<boost::mpl::aux::P1, boost::mpl::aux
    ::P2> is dependent on another argument.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 172: Error: Partial
    specialization parameter Tag is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 189: Error: Partial
    specialization parameter F is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 254: Error: The type
    of specialized argument boost::mpl::aux::F<boost::mpl::aux::P1, boost::mpl::aux
    ::P2, boost::mpl::aux::P3> is dependent on another argument.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 254: Error: Partial
    specialization parameter Tag is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 271: Error: Partial
    specialization parameter F is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 339: Error: The type
    of specialized argument boost::mpl::aux::F<boost::mpl::aux::P1, boost::mpl::aux
    ::P2, boost::mpl::aux::P3, boost::mpl::aux::P4> is dependent on another argument
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 339: Error: Partial
    specialization parameter Tag is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 357: Error: Partial
    specialization parameter F is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 427: Error: The type
    of specialized argument boost::mpl::aux::F<boost::mpl::aux::P1, boost::mpl::aux
    ::P2, boost::mpl::aux::P3, boost::mpl::aux::P4, boost::mpl::aux::P5> is dependen
    t on another argument.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 427: Error: Partial
    specialization parameter Tag is not used in the arguments.
    "./boost/mpl/aux_/preprocessed/plain/full_lambda.hpp", line 445: Error: Partial
    specialization parameter F is not used in the arguments.
    "libs/iostreams/src/mapped_file.cpp", line 441: Error: Could not find boost::sha
    red_ptr<boost::iostreams::detail::mapped_file_impl>::shared_ptr(boost::iostreams
    ::detail::mapped_file_impl*) to initialize pimpl_.
    20 Error(s) detected.
    Am i missing something? I will appreciate your input's.
    Regards,
    solarisneo

    C++ 5.7 will not give good results building Boost.
    Support for boost began with C++ 5.9 (Sun Studio 12), but you will get better results using the current release, Sun Studio 12 update 1, and better still with the upcoming release, Oracle Solaris Studio 12.2.

Maybe you are looking for

  • How to select multiple rows from List Of Values

    Hello, I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't. so how i can select many rows to set them in my adf table. Thank in advance

  • How can I delete duplicate music albums from my iPad 2?

    After installing iOS 7, I needed to sync some itunes music to my iPad2.  After running the sync process, I wound up with 64 albums instead of the 24 listed in my itunes account.  For some very strange reason, the music albums were duplicated (I am NO

  • How do i stop my iphone from automatically transferring purchases from iphone to computer?

    I purchase songs and convert them to mp3 and then delete AAC files so as to not have duplicates which I've done for years since the new update the iphone automatically transfers all the AAC files from the iphone thus creating duplicates I have tried

  • Scrolling Logos Horizontally

    I'm looking to find a tutorial and some information about setting up a small flash piece for a website that, when loaded, will be able to display x-number of logos that are slowly moving from top to bottom in a loop. When the cursor goes over that ar

  • How to link MM & FICO Tables

    Hi, I have a requirement to extract the data from the transaction FBL1N ( i.e. from BSIK & BSAK) to get the details of XBLNR-Reference Document & WRBTR-Amount in Document Currency to display in the MM-Purchasing reports. In MM-Purchasing tables we ar