JNI and Websphere 3.5

Hi there,
I have an application that makes use of JNI technology.
Basically, so as to work, the app must access a C++ DLL library via JNI, that in my case is a set of classes packaged in a jar file.
The app works just fine when is run locally, but I?m really in trouble to set up WebSphere properly so that I can web access the app with servlet and jsp.
I haven?t been succesful getting consistent info anywhere.
Could anybody give me detailed instructions on how to do that?
IBM instructions lack further details, they just don?t help, they?re made for experts!
Thanks!

I have solved the previous problem, and fallen into another.
Now this is quite a wierd one. Basically, as the servlet is run from the browser, the servlet calls the business classes. The business classes use other java classes that have native methods to call a DLL library.
A have put the JNI java classes in the websphere class path, not in the web app classpath, as descrived in the IBM redbooks, and I also created the 'path' variable from the web project in WebSphere in reference to the DLL.
When I go to the browser and call the servlet, the app works, once I get all the info on the jsp that came from the DLL. Now, if any other call is done through the web browser, the dll is no more instantiated!
Neither from the same machine nor from anywhere else!
Has anybody ever seen such a thing?
I just don?t know what else to do, and have not found any more instructions.
Please, any info on it is very much welcome.
Thanks a lot.

Similar Messages

  • Crystal Report 9.0 and Websphere

    hi can any body give me some steps regarding
    integration of crystal report and websphere
    i have already search this forum and i got lot many topics
    regarding this but all were using cyrstal report version 8 and 8.5
    which requires mandatory using IIS server which i dont wont to use
    i want a pure websphere and 9.0 version communication
    i had read the docs whihc states that 9.0 supports but i dont know how?
    can any bosy help regarding this

    here's the report code
    <%@ page contentType="text/html; charset=utf-8" %>
    <%@ page session="true"%>
    <%@ page import="javax.servlet.jsp.*"%>
    <%@ page import="java.util.Locale"%>
    <%@ page import="java.net.*" %>
    <%@ page import="java.text.DateFormat" %>
    <%@ page import="javax.servlet.jsp.JspWriter"%>
    <%@ page import="javax.servlet.http.HttpServletRequest" %>
    <%@ page import="javax.servlet.http.HttpSession" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*" %>
    <%@ page import="com.crystaldecisions.report.web.viewer.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*" %>
    <!--Code Starts here ........... -->
    <%
    System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$");
    String reportName=(String)request.getAttribute("ReportName");
    String requestNumber=(String)request.getAttribute("RequestNumber");
    String requestNumber="RPT_112";
    System.out.println("********************");
    ParameterField newParameter = new ParameterField();
    ParameterField newField = null;
    System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@");
    ParameterFieldDiscreteValue newValue = null;
    System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^");
    try{
    ReportClientDocument rptClientDoc = new ReportClientDocument();
    //System.out.println("11111111111111111111111111");
    /* Change DCWKS0241AB to the name of Machine where RAS is installed for ex like DCWKS0237 */
    rptClientDoc.setReportAppServer("DCWKS0241AB");
    System.out.println("22222222222222222222222222");
    /* Change this E:\\Crystal\\Reports\\ to the path where your reports are kept */
    String reportPath="E:\\RAS\\Reports\\Percentages.rpt";
    rptClientDoc.open (reportPath, 0);
    rptClientDoc.getDatabaseController().logon("bbva","bbva");
    System.out.println("After Creating the Client Document on the Report");
    /* folowing Code remove any default value to the report and append the request number in the input parameter*/
    newField = (ParameterField)rptClientDoc.getDataDefinition().getParameterFields().getField(0);
    newField.copyTo(newParameter,true);
    newParameter.getCurrentValues().removeAllElements();
    newValue=new ParameterFieldDiscreteValue();
    newValue.setValue(requestNumber);
    newParameter.getCurrentValues().add(newValue);
    /* Just for Testing Purpose
    Values v=newParameter.getCurrentValues();
    IValue iv=v.getValue(0);
    System.out.println("---> "+iv.computeText());
    rptClientDoc.getDataDefController().getParameterFieldController().modify(newField, newParameter);
    /* Specifying the Format */
    PDFExportFormatOptions PDFExpOpts = new PDFExportFormatOptions();
    //Create the ExportOptions object, set the PDF export options, and set the format type to PDF.
    ExportOptions exOpts = new ExportOptions();
    exOpts.setFormatOptions(PDFExpOpts);
    exOpts.setExportFormatType(ReportExportFormat.from_int(ReportExportFormat._PDF));
    System.out.println("After Setting the format");
    System.out.println("Before getting source");
    //Create the ReportExportControl object and set the report source to the report that will be exported to PDF.
    ReportExportControl expViewer = new ReportExportControl();
    System.out.println("Before getting source");
    expViewer.setReportSource (rptClientDoc.getReportSource());
    System.out.println("3");
    //Set the export options to the ReportExportControl object.
    expViewer.setExportOptions(exOpts);
    System.out.println("After Setting the Export Options to the ReportExportControl object.");
    //Set the exported report to display in the browser.
    //The setExportAsAttachment method is set to false by default. If it is set to true the user will be presented with the File Download dialog box to save the exported report to disk.
    expViewer.setExportAsAttachment(false);
    //Export and view the report.
    expViewer.processHttpRequest(request, response, (getServletConfig()).getServletContext(),null);
    System.out.println("After Exporting and viewing the report back in the Browser.");
    //Destroy the control.
    expViewer.dispose();
    catch (Exception e)
    out.write("Error: Open" + e.toString() + "\n");
    %>

  • JVM Crash When Using JNI and COM

    I'm trying to call a DLL compiled from VB6 source code that I do not have access to. The VB6 code simply retrieves data from a DB2 database using ADO and my client code grabs that data and marshals it to my Java code. I'm attempting to achieve this using JNI and COM (without a third-party bridge). It works 75% of the time, but the other 25% of the time, the JVM crashes with the usual Hotspot crash log containing an access violation exception. However, I don't know what in my C++ code (VC++ 8) could be causing this except for passing a "wild" pointer to the code lying underneath the COM object interface. If that is the case, I don't know how I am doing that.
    The Java code that is calling my native method is running on Tomcat 5.5.25 and just to be safe, I am not allowing multiple threads to concurrently call the method in my JNI DLL (though I realize that this will kill performance). Once I can get past this problem, I'll do the COM interfacing on a worker thread in my native code so I don't screw up CoInitialize and CoUninitialize calls in the case the same thread is concurrently executing multiple calls to my native code.
    I've noticed that in most cases, the JVM crashes during my call to the pClsAccount->OpenConnection method. However, my DLL isn't what is listed on the top of the call stack, which is why I suspect the passing of a wild pointer, though I'm just taking a guess at that. Does anyone have an idea as to what's going on ?
    JNIEXPORT jobject JNICALL Java_CustomerInfo_nGetCustomerAccountInfo(JNIEnv *env, jobject customerInfo, jstring accountNumber, jstring iniFileName)
    jboolean isCopy;
    // Account info class and instance to be instantiated
    jclass accountInfoCls = NULL;
    jobject accountInfoObj = NULL;
    // The constructor ID of the accountInfoCls
    jmethodID ctorID = NULL;
    // Pointer to the interface for the ClsAccount COM object
    _clsAccount *pClsAccount = NULL;
    HRESULT hr;
    BSTR bstrIniFileName(L"");
    try
    const char *nativeAccountNumber = NULL;
    if (accountNumber != NULL)
    nativeAccountNumber = env->GetStringUTFChars(accountNumber, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "accountNumber passed in was null !");
    return NULL;
    // Initialization
    variantt varConnectionSucceeded = variantt(false);
    variantt varGetAccountInfoSucceeded = variantt(false);
    variantt varAccountNumber = variantt(nativeAccountNumber);
    bstrt bstrLastPaymentDate = bstrt();
    bstrt bstrLastErrorMessage = bstrt();
    bstrt bstrLastErrorNumber = bstrt();
    jlong jTotalDue = NULL;
    jlong jEstablishedDueDay = NULL;
    jlong jLastPaymentAmount = NULL;
    jstring jLastPaymentDate = NULL;
    jstring jLastErrorMessage = NULL;
    jstring jLastErrorNumber = NULL;
    jthrowable jException = NULL;
    const char *chLastPaymentDate = NULL;
    const char *chLastErrorMessage = NULL;
    const char *chLastErrorNumber = NULL;
    long long totalDue;
    long long lastPaymentAmount;
    long establishedDueDateDay;
    //Convert string from Java string to C string to VB string
    const char *nativeIniFileName = NULL;
    if (iniFileName != NULL)
    nativeIniFileName = env->GetStringUTFChars(iniFileName, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "iniFileName passed in was null");
    return NULL;
    bstrIniFileName = comutil::ConvertStringToBSTR(nativeIniFileName);
    CoInitialize(NULL);
    // Create an instance of the COClass with the interface over it
    hr = CoCreateInstance(__uuidof(clsAccount), NULL, CLSCTX_INPROC_SERVER, __uuidof(_clsAccount), (void **)&pClsAccount);
    if (hr == S_OK)
    varConnectionSucceeded.boolVal = pClsAccount->OpenConnection(&bstrIniFileName);
    &#12288;
    if (varConnectionSucceeded.boolVal == -1)
    varGetAccountInfoSucceeded.boolVal = pClsAccount->GetAccountPaymentInformation(&(varAccountNumber.GetVARIANT()));
    env->ReleaseStringUTFChars(accountNumber, nativeAccountNumber);
    // Extract all available account information from the ClsAccount object
    if (varGetAccountInfoSucceeded.boolVal == -1)
    totalDue = pClsAccount->TotalDue.int64;
    establishedDueDateDay = pClsAccount->EstablishedDueDateDay;
    lastPaymentAmount = pClsAccount->LastPaymentAmount.int64;
    bstrLastPaymentDate = pClsAccount->LastPaymentDate;
    chLastPaymentDate = comutil::ConvertBSTRToString(bstrLastPaymentDate.GetBSTR());
    jTotalDue = (jlong)totalDue;
    jEstablishedDueDay = (jlong)establishedDueDateDay;
    jLastPaymentAmount = (jlong)lastPaymentAmount;
    jLastPaymentDate = env->NewStringUTF(chLastPaymentDate);
    delete[] chLastPaymentDate;
    pClsAccount->CloseConnection();
    // Populate error fields if any errors occur
    bstrLastErrorMessage = pClsAccount->LastErrMessage;
    chLastErrorMessage = comutil::ConvertBSTRToString(bstrLastErrorMessage.GetBSTR());
    bstrLastErrorNumber = pClsAccount->LastErrNumber;
    chLastErrorNumber = comutil::ConvertBSTRToString(bstrLastErrorNumber.GetBSTR());
    jLastErrorMessage = env->NewStringUTF(chLastErrorMessage);
    jLastErrorNumber = env->NewStringUTF(chLastErrorNumber);
    delete[] chLastErrorMessage;
    delete[] chLastErrorNumber;
    const char* clsName = "com/nuance/merchantsmutual/businessentities/CustomerAccountInfo";
    // Find the Java class and the ID of its constructor
    accountInfoCls = env->FindClass(clsName);
    ctorID = env->GetMethodID(accountInfoCls, "<init>", "(JJJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    //Release all resources associated with the ClsAccount instance
    pClsAccount->Release();
    //Instantiate the class with the given parameters
    accountInfoObj = env->NewObject(accountInfoCls, ctorID, jTotalDue, jEstablishedDueDay, jLastPaymentAmount, jLastPaymentDate, jLastErrorMessage, jLastErrorNumber);
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    else if (hr == REGDB_E_CLASSNOTREG)
    cout << "COM class not registered" << endl;
    else if ( hr == CLASS_E_NOAGGREGATION)
    cout << "COM class can't be aggregated" << endl;
    else if (hr == E_NOINTERFACE)
    cout << "No interface for COM class clsAccount" << endl;
    else if (hr == E_POINTER)
    cout << "*ppv pointer was NULL !" << endl;
    else
    cout << "Error occurred while creating COM object. HR is [" << hr << "]" << endl;
    // Free the BSTR because a new one was returned with a call to comutil::ConvertStringToBSTR
    SysFreeString(bstrIniFileName);
    // Release the string when it's no longer needed. MUST call if string won't be used
    // anymore or else a memory leak will occur
    env->ReleaseStringUTFChars(iniFileName, nativeIniFileName);
    CoUninitialize();
    &#12288;
    catch (_com_error &e)
    cout << "Encountered an exception in GetCustomerAccountInfo: Error was " << e.ErrorMessage();
    pClsAccount->Release();
    catch (...)
    pClsAccount->Release();
    return accountInfoObj;
    Edited by: Cthulhu76 on Jan 5, 2010 9:18 AM

    0x49202400 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=5340, stack(0x49bf0000,0x49c40000)]
    0x48a7e800 JavaThread "Thread-1" [_thread_in_native, id=5976, stack(0x48f00000,0x48f50000)]
    0x48a0dc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3072, stack(0x48c60000,0x48cb0000)]
    0x48a09000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4988, stack(0x48c10000,0x48c60000)]
    0x48a07c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3124, stack(0x48bc0000,0x48c10000)]
    0x48a07000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2572, stack(0x48b70000,0x48bc0000)]
    0x489f5c00 JavaThread "Finalizer" daemon [_thread_blocked, id=5752, stack(0x48b20000,0x48b70000)]
    0x489f4c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2596, stack(0x48ad0000,0x48b20000)]
    0x003c6000 JavaThread "main" [_thread_in_native, id=4252, stack(0x00820000,0x00870000)]
    Other Threads:
    0x489f0400 VMThread [stack: 0x48a80000,0x48ad0000] [id=5624]
    0x48a18800 WatcherThread [stack: 0x48cb0000,0x48d00000] [id=1192]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 36288K, used 12762K [0x02940000, 0x050a0000, 0x07800000)
    eden space 32256K, 34% used [0x02940000, 0x0343af58, 0x048c0000)
    from space 4032K, 37% used [0x04cb0000, 0x04e2ba28, 0x050a0000)
    to space 4032K, 0% used [0x048c0000, 0x048c0000, 0x04cb0000)
    tenured generation total 483968K, used 7518K [0x07800000, 0x250a0000, 0x42940000)
    the space 483968K, 1% used [0x07800000, 0x07f57958, 0x07f57a00, 0x250a0000)
    compacting perm gen total 14080K, used 14016K [0x42940000, 0x43700000, 0x46940000)
    the space 14080K, 99% used [0x42940000, 0x436f0320, 0x436f0400, 0x43700000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040f000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe
    0x7c800000 - 0x7c8c0000      C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000      C:\WINDOWS\system32\kernel32.dll
    0x77380000 - 0x77411000      C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000      C:\WINDOWS\system32\GDI32.dll
    0x77f50000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000      C:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000      C:\WINDOWS\system32\Secur32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\system32\MSVCRT.dll
    0x7c8d0000 - 0x7d0cf000      C:\WINDOWS\system32\SHELL32.dll
    0x77da0000 - 0x77df2000      C:\WINDOWS\system32\SHLWAPI.dll
    0x76290000 - 0x762ad000      C:\WINDOWS\system32\IMM32.DLL
    0x77420000 - 0x77523000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d7c0000 - 0x6da10000      C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x7c340000 - 0x7c396000      C:\WINDOWS\system32\MSVCR71.dll
    0x6d270000 - 0x6d278000      C:\Program Files\Java\jre1.6.0_07\bin\hpi.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      C:\Program Files\Java\jre1.6.0_07\bin\verify.dll
    0x6d310000 - 0x6d32f000      C:\Program Files\Java\jre1.6.0_07\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\Program Files\Java\jre1.6.0_07\bin\zip.dll
    0x6d570000 - 0x6d583000      C:\Program Files\Java\jre1.6.0_07\bin\net.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000      C:\WINDOWS\system32\mswsock.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76ed0000 - 0x76efa000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000      C:\WINDOWS\system32\rasadhlp.dll
    0x4a6a0000 - 0x4a6ac000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\CustomerInfoProxy.dll
    0x77670000 - 0x777a9000      C:\WINDOWS\system32\ole32.dll
    0x77d00000 - 0x77d8b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x7c420000 - 0x7c4a7000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCP80.dll
    0x78130000 - 0x781cb000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCR80.dll
    0x777b0000 - 0x77833000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x77010000 - 0x770d6000      C:\WINDOWS\system32\COMRes.dll
    0x77b90000 - 0x77b98000      C:\WINDOWS\system32\VERSION.dll
    0x75da0000 - 0x75e5d000      C:\WINDOWS\system32\SXS.DLL
    0x75e60000 - 0x75e87000      C:\WINDOWS\system32\apphelp.dll
    0x4dc30000 - 0x4dc5e000      C:\WINDOWS\system32\msctfime.ime
    0x4b0d0000 - 0x4b395000      C:\WINDOWS\system32\xpsp2res.dll
    0x71bb0000 - 0x71bb9000      C:\WINDOWS\system32\WSOCK32.dll
    0x4bbe0000 - 0x4bbea000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\ClearTranProxy.dll
    0x745e0000 - 0x7489e000      C:\WINDOWS\system32\msi.dll
    0x71c40000 - 0x71c97000      C:\WINDOWS\system32\NETAPI32.dll
    0x4bc50000 - 0x4bc6c000      C:\WINDOWS\system32\DBNETLIB.DLL
    0x71f60000 - 0x71f64000      C:\WINDOWS\system32\security.dll
    0x76c90000 - 0x76cb7000      C:\WINDOWS\system32\msv1_0.dll
    0x76cf0000 - 0x76d0a000      C:\WINDOWS\system32\iphlpapi.dll
    0x761b0000 - 0x76243000      C:\WINDOWS\system32\crypt32.dll
    0x76190000 - 0x761a2000      C:\WINDOWS\system32\MSASN1.dll
    0x4bcf0000 - 0x4bcff000      C:\Program Files\Common Files\System\Ole DB\SQLOLEDB.RLL
    0x4a8a0000 - 0x4a8aa000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MIGI.DLL
    0x73570000 - 0x736c2000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MSVBVM60.DLL
    0x4a950000 - 0x4a9e2000      C:\Program Files\Common Files\System\ado\msado15.dll
    0x74a50000 - 0x74a6a000      C:\WINDOWS\system32\MSDART.DLL
    0x4c850000 - 0x4c8c9000      C:\Program Files\Common Files\System\Ole DB\oledb32.dll
    0x4dbb0000 - 0x4dbc1000      C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
    VM Arguments:
    jvm_args: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties -Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib vfprintf -Xms512m -Xmx1024m
    java_command: <unknown>
    Launcher Type: generic
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07
    [error occurred during error reporting (printing environment variables), id 0xc0000005]
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 2
    CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 7 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
    time: Mon Dec 28 15:24:00 2009
    elapsed time: 600 seconds

  • Java 1.5 JNI and C++ exception

    Hello, All
    I've troubles with handling C++ exceptions using JNI and shared library. I'm using Java 1.5_06, RedHat 7.3 and JBoss 4.0.5
    From Java class I call JNI a method in my shared library(libx.so) which calls a method in other shared library(liby.so). Liby.so uses Xerces library. During parsing process an exception occurs. But according to Xerces sources it's a normal behavior and should be caught. But instead I've got SIGNABRT in JVM and a core dump will created. What's wrong? Backtrace shows similar something:
    XXXXX  __default_terminate() ....
    XXXXX  __terminate() ....
    XXXXX  __throws
    XXXXX C++ method ..
    XXXXX.....
    XXXXX.....
    XXXXX  JNI methodI found similar bugs reports in the forum. But they says about Java 1.4 version and according to bugs descriptions it should be already fixed.
    Message was edited by:
    kostik78

    The question is closed. The root cause was incorrect building of shared library.

  • EJB communication between weblogic and websphere

    Hello:
    I have weblogic 7.1 instance running in machine A and websphere running in machine B. I want to make a call to the ejb deployed from weblogic to websphere. Any experience in this would be very helpful. Or pl. post the procedure.
    Thx in advance.

    I don't think that there is any magic here, although I've never tried it.
    All you need is the compiled EJBHome and EJBObject interfaces in the
    classpath of the calling EJB, get an InitialContext in the JNDI namespace of
    the target EJB container using the name of the JNDI InitialContext Factory,
    do a lookup on the bean making sure to do a PortableRemoteObject.narrow when
    you are casting the Home stub with the vendor specific version of
    PortableRemoteObject(and that may be the real trick), call the appropriate
    create method, and you are rolling.
    I guess the question becomes how to make sure that when you are calling
    PortableRemoteObject.narrow on the Home stub, that you get the vendor
    specific version for the EJB container and JNDI namespace from which you are
    doing the lookup.
    I guess the answer is, I'm guessing. Have you tried it?
    bill
    "nebs om" <[email protected]> wrote in message
    news:30035468.1103738722864.JavaMail.root@jserv5...
    Hello:
    I have weblogic 7.1 instance running in machine A and websphere runningin machine B. I want to make a call to the ejb deployed from weblogic to
    websphere. Any experience in this would be very helpful. Or pl. post the
    procedure.
    >
    Thx in advance.

  • JNI and Out of Memory errors

    Hi,
    At my job, we seem to have a memory leak related to JNI. We know we
    have a memory leak because we keep getting Out of Memory errors even
    after increasing the maximum heap size to more than 256 megs. And we
    know that this is the application that is eating up all the system
    memory.
    We are running under Windows 2000, with both JDK 1.3.0 and JDK 1.4.1.
    We tried looking at the problem under JProbe, but it shows a stable
    Java heap (no problems, except that the Windows task manager shows it
    growing and growing...)
    I tried a strip down version, where I set the max heap size to 1 Meg,
    and print out the total memory, memory used, and maximum memory used at
    a 5 sec interval.
    Memory used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory().
    Well, I let that strip down version running for about a day. The
    maximum memory used has stabilized to about 1.1 Meg, and has not
    increased. The current memory used increases until it gets to some
    threshold, then it decreases again. However, the Windows task manager
    shows the memory increasing -- and currently it is at 245 Megs!
    In the lab, the behavior we see with the Windows task manager is as
    follows:
    1. Total memory used in the system increases until some threshold.
    2. Then it goes back down by about 100 Megs.
    3. This cycle continues, but at each cycle the memory goes back down
    less and less, until the app crashes.
    Now, our theory is that JNI is consuming all this memory (maybe we are
    using JNI wrong). That's the only explanation we can come up with to
    explain what we have seen (Java showing an OK heap, but the task
    manager showing it growing, until crashing).
    Does that make sense? Can the new operator throw an Out of Memory
    error if the system does not have enough memory to give it, even if
    there is still free heap space as far as the Runtime object is
    concerned? Does the Runtime object figures objects allocated through
    JNI methods into the heap used space?
    Note that I know the task manager is not a reliable indicator.
    However, I don't think a Java app is supposed to runaway with system
    memory -- the problem is not simply that the Java app is consuming too
    much memory, but that it seems to always want more memory. Besides, we
    do get the Out of Memory error.
    Thanks for your help,
    Nicolas Rivera

    Hi,
    there are two sources of memory leakage in JNI:
    - regular leaks in c/c++ code;
    - not released local/global references of java objects in JNI.
    I think that the first issue in not a problem for you. The second is more complex. In your JNI code you should check
    - how many local references alive you keep in your code as their number is restricted (about 16 and can be enlarged). The good style is not to store local references but keep only global.
    - any local reference accepted from java call in JNI are released by JVM. You should release local references you created in JNI and also global references.
    - do not use a large number of java object references. Each new reference gets new memory in JVM. Try to reuse refences.
    I guess that is your problem.
    Vitally

  • Help me for Configuration on Oracle AS 10g and WebSphere MQ

    If there someone can share there experience on configuration on Oracle AS 10g and WebSphere MQ. Is there some quite easy ways or tools to do this?
    Welcome any advise!

    Hi,
    The only thing I know of is the documentation to configure the resource provider and I think there is an example on Technet:
    "Declaring an IBM WebSphere MQ Resource Provider Reference"
    [http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/jms.htm#i1086751|http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/jms.htm#i1086751]
    and
    [http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html|http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html]
    I think the important thing is to note step 3 of the documentation,
    Add to J2EE_HOME/applib any JAR files required by a Websphere MQ JMS client
    as described in the IBM documentation.
    I assume this comes from an MQ library that should be installed in OC4J.
    If you use applib you must restart OC4J before it will be seen also.
    I hope this can guide you in the right path.
    Sincerely,
    Steff

  • SAP XI and WebSphere Application Server v6

    Hello,
    has anyone made integration projects between SAP XI and WebSphere App Server v6 using JMS?
    Thanks for any feedback
    Jens

    WebSphere is not a Sun Microsystems product.
    It does not make sense to ask questions here, about a third party product,
    particularly when that third party is such a large organization.
    Can you describe what guidance you have received from IBM ?
    They would be the best source of all nuances on their own product.
    They created it.
    They've undoubedly installed it once or twice.
    They are expected to be prepared to answer questions about it.

  • [svn] 2773: Update excludes list for JBoss and WebSphere.

    Revision: 2773
    Author: [email protected]
    Date: 2008-08-07 04:35:10 -0700 (Thu, 07 Aug 2008)
    Log Message:
    Update excludes list for JBoss and WebSphere.
    Modified Paths:
    blazeds/trunk/qa/features/excludes.properties

    JGroups is an open source project that allows processes to send messages to one another. LiveCycle data services uses it for its messaging implementation (basically it configures the server to multicast messages to all the listening clients...even in a clustered environment across different LAN/WAN).
    In most cases the default configuration will work fine, the problem is that if you are running a firewall on the server (or your local machine...i.e. windows firewall) the ports that JGroups uses for its communications can be blocked. In a local environment its easy enough to disable windows firewall and bounce your server to get things working.
    In a production environment you need to open the ports that JGroups is using. These settings are in the Global Administration settings (as mentioned by WorkspaceUser above). If you export it and look at the JChannelConnectionProperties you'll see the ports its using and you can set your firewall to allow communication to those ports.
    Bryan

  • Weblogic and Websphere intergration

    Hi,
    I would like to make a call from EJB bean deploeyd on WLS8.1 to another
    bean deployed on Websphere 6.0 but I have no idea how to do that.
    When I do sth like that in EJB in WLS:
    InitialContext tx = new InitialContext();
    Object obj =
    (Object)tx.lookup("corbaname:iiop:localhost:2809#comarch/test/ejb/BasicCalculator");
    I get the following exception:
    javax.naming.NameNotFoundException: Exception in lookup.:
    `comarch/test/ejb/Basi
    cCalculator' could not be found. Root exception is
    org.omg.CosNaming.Nami
    ngContextPackage.NotFound:
    IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    at
    org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHe
    lper.java:72)
    at
    org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:
    251)
    at
    weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:187)
    at
    weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:174)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at examples.HelloBean.hello(HelloBean.java:71)
    BasicCalculator bean is deployed on websphere and websphere runs on
    localhost.
    What should i do to get it running?
    Any help appreciated.

    looser0 <[email protected]> writes:
    BasicCalculator bean is deployed on websphere and websphere runs on
    localhost.
    What should i do to get it running?
    Any help appreciated.This definitely works but there have been several patches to both
    products to support things well. First of all check what name you
    should actually use for websphere - I have a feeling that it has some
    bizarre prefix on all of its names. Next make sure you are running
    with WLS 8.1sp4. I don't know what version of WebSphere 6.0 you need -
    I know there were fixes in WAS 5.1.3.
    andy
    --

  • Recent Kodo versions and WebSphere 4.0

    Hi,
    we may have to use WebSphere 4.0 with Kodo until the IT infrastructure
    department supports the latest version WebSphere 5.0.
    Is anyone still developing with Kodo and WebSphere 4.0? Can I use Kodo
    2.5 / 3.0 with the 'old' version of WebSphere?
    Thanks a lot!
    Yours,
    Carsten

    Carsten-
    Our only feedback is that Kodo has not been tested with Websphere
    versions before 5.0.
    Note that you can always just Kodo directly: the only hiccup might be in
    the automatic global transaction synchronization. As long as Websphere
    4.0 provides a JTA-compliant TransactionManager, though, you might be
    able to solve any problems you see by writing a custom ManagedRuntime
    implementation.
    I'm sure the rest of the community will be interested in hearing the
    results of your tests.
    In article <bn38qa$d1i$[email protected]>, Carsten Jahn wrote:
    Hi,
    we may have to use WebSphere 4.0 with Kodo until the IT infrastructure
    department supports the latest version WebSphere 5.0.
    Is anyone still developing with Kodo and WebSphere 4.0? Can I use Kodo
    2.5 / 3.0 with the 'old' version of WebSphere?
    Thanks a lot!
    Yours,
    Carsten
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Weblogic and websphere colocated?

    Has anyone ever had any experience running weblogic and websphere on the same machine? If so, what were your issues?
    Thanks in advance.

    Web sphere has a wide robust features which weblogic lacks some. Like the load balancing and admin console, clustering .
    In Weblogic In many cases, code for applications deployed on WebLogic Server is arbitrarily structured and depends on the build process to make sense of it all. The implication of this is that existing code organization will very likely have to be changed as part of the migration effort. This may be very difficult (or even impossible) to accomplish while maintaining links to your code's history. Some organizations choose simply to archive their history and start fresh.
    In WebSphere, Packaged with each module is an XML deployment descriptor that describes the organization of the components in the module and how they are configured at run time. hence applications can be migrated easily.

  • Weblogic and Websphere IIS plugin coexistence

    Hi Folks,
    I have a customer who is planning to migrate part of their webapps from websphere to weblogic, however they would like to share the same IIS webfarm for the existing appservers farms ... I wonder if anyone know how the appservers plugins will behave if I have both BEA ISSProxy and IBM WebSphere IIS plugin on the same server ... anyone can share experience on this? Is it even supported?
    BTW ... Weblogic is 8.1SP4 and WebSphere is 5.1 ...
    Thanks,
    Juan Pablo Chen

    Sure.. why wouldn't it be?
    If you are using 1 IIS instance, which I am assuming you are, just make sure
    you load the iisproxy.dll in high isolation.
    Regards,
    Eric
    "Alan Bub" <[email protected]> wrote in message
    news:[email protected]..
    >
    I have a requirement that I run two weblogic servers on the same box. Theserver
    run the same applications except that they have different port numbers. Iwould
    like to run these both through a single IIS server. Is this possible?
    Thanks
    Alan

  • Weblogic and Websphere communication!!

    Hi Friends,
    I have an EJB HelloWorld deployed on both servers(Weblogic and Websphere) and these beens are accessible easily from their respective client servlets, which is the easy part.
    Now what I want to try is access the bean's methods on Weblogic server from a bean on Websphere server and vice versa. This is where I want some ideas from the gurus please.
    e.g. hello() method of the EJB (HelloWeblogic) in Weblogic server prints the message "Hello from Weblogic" and the hello() method of the EJB (HelloWebsphere) in Websphere server prints the message "Hello from Websphere". Now I want to know what do I need to do so that I am able to execute hello() of the HelloWeblogic EJB, from HelloWebsphere EJB and vice versa.
    I am also new to EJB, but I think I am making my way slowly.
    Any help/ideas/code samples would be really appreciated.
    Please feel free to ask any questions.
    Regards
    Rajeev

    As far as I can see the standard way would be to lookup
    the ejbs-home in the others JNDI context. After that proceed
    as you are used to.
    Troubles (or some unlikely behaviours) could occur if your beans are
    served by the same interfaces.
    But Dynamic Stub loading via RMI should prevent you from any problems with non existing stub/skels, etc.
    You could only run into problems when stub/skel-implementation-classes where named equally (by full qualifier) in both app-servers. This should never happen. (weblogic.SomeWLStubClass != ...websphere...SomeStubClass)
    Read RMI-Specification for further details on dynamic class-loading in
    the RMI process:
    http://java.sun.com/products/jdk/1.1/docs/guide/rmi/spec/rmi-arch.doc.html
    or j2ee-tutorial on how to resolve JNDI-Contexts.
    Hope it helps!
    Alexander Sack

  • Weblogic and websphere

    hi
    could anybody tell what is the basic difference between weblogic and websphere.
    thanks
    suru

    Web sphere has a wide robust features which weblogic lacks some. Like the load balancing and admin console, clustering .
    In Weblogic In many cases, code for applications deployed on WebLogic Server is arbitrarily structured and depends on the build process to make sense of it all. The implication of this is that existing code organization will very likely have to be changed as part of the migration effort. This may be very difficult (or even impossible) to accomplish while maintaining links to your code's history. Some organizations choose simply to archive their history and start fresh.
    In WebSphere, Packaged with each module is an XML deployment descriptor that describes the organization of the components in the module and how they are configured at run time. hence applications can be migrated easily.

Maybe you are looking for

  • Power Mac Mirror Door DVI or ADC to SINGLE RCA VIDEO OUT to a TV...adapter?

    I have a Mirror Door G4 tower that I would like to use as a media center, with an old(er) Magnavox 19" television that only has the single yellow VIDEO IN jack, and the red and white audio L and R. Is there a converter cable that is similar to the on

  • Is there a way to view what is running on the Q10?

    I know about closing apps open in the HUB, but is there a way to see what processes or programs are running on a Q10? I am watching one of our phones drain slowly just from sitting. Only thing running is our phone network. Maybe its syncing too often

  • My ipod is not being recognized anymore by my computer- HELP!

    i have an HP- i use windows home as my software, and i have a 20gb ipod... it's less than a year old... for some reason suddenly when i go to import songs/music from my computer to my ipod my computer is not recognizing my ipod- i can import the musi

  • How do I make a program wait for a set amount of time?

    Basically, I want there to be some amount of lag after a repaint, so how do I do that? I want it to wait a fifth of a second, basically. Is there a quick way to do this? By the way, the program is not running on a timer, so I can't just have the time

  • Date Diff in Oracle BAM

    Hi, I need to get the difference between two dates (in days) in a calculated field, can anyone help me? Best Regards