Knowledge Base: J-IntegraKnowledge Base: J-Integra RSS 2.0 Feedhttp://j-integra.intrinsyc.com/support/kb/j-integra_support@intrinsyc.comTue, 26 Sep 2017 19:51:37 GMT20Knowledge Base: J-IntegraSupported JDKs and Platformshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30963<B>Abstract:</B> <H1>Supported JDKs and Platforms</H1><P>All J-Integra products are supported on the following JDKs and Platforms. Customers are also using our J-Integra products on additional JDK/Platform combinations not listed below, including non-Windows platforms such as Linux. If you experience technical issues with any JDK/Platform not listed below, please <A href="http://j-integra.intrinsyc.com/support/">contact support</A> and we will take all commercially reasonable steps to support it.</P><HR><H2>Supported JDKs</H2><UL><LI>Sun Microsystems JDK 1.2</LI><LI>Sun Microsystems JDK 1.3</LI><LI>Sun Microsystems JDK 1.4</LI><LI>Sun Microsystems JDK 5</LI><LI>Sun Microsystems JDK 6</LI><LI>Oracle JDK 7</LI><LI>Oracle JDK 8</LI><LI>IBM JDK 1.3*</LI><LI>IBM JDK 1.4</LI><P><EM><FONT size=1>* Embedding ActiveX controls will not work with IBM's JDK 1.3.x because it does not support Sun's AWT Native Interface (jawt.dll). However, this is the only limitation with this JDK (all other J-Integra functionality is supported). </FONT></EM></P></UL><H3>Notes:</H3><OL><LI>The J-Integra COM native code libraries (ntvinv.dll, ntvauth.dll, jintmk.dll, ntvocx.dll) are only supported on 32-bit JVMs. 64-bit JVMs cannot load the native code libraries and will result in an exception at runtime. You can still run J-Integra on 64-bit JVMs, but you must use pure DCOM mode to do so (ie, you cannot use "native mode" or "native authentication").</LI><br /><LI>EJB 3.0 (specifically "annotations") is not supported.</LI></OL><HR><H2>Supported Microsoft Windows Platforms</H2><UL><LI>Microsoft Windows NT 4.0 (including SP6)</LI><LI>Microsoft Windows 2000 (including SP4)</LI><LI>Microsoft Windows XP (including SP3)</LI><LI>Microsoft Windows Server 2003 (including R2 and SP2)</LI><LI>Microsoft Windows Server 2008 (including R2 and SP2)</LI><LI>Microsoft Windows Server 2012 (including R2)</LI><LI>Microsoft Windows Vista (including SP2)</LI><LI>Microsoft Thu, 19 Jan 2017 14:49:00 GMTJ-Integra KB AdminJ-Integra COM for Excel 2016 and Windows 10http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183259<B>Abstract:</B> <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN"><html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> <!-- marked for deletion --> <link rel="stylesheet" href="default_ns.css"> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"> </script> <script type="text/javascript" language="JavaScript" title="WebHelpInlineScript"> function reDo() { if (innerWidth != origWidth || innerHeight != origHeight) location.reload(); } if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) { origWidth = innerWidth; origHeight = innerHeight; onresize = reDo; } onerror = null; </script></head><body> <script type="text/javascript" language="javascript1.2"> if (window.gbWhTopic){ if (window.addTocInfo){ addTocInfo("Examples<br>Java Accessing COM<br>Java to Excel"); addButton("show",BTN_TEXT,"Show","","","","",0,0,"","",""); } if (window.writeBtnStyle){ writeBtnStyle(); } if (windoThu, 19 Jan 2017 14:42:00 GMTJ-Integra KB AdminHow do I Install CDO (Collaboration Data Objects)?http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113792<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>How do I Install CDO (Collaboration Data Objects)?</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>There are a few ways to install CDO. The method to use depends on what version of Microsoft Outlook you currently have installed (if any). Since different copies of CDO cannot co-exist on the same machine, please only follow the instructions that apply to your system configuration.</P><H2>1. Microsoft Outlook is not installed</H2><P>Download and install the stand-alone Messaging API (MAPI) client version available <A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e17e7f31-079a-43a9-bff2-0a110307611e&DisplayLang=en" target=blank>here</A>. <H2>2. Microsoft Outlook 2007</H2><P>Beginning in Outlook 2007, Microsoft no longer provides CDO as part of the product installation. However, since Outlook is a MAPI client itself, the stand-alone version that does not come pre-packaged with the MAPI client must be used. This version of CDO can be downloaded <A href="http://www.microsoft.com/downloads/details.aspx?familyid=2714320D-C997-4DE1-986F-24F081725D36&displaylang=en" target=blank>here</A>.Note: This version of CDO may only be used with Outlook 2007. Microsoft does not support CDO with Office 2010 or later. <H2>3. Microsoft Outlook 2003 and earlier</H2><P>In Outlook 2003 and earlier, CDO is bundled as a component in MS Outlook; however, it is not installed by default when you install MS Outlook. The following steps demonstrate how to install CDO as a component of Outlook using a Windows XP machine. Similar steps apply for other operating systems. <OL><P><LI>Open Add or Remove Programs under Settings > Control Panel. <P></P><LI>Click on Change or Remove Programs on the left side bar and select Microsoft OffTue, 18 Mar 2014 05:12:00 GMTJ-Integra KB AdminWindows - User Account Control (UAC)http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183235<B>Abstract:</B> <H1>Windows - User Account Control (UAC)</H1><P>Windows (starting with Vista) introduced a new security component known as User Account Control (UAC) that is designed to help prevent malicious programs from silently installing and computer-wide infections from occurring. With UAC enabled, an account with administrative privileges runs applications as a standard user unless the application has been approved to run at an "elevated" level. </P><P>If you are experiencing problems running J-Integra on Windows (Vista or later), please try disabling UAC by doing the following: </P><P>In (Windows 7) Control Panel -> User Accounts -> User Accounts, click on "Change User Account Control settings". In the next screen, drag the slider to the bottom and click OK. You may be prompted to reboot your machine in order for the change to come into effect. </P><P>For more information about Windows UAC, please refer to the <A href="http://technet.microsoft.com/en-us/library/cc709691%28v=ws.10%29.aspx">User Account Control Step-by-Step Guide</A>. </P>Thu, 03 Jan 2013 03:40:00 GMTJ-Integra KB AdminConfiguring CDO on a 64-bit Systemhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183258<B>Abstract:</B> <H1>Configuring CDO on a 64-bit System</H1><P>The following outlines how CDO can be configured on a 64-bit Windows system. Before continuing with this article, please familiarize yourself with the following documents (as they will be required later on): <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113792">How do I Install CDO (Collaboration Data Objects)</A> and <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/customConfig.htm">Custom CDO Configuration</A>.</P><P>It is assumed that J-Integra Exchange is installed (either by <A href="http://j-integra.intrinsyc.com/download/archive.asp">ZIP or EXE</A>) and that the PATH environment variable contains a valid reference to J-Integra's 'bin' folder.</P><P><OL><LI>Disable the Windows Firewall (and the UAC, if applicable).<LI>Install the CDO component (<A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113792">How do I Install CDO</A>).<LI>Register CDO.DLL using the 'regsvr32.exe' utility located in the 'WINDOWS\SysWOW64' directory.<LI>Configure CDO according to the <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/customConfig.htm">Custom CDO Configuration</A> (NOTE: Start at Step 5, since CDO.DLL was registered in the step above).<LI>Restart the system.</OL></P>Fri, 16 Mar 2012 04:32:00 GMTJ-Integra KB AdminCommon J-Integra for Exchange Problemshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Common J-Integra for Exchange Problems</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A></TD></TR></TBODY></TABLE><OL><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#Class not registered">Class not registered</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#Illegal Argument Exception">Illegal Argument Exception</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#MAPI_E_LOGON_FAILED or Interface not registered">MAPI_E_LOGON_FAILED or Interface not registered</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#AutomationException: 0x80010106">AutomationException: 0x80010106 - Cannot change thread mode after it is set</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#AutomationException: 0x5">AutomationException: 0x5 - Access is denied. in 'Invoke'</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#AutomationException: 0x800706ba">AutomationException: 0x800706ba - The RPC server is unavailable</A></LI><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#IOException">java.io.IOException: Unable to establish RPC Connection to DCOM SCM on <hostname/ip> (Bind returned Bind_NAK)</A></LI></OL><H2><A name="Class not registered"></A>1. Class not registered</H2><P>You will get this error when CDO is not installed on the CDO machine and/or CDO is installed but no surrogate process exists for CDO. To install CDO, refer to KB article 113792. <P>To create a surrogate process for CDO, refer to the <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/cdoconfigvb.htm" target=blank>Getting Started Guide</A> in the Tue, 25 Jan 2011 06:54:00 GMTJ-Integra KB AdminPrecompiled Java Proxy JAR Fileshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=81869<B>Abstract:</B> <H1>Precompiled Java Proxy JAR Files</H1><P>We have provided the following proxy JAR files for your convenience. These JAR files contain Java proxy files for specific COM applications (already generated by com2java, compiled, and JAR'd). Using these JAR files allows you to avoid having to generate and compile the proxy files manually. <P>Feel free to download any JAR file below you wish to use. To use a proxy JAR file, simply unzip the corresponding zip file and place it in your Java application's CLASSPATH.</P><LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/activeds-GUID27c236f9be1e407285633d45db9f5b25.jar">activeds.jar</A> - Microsoft Active Directory Library <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/access2003-GUID2916dc95dce0483fa1c03e8434211429.jar">access2003.jar</A> - Microsoft Access 2003 (11.x) <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/access2007-GUIDbd7370c3d56e4e36b91a60372599d390.jar">access2007.jar</A> - Microsoft Access 2007 (12.x) <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/cdo-GUID13725ff445f64011a1fd7bf6b69aa143.jar">cdo.jar</A> - Microsoft Collaboration Data Objects, CDO 1.2.1 v6.5.7233 <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/cdo2007-GUIDead41e2d28b44d27940c1cbf91671679.jar">cdo2007.jar</A> - Microsoft Collaboration Data Objects, CDO 1.2.1 v6.5.7888 <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/excel2000-GUID1107e7c133404b688311fd60b7c7e81f.jar">excel2000.jar </A>- Microsoft Excel 2000 (9.x) <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/excelXP-GUIDeb2c03345f4f4aff9d63ab43525edfac.jar">excelXP.jar</A> - Microsoft Excel XP (2002 10.x) <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/excel2003-GUID3e6af6ed06b14485825efb52fcac9cda.jar">excel2003.jar</A> - Microsoft Excel 2003 (11.x) <LI><A href="http://j-integra.intrinsyc.com/support/kb/attachments/excelMon, 22 Nov 2010 02:00:00 GMTJ-Integra KB AdminResolving Compilation Errors for ACTIVEDS.DLLhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=107101<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Resolving Compilation Errors for ACTIVEDS.DLL</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>When generating proxies for activeds.dll, the IADsADSystemInfo interface's 'get_IsNativeMode' conflicts with J-Integra's Dispatch object's 'isNativeMode' method, leading to the following compilation error:<BR><BR><CENTER><TABLE cellSpacing=0 cellPadding=0 width="80%" bgColor=#dedede><TBODY><TR><TD>IADsADSystemInfoProxy.java:231: isNativeMode() in Adsi.IADsADSystemInfoProxy cannot override isNativeMode() in com.linar.jintegra.Dispatch; overridden method is static public boolean isNativeMode () throws java.io.IOException, com.linar.jintegra.AutomationException </TD></TR></TBODY></TABLE></CENTER><BR>Because J-Integra has no mechanism for resolving this naming conflict, the proxies associated with the IADsADSystemInfo interface must be manually modified to change the method 'isNativeMode' to 'isNativeMode2' (or another name). This can be done by modifying the proxies in the following manner: <UL><LI>AdSystemInfo.java: <BR>On Line 302, change 'isNativeMode' to 'isNativeMode2' On line 304, change call to 'isNativeMode' to 'isNativeMode2' <LI>IADsADSystemInfo.java:<BR>On line 103, change 'isNativeMode' to 'isNativeMode2' <LI>IADsADSystemInfoProxy.java:<BR>On line 231, change 'isNativeMode' to 'isNativeMode2'</LI></UL>These changes have already been made to pre-compiled versions of these proxies, available via the <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=81869" target=_blank>Precompiled Java Proxy JAR Files</A> knowledge base article. Tue, 24 Aug 2010 05:16:00 GMTJ-Integra KB AdminUsing J-Integra to Access Real-Time Data from Bloomberg®http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183197<B>Abstract:</B> <body><H1>Using J-Integra to Get Real-Time Data from Bloomberg&reg;</H1><P>The following example demonstrates how to access Bloomberg&reg; real-time data from your Java application via J-Integra. Before running this example, make sure you have completed the configuration steps outlined in our documentation: </P><P><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=40283" target=blank>Accessing Bloomberg® from Java</A></P><P>Copy and paste the code below (and reference the Java proxies for Bloomberg&reg;) to get started with the example</P><P>For a third-party solution leveraging J-Integra, please see Optura&reg;'s <A href="http://www.opturo.com/via/">Virtual Investment Analytics</A> (VIA) automation platform. Additional information can also be found <A href="http://opturo.com/d_etl.html">here</A>.</P><TABLE border=0 cellSpacing=10 cellPadding=0 bgColor=#dddddd><TBODY><TR><TD><PRE>import blpdatax.BlpData;import blpdatax._BlpDataEventsAdapter;public class RealTimeDataExample { // fire event types final static int ByField = 0; final static int ByRequest = 1; final static int BySecurity = 2; // list of securities we wish to monitor static Object[] security = {"MSFT US Equity", "IBM US Equity", "EUR Curncy", "CAD Curncy"}; // security fields we wish to monitor static Object[] fields = {"Last_Price", "Bid", "Ask", "Volume", "High", "Low"}; public static void main(String[] args) { try{ //Uncomment this line if running J-Integra in native mode //i.e. Java and Bloomberg are running in the same machine //System.setProperty("JINTEGRA_NATIVE_MODE", ""); // Uncomment this line if running J-Integra in DCOM mode // i.e. Java and Bloomberg are in different machines // DCOM authentication: Make sure NT Domain, NT User, NT Password are valid credentials. //com.linar.jintegra.AuthInfo.setDefault("NT DTue, 04 May 2010 09:30:00 GMTJ-Integra KB AdminGetting Asynchronous Data Requests From Bloomberg®http://j-integra.intrinsyc.com/support/kb/article.aspx?id=37457<B>Abstract:</B> <H1>Getting Asynchronous Data Requests From Bloomberg®</H1><H3>Thanks to David McKenzie for the workaround suggested in this article.</H3><P>Be aware that if you start using the BLP Data Control, there is a problem that will keep asynchronous data requests from functioning correctly unless you use a work-around with J-Integra. The problem is that for the <I>Subscribe</I> and <I>GetHistoricalData</I> methods, the <I>Results</I> parameter is declared as <B>[OUT, OPTIONAL]</B> in the Bloomberg® DLL type library. You can only tell the Data Control that you want an asynchronous data return by omitting the <I>Results</I> parameter from the method call.</P><P>The VB compiler is smart enough to know that when the <B>[OPTIONAL]</B> attribute is designated, and the optional parameter has been omitted, it automaticaly passes a <B>VT_ERROR</B> variant with the value <B>DISP_E_PARAMNOTFOUND</B> (from C++, you just pass the <B>VT_ERROR</B> variant directly). Apparently VB does not care whether the parameter is an <B>[IN]</B> parameter or an <B>[OUT]</B> parameter.</P><P>Using the wrapper method generated by J-Integra, omitting the parameter is not an option because Java does not allow optional parameters - so you must pass <I>null</I>. However, J-Integra does not handle optional parameters correctly if they are declared as <B>[OUT, OPTIONAL]</B>. When J-Integra sees the <B>[OUT]</B> designation, it doesn't do any conversion of the parameter. It is only when the parameter is designated as <B>[IN, OPTIONAL]</B> that a <I>null</I> value gets converted into a <B>VT_ERROR</B> variant.</P><P>To get around the problem, you can use <I>invokeMethodByName()</I> to bypass J-Integra's parameter type checking. When <I>invokeMethodByName()</I> is used instead of calling the COM method directly, the <B>[IN]</B> / <B>[OUT]</B> attribute is not checked when sending parameters down the wire. Any paramater that is <I>null</I> will be converted into a <B>VT_ERROR</B> variant.</P><P>The fTue, 04 May 2010 09:27:00 GMTJ-Integra KB AdminUsing J-Integra to Access Historical Time-Series Data from Bloomberg®http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183198<B>Abstract:</B> <H1>Using J-Integra to Access Historical Time-Series Data from Bloomberg®</H1><P>The following example demonstrates how to access Bloomberg® time-series data from your Java application via J-Integra. Before running this example, make sure you have completed the configuration steps outlined in our documentation: </P><P><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=40283" target=blank>Accessing Bloomberg® from Java</A></P><P>Copy and paste the code below (and reference the Java proxies for Bloomberg®) to get started with the example. </P><P>For a third-party solution leveraging J-Integra, please see Optura®'s <A href="http://www.opturo.com/via/">Virtual Investment Analytics</A> (VIA) automation platform. Additional information can also be found <A href="http://opturo.com/d_etl.html">here</A>.</P><TABLE border=0 cellSpacing=10 cellPadding=0 bgColor=#dddddd><TBODY><TR><TD><PRE>import blpdatax.BlpData;import blpdatax._BlpDataEventsAdapter;public class HistoricalDataExample { //Bloomberg PERIODICITY constants final static int bbDaily = 1; final static int bbWeekly = 6; final static int bbMonthly = 7; final static int bbQuarterly = 8; final static int bbSemiAnnually = 5; final static int bbYearly = 9; final static int bbActualDaily = 1342177281; final static int bbActualWeekly = 1342177286; final static int bbActualMonthly = 1342177287; final static int bbActualQuarterly = 1342177288; final static int bbActualSemiAnnually = 1342177285; final static int bbActualAnnually = 1342177289; final static int bbCalendarDaily = 1610612737; final static int bbCalendarWeekly = 1610612742; final static int bbCalendarMonthly = 1610612743; final static int bbCalendarQuarterly = 1610612744; final static int bbCalendarSemiAnnually = 1610612741; final static int bbCalendarAnnually = 1610612745; final static int bbFiscalQuarterly = 1879048200; finTue, 04 May 2010 09:26:00 GMTJ-Integra KB AdminImproving J-Integra's Performance When Accessing Bloomberg® Softwarehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=39557<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Improving J-Integra's Performance When Accessing Bloomberg® Software</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>A number of customers have commented that their system performance takes quite a hit when using J-Integra to access Bloomberg® software. From the feedback we have received, we have gathered together some recommendations which may help improve overall performance.</P><P>1. The first thing you should do is upgrade to the latest version of J-Integra. Each new release contains many bug fixes and performance enhancements. You can download this version from our <A href="http://j-integra.intrinsyc.com/downloads/" target=blank>website</A>. </P><P>2. If you are currently running in DCOM mode, we suggest that you run in Native mode, as this will improve the performance significantly. To run in Native mode, you need to include a command line property when you run your Java client...</P><TT> java -DJINTEGRA_NATIVE_MODE MyClient </TT><P>3. Because the Bloomberg® software can pass back huge amounts of data in one transaction, an upgrade of the machine running J-Integra may be necessary. However, even though an upgrade may provide enough extra memory to keep the application from crashing, there will still be a significant performance hit.</P><P>4. Besides the fact that the Bloomberg® software can pass large amounts of data back to Java in a single transaction, the other reason it causes such a performance hit is because the data that is passed back is often carried in a two-dimensional array of Variants. This is fine when you are accessing this data from a Visual Basic client, as Variants are inherent to VB. But there is no such thing as a Variant in Java, so J-Integra must convert every one of these COM VarianTue, 04 May 2010 09:26:00 GMTJ-Integra KB AdminAccessing Bloomberg® from Javahttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=40283<B>Abstract:</B> <H1>Accessing Bloomberg® from Java</H1><P>The following example shows how to access the Bloomberg® BLP Data Control from Java using J-Integra. This example will run on any OS, run on any platform, and requires no native code (no DLLs). You can also download this example by clicking on the attachment below.</P><P>For a third-party solution leveraging J-Integra, please see Optura®'s <A href="http://www.opturo.com/via/">Virtual Investment Analytics</A> (VIA) automation platform. Additional information can also be found <A href="http://opturo.com/d_etl.html">here</A>.</P><TABLE border=0 cellSpacing=10 cellPadding=0 bgColor=#dddddd><TBODY><TR><TD><PRE>/* This example shows a pure Java client using the J-Integra pure Java-COM <BR> * bridge to talk to the Bloomberg® BLP Data Control. You can run this <BR> * program on any machine that supports a standard JVM. <BR> *<BR> * Create a file called BloombergExample.java containing this Java code. <BR> * Create a subdirectory called "blpdatax" under the directory containing <BR> * this Java program.<BR> *<BR> * Generate the pure Java proxy files used by this program to access the<BR> * Bloomberg® BLP Data Control by running the 'com2java' tool from the J-Integra <BR> * 'bin' directory. Specify "blpdatax.dll" as the type library, "blpdatax" <BR> * as the package name, and the blpdatax subdirectory you created above as the <BR> * output directory. <BR> *<BR> * You will also need to create a surrogate for "blpdatax.dll" using the <BR> * setdllhost tool. Open a command prompt and 'cd' to the directory containing<BR> * the blpdatax.dll file. Enter the following command:<BR> * &gt; setdllhost blpdatax.dll "Blpdatax"<BR> *<BR> * You may have to run DCOMCNFG and check that the DCOM settings for the new <BR> * surrogate are configured properly. For more information on DCOM configuration,<BR> * please see <A href="http://j-iTue, 04 May 2010 09:25:00 GMTJ-Integra KB AdminRetrieving the Global Address List (GAL) from an Exchange Serverhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=82038<B>Abstract:</B> <H1>Retrieving the Global Address List (GAL) from an Exchange Server</H1><P>The following example demonstrates how to retrieve the Global Address List (GAL) from an Exchange server using CDO. Before you try this example, make sure that you have installed J-Integra and <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/GettingStarted.htm" target=blank>configured the Exchange server</A>.</P><P>For more information about the programming API of CDO, please refer to <A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/78bd7f77-47e7-43ef-91fd-54abc7ca6a00.asp" target=blank>Microsoft CDO Object Model</A>.</P><P>The related article to the right explains how to retrieving additional fields from a contact record.</P></FONT><TABLE border=0 cellSpacing=10 cellPadding=0 bgColor=#dddddd><TBODY><TR><TD><PRE>import com.intrinsyc.cdo.*;public class GALExample {<BR> public static void main(String[] args) {<BR> //TODO: Change the following parameters based on your setup and configuration<BR> // the logon parameters of the service account you used to configure CDO<BR> String domain = "mydomain";<BR> String username = "jsmith";<BR> String password = "password";<BR> // the DNS name or IP address of the machine where you installed CDO<BR> String CDOmachine = "0.0.0.0";<BR> // the DNS name or IP address of the Exchange Server<BR> String excTue, 04 May 2010 08:55:00 GMTJ-Integra KB AdminEmbedding Internet Explorer in a Java Framehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=52227<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Embedding Internet Explorer in a Java Frame</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>This example embeds Internet Explorer inside a JFrame, navigates to an HTML document, and reads/displays the tags in the document to the command prompt. To run this example you will need the Java proxies generated from the mshtml type library, as well as the main Internet Explorer typelibrary (shdocvw.dll). <P>We assume that you are familiar with Java -- no COM knowledge should be required. You may wish to run through some of the more detailed step-by-step examples in the J-Integra documentation (such as the Excel example) prior to trying this example. We assume you have already <A href="http://j-integra.intrinsyc.com/downloads/" target=blank>downloaded and installed the J-Integra SDK</A>. <P><TT>Steps:<BR>1. Configure your Environment<BR>2. Download the Java proxies <BR>3. Run the Example<BR></TT><H2>Step 1: Configure your Environment</H2><P>Create a new folder to where the <A href="http://j-integra.intrinsyc.com/support/kb/attachments/HTMLDocumentParser-GUIDbebdbed5811f429fac70b8b17fbf4126.java">HTMLDocumentParser.java </A>source file will be downloaded. We assume that you have already configured your DCOM settings and environment variables such as Path and Classpath. <H2>Step 2: Download the Java proxies</H2><P>We have already generated the Java proxies needed for this example (they can be downloaded below). The two files you need to download are <A href="http://j-integra.intrinsyc.com/support/kb/attachments/mshtml-GUIDbcb45de69b3e4baa8ea6a71e2da44b40.zip">mshtml.zip</A> and <A href="http://j-integra.intrinsyc.com/support/kb/attachments/shdocvw-GUIDdc24bd97dec246fe9385c74d799705da.zip">shdocvw.zip</A>. Please unzip these filFri, 11 Dec 2009 04:00:00 GMTJ-Integra KB AdminJ-Integra and ADO Disconnected Recordsetshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30947<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>J-Integra and ADO Disconnected Recordsets</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><H3>Contents</H3><OL><LI><A href="http://j-integra.intrinsyc.com/support/kb/admin/editarticle.aspx?id=30947#SYMPTOMS">SYMPTOMS</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/admin/editarticle.aspx?id=30947#CAUSE">CAUSE</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/admin/editarticle.aspx?id=30947#RESOLUTION">RESOLUTION</A></LI></OL><H2><A name=SYMPTOMS></A>SYMPTOMS</H2><P>Using disconnected Recordsets in DCOM mode is not supported by J-Integra's DCOM mode. For example, you may one of these error messages below.</P><UL><LI><FONT face="Courier New">java.lang.NullPointerException</FONT> <LI><FONT face="Courier New">AutomationException: 0x800a0e78 - Operation is not allowed when the object is closed. in 'ADODB.Recordset'</FONT></LI></UL><P>For instance, if you have a Java client accessing VB program, the VB function<FONT face="Courier New">GetConnectedRecordset()</FONT> can be successfully invoked from Java but the VB function <FONT face="Courier New">GetDisconnectedRecordset()</FONT> will fail.</P><P><FONT face="Courier New">Public Function GetConnectedRecordset() As ADODB.Recordset<BR> Dim c As ADODB.Connection<BR> Set c = New Connection<BR> c.Open "driver=Microsoft Access Driver (*.mdb);dbq=C:\\pure\\products.mdb", , , -1<BR> Set GetRecordset = c.Execute("SELECT * FROM Products", , -1)<BR>End Function</FONT></P><P><FONT face="Courier New">Public Function GetDisconnectedRecordset() As ADODB.Recordset<BR> Dim rs As New ADODB.Recordset<BR> rs.Open<BR> Set GetRecordset = rs<BR>End Function</FONT></P><H2><A name=CAUSE></A>CAUSE</H2><P>J-Integra does not suppTue, 08 Sep 2009 05:32:00 GMTJ-Integra KB AdminUsing an Admin Account to Access Multiple Mailboxeshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=173004<B>Abstract:</B> <H1>Using an Admin Account to Access Multiple Mailboxes</H1><P>Other Java-Exchange connectors use MAPI and impersonation to access the Exchange Server. The motivation behind using impersonation is to be able to access multiple mailboxes without the need for special admin privileges. Although this is a feasible solution, it has been known to cause some problems. As Microsoft points out:</P><P>"We've seen a number of crashes in code that uses impersonation and then uses MAPI. Many of these relate to heap allocations occurring with one user context and then the deallocations happening with another context. Both the Exchange and Outlook development teams are aware of these issues. However, especially due to the problem with CreateThread, we've not been able to fix all of them."<BR>Source: <A href="http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx" target=blank>http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx</A></P><P></P><P>Microsoft's suggested solution for accessing multiple mailboxes is to use an admin account instead of impersonation:</P><P>"If you're using impersonation in order to access multiple mailboxes, you may be doing too much work. […]code running under an administrator account with the right permissions […] can access any mailbox without doing any impersonation."<BR>Source: <A href="http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx" target=blank>http://blogs.msdn.com/stephen_griffin/archive/2005/04/13/407925.aspx</A></P><P></P><P>The technology used by J-Integra for Exchange to access multiple mailboxes is akin to what Microsoft recommends. As pointed out in this <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=147062" target=blank>knowledge base article</A>, we require the use of an admin account when accessing multiple mailboxes.</P>Mon, 17 Aug 2009 08:22:00 GMTJ-Integra KB AdminUsing J-Integra with a Firewall or Load Balancerhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Using J-Integra with a Firewall or Load Balancer</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><H2>Contents</H2><OL><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#introducation">Introduction</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#non-nat">Non-NAT Based Firewalls</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#nat">NAT Firewalls</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#dcombalancers">Load Balancers with J-Integra's DCOM Mode</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#nativebalancers">Load Balancers with J-Integra's Native Mode</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30323#vb">A VB Program to Test DCOM Connection</A> </LI></OL></FONT><P><H2><A name=introducation></A>1. Introducation</H2><P>You may still get one of these errors after <A href="http://j-integra.intrinsyc.com/support/com/doc/#remoteaccess.html" target=_blank>configuring DCOM</A> if you use J-Integra in DCOM mode with firewalls or load balansers:</P><P><I>AutomationException: 0x80070005 - General access denied error<BR>AutomationException: 0x5 - Access is denied</I></P><P>There are some limiations in DCOM itself involving firewalls or load balancers. This is not caused by J-Integra and happens in all DCOM applications including VB and VC++ programs.</P><P><H2><A name=non-nat></A>2. Non-NAT Based Firewalls</H2><P>J-Integra uses DCOM, layered over TCP/IP to talk from a Java client to a COM component. A DCOM application needs to open a socket to port 135 on the NT box to send a DCOM "remote activation" request to the DCOM SCM (a kMon, 10 Aug 2009 03:16:00 GMTJ-Integra KB AdminWill J-Integra Support any COM Component that has a Type Libraryhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30977<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Will J-Integra Support any COM Component that has a Type Library?</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Unfortunately, unless you are very familiar with MIDL (the common language that Microsoft uses to expose COM to other programming languages), the best way to find out is to try your component with J-Integra. We can, however, provide a more technical answer to this question.</P><P>The answer has to do with marshalling - or the packaging/unpackaging of parameters/method calls across the wire to the actual object. There are three types of marshalling that COM uses - type library marshalling, standard marshalling and custom marshalling. </P><H2>Type Library Marshalling</H2>Type library marshalling means that a COM component exposes it's functionality through a type library file, which is basically a file that describes what parameters every exposed method accepts and what its return value is using MIDL. Type libraries are either included (embedded) in the DLL/OCX/EXE, or come as a separate '.TLB' file. The requirement for type library marshalling, also known as automation marshalling, is that interfaces must derive from IDispatch, and all parameters must be automation compatible. This is the type of COM component that J-Integra works with. The com2java tool will create Java "proxies" by reading in this type library, so that the Java developer can make calls in to the component via Java. <P></P><H2>Standard Marshalling</H2>Standard marshalling also requires a type library, but the interfaces and their parameter types are allowed more freedom - they do not necessarily have to be automation compatible (and interfaces do not have to derive from IDispatch). The cost of this however, is that proxy/stub DLL's need to be regiFri, 17 Jul 2009 03:00:00 GMTJ-Integra KB Adminjava.lang.NullPointerExceptionhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183253<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>java.lang.NullPointerException</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#NullPointerException">Common Java Exceptions</A> article.</P>Thu, 11 Jun 2009 03:47:00 GMTJ-Integra KB Adminjava.io.IOException: Unable to establish RPC Connection to DCOM SCM on &lt;hostname/ip&gt; (Bind returned Bind_NAK)http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183257<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>java.io.IOException: Unable to establish RPC Connection to DCOM SCM on &lt;hostname/ip&gt; (Bind returned Bind_NAK)</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>If using J-Integra for COM, please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#IOException">Common Java Exceptions</A> article.</P><P>If using J-Integra for Exchange, please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#IOException">Common J-Integra for Exchange Problems</A> article.</P>Wed, 10 Jun 2009 07:24:00 GMTJ-Integra KB AdminAutomationException: 0x5 - Access is deniedhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183256<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0x5 - Access is denied</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>If using J-Integra for COM, please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80070005">Common Java Exceptions</A> article.</P><P>If using J-Integra for Exchange, please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=129770#AutomationException:%200x5">Common J-Integra for Exchange Problems</A> article.</P>Wed, 10 Jun 2009 07:17:00 GMTJ-Integra KB AdminAutomationException: 0x800706f8http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183255<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0x800706f8</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x800706f8">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 07:12:00 GMTJ-Integra KB AdminAutomationException: 0xc00e0007 - An invalid handle was passed to a functionhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183254<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0xc00e0007 - An invalid handle was passed to a function</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0xc00e0007">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 07:09:00 GMTJ-Integra KB Adminjava.lang.ClassNotFoundExceptionhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183252<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>java.lang.ClassNotFoundException</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#ClassNotFoundException">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 07:05:00 GMTJ-Integra KB AdminAutomationException: 0x80020003 - Member not found in ''IDispatch::invoke''http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183251<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0x80020003 - Member not found in 'IDispatch::invoke'</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80020003">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 07:02:00 GMTJ-Integra KB Adminjava.lang.RuntimeException: Attempt to invoke a non-dispatch method on an object that only supports IDispatchhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183250<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>java.lang.RuntimeException: Attempt to invoke a non-dispatch method on an object that only supports IDispatch</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#IDispatch">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 06:59:00 GMTJ-Integra KB AdminAutomationException: 0x80010001 - Call was rejected by callee. in ''Invoke''http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183249<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0x80010001 - Call was rejected by callee. in 'Invoke'</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80010001">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 06:56:00 GMTJ-Integra KB AdminAutomationException: 0x80080005 - Server execution failedhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183248<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>AutomationException: 0x80080005 - Server execution failed</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80080005">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 06:52:00 GMTJ-Integra KB Adminjava.lang.ClassCastExceptionhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183247<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>java.lang.ClassCastException</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Please refer to the <A HREF="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#ClassCastException">Common Java Exceptions</A> article.</P>Wed, 10 Jun 2009 06:48:00 GMTJ-Integra KB AdminHow to Check Free/Busy Information From an Exchange Serverhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=98399<B>Abstract:</B> <H1>How to Check Free/Busy Information From an Exchange Server</H1><P>The following code demonstrates how to check someone else's schedule for Free/Busy information using J-Integra and Exchange Server's Collaboration Data Objects (CDO 1.2). It is adapted from <A href="http://support.microsoft.com/?id=186753" target=blank>Microsoft Knowledge Base Article - 186753</A>. Before you run this code, you should first <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm" target=blank>configure your Exchange Server</A></P><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>/*This example is adapted from Microsoft Knowledge Base Article - 186753HOWTO: Check Someone Else's Schedule for Free/Busy Informationhttp://support.microsoft.com/?id=186753*/import com.intrinsyc.cdo.*;import com.linar.jintegra.Cleaner;public class GetFreeBusy{ // Modify the following variables based on your specific Exchange setup static final String domain = "DOMAIN"; //make sure it's all capitalized static final String user = "username"; //username of Exchange super user static final String password = "password"; //password of Exchange super user static final String mailbox = "mailbox"; //mailbox name of Exchange super user static final String CDOmachine = "000.000.000.000"; //IP address of the CDO machine static final String server = "000.000.000.000"; // IP address of Exchange server static final String recipient1 = "joedoe"; // alias/login name of recipient public static void main (String[] arg ){ try{ // authenticate to Windows com.linar.jintegra.AuthInfo.setDefault(domain, user, password); // create a Session in the CDOmachine Session session = new Session(CDOmachine); // logon to the Exchange Server sessiMon, 30 Mar 2009 03:07:00 GMTJ-Integra KB AdminUsing Events with Microsoft Exchangehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30910<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Using Events with Microsoft Exchange</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Exchange is very different in the way it exposes events - you do not use a regular type library (CDO.DLL) and run com2java on it, etc. If you noticed, the type library contained in CDO.DLL does not have any declarations for exposed events. Events in the Exchange Server are actually run as a separate service known as the Microsoft Exchange Event Service (EVENTS.EXE). Two things of note: <P>1. The Event Service can only monitor folders stored on an Exchange server. It will not monitor folders stored on the local machines of users. For that, you'll need the Outlook type library instead (which contains events you can hook into) and not CDO.DLL. <P>2. The Event Service fires events asynchronously rather than synchronously in the context of the Exchange Information Store, so the Information Store won't block your event script, other processes, or people from working on items in the folder if the script hasn't run yet. <H3>The general idea</H3><P>The Event Service monitors changes to a folder and triggers an event if such change occurs. A change could either be one of the following: <UL><LI>A new item is added to a folder (e.g. an new mail arrives in your inbox) <LI>An existing item is modified (e.g. the business phone number of a contact item is changed) <LI>An item is deleted <LI>Scheduled events (e.g. events that are triggered every Saturday at 1:00 am) </LI></UL><P>Once the Event Service realizes that a change has occurred, it fires an event. It then looks for a corresponding event handler in the folder. The Exchange Event Service ships with one pre-built event handler, named the Exchange Event Scripting Agent that you can bind tMon, 23 Mar 2009 03:11:00 GMTJ-Integra KB AdminHow to Send a Task Itemhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=125224<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>How to Send a Task Item</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>The following Java code shows how to create and send a task item using CDO and J-Integra for Exchange. For more information on CDO Type property fields, refer to<BR><A href="http://msdn.microsoft.com/en-us/library/ms526914.aspx" target=_blank>CDO Object Model</A>.<BR><P><TABLE cellSpacing=10 cellPadding=0 bgColor=#dddddd border=0><TBODY><TR><TD><PRE>import com.linar.jintegra.*;import com.intrinsyc.cdo.*;import java.util.Date;public class SendTaskRequest { // Modify the following variables based on your specific setup // domain where the CDO host machine belongs, make sure it's all capitalized static String domain = "DOMAIN"; // Java-Exchange username static String user = "username"; // password of Java-Exchange user static String password = "password"; // mailbox of Java-Exchange user static String mailbox = "mailbox"; // IP address or name of the CDO host machine static String CDOmachine = "000.000.000.000"; // IP address or name of the Exchange Server static String exchangeServer = "000.000.000.000"; // e-mail address of the person assigned for this task static String assignTo = "someone@somewhere.com"; // MAPI Constants to determine property set and individual properties // specific to task items static String CDOPROPSETID2 = "0320060000000000C000000000000046"; static String CDOTASK_STARTDATE = "0x8104"; static String CDOTASK_DUEDATE = "0x8105"; static String CDOTASK_PERCENTCOMPLETE = "0x8102"; public static void main(String[] args) { try { // Authenticate to NT domain via NTLM AuWed, 25 Feb 2009 04:59:00 GMTJ-Integra KB AdminError "code too large"http://j-integra.intrinsyc.com/support/kb/article.aspx?id=88972<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Error "code too large"</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>You may get this error if a generated Java proxy file exceeds the maximum length of byte code that a Java compiler can handle. For example, SUN's JDK 1.4.2_01 has a constraint that the length (in bytes) of a Java code cannot exceed 65535 bytes.</P><P>For example, consider TaskProxy.java generated from Microsoft Project 2003 <FONT face="Courier New">C:\Program Files\Microsoft Office\OFFICE11\MSPRJ.OLB</FONT>. To increase the memory for your Java compiler, you will need to use the -J-mx128m and -J-ms128m options.</P>However, compilation causes a "code too large" error at compile time: <P></P><P><IMG hspace=0 src="http://j-integra.intrinsyc.com/support/kb/Attachments/9480f27f-1c09-49be-ae40-6062.gif" border=0></P><P>The solution is to remove the methods you don't need from the Java class. You can download a slimmed down version of TaskProxy.java <A href="http://j-integra.intrinsyc.com/support/kb/attachments/TaskProxy-GUID673820bb7fc048e6bff1b83401e75b00.zip">here</A>.</P>Fri, 20 Feb 2009 07:24:00 GMTJ-Integra KB AdminWorking With Recurring Calendar Itemshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183246<B>Abstract:</B> <H1>Working With Recurring Calendar Items</H1><P>This article demonstrates how to work with recurring Calendar items, such as Appointments and Meetings. The code snippets that follow use a basic Appointment for illustration, however, they can easily be adapted to Meeting Requests (see <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#examples/calendar.htm#meeting_request" target=blank>here for more details</A>). For more information on the RecurrencePattern object, please refer to the <A href="http://msdn.microsoft.com/en-us/library/ms526361%28EXCHG.10%29.aspx" target=blank>Microsoft CDO reference</A>.</P><H2>Creating a recurring Appointment:</H2><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.intrinsyc.cdo.*;import java.util.Date;import java.text.SimpleDateFormat;public class RecurrenceTesting { public static void main(String[] args) {&nbsp;&nbsp;&nbsp;&nbsp; String domain = ""; String username = ""; String password = ""; String CDOmachine = ""; String exchangeServer = ""; String mailbox = ""; try { // Authenticate to Windows com.linar.jintegra.AuthInfo.setDefault(domain, username, password); // Create Session and Logon Session session = new Session(CDOmachine); session.logon( null, null, Boolean.valueOf(false), Boolean.valueOf(true), Boolean.valueOf(false), Boolean.valueOf(false), exchangeServer + "<br>" + mailbox ); // Retrieve Messages collection from Calendar and add new AppointmentItem Integer defaultCalendar = Integer.valueOf(CdoDefaultFolderTypes.CdoDefaultFolderCalendar); Folder calendar = new FolderProxy(Mon, 01 Dec 2008 05:49:00 GMTJ-Integra KB AdminCDO Filter on AppointmentItemshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=61643<B>Abstract:</B> <H1>CDO Filter on AppointmentItems</H1><P>According to <A href="http://support.microsoft.com/support/kb/articles/q192/4/04.asp" target=blank>Microsoft Knowledge Base Article - 192404</A>, when filtering on a collection of Collaboration Data Objects (CDO) AppoinmentItems, the Start and End dates must be reversed to make the filter work as expected.</P><P>The following example maps the VB code in the article 192404 to Java.</P><H3>VB</H3><TABLE id=AutoNumber1 cellSpacing=1 width="90%" border=1><TBODY><TR><TD width="100%"><FONT face="Courier New" size=2>'You must add a Reference to Microsoft CDO version 1.21.<BR>Set objSession = CreateObject("MAPI.Session")<BR><BR>objSession.Logon<BR>Set objCalendar = objSession.GetDefaultFolder(MAPI.CdoDefaultFolderCalendar)<BR>Set oMsgColl = objCalendar.Messages<BR><BR>Set oMsgFilter = oMsgColl.Filter<BR>oMsgFilter.Fields.Add <FONT color=#800080>CdoPR_START_DATE</FONT>, <FONT color=#008000>"10/1/06"</FONT><BR>oMsgFilter.Fields.Add <FONT color=#800080>CdoPR_END_DATE</FONT>, <FONT color=#008000>"9/1/06"</FONT><BR><BR>Set oAppt = oMsgColl.GetFirst<BR>MsgBox oAppt.Subject<BR><BR>Do While (Not oAppt Is Nothing)<BR> MsgBox oAppt.Subject<BR> Set oAppt = oMsgColl.GetNext<BR>Loop<BR>objSession.Logoff</FONT></TD></TR></TBODY></TABLE><H3>Java</H3><TABLE id=AutoNumber2 cellSpacing=1 width="90%" border=1><TBODY><TR><TD width="100%"><P><FONT face="Courier New" size=2>import com.intrinsyc.cdo.*;<BR>import com.linar.jintegra.AuthInfo;</FONT></P><P><FONT face="Courier New" size=2>public class CalendarFilter {</FONT></P><P><FONT face="Courier New" size=2> //TODO: Change the following parameters based on your setup and configuration<BR> static String domain = "MYDOMAIN";<BR> static String user = "USERNAME";<BR> Mon, 01 Dec 2008 02:30:00 GMTJ-Integra KB AdminUsing the J-Integra Logging Mechanismhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=56425<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Using the J-Integra Logging Mechanism</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>By default, J-Integra does not log any messages to a file. If this is desired for your application, we advise you to use the <I>jintegra_reduced_logging.jar</I> runtime file instead of <I>jintegra.jar</I>. Simply include jintegra_reduced_logging.jar in your Classpath instead of jintegra.jar. This will result in better overall performance. However, if you require some form of logging you will have to use the jintegra.jar runtime file. <H2>Turning on J-Integra Logging</H2><P>There are two methods you can use to turn on J-Integra logging: <P><B>Setting Java Properties During Runtime</B><TT><PRE> java -DJINTEGRA_LOG_FILE="c:\temp\jintegra.log" -DJINTEGRA_LOG_LEVEL=3 <JAVA client></TT></PRE><P><B>Setting Java Properties in Source Code</B><TT><PRE>Public static void main(String args[]) {<BR> System.setProperty("JINTEGRA_LOG_FILE", "c:\\temp\\jintegra.log");<BR> System.setProperty("JINTEGRA_LOG_LEVEL", "3");<BR> ...<BR>}<BR>Public static void main(String args[]) {<BR> com.linar.jintegra.Log.logImmediately(3, "c:\\temp\\jintegra.log");<BR> ...</PRE><PRE>}</TT></PRE><PRE> </PRE><H2>Description of Logging Levels</H2><P>There are four possible logging levels:<PRE> SILENT = 0 Does not create a log file<BR> ERROR = 1 Only logs the errors<BR> BRIEF = 2 Reports only significant events<BR> VERBOSE = 3 Reports everything</PRE><P>Whenever sending logs to J-Integra Support, a logging level of VERBOSE should be used. </P>Thu, 30 Oct 2008 03:58:00 GMTJ-Integra KB AdminSearch Messages and Appointments by Entry IDhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183230<B>Abstract:</B> <H1>How to Search and Retrieve Messages and Appointments by their Message ID</H1><P>The following code demonstrates how to search an appointment item by its entry ID. You can apply the same example in searching for other Exchange item types like messages, contacts, task, etc. For more information on message ID's, please refer to the <A href="http://msdn.microsoft.com/library/en-us/cdo/html/6fb473f0-108a-433c-bdae-fdeb80bcf34f.asp" target=blank>Microsoft CDO reference</A>. Before you run this code, you should first <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm" target=blank>configure CDO</A>.</P><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.intrinsyc.cdo.*;import com.linar.jintegra.AuthInfo;public class GetMessageByID { //TODO: Change the following parameters based on your setup and configuration static String domain = "mydomain"; static String user = "jsmith"; static String password = "password"; static String CDOmachine = "0.0.0.0"; static String exchangeServer = "0.0.0.0"; static String mailbox = "jsmith"; public static void main (String[] arg ){ try { // Authenticate to NT domain via NTLM AuthInfo.setDefault(domain, user, password); // Start a MAPI Session Session session = new Session(CDOmachine); // Logon to the Exchange Server session.logon(null, null, new Boolean(false), new Boolean(true), new Integer(0), new Boolean(true), exchangeServer + "<br>" + mailbox); // Retrieve appointment items from the Calendar Integer folderID = new Integer(CdoDefaultFolderTypes.CdoDefaultFolderCalendar); Folder calendar = new FolderProxy(session.getDefaWed, 27 Aug 2008 08:04:00 GMTJ-Integra KB AdminQuestions Regarding JCOMhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=65892<B>Abstract:</B> <H1>Questions Regarding JCOM</H1><P>JCOM is a version of J-Integra which <A href="http://www.bea.com/" target=blank>BEA</A> ships with their WebLogic Server (WLS). They have licensed the J-Integra source code and integrated it into WLS. <B>BEA has asked that all JCOM support requests go through <A href="mailto:support@bea.com">BEA Support</A> (not through J-Integra Support).</B> So if you wish to use the WLS version of J-Integra (JCOM), then you will have to send JCOM support requests to BEA directly.</P><H2>Updating JCOM to the latest version of J-Integra</H2><P>The JCOM classes that are shipped with WLS are based on older versions of J-Integra. If you wish to test your JCOM application with the latest version of J-Integra (e.g. to see if there are any differences in functionality), do the following:</P><P><B>1.</B> Download and install a copy of the latest version of J-Integra from our <A HREF=http://j-integra.intrinsyc.com/download/default.aspx?ProductId=com>website</A>. Simply ignore the 30-day evaluation license. J-Integra is fully functional and a production license is not required if you have a valid WebLogic license.<P><B>2.</B> Update the startWebLogic.cmd startup script by adding a JINTEGRA_HOME variable and <U>prefixing</U> the CLASSPATH with the jintegra.jar. The jintegra.jar must be placed <STRONG>in front</STRONG> of the WEBLOGIC_CLASSPATH in order to ensure that the updated classes will be used instead of the ones in weblogic.jar (WLS 8.1 and earlier) or jcom.jar (WLS 10.0).<P><EM>* Note: If you are using the examplesServer on WLS 8.1, you need to update the startExamplesServer.cmd script instead.</EM></P><P><B>3.</B> Add a system PATH variable that places the J-Integra \bin directory <STRONG>in front</STRONG> of the existing PATH. Doing so ensures that the updated J-Integra tools (i.e. jintmk.dll, ntvinv.dll, etc.) are used instead of their JCOM \bin directory counterparts. This also ensures that the tools are the same version as the J-Tue, 22 Jul 2008 03:21:00 GMTJ-Integra KB AdminHow To Access Weblogic Server 9/10 EJB from C# Clienthttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183245<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H2>How to Access EJB on Weblogic Server 9/10 from C# Client</H2></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Use this example as a guideline to show you how to access your Enterprise Java Beans (EJB) from a .NET client, using J-Integra for .NET. This example could be deployed on BEA's Weblogic 9.1 or 10.0 Application Server.</P><P>Note: For a more detailed step-to-step instruction, please refer to <A href="http://j-integra.intrinsyc.com/support/net/doc/#examples/bea_weblogic_81_http/index.html">this Access EJB on Weblogic 8.1 from .NET Client</A> example.</P><P>To run the example, follow these directions:</P><OL><LI><STRONG>Download the attachment below (bea_weblogic_91_http.zip)</STRONG>, and unzip it into any folder of your choice.</LI><BR><BR><BR><LI><STRONG>Run Janetor to Configure J-Integra for .NET<BR></STRONG><BR>Use Janetor tool open the \java_server\janet.xml configration file. All settings in Janetor should be already set, the only thing you need to do is to <A href="http://j-integra.intrinsyc.com/support/net/doc/#license/index.html">install your own J-Integra for .NET license</A> before your test.</LI><BR><BR><BR><LI><STRONG>Generate a Web Application aRchive (WAR file)<BR></STRONG><BR>In Janetor, go to "File - Export web application archive". The screenshot below shows the Export web application archive window. See the <A href="http://j-integra.intrinsyc.com/support/net/doc/#janetor/index.html#create_war">documentation for Janetor</A> for a description of all the fields. Make sure you select the correct ejb20_basic_beanManaged_client.jar from the downloaded example. Change Output file as necessary.<BR><BR><IMG hspace=0 src="http://j-integra.intrinsyc.Fri, 27 Jun 2008 10:01:00 GMTJ-Integra KB AdminWindows Error 3 occurred while using J-Integra installerhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183237<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Windows Error 3 occurred while using J-Integra installer</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A></TD></TR></TBODY></TABLE><P>You may get the following error when use J-Integra installer.</P><P><STRONG><EM>"<SPAN style="FONT-SIZE: 10pt">Windows error 3 occurred while loading the Java VM."<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></EM></STRONG></P><P>If the install package crashes when trying to invoke the JVM on your computer, it's usually an indication that your Java Runtime isn't properly configured. </P><P>In your Windows "System Properties" -> "Advanced" -> "Environmental Variables", please check that your have the Java bin folder added to your System Path. </P><P dir=ltr style="MARGIN-RIGHT: 0px">Some variations of the path may be (depending on your installation folder and Java runtime version):<BR><FONT face="Courier New">C:\Program Files\Java\JRE 1.6.0\bin<BR>C:\Program Files\Java\JDK 1.6.0\jre\bin</FONT></P><P>If you receive this error while installing J-Integra on an x64 (e.g. Windows Server, XP, Vista) system, the cause is the new "Program Files" structure/naming. There are 2 possible workarounds:<OL><LI>Add quotation marks to the path contained in the JAVA_HOME System variable.<BR>e.g. "<FONT face="Courier New">C:\Program Files (x86)\Java\xxxxxxxx</FONT>". <B><I>OR</B></I></LI><LI>Uninstall and reinstall the Java JDK to a different directory.<BR>e.g. "<FONT face="Courier New">C:\Java\xxxxxxxx</FONT>".</LI></OL><P> If this doesn't fix the installation problem, please go ahead and download the ZIP version of J-Integra for COM: <A href="http://j-integra.intrinsyc.com/download/default.aspx?ProductId=com">http://j-integra.intrinsyc.com/download/default.aspx?ProductId=com</A>.</PMon, 23 Jun 2008 05:33:00 GMTJ-Integra KB AdminCommon Java Exceptionshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Common Java Exceptions</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>This article discusses the solutions to these common Java exceptions:</P><OL><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80070005">AutomationException: 0x80070005 - General access denied error</A><BR><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80070005">AutomationException: 0x5 - Access is denied</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#NoClassDefFoundError">Can't find class com/linar/java2com/Main Package com.linar.jintegra not found in import java.lang.NoClassDefFoundError: com/linar/jintact/Helper</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#ClassCastException">java.lang.ClassCastException</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80080005">AutomationException: 0x80080005</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80010001">AutomationException: 0x80010001 - Call was rejected by callee. in 'Invoke'</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#IDispatch">java.lang.RuntimeException: Attempt to invoke a non-dispatch method on an object that only supports IDispatch</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#0x80020003">AutomationException: 0x80020003 - Member not found in 'IDispatch::invoke'</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=30337#IOException">java.io.IOException: Unable to establish RPC Connection to DCOM SCM on HOSTNAME (Bind returned Bind_NAK)</A> <LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspTue, 03 Jun 2008 03:24:00 GMTJ-Integra KB AdminWorking with Custom Document Properties in Microsoft Word 2003http://j-integra.intrinsyc.com/support/kb/article.aspx?id=107452<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Working with Custom Document Properties in Microsoft Word 2003</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>There is a glitch in the type library of Microsoft Word 2003 which makes it confusing for Word developers to work with Custom Document Properties programmatically. If you browse through the Word type library (MSWORD.OLB) using Visual Basic's Object Browser and look for CustomProperties, you will see that the Add function has the following signature: <P> Function Add(Name As String, Value As String) As CustomProperty Member of Word.CustomProperties <P>Note that the function accepts two string parameters. Consequently, com2java will generate the corresponding Java method for this function as follows: <P> public word.CustomProperty add(String name, String value) <P>When you then call CustomProperties.Add() from Java passing it two valid String parameters, you will get an exception from your Java client that looks as follows: <P> java.lang.ClassCastException: A COM object reference via iid <BR> 00020400-0000-0000-c000-000000000046 does not support COM<BR> interface b923fde1-f08c-11d3-91b0-00105a0a19fd<BR> at com.linar.jintegra.Dispatch.b(Unknown Source)<BR> at com.linar.jintegra.Dispatch.vtblInvoke(Unknown Source)<BR> at word.CustomPropertiesProxy.add(CustomPropertiesProxy.java:212)<BR> at CustomDocProperties.main(CustomDocProperties.java:37) <P>When to attempt to call the same function from VB passing it 2 string parameters as required by the function signature, you will get the following error: <P><I>Run-time error '450': Wrong number of arguments or invalid property assignment</I> <P> <IMG hspace=0 srTue, 22 Apr 2008 03:23:00 GMTJ-Integra KB AdminEmbedding a Microsoft Office Document in a Java Framehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=66642<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Embedding a Microsoft Office Document in a Java Frame</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>According to Microsoft Knowledge Base <A href="http://support.microsoft.com/support/kb/articles/q242/2/43.asp" target=blank>article 242243</A> and <A href="http://support.microsoft.com/support/kb/articles/q311/7/65.asp" target=blank>article 311765</A>, Microsoft Office documents (including Word, Excel, PowerPoint, Project, and Visio documents) are ActiveX Document servers, not ActiveX Controls. Visual Basic does not support a native control to host ActiveX Documents. Instead, Visual Basic uses the OLE container control to embed an ActiveX Document. Therefore you cannot directly embed ActiveX Documents in a Java frame either. There are three workarounds:</P><H2>1. Use the WebBrowser ActiveX Control</H2><P>The WebBrowser control that comes with Internet Explorer (version 3.0 and higher) does support this form of in-place containment. It is possible to use this control to open an Office document as an ActiveX Document as mentioned in <A href="http://support.microsoft.com/support/kb/articles/q243/0/58.asp" target=blank>Microsoft Knowledge Base Article - 243058</A>.</P><P>Run J-Integra's com2java tool and select C:\WINDOWS\system32\shdocvw.dll as the type library. Check the <B>"Generate extra classes for embedding ActiveX controls in AWT components"</B> option and use <B>shdocvw</B> as the package name. Generate the proxies to a subdirectory named shdocvw.</P><P><B>Note:</B> Due to a method naming conflict between <FONT face="Courier New" size=2>java.awt.Component</FONT> and <FONT face="Courier New" size=2>shdocvw.WebBrowser</FONT>, you will receive the errors below when attempting to compile the generated proxies. TMon, 18 Feb 2008 03:16:00 GMTJ-Integra KB AdminSend an HTML Messagehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183243<B>Abstract:</B> <H1>How to Send an HTML Message</H1><P>The following example demonstrates a workaround to send an HTML message using CDO (which does not support the automatic generation of HTML for HTML messages) and J-Integra for Exchange. The code below writes the HTML information to one of the Message object's fields. For more information about Field objects, please refer to the <A href="http://msdn2.microsoft.com/en-us/library/ms526701%28VS.85%29.aspx">Microsoft CDO reference</A>. Before running this code, please ensure that <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm">CDO has first been configured</A>.</P><H2>Java Application Code (HTMLTest.java):</H2><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.linar.jintegra.Cleaner;import com.intrinsyc.cdo.*;import java.io.*;public class HTMLTest { public static void main(String[] args) {&nbsp;&nbsp;//TODO: Change the following parameters based on your setup and configuration String domain = "domain"; String username = "username"; String password = "password"; String CDOmachine = "0.0.0.0"; String exchangeServer = "0.0.0.0"; String mailbox = "mailbox";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String tempFile = "HTMLTest.txt";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {&nbsp;&nbsp; // authenticate to Windows com.linar.jintegra.AuthInfo.setDefault(domain, username, password); // create a Session in the CDOmachine Session session = new Session(CDOmachine); // logon to the Exchange Server session.logon(null, null, new Boolean(false), new Boolean(true), new Boolean(false), new Boolean(false), exchangeServer + "<br>" + mailbox); // create a message in the Outbox Integer folderType = new Integer(CdoDWed, 09 Jan 2008 09:27:00 GMTJ-Integra KB AdminLimiting the Range of Ports for Java-COM Communicationhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=30123<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Limiting the Range of Ports for Java-COM Communication</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>The following example scenario (Java client accessing a COM component on remote machine) will demonstrate how to do this.</P><P>You'll need to experiment with the JINTEGRA_LOCAL_PORT_START and JINTEGRA_LOCAL_PORT_END properties on the Java side to limit the range of ports the client uses. </P><P>On the server side, you'll need to limit the port range for the COM component. To do this:</P><OL><LI>Launch DCOMCNFG</LI><LI>Click on the Default Protocols tab</LI><LI>Click on Connection-Oriented TCP/IP</LI><LI>Add the required port range (note that this setting will be used for all components - we are unsure if there is a way to specify for a single component). </LI></OL><P>This should now limit both servers to the specific port range.</P>Tue, 18 Dec 2007 06:22:00 GMTJ-Integra KB AdminRetrieve the Members of a Private Distribution Listhttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183242<B>Abstract:</B> <H1>How to Retrieve the Members of a Private Distribution List</H1><P>The following piece of code demonstrates how to retrieve the members of Private Distribution List stored in a user's Contacts folder. For more information about any CDO object or method used below, please refer to the <A href="http://msdn2.microsoft.com/en-us/library/ms526914.aspx">Microsoft CDO reference</A>. Before running this code, please ensure that you have <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm">first configured CDO</A>.</P><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.intrinsyc.cdo.*;import com.linar.jintegra.Cleaner;public class RetrievePrivateDLMembers { public static void main(String[] args) {&nbsp;&nbsp;&nbsp;&nbsp;System.setProperty("JINTEGRA_RELEASEALL_SHUTDOWN_HOOK", ""); //TODO: Change the following parameters based on your setup and configuration // the logon parameters of the service account you used to configure CDO String domain = "domain"; String username = "username"; String password = "password"; // the DNS name or IP address of the machine where you installed CDO String CDOmachine = "0.0.0.0"; // the DNS name or IP address of the Exchange Server String exchangeServer = "0.0.0.0"; // the mailbox you wish to access (NOTE: this is the same as the user's login name // e.g., if the username is jsmith, mailbox would also be jsmith ) String mailbox = "mailbox";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// field and propset ids&nbsp;&nbsp;String CdoPropSetID3 = "0420060000000000C000000000000046";&nbsp;&nbsp;String CdoContact_PrivateDLMemberIDs = "0x8054"; try { // use credentials of service account to authenticate to Windows com.linar.jintegra.AuthInfo.setDefault(domain, username, pasThu, 01 Nov 2007 05:35:00 GMTJ-Integra KB AdminForward, Copy, or Move a Messagehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183239<B>Abstract:</B> <H1>How to Forward, Copy, or Move a Message</H1><P>The following piece of code demonstrates how to Forward, Copy, or Move the most recent message in a user's Inbox. Each <EM>independent</EM> action (Forward, Copy, and Move) is clearly commented for ease of use and illustration. Please note that the above actions are presented together only for the sake of efficiency, and are <EM>not</EM> dependent upon one another for proper functionality. For more information about Message objects, please refer to the <A href="http://msdn.microsoft.com/library/en-us/cdo/html/06c4713a-704b-47bc-8b5d-7c49c094b8cd.asp">Microsoft CDO reference</A>. Before running this code, please ensure that <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm">CDO has first been configured</A>.</P><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.intrinsyc.cdo.*;import com.linar.jintegra.Cleaner;public class ForwardCopyMoveMessage { public static void main(String[] args) { // TODO: Change the following parameters based on your setup and configuration // the logon parameters of the service account you used to configure CDO String domain = "domain"; String username = "username"; String password = "password"; // the DNS name or IP address of the machine where you installed CDO String CDOmachine = "0.0.0.0"; // the DNS name or IP address of the Exchange Server String exchangeServer = "0.0.0.0"; // the mailbox you wish to access (NOTE: this is the same as the user's login name // e.g., if the username is jsmith, mailbox would also be jsmith ) String mailbox = "mailbox"; try { // use credentials of service account to authenticate to Windows. com.linar.jintegraThu, 01 Nov 2007 05:12:00 GMTJ-Integra KB AdminRetrieve and Store Attachments from Messageshttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=183232<B>Abstract:</B> <H1>How to Retrieve and Store Attachments from a Message</H1><P>The following pieces of code demonstrate how to extract an attachment (either a data file or an embedded message) from the most recent message in a user's Inbox. For more information about Attachment objects, please refer to the <A href="http://msdn.microsoft.com/library/en-us/cdo/html/55f941ed-4d16-4c46-bf1b-b3a1d6574012.asp">Microsoft CDO reference</A>. Before running this code, please <A href="http://j-integra.intrinsyc.com/support/exchange/doc/#GettingStarted/gettingStarted.htm">configure CDO first</A>.</P><H2>Retrieving and Storing an Attached Data File:</H2><P><TABLE cellPadding=0 rules=none bgColor=#dddddd frame=void x-use-null-cells><TBODY><TR><TD width=10></TD><TD class=code><PRE>import com.intrinsyc.cdo.*;import com.linar.jintegra.Cleaner;import java.io.*;public class GetAttachment { public static void main(String[] args) { //TODO: Change the following parameters based on your setup and configuration // the logon parameters of the service account you used to configure CDO String domain = "domain"; String username = "username"; String password = "password"; // the DNS name or IP address of the machine where you installed CDO String CDOmachine = "0.0.0.0"; // the DNS name or IP address of the Exchange Server String exchangeServer = "0.0.0.0"; // the mailbox you wish to access (NOTE: this is the same as the user's login name // e.g., if the username is jsmith, mailbox would also be jsmith ) String mailbox = "mailbox"; try { // use credentials of service account to authenticate to Windows com.linar.jintegra.AuthInfo.setDefault(domain, username, password); // create a Session in the CDOmachine Session session = new Session(CDOmachine); Thu, 01 Nov 2007 04:38:00 GMTJ-Integra KB AdminMapping VB Code to Java Codehttp://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758<B>Abstract:</B> <TABLE cellSpacing=0 width="100%" cellpading="0"><TBODY><TR><TD vAlign=bottom><H1>Mapping VB Code to Java Code</H1></TD><TD vAlign=top align=right><A href="http://j-integra.intrinsyc.com/products/com/" target=_blank alt="Java/J2EE COM Interoperability Products Page"></A> </TD></TR></TBODY></TABLE><P>Because the Java proxies generated by <A href="http://j-integra.intrinsyc.com/support/com/doc/#com2java/index.html" target=_blank>com2java tool</A> are simply mapped from the original COM programming API, you need to refer to the original documentation of the COM API to understand what each corresponding Java proxy does. The comments in the Java proxies are based on the comments found from the COM IDL file. The easiest way to start programming Java source code (which uses J-Integra for COM to access a COM component) is to find a VB example first, and then map the VB code to Java. This article covers some basic principles to map VB code to its equivalent Java code.</P><OL><LI><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Object">Object<BR></A>1.1 <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Creating a New Object">Creating a New Object</A><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Object"><BR></A>1.2 <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Retrieving an existing active object">Retrieving an Existing Active Object</A><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Object"><BR></A>1.3 <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Casting an Object into Another Object">Casting an Object into Another Object</A><A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Object"><BR></A>1.4 <A href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758#Embedding an ActiveX Control">Embedding an ActiveX Control</A><A href="http://j-integra.intrinsyc.com/support/Tue, 04 Sep 2007 04:45:00 GMTJ-Integra KB Admin