Help! Jaguar dies in Servlet-C++ Corba connection jungle!

I was able to make the servlet to work with Java-Corba component.

But, I need help about getting Servlet to access C++ component that
does a getHello (double,double) method. 

On the client side (servlet), I generated Java Stub. 
On the server side, I generated C++ skeleton and 
implemented in this fashion: 

#include "CPPMyHelloImpl.hpp"
CORBA_Char* CPPMyHelloImpl::getHello
    (CORBA::Double i1,
    CORBA::Double i2)
{
  char str[100];
  strcpy (str,"Hello C++-CORBA");
  CORBA_Char *c = str;
  return  c;
}

But, after starting the jaguar and launched the servlet, I got:
....
Application Integrator for CICS Option is not licensed 
Starting services...
Accepting connections.
SIGABRT   6*   abort (generated by abort(3) routine)
    si_signo [6]: SIGABRT   6*   abort (generated by abort(3) routine)
    si_errno [0]: Error 0
    si_code [-1]: SI_LWP [pid: 20621, uid: 224]
        stackpointer=fd1ed904

Full thread dump Classic VM (JDK-1.2.2_005, native threads):
    "Thread-4" (TID:0x6360cd50, sys_thread_t:0xac4160, state:R, native 
ID:0x21) prio=5
    "Thread-3" (TID:0x6360f798, sys_thread_t:0xac13a0, state:CW, native 
ID:0x20) prio=5
        at java.lang.Thread.sleep(Native Method)
        at 
com.sybase.jaguar.servlet.ServletEngine.run(ServletEngine.java:1082)
        at 
com.sybase.jaguar.servlet.ServletServiceImpl.run(ServletServiceImpl.java:278)
        at 
com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:500)
    "Thread-2" (TID:0x6360fac0, sys_thread_t:0xaaaf60, state:R, native 
ID:0x1f) prio=5
    "Thread-1" (TID:0x6360a108, sys_thread_t:0xaaac18, state:R, native 
ID:0x1e) prio=5
    "Thread-0" (TID:0x635d17b8, sys_thread_t:0x9e2330, state:R, native 
ID:0x18) prio=5
        at com.sybase.CORBA.local.Socket.call(Native Method)
        at com.sybase.CORBA.local.OutputStream.write(OutputStream.java:29)
        at com.sybase.CORBA.iiop.Connection.invoke(Connection.java:1939)
        at CTutorial._st_CPPMyHello.getHello(_st_CPPMyHello.java:32)
        at 
com.sybase.jaguar.Tutorial.MyHelloServlet.doGet(MyHelloServlet.java:69)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
.....
.....

Any help will be appreciated.

BTW, I built the shared library in this fashion (sybase document's
options were errorneous in "Getting Started" for my SUN OS 5.7) :

CC -G -o libCPPMyHello.so -h libCPPMyHello.so -Kpic 
CTutorial_CPPMyHello.cpp CPPMyHelloImpl.cpp
-I$JAGUAR/include -DJAG_NO_NAMESPACE 

and copied libCPPMyHello.so to $JAGUAR/cpplib. This is a good
portion of the servlet:

        java.util.Properties props = new java.util.Properties(); 
        props.put ("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
        props.put ("org.omg.CORBA.NameServiceURL","iiop://fscsun02:9000");
        ORB orb = ORB.init((String[])null, props);
        org.omg.CORBA.Object objRef = 
orb.resolve_initial_references("NameService");
        NamingContext nc = NamingContextHelper.narrow(objRef);
        NameComponent compNc[] =          { new NameComponent(_compName, 
"") }; 
        Factory compFactory =            FactoryHelper.narrow ( 
nc.resolve(compNc) ); 
//      _comp = compFactory.create("jagadmin", "");
        _comp = 
CTutorial.CPPMyHelloHelper.narrow(compFactory.create("jagadmin", "") ); 
        //      System.out.println("... Created component instance."); 
        helloText = _comp.getHello (1.0, 2.0);


0
Behrouz_Vafa
1/9/2001 5:53:56 PM
sybase.easerver 11371 articles. 0 followers. Follow

3 Replies
369 Views

Similar Articles

[PageSpeed] 14

From Jaguar Programmers guide for parameters in C++

---------------------------------------------------

MyType_var v;
.....
v.in()              // Passes v as an in                       // parameter.
v.inout()           // Passes v as an inout                       // parameter.
v.out()             // Passes v as an out                       // parameter.
return v._retn()    // Passes v as a return value.

-----------------------------------------------------

Use this code

CORBA_String_var out = "Test STring";
return out._retn();


Check if this works
-himagiri



Behrouz_Vafa wrote:

> I was able to make the servlet to work with Java-Corba component.
> 
> But, I need help about getting Servlet to access C++ component that
> does a getHello (double,double) method. 
> 
> On the client side (servlet), I generated Java Stub. 
> On the server side, I generated C++ skeleton and 
> implemented in this fashion: 
> 
> #include "CPPMyHelloImpl.hpp"
> CORBA_Char* CPPMyHelloImpl::getHello
>     (CORBA::Double i1,
>     CORBA::Double i2)
> {
>   char str[100];
>   strcpy (str,"Hello C++-CORBA");
>   CORBA_Char *c = str;
>   return  c;
> }
> 
> But, after starting the jaguar and launched the servlet, I got:
> ....
> Application Integrator for CICS Option is not licensed 
> Starting services...
> Accepting connections.
> SIGABRT   6*   abort (generated by abort(3) routine)
>     si_signo [6]: SIGABRT   6*   abort (generated by abort(3) routine)
>     si_errno [0]: Error 0
>     si_code [-1]: SI_LWP [pid: 20621, uid: 224]
>         stackpointer=fd1ed904
> 
> Full thread dump Classic VM (JDK-1.2.2_005, native threads):
>     "Thread-4" (TID:0x6360cd50, sys_thread_t:0xac4160, state:R, native 
> ID:0x21) prio=5
>     "Thread-3" (TID:0x6360f798, sys_thread_t:0xac13a0, state:CW, native 
> ID:0x20) prio=5
>         at java.lang.Thread.sleep(Native Method)
>         at 
> com.sybase.jaguar.servlet.ServletEngine.run(ServletEngine.java:1082)
>         at 
> com.sybase.jaguar.servlet.ServletServiceImpl.run(ServletServiceImpl.java:278)
>         at 
> com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:500)
>     "Thread-2" (TID:0x6360fac0, sys_thread_t:0xaaaf60, state:R, native 
> ID:0x1f) prio=5
>     "Thread-1" (TID:0x6360a108, sys_thread_t:0xaaac18, state:R, native 
> ID:0x1e) prio=5
>     "Thread-0" (TID:0x635d17b8, sys_thread_t:0x9e2330, state:R, native 
> ID:0x18) prio=5
>         at com.sybase.CORBA.local.Socket.call(Native Method)
>         at com.sybase.CORBA.local.OutputStream.write(OutputStream.java:29)
>         at com.sybase.CORBA.iiop.Connection.invoke(Connection.java:1939)
>         at CTutorial._st_CPPMyHello.getHello(_st_CPPMyHello.java:32)
>         at 
> com.sybase.jaguar.Tutorial.MyHelloServlet.doGet(MyHelloServlet.java:69)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> .....
> .....
> 
> Any help will be appreciated.
> 
> BTW, I built the shared library in this fashion (sybase document's
> options were errorneous in "Getting Started" for my SUN OS 5.7) :
> 
> CC -G -o libCPPMyHello.so -h libCPPMyHello.so -Kpic 
> CTutorial_CPPMyHello.cpp CPPMyHelloImpl.cpp
> -I$JAGUAR/include -DJAG_NO_NAMESPACE 
> 
> and copied libCPPMyHello.so to $JAGUAR/cpplib. This is a good
> portion of the servlet:
> 
>         java.util.Properties props = new java.util.Properties(); 
>         props.put ("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
>         props.put ("org.omg.CORBA.NameServiceURL","iiop://fscsun02:9000");
>         ORB orb = ORB.init((String[])null, props);
>         org.omg.CORBA.Object objRef = 
> orb.resolve_initial_references("NameService");
>         NamingContext nc = NamingContextHelper.narrow(objRef);
>         NameComponent compNc[] =          { new NameComponent(_compName, 
> "") }; 
>         Factory compFactory =            FactoryHelper.narrow ( 
> nc.resolve(compNc) ); 
> //      _comp = compFactory.create("jagadmin", "");
>         _comp = 
> CTutorial.CPPMyHelloHelper.narrow(compFactory.create("jagadmin", "") ); 
>         //      System.out.println("... Created component instance."); 
>         helloText = _comp.getHello (1.0, 2.0);
> 
> 

0
Himagiri
1/9/2001 6:50:09 PM
Thanks for tuning the implementation. I changed it accordingly,
compiled and rebuilt the shared library and copied over to
$JAGUAR/cpplib. Then I started Jaguar, and after a few minutes
of initialization, I ran the servlet with similar error messages
spewed out by Jaguar before it surrendered and died in the 
dense jungle:

SIGABRT   6*   abort (generated by abort(3) routine)
    si_signo [6]: SIGABRT   6*   abort (generated by abort(3) routine)
    si_errno [0]: Error 0
    si_code [-1]: SI_LWP [pid: 335, uid: 224]
        stackpointer=fd0fd904

Full thread dump Classic VM (JDK-1.2.2_005, native threads):
    "Thread-5" (TID:0x6360f0c8, sys_thread_t:0xafbfd8, state:R, native 
ID:0x1b) prio=5
        at com.sybase.CORBA.local.Socket.call(Native Method)
        at com.sybase.CORBA.local.OutputStream.write(OutputStream.java:29)
        at com.sybase.CORBA.iiop.Connection.invoke(Connection.java:1939)
        at CTutorial._st_CPPMyHello.getHello(_st_CPPMyHello.java:32)
        at 
com.sybase.jaguar.Tutorial.MyHelloServlet.doGet(MyHelloServlet.java:69)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at 
com.sybase.jaguar.servlet.JagServlet.service(JagServlet.java:164)
        at 
com.sybase.jaguar.servlet.JagRequestDispatcher.service(JagRequestDispatcher.java:743)
        at 
com.sybase.jaguar.servlet.ServletEngine.service(ServletEngine.java:524)
        at 
com.sybase.jaguar.servlet.ServletServiceImpl.doService(ServletServiceImpl.java:52)
        at 
com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:140)
    "Thread-4" (TID:0x6360f1f0, sys_thread_t:0xac3c88, state:R, native 
ID:0x21) prio=5
    "Thread-3" (TID:0x6360fad8, sys_thread_t:0xac13f8, state:CW, native 
ID:0x20) prio=5
        at java.lang.Thread.sleep(Native Method)
        at 
com.sybase.jaguar.servlet.ServletEngine.run(ServletEngine.java:1082)
        at 
com.sybase.jaguar.servlet.ServletServiceImpl.run(ServletServiceImpl.java:278)
        at 
com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:500)
................
................

Any further help will make my EAServer evaluation a happy
success.

thanks,
--behrouz

0
Behrouz_Vafa
1/9/2001 7:37:48 PM
Great News!! My colleague installed GNU C++ and after rebuilding
the shared library based on the GNU C++ (as opposed to the 
latest version of the SUN/Solaris C++), the servlet was able to
talk to C++-Corba component. 

That effort stemmed from a message from a sybase technical
support who said:

"The latest CC version from SUN is not truely supported"

regards,
--behrouz

0
Behrouz_Vafa
1/9/2001 10:01:32 PM
Reply:

Similar Artilces:

How to connect a Jaguar connection cache from a C/C++ CORBA component
Hi.. All I am using Jaguar CTS 3.6.1 (#36108) running on MS Windows 2000 Professional. I also installed Sybase Adaptive Server Enterprise PC Client to connect a remote ASE 12.0 database... I have successfully created a connection cache to the database (Connection cache ping OK)... However, i am in trouble making a C/C++ CORBA component to use this conn cache... I added jagCMGetConnection API to get a connection from available cache as following * ------------------------------------------------------*/ retcode = JagCmGetConnection (&cache, (unsigned char *)"us...

C++/CORBA client connectivity to Jaguar EJB's
We have customers who want to access our Jaguar hosted EJB's from their C++/CORBA applications (they use Sun/Solaris machines). We have implemented this, however we need to cleanly deploy this ability to our customers. We only want to send them the Jaguar generated STUBS and the minimum files (*.so and *.hpp files etc) necessary for them to connect and call our Jaguar components. I.E. we need to provide the Jaguar client ORB along with our STUBS. We see the jagclient program but this is too large and all-encompasing for our needs as we only need C++/CORBA support and not COM an...

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

HELP C++ OCX Jaguar
Hello, I want to build an OCX in C++. This program must instanciate and invoke a Jaguar Component. I wrote this line (as the Jaguar's doc) : int main(int argc, char** argv) { ...... ORB_var orb = ORB_init(argc, argv, ""); Manager_var manager = Manager:: _narrow(Object_var(orb->string_to_object("iiop://jagpc3:9000"))); Session_var session = manager->createSession("jagadmin", ""); Ping_var p = Ping::_narrow(Object_var(session->create("Test/Java"))); ResultSet_var rs = p->results(); pri...

Help, Jaguar Connection Cache
Hi. I have a problem whit the creation connection cache to the Adaptive Server Enterprise. In teh user manual, one of the steps is change de variable enviroment SYBASE, in the System icon form the Control Panel. I do the change, restar teh server, but the Sybase Central no running and teh connection cache in create in the Jaguar server no function. The Ping result error is: "Ping of SybaseEnterprise CTLIB_110 Connection Cache failed: The ping operation did not complete successfully. The CT-Lib connect call failed." Tanks for you help ...

[Help] Again...Jaguar & Servlets
Hi again, I have been compiled a simple servlet. I will try to install it on jaguar.....OK! I will try to use it via Html call.......OK. I will try to stop & start servlet (not modify the class)...NOK!! I receive the error below: java.lang.ClassNotFoundException java.lang.IllegalArgumentException Sigh!!!! Any suggest??? thx -- Miserini Paolo Datamat S.p.A. Via Laurentina, 760 00143 Roma Tel : +39 6 50274463 Fax: +39 6 5020778 Email : Pmiser@datamat.it Hi, Paolo : It happend to me several times. From my experience , just refresh the servlet and s...

[ Help ] EAServer Connection Setting
I need a your help I had to write OCIW32.DLL on the Installed Connection cache for ORACLE 7.3.4 But I writed OCI32.DLL on the Installed Connection cache. When I Execute Jaguar CTS, I See the Error Message. SO, I cannot Execute Jaguar CTS. and I cannot rewrite that on the Installed Connection cache. Please, Help me. In advance, Thanks for your help. Start the JagRepair server and you will be able to correct the error via Jaguar Manager. On Fri, 20 Apr 2001 13:19:50 +0900, "���" <sslee@disc.co.kr> wrote: >I need a your help > >I...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

Running CORBA C++ on EAServer
My environment is Solaris 8 Forte C++ 6 My application build on C++ component by using the Rogue Wave class bundled with Forte C++ 6. However, I discover as the program running, the memory will be increased significantly. I think the Rogue Wave class memory may not be freed Are there any persons using the same environment exprience this memory issue. Please share you experence. Many Thanks ...

Need help with C# connection!!
Can someone please tell me what I'm doing wrong? I regularly program in VB.Net but am trying to learn C#. The code is really simple, I have this already working in VB, but I can not seem to get it to function correctly in C#. It keeps complaining that it doesn't have a definition for "Item".               //Database connection variables.               MySqlConnection MyConn;             ...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

Help with sql connection in C#
I have always programmed in VB.net but was given this site that is written in C#.  Basically for some reason they can not get the IDataReader reader To work on the IIS server they are loading it on to.  They are now asking me to fix the website so it will work.  I have no clue how to do this in C#.  In VB.net I would do this: Dim ConnectionString As String = "server=;uid=;pwd=;database="Dim CommandText As StringDim myConnection As New SqlConnection(ConnectionString)Dim Adapter As SQLDataAdapter = New SQLDataAdapterDim MyCommandBuilder As SQLCommandBuilderDim Ma...

Help with database connection in C# script
new to asp. I need help with this code that connects to database, it is giving me error on: Compiler Error Message: CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 13: {Line 14: Line 15: SqlConnection connection;Line 16: protected void Page_Load(object sender, EventArgs e)Line 17: { //this is the whole script without the system file paths//pu...

Web resources about - Help! Jaguar dies in Servlet-C++ Corba connection jungle! - sybase.easerver

Resources last updated: 12/15/2015 9:30:57 PM