Multiple SQL_HANDLE_DBC handles do not work on Linux

Hello,
I am seeing the following error from the SQL Server Driver For Linux when I attempt to execute a query on a SECOND connection within my application:
SQLSTATE: IM001
Native Error Code: 0
Message: [unixODBC][Driver Manager]Driver does not support this function
I have compiled/run the test case I have on Windows and the code executes without issue.
Here is my test case:
// SQLGetData.cpp
// g++ -M64 -I$ODBC/include -L$ODBC/lib -g -lodbc sqlgetdata.cpp
// cl sqlgetdata2.cpp odbc32.lib
// CREATE TABLE tstDFRBLB(col1 varbinary(max))
#if defined(_WIN32)
#include <windows.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <sql.h>
#include <sqlext.h>
void checkError ( SQLRETURN rc, const char *cstr )
if( rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO ) {
return ;
} else if( rc == SQL_INVALID_HANDLE ) {
fprintf( stderr, "Error: invalid handle: %s.\n", cstr ) ;
} else {
fprintf( stderr, "Unknown Error occured in %s: code %d.\n", cstr, rc ) ;
void checkStmtError( SQLRETURN rc, SQLHSTMT stmth )
if(rc != SQL_SUCCESS) {
int i = 1 ;
SQLSMALLINT length;
SQLINTEGER sqlcode;
SQLCHAR *sqlstate = (SQLCHAR *) malloc(100 * sizeof(SQLCHAR));
SQLCHAR *message = (SQLCHAR *) malloc(1000 * sizeof(SQLCHAR));
while ( SQLGetDiagRec( SQL_HANDLE_STMT, stmth, i, sqlstate, &sqlcode,
message, 1000, &length ) == SQL_SUCCESS ) {
printf( "\nSQLSTATE: %s\n", sqlstate ) ;
printf( "Native Error Code: %ld\n", sqlcode ) ;
printf( "Message: %s\n", message ) ;
i++ ;
delete sqlstate;
delete message;
int main( int ac, char **av )
SQLHENV envh ;
SQLHDBC dbch ;
SQLHDBC dbch2 ;
SQLRETURN rc ;
SQLHSTMT stmth ;
const char *select_stmt = "SELECT * FROM tstDFRBLB" ;
/* Allocate a environment handl */
rc = SQLAllocHandle( SQL_HANDLE_ENV, // Handle type
SQL_NULL_HANDLE,
&envh // SQLHENV handle (environment)
checkError( rc, "SQLAllocHandle - SQL_HANDLE_ENV" ) ;
/* Set environment attributes */
rc = SQLSetEnvAttr( envh, // Environment handle
SQL_ATTR_ODBC_VERSION, // Attribute to set
(SQLPOINTER) SQL_OV_ODBC3,// New attribute
SQL_NTS // SQL_NTS (null terminated)
checkError( rc, "SQLSetEnvAttr" ) ;
/* Allocate a database connection handle */
rc = SQLAllocHandle( SQL_HANDLE_DBC, // Handle Type
envh, // Where to attatch the new handle
&dbch // Pointer to new handle
checkError( rc, "SQLAllocHandle - SQL_HANDLE_DBC" ) ;
/* Establish a connection */
SQLCHAR outStr[1024];
SQLSMALLINT outSize;
rc = SQLDriverConnect(dbch, NULL,
#if defined(_WIN32)
(SQLCHAR*)"DSN=MSSQL_2012_NC_64;UID=*****;PWD=*****;DATABASE=qe1;", 57,
#else
(SQLCHAR*)"DSN=mssql-2012-md_64;UID=*****;PWD=*****;DATABASE=qe1;", 57,
#endif
outStr, sizeof(outStr), &outSize, SQL_DRIVER_NOPROMPT);
/* Allocate a second database connection handle */
rc = SQLAllocHandle( SQL_HANDLE_DBC, // Handle Type
envh, // Where to attatch the new handle
&dbch2 // Pointer to new handle
checkError( rc, "SQLAllocHandle - SQL_HANDLE_DBC" ) ;
rc = SQLSetConnectAttr(dbch2,
SQL_ODBC_CURSORS,
(SQLPOINTER)SQL_CUR_USE_DRIVER,
(SQLINTEGER)NULL); // this value is ignored
checkError( rc, "SQLSetConnectAttr - SQL_ODBC_CURSORS" ) ;
rc = SQLDriverConnect(dbch2, NULL,
#if defined(_WIN32)
(SQLCHAR*)"DSN=MSSQL_2012_NC_64;UID=*****;PWD=*****;DATABASE=qe1;", 57,
#else
(SQLCHAR*)"DSN=mssql-2012-md_64;UID=*****;PWD=*****;DATABASE=qe1;", 57,
#endif
outStr, sizeof(outStr), &outSize, SQL_DRIVER_NOPROMPT);
rc = SQLAllocHandle( SQL_HANDLE_STMT, dbch2, &stmth ) ;
checkError( rc, "SQLAllocHandle - SQL_HANDLE_STMT" ) ;
** Read the value back
rc = SQLExecDirect( stmth, (SQLCHAR*)select_stmt, SQL_NTS ) ;
checkStmtError( rc, stmth );
char outWData[168000];
SQLLEN outInd = 0;
while ( SQLFetch( stmth ) == SQL_SUCCESS )
rc = SQLGetData( stmth, 1, SQL_C_BINARY, outWData, sizeof(outWData), &outInd );
checkStmtError( rc, stmth );
if(outInd == SQL_NULL_DATA) {
printf("Data Returned: NULL\n");
else {
printf("Data Returned Length %d\n", outInd);
rc = SQLMoreResults(stmth);
checkStmtError( rc, stmth );
/* Disconnect from the database */
rc = SQLDisconnect( dbch2 ) ;
checkError( rc, "SQLDisconnect" ) ;
/* Free connection and environment handles */
rc = SQLFreeHandle( SQL_HANDLE_DBC, dbch2 ) ;
checkError( rc, "SQLDisconnect" ) ;
/* Disconnect from the database */
rc = SQLDisconnect( dbch ) ;
checkError( rc, "SQLDisconnect" ) ;
/* Free connection and environment handles */
rc = SQLFreeHandle( SQL_HANDLE_DBC, dbch ) ;
checkError( rc, "SQLDisconnect" ) ;
SQLFreeHandle( SQL_HANDLE_ENV, envh ) ;
checkError( rc, "SQLDisconnect" ) ;
return EXIT_SUCCESS ;
Thank you for any help/advice.
Dave
David Ritter

Hi David,
According to your description, the code running smoothly in windows, and getting this problem when using SQL Server driver for linux.
So, what's the version of your SQL Server driver for linux?
As per the error message, the function is not supported, so could you please check the configuration of the driver or there are some limitation in the driver you used?
Please follow these links to have a check:
The ODBC Driver 11 for SQL Server on 64-bit Red Hat Enterprise Linux 5 and 64-bit Red Hat Enterprise Linux 6.
You can download the ODBC driver for Red Hat at
Microsoft ODBC Driver for SQL Server.
The ODBC Driver 11 for SQL Server on 64-bit SUSE Linux Enterprise 11 Service Pack 2. This driver is currently available as a Community Technology Preview (CTP).
You can download the ODBC driver for SUSE Linux at
Microsoft ODBC Driver 11 for SQL Server on SUSE Linux.
If you have any feedback on our support, please click
here.
Iric Wen
TechNet Community Support

Similar Messages

  • JCombox does not work under linux (fedora) could you help me???

    Hi All,
    I am implementing a GUI for a linux application. This GUI works fine under windows system. But the JCombobox does not work under Linux system. Would you help me to solve it? Thank you very much!..
    The problem is that I cannot select any other item except the first item in the dropdown box of JCombobox. There is no event generated when I click the combobox, while events are generated for other Buttons.
    This problem exists for the following code when I maximize the window. When the window is minimize to some extend in my problem, it is OK.
    Here is the simplify code:
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.Serializable;
    import java.util.Vector;
    import javax.swing.ComboBoxModel;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.event.ListDataEvent;
    import javax.swing.event.PopupMenuEvent;
    import javax.swing.event.PopupMenuListener;
    import java.awt.event.*;
    import javax.swing.*;
    //carmen
    import javax.swing.filechooser.*;
    import javax.swing.event.*;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.border.*;
    //import AlwaysSelectableComboBoxDemo.AlwaysSelectableComboBox;
    //import AlwaysSelectableComboBoxDemo.AlwaysSelectableComboBox;
    import java.io.*;
    import java.util.*;
    import java.lang.String.*;
    public class Test extends JFrame
         private JComboBox jComboBox1;
         private JComboBox jComboBox2;
         private JPanel contentPane;
         private JTabbedPane jTabbedPane1;
         //Main Tab
         private JPanel Main;
         private JPanel OutputSimSet;
         private JPanel Test;
         private JPanel ScriptGenTab;
         private JPanel ResultTab;
    //Result Tab
    private JPanel SimResult;
         public Test()
              super();
              //initializeComponent();
              contentPane = (JPanel)this.getContentPane();
              jTabbedPane1 = new JTabbedPane();
              Main = new JPanel();
              OutputSimSet = new JPanel();
              Test = new JPanel();
              ScriptGenTab = new JPanel();
              ResultTab = new JPanel();
              SimResult = new JPanel();
         jComboBox1 = new JComboBox(
                        new String[]{"Item 1","Item 2", "Item 3"});
                        jComboBox1.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                        System.out.println("Yeah");
         jComboBox2 = new JComboBox(
                                  new String[]{"Item 1","Item 2", "Item 3"});
                                  jComboBox2.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent ae) {
                                  System.out.println("Yeah");
              // jTabbedPane1
              jTabbedPane1.addTab("Main", Main);
              jTabbedPane1.addTab("ScriptGenerator", ScriptGenTab);
              jTabbedPane1.addTab("Simulation Result", ResultTab);
              jTabbedPane1.addChangeListener(new ChangeListener() {
                   public void stateChanged(ChangeEvent e)
                        jTabbedPane1_stateChanged(e);
              // contentPane
              contentPane.setLayout(new BorderLayout(0, 0));
              contentPane.add(jTabbedPane1, BorderLayout.CENTER);
              // Main
              //Main.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              Main.setLayout(new BorderLayout(0, 0));
              Main.add(OutputSimSet,BorderLayout.NORTH);
              OutputSimSet.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              OutputSimSet.add(Test, 0);
              Test.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              Test.add(jComboBox1,0);
              //ResultTab
              ResultTab.setLayout(new BorderLayout(0, 0));
              ResultTab.setBorder(new TitledBorder(""));
              ResultTab.add(SimResult, BorderLayout.NORTH);
              SimResult.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              SimResult.add(jComboBox2,0);
              // Test
              this.setTitle("Test");
              this.setLocation(new Point(0, 0));
              this.setSize(new Dimension(600, 500));
              this.setVisible(true);
         public void initializeComponent()
         /** Add Component Without a Layout Manager (Absolute Positioning) */
         private void addComponent(Container container,Component c,int x,int y,int width,int height)
              c.setBounds(x,y,width,height);
              container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jTabbedPane1_stateChanged(ChangeEvent e)
              System.out.println("\njTabbedPane1_stateChanged(ChangeEvent e) called.");
              // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jComboBox1_actionPerformed(ActionEvent e)
              System.out.println("\njComboBox1_actionPerformed(ActionEvent e) called.");
              Object o = jComboBox1.getSelectedItem();
              System.out.println(">>" + ((o==null)? "null" : o.toString()) + " is selected.");
              // TODO: Add any handling code here for the particular object being selected
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Create and set up the window.
    Test frame = new Test();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }

    package oct03_JCBox;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class Test extends JFrame
    private JComboBox jComboBox1;
    private JComboBox jComboBox2;
    private JPanel contentPane;
    private JTabbedPane jTabbedPane1;
    //Main Tab
    private JPanel Main;
    //private JPanel OutputSimSet;
    //private JPanel Test;
    private JPanel ScriptGenTab;
    private JPanel ResultTab;
    //Result Tab
    //private JPanel SimResult;
    public Test()
         super();
         //initializeComponent();
         contentPane = (JPanel)this.getContentPane();
         jTabbedPane1 = new JTabbedPane();
         Main = new JPanel();
         ScriptGenTab = new JPanel();
         ResultTab = new JPanel();
    //     OutputSimSet = new JPanel();
    //     Test = new JPanel();
    //     SimResult = new JPanel();
         jComboBox1 = new JComboBox(
         new String[]{"Item 1","Item 2", "Item 3"});
         jComboBox1.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent ae) {
              System.out.println("Yeah");
         jComboBox2 = new JComboBox(
         new String[]{"Item 1","Item 2", "Item 3"});
         jComboBox2.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent ae) {
                   System.out.println("Yeah");
         // Main
         //Main.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
         Main.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
         Main.add(jComboBox1);
         //ResultTab  -----     
         ResultTab.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
         ResultTab.add(jComboBox2);
        //      jTabbedPane1
         jTabbedPane1.addTab("Main", Main);
         jTabbedPane1.addTab("ScriptGenerator", ScriptGenTab);
         jTabbedPane1.addTab("Simulation Result", ResultTab);
         jTabbedPane1.addChangeListener(new ChangeListener() {
              public void stateChanged(ChangeEvent e)
                   jTabbedPane1_stateChanged(e);
         // contentPane
         contentPane.setLayout(new BorderLayout(0, 0));
         contentPane.add(jTabbedPane1, BorderLayout.CENTER);
         // Test
         this.setTitle("Test");
         this.setLocation(new Point(0, 0));
         this.setSize(new Dimension(600, 500));
         this.setVisible(true);
         public void initializeComponent()
    //     /** Add Component Without a Layout Manager (Absolute Positioning) */
    //     private void addComponent(Container container,Component c,int x,int y,int width,int height)
    //     c.setBounds(x,y,width,height);
    //     container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jTabbedPane1_stateChanged(ChangeEvent e)
         System.out.println("\njTabbedPane1_stateChanged(ChangeEvent e) called.");
         // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
         // TODO: Add any appropriate code in the following Event Handling Methods
    //     private void jComboBox1_actionPerformed(ActionEvent e)
    //     System.out.println("\njComboBox1_actionPerformed(ActionEvent e) called.");
    //     Object o = jComboBox1.getSelectedItem();
    //     System.out.println(">>" + ((o==null)? "null" : o.toString()) + " is selected.");
    //     // TODO: Add any handling code here for the particular object being selected
         * Create the GUI and show it. For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
         private static void createAndShowGUI() {
         //Create and set up the window.
         Test frame = new Test();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.pack();
         frame.setVisible(true);
    public static void main(String[] args) {
         //Schedule a job for the event-dispatching thread:
         //creating and showing this application's GUI.
         javax.swing.SwingUtilities.invokeLater(new Runnable() {
         public void run() {
         createAndShowGUI();
    } Try this - you use too many unnecessary JPanels.
    Which way you prefer with actionPerformed should work either way.
    I think your problem was too many unnecessary Panels and set all attributes before it is added, perhaps,
    not add the panel first and then try to set attributes like layout, color, etc...

  • Why my RMI is not Working in Linux???

    Hiii how ru?
    I am Rahul here
    Well I have a problem that my RMI in not working on Linux.. so can u tell me the solution to my problem???
    When i am typing following command i am getting exception as RmiNotBoundException
    java -Djava.security.policy=my.policy ChaClient&
    however my Server is Starting normally but client is not connection to server.
    so please tell me the solution to this problem
    U can contact me at
    [email protected]
    [email protected]
    Thank u Very much...

    i ran into the same issue dealing with RMI and Linux. My issue was the the stub that linux was giving you gave in the host field the ip number of "127.0.0.1" which tried to make the client connect to itself. this is how i got around it:
    java -Djava.rmi.server.hostname=<ip that other clients will connect to>
    so, for instance, if on a client you connect to the server with an IP of 10.5.0.1, then when starting up the java vm, you start it
    java -Djava.rmi.server.hostname=10.5.0.1
    hopefully that helps

  • Wireless not working in linux, but works fine in windows vista

    Hello!
    I have installed Unbreakable Enterprise Linux 4 in a dual boot config. with Window Vista on a Compaq Presario laptop. After install completed I found that my on board Broadcom Wireless Adapter (Dell 1390 Mini PC card) was not recognized. I have tried installing NDISwrapper versions 1.48 and later 1.47 (after uninstalling 1.48) because everytime I got to the "modprobe ndiswrapper" received a fatal error about an unknown symbol or parameter, and on install I also encountered a "CONFIG_4KSTACKS" error as well. The good part is the light on my laptop for the wireless adapter finally came on and the driver (bcmwl5.inf) appears to be installed and the wireless adapter identified as being present, but it still doesn't show up in the network manager gui interface. So I am out of ideas if any one can give me a suggestion for a solution I would appreciate it.

    Hi there,,,,,
    I have Oracle Enterprise Linux 5 installed and Intel wifi 5100 card installed on my laptop. Wireless card does not work in Linux it works fine with Vista, I have dual boot. I have downloaded and installed the microcode for the wireless card for Linux,,,it is now active but it does not take ip address from dhcp and nor does it connect when i supply manual ip. it does not even scan for any wireless network. I have WEP enabled on my wireless network. It just says disconnected.....
    Please help me.....i have been trying to get this thing work for 3 weeks.
    thanks.

  • Webutil not working in linux

    Hi all,
    i have insert image using webutil(oracle forms 10g) to database in windows o.s. it was successful.
    but when i have tried it in solaries o.s. .
    It is not working in linux how to do it in solaries o.s.
    when i am clicking on the browse button it is showing pl/sql error how to solve it.
    please guide me ..

    HI Anderas,
    i am using using a demo form of webutil which is available on internet i.e WEBUTIL_DOCS.fmb
    which is working fine on windows sp2(when i am clicking on the browse button)
    but it is not working on linux when i am clicking on the browse button it is showing pl/sql error.
    code in browse butrton
    Declare
         LC$Fichier Varchar2(128 ) ;
    Begin
    LC$Fichier := PKG_FICHIERS.Selection ;
    If LC$Fichier is not null Then
    :TRANSFERTS.FIC_SOURCE := LC$Fichier ;
    End if ;
    End ;
    and the package is
    package specification
    ==================
    PACKAGE PKG_FICHIERS IS
    -- Sélection d'un fichier --
    FUNCTION Selection ( PC$Filtre IN Varchar2 DEFAULT '|All files|*.*|' ) RETURN VARCHAR2 ;
    END;
    package body
    =============
    PACKAGE BODY PKG_FICHIERS IS
    -- Sélection d'un fichier --
    FUNCTION Selection ( PC$Filtre IN Varchar2 DEFAULT '|All files|*.*|' )RETURN VARCHAR2
    IS
    LC$Path Varchar2(128) ;
    LC$Fichier Varchar2(256) ;
    LC$Filtre          Varchar2(100) := PC$Filtre ;
    Begin
         -- Répertoire temporaire --
         LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
    LC$Fichier := WEBUTIL_FILE.FILE_OPEN_DIALOG
         LC$Path,
         LC$Filtre,
         'Select a file to upload'
    Return LC$Fichier ;
    END Selection ;
    END;
    please reply..

  • KeyListener not working in Linux

    Hello guys, I'm having a weird problem I was hoping I could get resolved.
    I finished a Pong applet for my Java class, and it works just fine under Windows and on my Mac.
    But when I run it under Linux, the Applet doesn't work correctly.
    The applet draws, and my timer works, but my KeyListener does not work.
    I believe all of my Java files are updated properly.
    But I do not understand why KeyListener does not work under Linux, but it does in Windows.
    I then made a very basic applet just to test my KeyListener, and it still does not work.
    This is how I was taught to do KeyListeners, but if I'm doing something wrong, please help me out!
    here is the basic program code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JApplet implements KeyListener
    int x = 0;
    int y = 250;
    public void init()
    addKeyListener(this);
    public void paint(Graphics g)
    g.setColor(Color.white);
    g.fillRect(0,0,500,500);
    g.setColor(Color.black);
    g.fillRect(x,y,50,50);
    public void keyPressed(KeyEvent event)
    int keyCode = event.getKeyCode();
    if(keyCode == KeyEvent.VK_RIGHT)
    x += 10;
    public void keyReleased(KeyEvent event)
    public void keyTyped(KeyEvent event)

    What if don't use a KeyListener but instead use key binding? For instance,
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    @SuppressWarnings("serial")
    public class Test2 extends JPanel {
      private static final int DELTA_X = 10;
      private static final int DELTA_Y = DELTA_X;
      private static final Dimension MAIN_SIZE = new Dimension(600, 600);
      enum Arrows {
        LEFT(KeyEvent.VK_LEFT, -DELTA_X, 0),
        RIGHT(KeyEvent.VK_RIGHT, DELTA_X, 0),
        UP(KeyEvent.VK_UP, 0, -DELTA_Y),
        DOWN(KeyEvent.VK_DOWN, 0, DELTA_Y);
        private int keyCode;
        private int deltaX, deltaY;
        private Arrows(int keyCode, int deltaX, int deltaY) {
          this.keyCode = keyCode;
          this.deltaX = deltaX;
          this.deltaY = deltaY;
        public int getDeltaX() {
          return deltaX;
        public int getDeltaY() {
          return deltaY;
        public int getKeyCode() {
          return keyCode;
      int x = 0;
      int y = 250;
      public Test2() {
        setBackground(Color.white);
        setPreferredSize(MAIN_SIZE);
        InputMap inMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
        ActionMap actMap = getActionMap();
        for (Arrows arrow : Arrows.values()) {
          inMap.put(KeyStroke.getKeyStroke(arrow.getKeyCode(), 0), arrow);
          actMap.put(arrow, new MyAction(arrow));
      private class MyAction extends AbstractAction {
        private Arrows arrow;
        public MyAction(Arrows arrow) {
          this.arrow = arrow;
        public void actionPerformed(ActionEvent e) {
          x += arrow.getDeltaX();
          y += arrow.getDeltaY();
          repaint();
      @Override
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.setColor(Color.black);
        g.fillRect(x, y, 50, 50);
    import javax.swing.JApplet;
    @SuppressWarnings("serial")
    public class TestApplet extends JApplet {
      public void init() {
        try {
          javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
              createGUI();
        } catch (Exception e) {
          System.err.println("createGUI didn't successfully complete");
      private void createGUI() {
        getContentPane().add(new Test2());
    }

  • Help - Multiple native extensions do not work

    Dear Adobe Air developer community and Adobe employees,
    My game dev. studio www.GoldSunGames.com is nearing completion on our biggest title developed with Adobe Air for iOS. During development we've hit countless  technical bumps in the road including issues with low memory, low performance and many others I can happily say have now been solved in big part to the help we've received from the Adobe Flash/Air community. Thanks!
    I am now reaching out to the community and any Adobe employees reading this to solve our last remaining major issue/bug with Adobe Air which is holding us back from releasing our title.
    Multiple native extensions do not work
    We can get any one single native extension to work including Game Center (with the help of MilkManGames). But multiple extensions together simply do not work. We are required by our publisher to have other iOS features included which require the use of multiple native extensions.
    A detailed break down of the programming process we are using can be found here:
    http://forums.adobe.com/thread/923158?tstart=0
    Any and all help is greatly appreciated. Free copy of the game in question "Megaplex Madness 2" to the problem solver or solvers.

    Thanks to Saumitra Bhave the problem has been solved!
    >> Does http://forums.adobe.com/message/4026961#4026961 help?
    Thanks

  • When i compare multiple attribute it is not working in MDX query

    Hi All,
    i have create a measuer please see below code,
    MEMBER [Measures].[a] as
    case when
    [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  //Working
    then "1"
    when [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Herbicide"  //Working
    then "1"
    when  [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed" //Working
    then "3"
    when ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide" //Not working
    and [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed")
    then "1and2"
    when  ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  //Not Working
    and [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed"  )
    then "1and3"
    end
    when i compare multiple attribute it is not working.

    Hi manishcal16PPS,
    According to your description, your calculated measure is not working when two when statement together. Right?
    In this scenario, since the conditions in your case when statement are exclusive, you should use OR instead of AND operator.
    when  ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  
    OR
    [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed"  )
    then "1and3"
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Windows XP file/folder handling does not work? (RSP Rules!)

    Sorry if this has been asked many times before, but a forum search on "folder" does not return anything ??? (amazing)
    I am trying to make sense out of where and when to use folders and collections and I wish there would be more info in the help/manual.
    Lesson learned so far: you can spend an awful lot of time flagging images as rejected and then delete them from a quick collection, only to find out that they are only removed from the (logical) quick collection, not from the (physical) folder on the file system. @!x$
    Now, it seams that any folder action does either not work at all or only works partially:
    - I cannot import an empty folder, to put images in later
    - I cannot drag and drop more than one file at a time to a folder
    - When I create a new folder, I never get to see it or name it in Lightroom. It gets created on the file system however, as "new folder (x)".
    Why are there no settings under "preference" where to put libraries, back-ups of libraries, which library to use at startup, where and how to create/store previews and their lifetime and so on?
    Also, there should be a much more convenient way in the handling of multiple computers and creating/restoring backups!
    Reading some of the endless complaints about file corruptions and file losses, I think I will return to RawShooter Premium untill I finally get the feeling that my images and the work on them are safe within Lightroom. RSP is also WAY more snappy and responsive (except for the slide show)!

    Jeff: You truly offered some amazing insight here! I really thought that Adobe bought Pixmantec for their technology and for the wizzards that drove that technology. Now you made it clear that all that is limited to "inspiration". Wow! So, why DID Adobe buy Pixmantec? Market share? Take the most brilliant and cheap competitor off the market? Some other reason???
    Apart from that: I DO know that writing software is not easy. It must be really unpleasant for the hard working "scary brilliant" experts with a serious track history to hear people complain about issues like file handling on a particular operating system instead of admiring their brilliant ideas and concepts.
    Alas, this is life: if you would buy a car you would bring it back to the garage to complain about the lock in the trunk that opens at awkward times leading you to loose your groceries instead of talking to those people about how magnificent that particular car takes you trough corners at 100 mph.
    And I still believe that the RSP folks did a better job with their version 1 than Adobe did with LR, knowing that Lightroom is more complicated than RSP and taking into consideration that the Adobe people have a much longer history and experience with Photoshop/Album/Bridge. So I would say Adobe can learn a lot from the RSP boys. Just do it!
    Tim: as I'm planning to move from RSP to LR (maybe wait until 1.1), the most important starting information I'm looking for right now is how to set up my filesystem and the LR database for the most efficient way of working and for the "most" data security. Neither the LuLa tutorial nor the help file/manual seem to offer much information on this -I believe extremely important- topic.
    All this aside from what seems like Windows file handling bugs to me, hopefully adressed in version 1.1

  • Barcode report is not working in linux

    hi,
    i am running the report using the barcode, which is running perfectly in the windows server - i meant in the report builder.
    but when i try run the same report in linux server through application, i am getting the below mentioned error:
    Terminated with error:
    REP-1401: 'beforereport': Fatal PL/SQL error occurred. ORA-39565: Message 39565 not found; product=RDBMS; facility=ORA
    below mentioned is the code written in beforereport trigger:
    globals.barcode_to_use := BarCodeConstants.BAR_CODE_128;
    globals.bcobj := barcodemaker.new();
    i have include the jar file path /ora/u01/oracle/v101/ds1/reports/jlib/oraclebarcode.jar both in class path and report_path, but still its not working.
    any one had solve this issue?...pls help me out
    for you info:
    CLASSPATH=/ora/u01/oracle/v101/ds1/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar:/ora/u01/oracle/v101/ds1/jlib/repository.jar:/ora/u01/oracle/v101/ds1/jlib/ldapjclnt10.jar:/ora/u01/oracle/v101/ds1/jlib/debugger.jar:/ora/u01/oracle/v101/ds1/jlib/ewt3.jar:/ora/u01/oracle/v101/ds1/jlib/share.jar:/ora/u01/oracle/v101/ds1/jlib/utj.jar:/ora/u01/oracle/v101/ds1/jlib/zrclient.jar:/ora/u01/oracle/v101/ds1/reports/jlib/rwrun.jar:/ora/u01/oracle/v101/ds1/forms/java/frmwebutil.jar:/ora/u01/oracle/v101/ds1/reports/jlib/oraclebarcode.jar
    RW=$ORACLE_HOME/reports; export RW
    REPORTS_PATH=$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo:$ORACLE_HOME/reports/integ:$ORACLE_HOME/reports/printers:${REPORTS_PATH}; export REPORTS_PATH
    REPORTS_TMP=/tmp; export REPORTS_TMP
    REPORTS_NO_DUMMY_PRINTER=TRUE; export REPORTS_NO_DUMMY_PRINTER
    REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar; export REPORTS_TAGLIB_URI
    REPORTS_CLASSPATH=$ORACLE_HOME/reports/jlib/rwbuilder.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/j2ee/home/oc4j.jar:$ORACLE_HOME/j2ee/home/lib/ojsp.jar:$ORACLE_HOME/reports/jlib/oraclebarcode.jar; export REPORTS_CLASSPATH
    repserver.conf file setting:
    <engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="1" minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="90000" jvmOptions="-Xms512m -Xmx512m" classPath="/ora/u01/oracle/v101/ds1/reports/jlib/oraclebarcode.jar">
    <property name="sourceDir" value="/ora/u02/oraadmin/config/as2/app_qits_run"/>
    <property name="tempDir" value="/ora/u02/oraadmin/config/as2/app_qits_tmp"/>
    </engine>
    <engine id="rwURLEng" class="oracle.reports.urlengine.URLEngineImpl" initEngine="1" maxEngine="1" minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="60000" classPath="/ora/u01/oracle/v101/ds1/reports/jlib/oraclebarcode.jar"/>
    thanks
    renjish

    Hello,
    The first step if to find the PL/SQL line causing the error in 'cf_1formula':
    create a procedure Trace in your Reports : (modify the line trace_file := Text_IO.Fopen('d:\temp\rep_trace.txt', 'A'); to adapt the filename to your system)
    PROCEDURE Trace (trace_string in varchar2) IS
    trace_file Text_IO.File_Type;
    BEGIN
    trace_file := Text_IO.Fopen('d:\temp\rep_trace.txt', 'A');
    Text_IO.Put_Line(trace_file, trace_string);
    Text_IO.Fclose (trace_file);
    END;
    Then, add some calls to this procedure in the program unit 'cf_1formula'
    trace('Before line 1';
    <PL/SQL code of line 1>
    trace('Before line 2';
    <PL/SQL code of line 2>
    trace('Before line 3';
    <PL/SQL code of line 3>
    Excecute the Reports and find in the file 'd:\temp\rep_trace.txt' the last line executed.
    Regards

  • Barcode Report is not working in Linux REP-1401: 'cf_1formula': Fatal PL/SQ

    In windows its barcodesample is working fine.(all the barcode constants)
    In linux
    1.I have set the CLASSPATH in reports.sh
    2.and I also added the classPath value in <engineId...> tag in the reportservername.confg file.
    3.And I restart the report server as well as application server also. still I am getting the following error messages.
    REP-1401: 'cf_1formula': Fatal PL/SQL error occurred.
    ORA-39565: Message 39565 not found; product=RDBMS; facility=ORA
    In windows I followed the same steps its working fine.But Linux its not working any idea.!!! Its really urgent....
    Thanks,
    Natarajan.U
    Mail:[email protected]

    Hello,
    The note 278044.1 available on metalink may help you :
    Note.278044.1 How to Debug REP-1401 when executing Reports with Barcode java code ?:
    Regards

  • Host command is not working on linux

    Hi
    I m using linux for application server n windows for client. I need to create folder from client machine by cliking a button of forms10g runtime.HOST command is not working which was working fine in windows.
    Any help is appriciateable.
    kazi mokarem

    Hi
    I had the same issue on linux a few weeks back. What tuned out was, when you install the Oracle app svr it does not include the system paths by default.
    The path where mkdir is located may not be visible to the app.
    Try to hardcode the path for mkdir as /bin/mkdir .... and seee if that works.
    If the above statement works then add that path in the paths variable in default.env file located in $ORACLE_HOME/forms/server directory
    HTH
    Arvind

  • Sql Developer Launcher Not Working In Linux

    Hello,
    System Details:
    Fedora 19
    Sql Developer Version: Version 4.0.0.12
    Java Version:  OpenJDK 1.7.0-40
    I can launch Sql Developer from the command line successfully.
    /opt/sqldeveloper/sqldeveloper.sh
    But when I attempt to use the launcher icon, I receive a SIGSEGV error.  Here is the top of the hs_error.log file.
    # A fatal error has been detected by the Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x000000317a062e00, pid=7680, tid=140636646749952
    # JRE version: OpenJDK Runtime Environment (7.0_40-b60) (build 1.7.0_40-mockbuild_2013_10_02_16_56-b00)
    # Java VM: OpenJDK 64-Bit Server VM (24.0-b56 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # C  0x000000317a062e00
    The ~/.sqldeveloper/jdk file contains the following:
    /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.7.fc19.x86_64
    And my /usr/share/applications/sqldeveloper.desktop file contains the following:
    [Desktop Entry]
    Encoding=UTF-8
    Name=SQL Developer
    Comment=Oracle SQL Developer
    Icon=/opt/sqldeveloper/icon.png
    Exec=/opt/sqldeveloper/sqldeveloper.sh
    Terminal=true
    Type=Application
    Categories=GNOME;Oracle;
    I'm just switching from Ubuntu to Fedora so this has not worked in the past.
    Thank you for any help,
    Ann

    The solution in https://forums.oracle.com/thread/2594033 worked.  I added the 2nd line below to /opt/sqldeveloper/sqldeveloper.sh.
    #!/bin/bash
    unset -v GNOME_DESKTOP_SESSION_ID
    cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*
    Previously, I incorrectly updated ~/.bashrc to unset GNOME_DESKTOP_SESSION_ID.  That's why running Sql Developer from the command line worked, but not from the launcher.
    Thanks su.

  • Drawstring is not working in Linux !!!

    hi everbody
    Graphics.drawString is not working properly on Linux ,
    how can i fix it.
    what is problem.
    on XP , 10gR2 db evertything is ok. 326x160 picture and "Sample Text." seen on browser.
    on Oracle Unbrakeble Linux , 11g db 326x160 picture seen on browser but "Sample Text." absent on picture !!!!!
    complete code is below
    Thanks.
    create or replace and compile java source named java1 as
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class MyGraph
    public static byte[] vcanvas (int width ,int height ) throws IOException
    BufferedImage bimage = new BufferedImage(width,height, BufferedImage.TYPE_INT_RGB);
    Graphics g = bimage.createGraphics();
    g.setColor(Color.white);
    g.fillRect(0, 0, width - 1, height - 1);
    g.setColor(Color.red);
    g.drawRect(0,0,width-1,height-1);
    g.setColor(Color.black);
    g.drawRect(2,2,width-3,height-3);
    g.drawString("Sample Text.",10,height/2);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    JPEGImageEncoder jpeg = JPEGCodec.createJPEGEncoder(baos);
    jpeg.encode(bimage);
    baos.flush();
    baos.close();
    return baos.toByteArray();
    } // MyGraph
    create or replace function javaimage(w number,h number) return varchar2
    as LANGUAGE JAVA name 'MyGraph.vcanvas(int, int) return byte[]';
    create or replace procedure imgXYZ is
    vData varchar2(32767);
    begin
    owa_util.mime_header('image/jpeg', FALSE );
    owa_util.http_header_close;
    vData:=javaimage(326,160);
    htp.prn(vData);
    end;
    http://server:port/schema/imgXYZ

    You have to start Http server for that :
    $ $ORACLE_HOME/Apache/Apache/bin/apachectl start

  • I am attempting to upload multiple photos on a macpro from a cd.  I am used to a pc.  I tried using the command button to select multiples but it does not work.  Please advise

    I am attempting to upload multiple photos on a mac pro from a cd.  I have tried holding the "command"button down to select multiple photos but it does not work.  Please advise.  Thanks,John

    why not sort by (name, date, etc) and Click on 1st and Shift-Click on last.
    Might work better to copy or import to a project folder.
    https://discussions.apple.com/community/ilife/iphoto
    http://www.apple.com/support/iphoto

Maybe you are looking for