"Bad CPU Type In Executable"

After upgrading from an eMac to an Intel Mac Mini, I noticed that I needed to reinstall Xcode. Once I reinstalled Xcode (v2.4), I made some changes to one of my applications. After testing it fully on my new Mac, I copied the .app file to my old eMac and attempted to re-run. In doing so, I received the following error message:
"You cannot open the application 'NAME OF APPLICATION' because it may be damaged or incomplete."
So, in Terminal, I navigated through the Package Contents to the actual executable and tried to run it. I, then, received the following error:
"Bad CPU type in executable."
How do I correct this error, so it will run on both of my Macs??
THANKS IN ADVANCE!!
WBELL
eMac Specs:
1GHz, 768MB DDR, OSX 10.4.x
Mini Specs:
1.5GHz Core Solo, 1024MB DDR2, OSX 10.4.x
Mac Mini Mac OS X (10.4.7) 1.5GHz Core Solo

Here are a couple of things to check...
First, from your screen shot it appears that the main.m file is from an older AS Studio application (ie is this a project that was originally created some time ago... perhaps under Project Builder?). The main.m file that gets included with relatively new AS Stdio apps looks like this:
<pre>
extern void ASKInitialize();
extern int NSApplicationMain(int argc, const char *argv[]);
int main(int argc, const char *argv[])
ASKInitialize();
return NSApplicationMain(argc, argv);
</pre>
So you may want to copy/paste the main.m code from a newly created AS Studio app into your (older?) existing project. I'm not sure the above problem would cause the failure to build a Universal app, but changing code in main.m may get rid of the warnings you're seeing.
But also, the screenshot made me wonder if your target(s) needs to be converted to the newer "native" target format (this is different from the "conversion" that Xcode does to an older project file). With your project open click on Xcode's "Project" menu... is the option "Upgrade 'YourTargetName' to Native Target" or "Upgrade all Targets in Project to Native" available? If so, I think you must convert to native targets in order to build universal binaries.
Hope this helps,
Steve

Similar Messages

  • Error:arch: posix_spawnp: osascript: Bad CPU type in executable

    Hi, i am new to these issues
    I use to be able to excute my frank-cucmber on Lion and now when i move to mountain lion and I  get the following error
    error:arch: posix_spawnp: osascript: Bad CPU type in executable
    i read on the interent that mountain lion is not supporting 32 bit
    so how can  i solve the problem so 32 bit will be supported?

    You need a 64-bit version.
    32-bit will never be supported on Mountain Lion.

  • What does the message ``Bad CPU type in executable'' mean in terminal window?

    All the time I have been using TEX on my computer to handle mathematical symbols.
    I have several macintosh machines.
    Usually I used tex on the terminal (rather than texshop or texwork).
    Quite recently when  I input ``platex filename.tex,’’
    I received the message ``Bad CPU type in executable.’’
    On another machine, I receive the message which says “platex” failed:  the
    PowerPC architecture is no longer supported.
    I have no idea why this happens.
    Will anyone help me?
    It occured when I typed ``platex foo.tex,'' in an attempt to compile a tex file.

    PowerPC architecture is no longer supported.
    This mean you have an old executable that was compiled for a Power PC Mac (the ones before they got the Intel chips). On systems running 10.6 (Snow Leopard) there was  code called Rosetta that was able to run the PPC code on the Intel CPU, That went away in 10.7
    Sounds like you recently upgraded to 10.8 from 10.6 or earlier and copied the binary to the new OS.
    If you compiled the code yourself you need to recompile it for the new OS. If you installed the binary you need to go to the site you got the binary from and see if there is a newer version for Intel Macs.

  • How to get CPU type?

    How do i determine the CPU type of a local computer?
    I am trying to launch a runtime process, but the executable is tuned for the cpu. the executables are tuned for the cpu from the gcc docs:
    http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
    What would be the best way to approach this situation? As far as i know java doesnt have any way of returning a CPU type

    perfect. thank you guys a bunch.
    this is my code so far to get the Family and Model which so far works in linux and windows.
    any suggestions for mac? i'm going to test out the system environment variables but i doubt it will be there
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Map;
    public class CPU {
        private final String os = System.getProperty("os.name");
        public static void main(String[] args) {
            CPU c = new CPU();
            System.out.println("Family: " + c.getFamily());
            System.out.println("Model: " + c.getModel());
        public int getFamily() {
            if (os.startsWith("Windows")) {
                Map<String, String> env = System.getenv();
                String pid = env.get("PROCESSOR_IDENTIFIER");
                return Integer.parseInt(pid.substring(pid.indexOf("Family ") + 7, pid.indexOf(" Model")).trim());
            } else if (os.equals("Linux")) {
                String[] command = {
                    "cat",
                    "/proc/cpuinfo"
                ProcessBuilder pb = new ProcessBuilder(command);
                try {
                    Process p = pb.start();
                    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
                    String line = br.readLine();
                    while (line != null) {
                        if (line.startsWith("cpu family")) {
                            return Integer.parseInt(line.substring(line.indexOf("cpu family\t: ") + 13).trim());
                        line = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
            return 0;
        public int getModel(){
            if (os.startsWith("Windows")) {
                Map<String, String> env = System.getenv();
                String pid = env.get("PROCESSOR_IDENTIFIER");
                return Integer.parseInt(pid.substring(pid.indexOf("Model ") + 6, pid.indexOf(" Stepping")).trim());
            } else if (os.equals("Linux")) {
                String[] command = {
                    "cat",
                    "/proc/cpuinfo"
                ProcessBuilder pb = new ProcessBuilder(command);
                try {
                    Process p = pb.start();
                    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
                    String line = br.readLine();
                    while (line != null) {
                        if (line.startsWith("model")) {
                            return Integer.parseInt(line.substring(line.indexOf("model\t\t: ") + 9).trim());
                        line = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
            return 0;
    }

  • Panic[cpu1]/thread=30002f12060: BAD TRAP: type=31

    Sun V240 panic with t5he following output:
    # tail -f /var/adm/messages
    Sep 24 15:52:24 [10.64.47.16.183.179] agent[21415]: [ID 695539 daemon.alert] syslog   Sep 24 15:52:24 agent         *** aborting execution ***
    Sep 24 15:52:24 [10.64.47.16.183.179] agent[21415]: [ID 695539 daemon.alert] syslog   Sep 24 15:52:24 agent         *** aborting execution ***
    Sep 24 15:53:29 [10.64.47.16.183.179] agent[23844]: [ID 440145 daemon.alert] syslog   Sep 24 15:53:29 agent         syntax error in fscan+syslog.dat(1) at token '{'
    Sep 24 15:53:29 [10.64.47.16.183.179] agent[23844]: [ID 440145 daemon.alert] syslog   Sep 24 15:53:29 agent         syntax error in fscan+syslog.dat(1) at token '{'
    Sep 24 15:53:29 [10.64.47.16.183.179] agent[23844]: [ID 617052 daemon.alert] syslog   Sep 24 15:53:29 agent         *** aborting execution ***
    Sep 24 15:53:29 [10.64.47.16.183.179] agent[23844]: [ID 617052 daemon.alert] syslog   Sep 24 15:53:29 agent         *** aborting execution ***
    Sep 24 15:54:35 [10.64.47.16.183.179] agent[26272]: [ID 134417 daemon.alert] syslog   Sep 24 15:54:35 agent         syntax error in fscan+syslog.dat(1) at token '{'
    Sep 24 15:54:35 [10.64.47.16.183.179] agent[26272]: [ID 134417 daemon.alert] syslog   Sep 24 15:54:35 agent         syntax error in fscan+syslog.dat(1) at token '{'
    Sep 24 15:54:35 [10.64.47.16.183.179] agent[26272]: [ID 336262 daemon.alert] syslog   Sep 24 15:54:35 agent         *** aborting execution ***
    Sep 24 15:54:35 [10.64.47.16.183.179] agent[26272]: [ID 336262 daemon.alert] syslog   Sep 24 15:54:35 agent         *** aborting execution ***
    panic[cpu1]/thread=30002f12060: BAD TRAP: type=31 rp=2a100feac60 addr=20 mmu_fsr=0 occurred in module "md" due to a NULL pointer dereference
    nfsd: trap type = 0x31
    addr=0x20
    pid=10465, pc=0x12e5de0, sp=0x2a100fea501, tstate=0x9980001603, context=0x751
    g1-g7: 4, 2000, 1900000, 1fff, 1c00, 751, 30002f12060
    000002a100fea980 unix:die+78 (31, 2a100feac60, 20, 0, 2a100feaa40, 107c400)
      %l0-3: 00000000c0800000 0000000000000031 0000000001000000 0000000000002000
      %l4-7: 000000000181a570 000000000181a400 0000000000000000 0000009980001603
    000002a100feaa60 unix:trap+9d4 (2a100feac60, 0, 1fff, 5, 0, 1)
      %l0-3: 0000000000000000 00000600084af8c0 0000000000000031 0000000000001c00
      %l4-7: 0000000000000000 0000000000000001 ffffffffffffe000 0000000000000005
    000002a100feabb0 unix:ktl0+48 (6, 0, 20, 70, 1905348, 1905000)
      %l0-3: 0000000000000004 0000000000001400 0000009980001603 000000000101b304
      %l4-7: 0000000000000000 0000000000000001 0000000000000000 000002a100feac60
    000002a100fead00 7 (5500002004, 422, 0, ffffffff80200000, 1900000, 1)
      %l0-3: 0000000000000004 0000000000000001 0000000000000008 0000000001904800
      %l4-7: 000006000c4aadc0 000000000003ffff 000000000003fc00 0000000000000020
    000002a100feadd0 specfs:spec_fsync+fc (6000c50a500, 10000, 60007e88fe0, 3, 0, 6000c50a000)
      %l0-3: 000006000c18cb68 000006000c18cae0 0000000000002420 0000000000002000
      %l4-7: 0000000000000000 000006000c4aadc0 0000000000000000 000006000c4aadc0
    000002a100feafa0 genunix:fop_fsync+14 (6000c50a500, 10000, 60007e88fe0, f3, 0, 121cab0)
      %l0-3: 0000060004a97580 0000000000002420 0000000000002000 0000000000000003
      %l4-7: 0000060002234000 0000060004a97580 0000060004a97738 0000000000000062
    000002a100feb050 nfssrv:rfs3_mknod+30c (2a100feb110, 2a100feb398, 600049e4840, 2a100feb3a0, 60007e88fe0, 2a100feb1a0)
      %l0-3: 00000000ffffffff 0000060004ef8c00 ffffffffffffffff 0000000000002004
      %l4-7: 0000000000000055 000002a100feb1a0 000002a100feb568 000002a100feb228
    000002a100feb2b0 nfssrv:common_dispatch+444 (2a100feb698, 6000ac8fa80, 0, 600049e4840, 705a01b8, 7b32e4d4)
      %l0-3: 0000000000001000 000000007059eb90 000000000000000b 000002a100feb398
      %l4-7: 0000060007e88fe0 0000000000000000 0000000001901df8 000002a100feb398
    000002a100feb5d0 rpcmod:svc_getreq+1c8 (6000ac8fa80, 60002324800, 6000b5501d0, 6000102dc80, 1902560, 6000b550040)
      %l0-3: 0000000000000000 000006000b550040 0000000000000000 000006000ac8fad4
      %l4-7: 0000060005218fc0 000000007b3271bc 0000000001872800 000006000b550360
    000002a100feb720 rpcmod:svc_run+198 (6000b837980, 0, 0, 0, 6000b8379b8, 1)
      %l0-3: 00000600084af8c0 000006000b8379c8 000006000ac8fa80 000006000102dc80
      %l4-7: 0000000000000000 0000000000000000 000000000000000c 0000060002324800
    000002a100feb7d0 nfs:nfssys+1c4 (c, 1, 7b2b3800, c, 1f8, 30)
      %l0-3: 0000000000000000 0000000000000000 00000000cb050000 000000000000cb05
      %l4-7: 0000000000000001 0000000000000000 0000000000000000 000000007b2b3938
    syncing file systems... [1] 46 [1] 11 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 [1] 4 done (not all i/o completed)
    dumping to /dev/md/dsk/d20, offset 859701248, content: kernel
    100% done: 64894 pages dumped, compression ratio 5.02, dump succeeded
    rebooting...
    SC Alert: Host System has Reset
    @(#)OBP 4.16.2 2004/10/04 18:22 Sun Fire V210/V240,Netra 240
    Clearing TLBs
    Loading Configuration
    Membase: 0000.0012.0000.0000
    MemSize: 0000.0000.4000.0000
    Init CPU arrays Done
    Init E$ tags Done
    Setup TLB Done
    MMUs ON
    Scrubbing Tomatillo tags... 0 1
    Block Scrubbing Done
    Find dropin, Copying Done, Size 0000.0000.0000.6cb0
    PC = 0000.07ff.f000.5ba8
    PC = 0000.0000.0000.5c58
    Find dropin, (copied), Decompressing Done, Size 0000.0000.0006.6870
    Diagnostic console initialized
    System Reset: CPU Reset
    Probing system devices
    jbus at 0,0 SUNW,UltraSPARC-IIIi (1503 MHz @ 9:1, 1 MB) memory-controller
    jbus at 1,0 SUNW,UltraSPARC-IIIi (1503 MHz @ 9:1, 1 MB) memory-controller
    jbus at 1f,0 pci
    jbus at 1e,0 pci
    jbus at 1c,0 pci
    jbus at 1d,0 pci
    Loading Support Packages: kbd-translator obp-tftp SUNW,i2c-ram-device SUNW,fru-device SUNW,asr
    Loading onboard drivers:
    /pci@1e,600000: Device 7 isa
    /pci@1e,600000/isa@7: flashprom rtc i2c power serial serial serial rmc-comm
    /pci@1e,600000/isa@7/i2c@0,320: i2c-bridge i2c-bridge motherboard-fru-prom chassis-fru-prom power-supply-fru-prom power-supply-fru-prom dimm-spd dimm-spd dimm-spd dimm-spd dimm-spd dimm-spd dimm-spd dimm-spd rscrtc nvram idprom gpio gpio gpio gpio gpio gpio
    Probing memory
    CPU 0 Bank 0 base          0 size 2048 MB
    CPU 0 Bank 1 base  100000000 size 2048 MB
    CPU 0 Bank 2 base  200000000 size 2048 MB
    CPU 0 Bank 3 base  300000000 size 2048 MB
    CPU 1 Bank 0 base 1000000000 size 1024 MB
    CPU 1 Bank 2 base 1200000000 size 1024 MB
    ChassisSerialNumber FN54050325
    Probing I/O buses
    /pci@1d,700000: Device 2 network network
    /pci@1f,700000: Device 2 network network
    /pci@1e,600000: Device 6 pmu i2c gpio
    /pci@1e,600000/pmu@6/i2c@0,0:
    /pci@1e,600000: Device a usb
    /pci@1e,600000: Device d ide disk cdrom
    /pci@1e,600000: Device 2 Nothing there
    /pci@1e,600000: Device 3 SUNW,qlc fp disk
    /pci@1c,600000: Device 2 scsi disk tape scsi disk tape
    /pci@1c,600000: Device 1 Nothing there
    /pci@1d,700000: Device 1 SUNW,qlc fp disk
    BNZ - Bank of New Zealand
    Rebooting with command: boot
    Boot device: disk0:a  File and args:
    Loading ufs-file-system package 1.4 04 Aug 1995 13:02:54.
    FCode UFS Reader 1.12 00/07/17 15:48:16.
    Loading: /platform/SUNW,Sun-Fire-V240/ufsboot
    Loading: /platform/sun4u/ufsboot
    SunOS Release 5.10 Version Generic_127111-05 64-bit
    Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
    Use is subject to license terms.
    SC Alert: SC Request to send Break to host.
    Type  'go' to resume
    {1} ok
    {1} okSystem can be boot into single user mode but fails when moved to multi-user mode.
    Any ideas?
    Cheers
    --Andreas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    This looks like it could be bug 6614416.
    See [Sun Alert 241066|http://sunsolve.sun.com/search/document.do?assetkey=1-66-241066-1] .

  • Unable to launch application from my machine:Bad MIME Type

    Hi,
    The following error message was printed when I tried to access the SwingSet2 demo from the Java Web Start site.
    An error occurred while launching/running the application.
    Title: SwingSet2
    Vendor: Sun Microsystems, Inc.
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http://java.sun.com/products/javawebstart/apps/SwingSet2.jnlp - text/html
    Can you please suggest what is to be done to rectufy this problem?
    Regards,
    Satish

    Bad MIME type returned from server when accessing
    resource:
    http://java.sun.com/products/javawebstart/apps/SwingSet
    .jnlp - text/htmlit should return application/x-java-jnlp-file.
    My guess is that you use proxy which messes up headers.
    Otherwise try to reinstall Web Start, then enable the console and log output in Web Start's advanced preferences to get more clues what's going on.
    Regards,
    Marc

  • Error Messge: Final Cut Pro requires that your system have a CPU type of G5

    I recently updated my OS to 10.5.8. I also downloaded AVID codec for quicktime. Then, when I went to open FCP on my MacBook Pro (2.6GHz Intel Core 2 Duo), I was hit with the error message Final Cut Pro requires that your system have a CPU type G5; this system has a CPU type of G4. I've never had a problem running FCP on this laptop. Any suggestions? Help!

    Also, I found another person who posted with a similar problem and here's what he wrote, (but curiously, he doesn't state what the fix was to his problem).
    After 1 and a half hours of support from Ireland it came out that some llibrary setting
    was conflicting with the startup of FCP. Apple did not hear of this problem before. I wonder
    how many macbookpro users have the same issue...
    mac book pro 17" Mac OS X (10.5.7)

  • RFC call from Delphi (Bad Variant Type error)

    Well, I'm trying to call an RFC function from Delphi via ActiveX objects..
    I have Codegear 2009 installed and it works without any problem..
    But on another system with Delphi7 installed when I ran same code it gives "Bad Variant Type" error when assigning SapLogonControl's connection object to SapFunction's connection parameter... Both computers have same SAP installation. And on both systems ActiveX objects imported correctly on Delphi.
    Here is the code:
    unit logon1;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    ExtCtrls, OleCtrls, StdCtrls, SAPFunctionsOCX_TLB,
    Grids, SAPLogonCtrl_TLB;
    type
      TForm1 = class(TForm)
      SAPFunctions1: TSAPFunctions;
      Button2: TButton;
      Grid: TStringGrid;
      Edit1: TEdit;
      Edit2: TEdit;
      Label1: TLabel;
      Label2: TLabel;
      SAPLogonControl1: TSAPLogonControl;
    procedure Button2Click(Sender: TObject);
    private
    { Private-Deklarationen }
    public
    { Public-Deklarationen }
    end;
    var
    Form1 : TForm1 ;
    Table, Funct, Connection : VARIANT ;
    implementation
    {$R *.DFM}
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      Connection                  := SAPLogoncontrol1.newConnection;
      Connection.User             := 'testuser';
      Connection.System           := 'CRD';
      Connection.Client           := '300';
      Connection.ApplicationServer:= '10.1.1.10';
      Connection.SystemNumber     := '00';
      Connection.Password         := 'testpass';
      Connection.Language         := 'EN' ;
      if Connection.LogOn(0,true) = true then
      (* parameter "true" = SilentLogOn *)
      begin
        (* assign the existing connection to the *)
        (* component SAPFunctions1                *)
        SAPFunctions1.Connection := Connection; // It gives error on this line...
        Funct := SAPFunctions1.add('ZGIS_TEST_FUNC');
      end;
    end;
    end.
    As I said while Codegear 2009 runs this code without any problem, Delphi 7 crashes on that assignment.. Also I tried outside Delphi, and the file compiled with Codegear works on both systems while the file compiled with Delphi 7 again crashes on buth systems...
    Is there a problem with Delphi 7? Should I use at least Delphi 8 or something for compiling?

    Hi Hakan,
    You must use Non-Unicode RFC library for Delphi 7.0.
    ( Bende Delphi 7.0 kullaniyorum. Ayni hatayi aldim. Unicode library kullanmistim. Kaldirip Non-Unicode olani kullandim. Su an hata yok. RFC cagirabiliyorum. )
    Mustafa Yalcin

  • Is there any function module getting the cpu type?

    Is there any function module getting the cpu type?

    I guess the database server...
    I would like to get the SAP system cpu type as done in transaction st06 under system information.
    Thanks.

  • ASPX Bad Variant Type

    This code is simply to prove my connection to SAP is working.  So far, I'm unable to get it to work without getting the "Bad Variant Type" error.
    <%@ Page Language="VB" Debug="true" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%
        Dim fc As Object
        Dim sapConn As Object
        Dim PARTNERS_TAB As Object
        Dim RETURN_TAB As Object
        Dim Z_BAPI_FIND_CUSTOMERS As Object
        Dim msg As String
        Dim fld_type As String
        Dim count As Integer
        Dim index As Integer
        Dim index2 As Integer
        Dim cnt_sold_to As Integer
        Dim cnt_ship_to As Integer
        Dim retcd As Integer
        msg = "start" & "<BR>"
        fc = CreateObject("SAP.Functions")
        fc.LogLevel = 9
        fc.LogFileName = "C:temperrors.txt"
        sapConn = CreateObject("SAP.Logoncontrol.1")
        fc.Connection = sapConn.NewConnection()
        'Pass the name of the system
        fc.Connection.System = "TST"
        fc.Connection.SystemNumber = "02"
        'Pass the name of the Server
        fc.Connection.ApplicationServer = "server.fqdn.net"
        'Pass the name of the Client
        fc.Connection.client = 100
        'Pass the name of the USER
        fc.Connection.user = "username"
        'Pass the name of the Password
        fc.Connection.Password = "password"
        'Pass the name of the Language
        fc.Connection.language = "EN"
        'Log On to the SAP System
        retcd = fc.Connection.Logon(0, True)
        If (retcd = False) Then
            msg = msg & "SAP Logon Failed." & "<BR>"
        Else
            msg = msg & "logon success / setting vars" & "<BR>"
            Z_BAPI_FIND_CUSTOMERS = fc.Add("Z_BAPI_FIND_CUSTOMERS")
            Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_NAME") = "Customer Name"
            Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_CITY") = "CHICAGO"
            'Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_NBR")
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_NAME") = "Customer Name"
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_CITY") = "BAYONNE"
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_STATE") = "NJ"
            'Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_NBR")
            msg = msg & "calling func" & "<BR>"
            If (Z_BAPI_FIND_CUSTOMERS.Call() <> True) Then
                msg = msg & "func fail" & "<BR>"
            Else
                msg = msg & "func success" & "<BR>"
                RETURN_TAB = Z_BAPI_FIND_CUSTOMERS.Tables("RETURN_TAB")
                fld_type = RETURN_TAB.Value("TYPE")
                If ((fld_type = "M") Or (fld_type = "N")) Then
                    msg = msg & fld_type & " " & RETURN_TAB.Value("MESSAGE") & "<BR>"
                Else
                    msg = msg & "parameters are correct <BR>"
                    PARTNERS_TAB = Z_BAPI_FIND_CUSTOMERS.Tables("PARTNERS_TAB")
                    ' Results
                    count = PARTNERS_TAB.Rows.Count
                    msg = msg & "partner rows: " & CStr(count) & "<BR>"
                    If (count > 2) Then ' we have more than one soldto or shipto
                        cnt_sold_to = 0
                        cnt_ship_to = 0
                        For index = 1 To PARTNERS_TAB.Rows.Count
                            If (PARTNERS_TAB.Value(index, "PARTN_ROLE") = "AG") Then
                                cnt_sold_to = cnt_sold_to + 1 ' PARTN_ROLE = "AG"
                            Else
                                cnt_ship_to = cnt_ship_to + 1 ' PARTN_ROLE = "WE"
                            End If
                        Next ' go to next record in partner_tab
                        msg = msg & "sold to: " & CStr(cnt_sold_to) & " ship to: " & CStr(cnt_ship_to) & "<BR>"
                    End If ' count of partners_tab > 2 we *may* need to do something about it here - fix me
                    msg = msg & "<table>"
                    For index = 1 To PARTNERS_TAB.Rows.count
                        msg = msg & "<tr>"
                        For index2 = 1 To 8
                            msg = msg & "<td>" & PARTNERS_TAB.Value(index, index2) & "</td>"
                        Next
                        msg = msg & "</tr>"
                    Next
                    msg = msg & "</table>"
                    'If ((cnt_sold_to = 1) And (cnt_ship_to = 1)) Then ' we only have one soldto and one shipto
                    '    Results.Visible = False
                    'Else ' we have more than one shipto or soldto - fix me
                End If
            End If
        End If
        msg = msg & "<br>DONE!"
        Response.Write(msg)
        Response.End()
    %>
    The error occurs when I make the call to fc.add.

    It seems the fc.Connection and the RETURN_TAB.Value needed (row, field) to solve the problem.
    For reasons I do not understand, I had to create a separate connection
    object and assign the handle of it to the function control handle.
    The RETURN_TAB.Value(row, field) was a syntax error on my part.
    Here is the updated, working code:
    <%@ Page Language="VB" Debug="true" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%
        Dim fc As Object
        Dim sapConn As Object
        Dim PARTNERS_TAB As Object
        Dim RETURN_TAB As Object
        Dim msg As String
        Dim fld_type As String
        Dim count As Integer
        Dim index As Integer
        Dim index2 As Integer
        Dim cnt_sold_to As Integer
        Dim cnt_ship_to As Integer
        Dim retcd As Integer
        msg = "start" & "<BR>"
        fc = CreateObject("SAP.Functions")
        fc.LogLevel = 9
        fc.LogFileName = "C:temperrors.txt"
        sapConn = CreateObject("SAP.Logoncontrol.1")
        Dim conn As Object = sapConn.NewConnection()
        'Pass the name of the system
        conn.System = "TST"
        conn.SystemNumber = "99"
        'Pass the name of the Server
        conn.ApplicationServer = "server.domain.com"
        conn.MessageServer = "server.domain.com"
        'Pass the name of the Client
        conn.client = 999
        'Pass the name of the USER
        conn.user = "USER_NAME"
        'Pass the name of the Password
        conn.Password = "PASSWORD"
        'Pass the name of the Language
        conn.language = "EN"
        'Log On to the SAP System
        retcd = conn.Logon(0, True)
        If (retcd = False) Then
            msg = msg & "SAP Logon Failed." & "<BR>"
        Else
             fc.Connection.ConnectionHandle = conn.ConnectionHandle
            msg = msg & "logon success / setting vars" & "<BR>"
            Dim Z_BAPI_FIND_CUSTOMERS As Object = fc.Add("Z_BAPI_FIND_CUSTOMERS")
            Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_NAME") = "CUSTOMER NAME"
            Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_CITY") = "CITY"
            'Z_BAPI_FIND_CUSTOMERS.Exports("SOLDTO_NBR")
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_NAME") = "CUSTOMER NAME"
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_CITY") = "CITY"
            Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_STATE") = "ZZ"
            'Z_BAPI_FIND_CUSTOMERS.Exports("SHIPTO_NBR")
            msg = msg & "calling func" & "<BR>"
            If (Z_BAPI_FIND_CUSTOMERS.Call() <> True) Then
                msg = msg & "func fail" & "<BR>"
            Else
                msg = msg & "func success" & "<BR>"
                RETURN_TAB = Z_BAPI_FIND_CUSTOMERS.Tables("RETURN_TAB")
                fld_type = RETURN_TAB.Value(1,"TYPE")
                If ((fld_type = "M") Or (fld_type = "N")) Then
                    msg = msg & fld_type & " " & RETURN_TAB.Value(1,"MESSAGE") & "<BR>"
                Else
                    msg = msg & "parameters are correct <BR>"
                    PARTNERS_TAB = Z_BAPI_FIND_CUSTOMERS.Tables("PARTNERS_TAB")
                    ' Results
                    count = PARTNERS_TAB.Rows.Count
                    msg = msg & "partner rows: " & CStr(count) & "<BR>"
                    If (count > 2) Then ' we have more than one soldto or shipto
                        cnt_sold_to = 0
                        cnt_ship_to = 0
                        For index = 1 To PARTNERS_TAB.Rows.Count
                            If (PARTNERS_TAB.Value(index, "PARTN_ROLE") = "AG") Then
                                cnt_sold_to = cnt_sold_to + 1 ' PARTN_ROLE = "AG"
                            Else
                                cnt_ship_to = cnt_ship_to + 1 ' PARTN_ROLE = "WE"
                            End If
                        Next ' go to next record in partner_tab
                        msg = msg & "sold to: " & CStr(cnt_sold_to) & " ship to: " & CStr(cnt_ship_to) & "<BR>"
                    End If ' count of partners_tab > 2 we *may* need to do something about it here - fix me
                    msg = msg & "<table>"
                    For index = 1 To PARTNERS_TAB.Rows.count
                        msg = msg & "<tr>"
                        For index2 = 1 To 8
                            msg = msg & "<td>" & PARTNERS_TAB.Value(index, index2) & "</td>"
                        Next
                        msg = msg & "</tr>"
                    Next
                    msg = msg & "</table>"
                    'If ((cnt_sold_to = 1) And (cnt_ship_to = 1)) Then ' we only have one soldto and one shipto
                    '    Results.Visible = False
                    'Else ' we have more than one shipto or soldto - fix me
                End If
            End If
        End If
        msg = msg & "<br>DONE!"
        Response.Write(msg)
        Response.End()
    %>

  • SOAPExceptionImpl: Bad endPoint type

    Hi,
    I am using SoapClient to send out my web services. It is running normally in my environment, but when I uploaded the files onto a web hosting site and run it from there, i encountered the below error.
    java.lang.RuntimeException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad endPoint type https://webservices.sabre.com/websvc at webservices.client.AvailWsdlClient.startConversation(AvailWsdlClient.java:149)
    (ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686) at java.lang.Thread.run(Thread.java:619) Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad endPoint type https://webservices.sabre.com/websvc at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:149) at webservices.client.SoapClient.sendSoapMessage(SoapClient.java:123) at webservices.client.AvailWsdlClient.startConversation(AvailWsdlClient.java:128) ... 23 more
    I read up some forums and found this, http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6619327
    Extracted from the url:
    Such code as
    SOAPConnection con = conFactory.createConnection();
    con.call(message, new URLEndpoint("http://localhost/"));
    worked well in java 5.0 but in java 6.0 it fails with "SOAPExceptionImpl: Bad endPoint type"
    However, I tested with Java 6.0 and it still works.
    Anyone has come across this error and can share your solution?
    Thank you in advance.
    Edited by: jduo on Mar 8, 2008 2:43 AM

    use instead of URLEndpoint ([...|http://docs.sun.com/app/docs/doc/819-3669/bnbhy?l=en&a=view])

  • RCU Database Coneection Details "Bad Packect Type"  error

    Hi,
    I am installing oracle soa suite 11.1.1.2.0, In RCU wizard, shows "Bad Packect Type" error, anybody give me a details how to i solve this issue
    I am providing following details
    Databasetype: Oracle Database
    Host: localhost
    port: 5560
    servicename: xe
    username: sys
    password: tiger
    ROLE: SYSDBA
    It shows Bad packet type,In Database connection details page

    Hi,
    Here are some pre-RCU-run you can perform:
    1) Check if you service is up and running.
    2) Try to connect to the DB separately using a tool/IDE like SQL Developer, JDeveloper, Toad, etc.
    3) Try to run RCU from a different machine. May be there are some Port conflicts.
    Thanks,
    Sanjay

  • Code for finding CPU utilisation for executing query

    Hi, i need code for finding CPU utilisation for executing the particular query.

    Use session tracing, then in trace file you can find cpu utilization for particular statement on each phase: parse, execute, fetch and the overall.
    Or You can use the dbms_utility.get_cpu_time (if your database is 10g) in pl/sql:
    declare
    cpt1 pls_integer;
    cpt2 pls_integer;
    cputime pls_integer;
    begin
    cpt1:=sys.dbms_utility.get_cpu_time;
    <some code here>
    cpt2:=sys.dbms_utility.get_cpu_time;
    cputime:=cpt2-cpt1;
    end;
    good luck

  • I get "Bad endPoint type" only on the server

    I have a fairly simple program that receives JMS messages from an external queue and compiles the message into a SOAP query to a BPEL process. The Oracle App server & BPEL process is running on a Solaris system. I'm running 10.1.2 for the moment.
    If I run my program on my windows developer's box, it receives the JMS message and successfully invokes the BPEL process on the BPEL App server thru the SOAP message.
    If I install the same jars and configuration files on the Solaris box which hosts the BPEL App server, I get a "Bad endPoint type" exception(com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl) when I attempt to send the SOAP message to the server.
    JAXM Exception; MSG: Bad endPoint type http://{url:port/orabpel/process}
    What could be different? I know the VMs are different, but they are both of the 1.6 series. There must be some other issue, but I do not know where to look. I have verified it is the same URL string used in either case.

    This turns out to be an issue between running under java 1.5 or java 1.6. I can make the windows box have the same Bad Endpoint Type failure when running under the 1.6 VM. There must be a miss-match of jars when 1.6 is used since it has the SOAPConnectionFactory, etc... in its release while 1.5 relies entirely on the axis-saaj jar.
    Has anyone had any experience with the transition from 1.5 to 1.6 and axis-saaj causing problems?

  • [ID 340138 kern.notice] BAD TRAP: type=31 rp=2a103985540 addr=4 mmu_fsr=0

    Hi,
    Solaris 10 running on Sun-Fire-V490 had a panic reboot with the following messages, any one aware of what kind of panic it was and what was the cause and resolution for this? Please help me.
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com ^Mpanic[cpu0]/thread=3000409f7a0:
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 340138 kern.notice] BAD TRAP: type=31 rp=2a103985540 addr=4 mmu_fsr=0 occurred in mod
    ule "qlog" due to a NULL pointer dereference
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 100000 kern.notice]
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 839527 kern.notice] fsck:
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 520581 kern.notice] trap type = 0x31
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 381800 kern.notice] addr=0x4
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 101969 kern.notice] pid=15282, pc=0x7b292524, sp=0x2a103984de1, tstate=0x4414001601,
    context=0x1de9
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 743441 kern.notice] g1-g7: 700de800, 770, 18c7c00, 0, 0, 1de9, 3000409f7a0
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com unix: [ID 100000 kern.notice]
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a103985260 unix:die+78 (31, 2a103985540, 4, 0, 2a1039853
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 000000000181bea8 000000000181bc00 0000000000000000 0000000000000001
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a103985340 unix:trap+9e0 (2a103985540, 0, 1fff, 5, 0, 1)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000000000000000 0000060011cb9858 0000000000000031 00
    00000000001c00
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 0000000000000000 0000000000000001 ffffffffffffe000 0000000000000005
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a103985490 unix:ktl0+48 (3000409f7a0, 6001dc88e00, 13, 0
    , 0, 3000409f7a0)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000000000000002 0000000000001400 0000004414001601 00
    0000000101c030
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 00000000000060b0 00000000018ca000 0000000000000000 000002a103985540
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a1039855e0 qlog:ql_open+b0 (2a103985758, 2003, 0, 700de8
    00, 0, 0)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000000000000180 000006001b96d478 00000600215d5460 00
    000000700dec00
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 0000000000000000 000000ee00000000 000006001b96d478 0000000000000000
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a1039856a0 specfs:spec_open+4f8 (2a103985930, 20, 300050
    715c0, 201, 600215d5460, 0)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000000000002003 000006001a10cac0 0000000000000000 00
    00060024bb7940
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 0000000000000004 0000000000008000 0000060011c02c88 000000ee00000000
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a103985760 genunix:fop_open+78 (2a103985930, 2, 30005071
    5c0, 2003, 6001a10cac0, 6001a10cac0)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000030000c8f080 0000000000002000 0000000000000004 00
    00060010058b00
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 0000060010058080 0000060010058298 000000000061d636 0000000000000004
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 723222 kern.notice] 000002a103985810 genunix:vn_openat+500 (0, 0, 1, 0, 2003, 7fff
    ffff)
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com genunix: [ID 179002 kern.notice] %l0-3: 0000000000000000 0000000000000002 0000000000000000 00
    00000000000000
    Dec 14 15:35:33 ux5slv13.ops.storagenetworks.com %l4-7: 0000000000000000 0000000000002000 0000000000000000 0000000000000000
    Thanks
    Mahalingam R.

    System is panicking in the qlog (QuickLog driver) kernel module which is provided by Symantec/Veritas and not Sun.

Maybe you are looking for

  • I try to download an app, but it says I need a new version of iPod software, yet I have the latest version.

    I've had this issue a couple times now. I have a iPod touch. It is a couple years old, but still new enough to have dual cameras. There have been a couple apps I've tried to load, and it tells me I need a new version of iPod software. I go to the iPo

  • Purchase order for a line item

    Hi Guys,              I have got the following business sceanrio. I have got a material "A" which can get from locally or can get from 3rd party also. In the sales order i have entered like following. Line item no.  Material     Qunatity     Item cat

  • PO send by mail using SAP

    Hi, Let me know how to send the po by mail using SAP. What is the configuration need? Regards Somu

  • Understanding isolation levels

    I'm having a difficult time understanding isolation levels. I know what problems each isolation level solves (i.e. dirty reads, nonrepeatable reads, phantom reads) and the classic textbook description of each level, but I simply cannot understand how

  • Private note in ME52N - ECC6.0

    Hi, In Purchase Req procedure, user entered the private note. Next users should not allow to modify it. How to restrict this private note in ME52N ? With Regards, Ramakrishna