JNI Not write once run anywhere But...

I have written a program that I put into C++ for speed reasons. I now want to use the JNI to
a) Get familiar with the JNI
b) To merge a Java GUI and speedy code together.
I've read that if you use the JNI then you cannot run your program everywhere. But I thought about programs written in C/C++ that do run everywhere, with respect to say the OS.
So isn't it possible to still have that via the JNI?

I have written a program that I put into C++ for
speed reasons. So, you measured the speed of a Java prototype and a C++ prototype and found the Java version to be significantly slower?
Or you just assumed it would be?
I've read that if you use the JNI then you cannot run
your program everywhere. But I thought about programs
written in C/C++ that do run everywhere, with respect
to say the OS.You may be able to use the same C/C++ source code, depending on what it's doing, but you'll at least have to recompile the native code. A Windows DLL can't be used on a Linux box.

Similar Messages

  • Programming on SIM??? write once, run anywhere???

    Dear all,
    I am a java developer for 2 years, everytime i read any java book, it stated there "write once, run anywhere", but does it really perform that? especially when we develope in J2ME, MIDP, CLDC is a main consideration for different phone. Different phones requires different CLDC n MIDP, developer have to develope different program for that. But, if we can develope program into Java SIM card, is that make sense of the phase "write once, run anywhere"?
    Due to the limited space, limited processor power, limited RAM on a little SIM card... how about we have a brainstorming session here to discuss about what kind of program that mobile phone user really want in their SIM? SIM card program is interoperability with every phone, and i think user will prefer to store more personalized things to SIM.......
    So, do u guys have any ideas on SIM?
    Best regards,
    Ric

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • "Write once, run anywhere" - Error on MacOS X running TrayIconDemo - JNI?

    I can not get the TrayIconDemo running on MacOS X... "Write once, run anywhere" broken? How can I use pure Java when I have to write MacOS X specific trayicons to get around the fact that MacOSX does not support lastest Java, and no official say when Java will be avalibale.
    http://java.sun.com/docs/books/tutorial/uiswing/examples/misc/TrayIconDemoProject/src/misc/TrayIconDemo.java

    What does the fact that Java6 doesn't exist onOS/X
    have to do with anything? Java6 didn't make
    enough
    changes to swing that it matters.
    The tray icon capability is a new feature in Java6.
    and Mac OS doesn't have a system tray like Windows
    does so there's nowhere to display the icon...http://www.ubuntu.com/
    It's for the best, really.

  • Write once, run anywhere philosophy

    Here is the text from JAVA2COMPLETE Reference about Character Streams.
    While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters. My doubt is that Why is that WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

    Here is the text from JAVA2COMPLETE Reference about Character Streams.
    While the byte stream classes provide sufficient functionality to handle any type of I/O operation, they cannot work directly with Unicode characters. Since one of the mainpurposes of Java is to support the�write once, run anywhere� philosophy, it was necessary to include direct I/O support for characters.
    My doubt is that Why is WRITE ONCE RUN ANYWHERE philosophy not applicable for Byte Streams.

  • Does "Write Once, Run Anywhere" (WORA) really exist?

    Does "Write Once, Run Anywhere" (WORA) really exist?

    Absolutely. You can write applications that will run on any
    J2EE-compatible application server. Although a few cases are very
    difficult, in many cases more can be done than you may realize. Java
    BluePrints (http://java.sun.com/blueprints) is the proof point here.
    Each year, we run the Deployathon
    (http://java.sun.com/developer/technicalArticles/J2EE/deployathon4/)
    which demonstrates a significant J2EE application running on multiple
    J2EE-compatible application servers.

  • Why java is called platform independent? "write once, run anywhere" code...

    I do have a answer for this. Please shed some light whether i am right or wrong.
    When you say java as platform independent, it means that, any java program once compiled to java class can be transferred to anyother machine(say, from windows to unix) can be executed, provided the destination machine has JVM.
    where as, in C/C++, if we transfer the object files from one machine to another machine, they will not be executed and they have to be re-compiled in the other machine.
    Am i correct?
    please, do give me your idea on this...
    thanks...

    Thanks george !

  • Write once run anywhere

    Is it possible to write one application that can run on Notebook, Palm OS and Win CE PDAs ?
    If can, how? What tools and APIs do I need? How about the jvm?
    If can't, why?
    I need to know it asap, waiting for your helps, thanks.

    Hi!
    I don't think so. There is no unique VM availale to that variety of platforms.
    The big problem is to get a VM that runs under those platforms. There is one kind of VM available to PDAs - personal Java -, other to notebooks and PC's - J2SE -, other to Palm devices - J2ME CLDC MIDP-.
    3 VM to three kind of devices with different features, although the Personal Java apps probabily would be compatible with J2SE...
    Marco Caetano

  • XML Anywhere TO Write Once , Run Everywhere

    I proposed this 4 years ago to cho haha reply.
    All codebase languages , legacy codebase , legacy code , etc . . . standardized into am XML file.
    MVC no. XVC yes. Xml View Controller yes.
    Xml Namespace yes. Xml Redirection_One Namespace yes.
    Xml Redirection_Two Namespace yes.
    No one says the word XHTML let alone XDHTML. Or SGML.
    At Intel Forum-- [http://communities.intel.com/people/ajaytemp?view=profile] -------
    The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web (abbreviated WWW or W3).
    Founded and headed by Tim Berners-Lee,[2] the consortium is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the World Wide Web. As of 10 July 2011, the World Wide Web Consortium (W3C) has 317 members.[1]
    W3C also engages in education and outreach, develops software and serves as an open forum for discussion about the Web.
    Is HTML3,4,5 in conformance to XML or XHTML ? Or X-HTML ? Why is ther HTML and then XHTML. I didn't see SGML consortium.
    This fissure or crack which seems to have caused a bumpy road for Web Browser producers is really annoying.
    It won't cause problems is really dumb.
    XML has been around for a decade or so . . .
    So if I write XHTML code. Will older browsers show it ?
    I felt like there is HTML and then there is XHTML.
    HTML requires a DTD tag at top which is really weird if you ask a layman what that is. Some standard from really old days.
    THen there is HTML transition standard, a 2nd , a 3rd... If it's a standard and everyone could write HTML code and be a public publisher or FREE speech.
    Then certain keywords are deprecated in one version, another version it's good to show. Makes no sense what is going on with browsers and their best attempts to get close to a W3C standard.
    Shame.
    They have strict, frameset, and then transitional versions of HTML, DHTML, or XHTML, XDHTML. What's the need for four or five more Standards. Not a standard even a Protocol now.
    It would of been easier to write Mandarin (chinese) code in ISO C or ANSI C then put up a simple egnlish home page i write in word pad or note pad.
    They Javascript Event Handling Methods are deprecated. A new one is added.
    It's really all unncessary. And this is making students life difficult is understatement.
    UGGGGGGGGLY.
    See Berkshire Hathaway home site for QUALITY HOME PAGE. Always see GOOGLE.COM home site. Quality matters.

    Large corps can't cooperative with college grads with COOP. Fine. It doesn't matter with .xml Lingua Franca .
    Older systems have compatibility now with the 3 letter extension !
    corperative dot_xml

  • What about "write once, run everywhere" with web services ?

    Hi all,
    I'm very new to web services in Java (but not new at all in Java and not really new in web services).
    I'm amazed of not finding a specification API for web services. It doesn't seem that I can write a web service (or a web service client) and run it under several "web services containers" (like we can do for servlets, JDO and pretty all java technologies). It seems - according to the tutorials I found yet - that if I want to make a web service that runs under Apache Axis, I must use org.apache.axis.* classes, and so on with WebLogic and other web services container...
    It doesn't look like java style and I'm kind of confused...
    could someone give me details ? am I wrong or something ?
    TIA

    I think is not that bad.
    You have two APIs in the jwsdp tool just for web services (JAXRPC and JAXM) and you can construct your web services and your clientes wit that. Once you compile with the tool and you get the WSDL and the model I think that you can deploy it in any container (I think)
    hope it hepls

  • File System Case Sensitive - breaks Write-Once

    I don't find a System property that denotes if the file system is case sensitive.
    If I want a FileFilter to behave as the user is expecting - it must know if the file system that it is running on is case sensitive. For example: On a DOS system the file apple.txt should be returned with the file PEACH.TXT by a FileFilter that is accepting *.TXT files. But on a Unix system only the PEACH.TXT would be returned (case sensitive).
    How would I make my FileFilter a true write-once-run-anywhere class?
    What am I missing?
    David

    For a file filter,
    you can get the file name and convert it to lowercase,
    then compare to a lowercase extension. It's not like
    that will rename the file, the file will still have
    whatever name the file has. However for a FileFilter that is case sensitive - there is a difference in what a File.listFiles(new ExtensionFilter("txt")) returns. And one can not just decide that it doesn't matter.
    Here's a specfic example. On a case insensitive system what is the next file in the sequence of:
    File.001, File.002, File.003, file.004
    Answer: fILE.005 - is valid
    But on a case sensitive system if one uses a FileFilter to find all the files that match "File".* then the answer is "File.004" - ONLY ONE answer, and creating this file will not (should not) overwrite the file.004!
    Seems to me one needs to match the FileFilter to the underling OS - because chances are the user is expecting OS file system naming conventions. If the user doesn't know what file system (and can't know - like on a web server app) then the system better be smart enough to not mess up and clober files.
    So it appears to me that a programmer needs to be able to ask the System what it's file system convention is. And sure I could guess based on some other properties (System.os.name or as Sun did based on file.separator) - but I was hopeful that I didn't need to GUESS.

  • ICO file not displaying at run time?

    Hello Experts,
    I an using fusion 11.1.2.1 32 bit. I have Copied the Icons as well as GIF files in C:\Oracle\Middleware\Oracle_FRHome1\forms\java folder.
    At button property i set Iconic to yes
    and file = addrow
    Icon not display at run time.
    but when i set file = abc.GIF
    image is displaying at run time.
    My doubt is that ICO file not displaying at run time while GIF file are displaying.
    Do i need to change configuration ?
    Please do the needful.
    Thanks
    Yash

    Hi Yash,
    First Try this steps
    To resolve this issue, follow these steps:
    Double-click My Computer, and then click Options on the View menu.
    Verify that the Icon file type appears on the File Types tab. If the Icon file type does not appear in the Registered File Types box, skip to step 10.
    Click Icon in the Registered File Types box, and then click Edit.
    Verify that the following settings exist, and then click OK:
    The Description Of Type box contains Icon.
    If there is a Confirm Open After Download check box, it should be selected.
    If the settings do not appear exactly as listed in step 4, click Remove, click Yes, and then click OK. If the settings do appear as listed in step 4, skip to step 10.
    Click New Type.
    In the Description Of Type box, type Icon.
    In the Associated Extension box, type ICO.
    Click OK, and then click Close.
    Use Registry Editor to view theHKEY_CLASSES_ROOT\.icokey, and then verify that the default string contains the following value:icofileIf the .ico key does not exist, create it, and then insert the value listed above. If any other values exist in the .ico key, delete them.
    Use Registry Editor to view theHKEY_CLASSES_ROOT\icofilekey, and then verify that the default string contains the following value:iconIf the icofile key does not exist, create it, and then insert the value listed above. If any other values exist, delete them.
    Create a new key in the icofile key called DefaultIcon , and type %1 as this key's default value.
    Quit Registry Editor, and then restart your computer.
    Second Try this
    Simple way
    Copy your images to:
    1
    c:\Oracle\Middleware\as_1\forms\java\ 
    Notes:
    - Icon files may not be supported.
    - In case of a Java security issue when using gif images, you will need to create a jar file and sign it with oracles sign-tool (see below, point 6).
    - In case you having trouble with oracle’s sign-tool, do it directly with java’s
    Recommended way
    1. Create a “icons” folder and place all your gifs in there
    i.e. “c:\Oracle\Middleware\as_1\forms\java\<icons>”
    2. From within icons folder make a jar file of all the gif images:
    1
    jar -cvf frmicons.jar *.gif 
    3. Copy this new jar into “c:\Oracle\Middleware\as_1\forms\java\”
    4. Edit/update formsweb.cfg file:
    path = c:\Oracle\Middleware\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\formsweb.cfg  …to update/include:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    # Forms applet parameter 
    codebase=/forms/java
    # Forms applet parameter
    imageBase=codebase
    # Forms applet archive setting for other clients (Sun Java Plugin...etc)
    archive=frmall.jar,frmicons.jar
    # Forms applet archive setting for JInitiator
    archive_jini=frmall_jinit.jar,frmicons.jar
    5. Edit/update Registry.dat file:
    path = c:\Oracle\Middleware\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\forms\registry\oracle\forms\registry\Registry.dat
    1
    2
    default.icons.iconpath=icons/ 
    default.icons.iconextension=gif
    At this point your icons should work normally, but if you get a security check of Java for gif files then proceed to the next step to fix this. TIP: May need to restart the weblogic/forms server for changes to take effect.
    6. Sign your jar file with oracles sign_webutil.bat sign-tool.
    path = c:\Oracle\Middleware\asinst_1\bin\sign_webutil.bat
    Firstly, you need to edit the sign_webutil.bat as follows:
    1
    2
    3
    SET KEYSTORE_PASSWORD=my_password 
    SET JAR_KEY=webutil2 # will need to change for every run
    SET JAR_KEY_PASSWORD=my_password
    Secondly, set the environment path and finally run the command:
    1
    2
    3
    set path=c:\Oracle\Middleware\as_1\jdk\bin 
    cd c:\Oracle\Middleware\asinst_1\bin\
    sign_webutil c:\Oracle\Middleware\as_1\forms\java\my_icons.jar
    This will create your signed jar file. Once initialized from the web-app it should ask the user to “Trust” the certificate and never prompt again.
    Other issues you may encounter and may need to edit/update the following files/registry entries as well:
    formsweb.cfg
    path = c:\Oracle\Middleware\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\formsweb.cfg
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    # Forms applet parameter 
    codebase=/forms/java
    # Forms applet parameter
    imageBase=codebase
    # Forms applet archive setting for other clients (Sun Java Plugin, ...etc)
    archive=frmall.jar, my_icons.jar
    ...or
    # Forms applet archive setting for JInitiator
    archive_jini=frmall_jinit.jar, my_icons.jar
    Registry.dat
    path = c:\Oracle\Middleware\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\forms\registry\oracle\forms\registry\Registry.dat
    1
    2
    default.icons.iconpath=/forms/java 
    default.icons.iconextension=gif
    Registry entries:
    1
    2
    UI_ICON:<path_to_icons_dir> 
    UI_ICON_EXTENSION: "gif": ".gif" "ico": ".ico"
    Credits and further information can be tracked for icons issue here and for jar file creation here.
    Hope this will help.

  • The Apache axis2 jar files are not taking at run time

    While running the application I was getting the following errors. The error is getting at run time only. It has compiled successfully.
    It ran under eclipse without any issues. But with Apache axis we are getting following error trace while uploading to server. The Apache axis2 jar files are not taking at run time.But compiling successfully.
    The application is running under Oracle R12 server.I didn't find any option to set class path for run time in R12 server.
    Using Java version is 1.6 and Apache axis2.1.6.2
    Error trace:
    Exception :java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
    Error : java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.populateAxisService(RightNowSyncServiceStub.java:41)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:636)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:625)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:673)
    com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:665)
    com.rightnow.ws.util.ContactUtils.initializeService(ContactUtils.java:57)
    somejsp.jspService(_somejsp.java:189)
    com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
    oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
    com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
    com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
    com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
    com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    java.lang.Thread.run(Thread.java:619)

    Hello,
    I too am trying to use Axis2 application in R12. But getting the following error:
    java.lang.classCastException: com.sun.xml.messaging.saaj.soap.ver1_1.SoapMessageFactory1_1Impl cannot be cast to oracle.webservices.soap.VersionedMessageFactory
    If I run the application standalone from java command line it works fine. I think the error could be because of some oracle app jars getting picked up inatead of my application jars. How to make sure that my application jars get picked up instead of oracle jars
    I tried loading my jar file and then setting it as contextClassLoader using "Thread.currentThread().setContextClassLoader", but this did not help.
    Can you please let me know what can be tried to fix this
    Thanks
    Srikanth

  • How to use the dll  created by c++ but not write a jni wrapper around

    how to use the dll created by c++ but not write a jni wrapper around through a java program. now I can't access that dll like this directly from java.

    Your question is unclear. (You haven't said what dll you are talking about.)
    But:
    If you are talking about an existing dll, then the only alternative to writing a wrapper is to use one of the wrapper generators floating around. Do a search on JACE.
    If you are talking about a dll you are writing, then run jah and get the interface to match java right away; then you won't have to write a wrapper.

  • My Firefox version is 13.0.1, I use Windows Seven 64-bit, when I click on Firefox, but the program does not run! But Firefox is seen in the list of Windows proc

    My Firefox version is 13.0.1, I use Windows Seven 64-bit, when I click on Firefox, but the program does not run! But Firefox is seen in the list of Windows processes, while Firefox does not run.
    I manually deleted Firefox from the list once I have Windows processing.
    And when I clicked on Firefox, Firefox will open quickly and easily.
    Firefox process in Windows Processes names list called "firefox.exe * 32" is.
    Please try to solve my problem, my problem is how to solve?

    Hi, are you saying that you start Firefox and it stalls -- you can see it in the Task Manager but it never displays -- but if you kill that process and start Firefox again it starts up properly that second time?
    If you look at the statistics available in the Task Manager's processes tab such as bytes read or other bytes, can you see whether Firefox is doing anything at all? ''Note: You might need to add columns if your Processes tab isn't set up to display statistics. You can do that from the View menu.''
    You might already have seen these troubleshooting articles. If not, does anything here help:
    * [[Firefox won't start - find solutions]]
    * [[Firefox hangs or is not responding - How to fix]]

  • Web part throwing exception at run time but not in debug mode

    The below code is throwing exception at run time but does not throw exception while debugging in Visual Studio. This is really causing difficulty for me to detect the cause of exception. Below I have also placed the exception image for reference.
    namespace CheckforContractorLogin.VisualWebPart1
    public partial class VisualWebPart1UserControl : UserControl
    protected void Page_Load(object sender, EventArgs e)
    if (!IsPostBack)
    string loginName = string.Empty;
    string coc_url = string.Empty;
    SPQuery spQuery = new SPQuery();
    spQuery.Query = "<Where><Eq><FieldRef Name='LoginName' /><Value Type='Text'>" + currentUser + "</Value></Eq></Where>";
    Guid _spSiteID = SPContext.Current.Site.ID;
    Guid _spWebID = SPContext.Current.Site.OpenWeb().ID;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite _spSite = new SPSite(_spSiteID))
    using (SPWeb _spWeb = _spSite.OpenWeb(_spWebID))
    //if user has already accepted the COC
    SPList getSPList = _spWeb.Lists["RedirectUrl"];
    SPListItemCollection getspItemColl = getSPList.Items;
    foreach (SPListItem item in getspItemColl)
    if (Convert.ToString(item["Title"]) == "Policy Acceptance")
    coc_url = Convert.ToString(item["Url"]);
    SPList spList = _spWeb.Lists["Policy Acceptance Status"];
    SPListItemCollection spItemColl = spList.GetItems(spQuery);
    bool result = getADUserInfo();
    if ((spItemColl.Count == 0) && (result))
    Response.Redirect(coc_url);
    protected string currentUser
    get
    string currentUser1 = HttpContext.Current.User.Identity.ToString();
    int index = currentUser1.IndexOf("\\") + 1;
    string currentLoginUser = currentUser1.Substring(index);
    return currentLoginUser;
    protected bool getADUserInfo()
    DirectoryEntry dentry = null;
    DirectorySearcher dsearcher = null;
    string ldap = string.Empty;
    string empID = string.Empty;
    string _empID = string.Empty;
    try
    Guid spSiteGUID = SPContext.Current.Site.ID;
    Guid spWebGUID = SPContext.Current.Site.OpenWeb().ID;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite elevatedSiteColl = new SPSite(spSiteGUID))
    using (SPWeb elevatedWeb = elevatedSiteColl.OpenWeb(spWebGUID))
    SPList spList = elevatedWeb.Lists["LDAP_Paths"];
    SPQuery spQuery = new SPQuery();
    spQuery.Query = "<Where><Eq><FieldRef Name='OU'/>"
    + "<Value Type='Text'>QD</Value></Eq></Where>";
    SPListItem spItem = spList.GetItemById(1);
    ldap = spItem["Path"].ToString();
    dentry = new DirectoryEntry();
    dentry.Path = ldap;
    dentry.Username = "******\\sp_admin";
    dentry.Password = "******";
    dsearcher = new DirectorySearcher(dentry);
    dsearcher.Filter = String.Format("(&(ObjectCategory=Person)(sAMAccountName=" + currentUser + "))");
    SearchResult searchResult = dsearcher.FindOne();
    dentry = searchResult.GetDirectoryEntry();
    if (searchResult != null)
    if (dentry.Properties.Contains("physicalDeliveryOfficeName"))
    empID = dentry.Properties["physicalDeliveryOfficeName"][0].ToString();
    if (empID.Contains("QA-"))
    return true;
    else
    return false;
    catch (Exception e)
    throw e;
    finally
    dentry.Close();
    dentry.Dispose();
    dsearcher.Dispose();

    Hi Zakir,
    I am not sure but it would be nice if you can do following
    Try search ULS log with correlation id and find exact error and share here. If not able to find do following
    Or in catch block write
    Response.Write(ex.ToString());
    and check what exception its giving.

Maybe you are looking for