Re: Compiling log4j and slf4j-api

Volker Berlin <[email protected]> Mon, 30 Oct 2017 09:22:21 +0100
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
--===============2211558556152538640==
Content-Type: multipart/alternative;
	boundary="------------244EC545486CF9BC6AEA659A"
Content-Language: en-US

--------------244EC545486CF9BC6AEA659A
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 8bit

The cause of this exception is that not all dlls of the IKVM are
available. Typical this occur because Visual Studio does not copy all to
the output.

Volker

Am 29.10.2017 um 18:52 schrieb Ian Marteens:
>
> Ok, I solved it: it’s a circular reference between two SLF4J jars.
>
>  
>
> Now I’m getting this, when running the sample application:
>
>  
>
> Excepción no controlada: com.lchclearnet.exception.SystemException:
> CLSSIDPI: Unexpected error occurred when initialising DataProvider for
> report directory [D:\Users\Marteens\Documents\Satori\20170728\SMART]
> ---> java.lang.ClassCastException: No se puede convertir un objeto de
> tipo 'java.util.PropertyResourceBundle' al tipo
> 'sun.util.resources.OpenListResourceBundle'.
>
>    --- Fin del seguimiento de la pila de la excepción interna ---
>
>    en com.lchclearnet.swapclear.smart.a.j..ctor(File f, String str)
>
>    en com.lchclearnet.swapclear.smart.a.j..ctor(File f)
>
>    en
> com.lchclearnet.swapclear.smart.SMARTDataProviderFactory..ctor(String str)
>
>    en TestSmart.Program.Main(String[] args) en
> d:\Users\Marteens\Documents\Visual Studio
> 2015\Projects\TestSmart\TestSmart\Program.cs:línea 23
>
>  
>
> It seems it’s a problem when using System.getProperty(), and it shows
> up as an exception when casting PropertyResourceBundle into an
> OpenListResourceBundle. Is my application missing any DLL reference?
>
>  
>
> Ian
>
>  
>
> *De:*Ian Marteens [mailto:[email protected]]
> *Enviado el:* viernes, 27 de octubre de 2017 13:40
> *Para:* [email protected]
> *Asunto:* [Ikvm-developers] Compiling log4j and slf4j-api
>
>  
>
> Hi, all:
>
>  
>
> I’m using IKVM 8.1.5717. I’m trying to compile log4j and slf4j-api to DLL.
>
>  
>
> When compiling log4j, IKVM complains about some javax.jms and
> javax.mail classes. I understand from previous messages that I can
> ignore the warning if I don’t use that bindings.
>
>  
>
> My real problem is with slf4j-api-1.6.1. and slf4j-log4j12-1.6.1.
> These are the compiling errors I get:
>
>  
>
> note IKVMC0002: Output file is "slf4j-log4j12-1.6.1.dll"
>
> warning IKVMC0100: Class "org.slf4j.helpers.MarkerIgnoringBase" not found
>
> warning IKVMC0100: Class "org.slf4j.ILoggerFactory" not found
>
> warning IKVMC0100: Class "org.slf4j.spi.MDCAdapter" not found
>
> warning IKVMC0100: Class "org.slf4j.spi.LoggerFactoryBinder" not found
>
> warning IKVMC0100: Class "org.slf4j.spi.MarkerFactoryBinder" not found
>
>  
>
> note IKVMC0002: Output file is "slf4j-api-1.6.1.dll"
>
> warning IKVMC0100: Class "org.slf4j.impl.StaticLoggerBinder" not found
>
> warning IKVMC0100: Class "org.slf4j.impl.StaticMarkerBinder" not found
>
>  
>
> My application use a third-party JAR from LCH Clearnet that internally
> use log4j. Execution fails when it tries to load StaticLoggerBinder.
>
>  
>
> Any clues, please?
>
>  
>
> Best regards,
>
>  
>
> Ian Marteens
>
> Comunytek Consultores
>
>  
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Ikvm-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers


--------------244EC545486CF9BC6AEA659A
Content-Type: text/html; charset="windows-1252"
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>The cause of this exception is that not all dlls of the IKVM are
      available. Typical this occur because Visual Studio does not copy
      all to the output.<br>
    </p>
    Volker<br>
    <br>
    <div class="moz-cite-prefix">Am 29.10.2017 um 18:52 schrieb Ian
      Marteens:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EstiloCorreo18
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
span.EstiloCorreo19
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
span.EstiloCorreo20
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-GB">Ok, I solved it: it’s a
            circular reference between two SLF4J jars.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Now I’m getting this,
            when running the sample application:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Excepción no controlada:
            com.lchclearnet.exception.SystemException: CLSSIDPI:
            Unexpected error occurred when initialising DataProvider for
            report directory
            [D:\Users\Marteens\Documents\Satori\20170728\SMART] ---&gt;
            java.lang.ClassCastException: No se puede convertir un
            objeto de tipo <span
              style="background:yellow;mso-highlight:yellow">'java.util.PropertyResourceBundle'</span>
            al tipo <span
              style="background:yellow;mso-highlight:yellow">'sun.util.resources.OpenListResourceBundle'</span>.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">   </span>--- Fin del
          seguimiento de la pila de la excepción interna ---<o:p></o:p></p>
        <p class="MsoNormal">   <span lang="EN-GB">en
            com.lchclearnet.swapclear.smart.a.j..ctor(File f, String
            str)<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">   en
            com.lchclearnet.swapclear.smart.a.j..ctor(File f)<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">   en
            com.lchclearnet.swapclear.smart.SMARTDataProviderFactory..ctor(String
            str)<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">   en
            TestSmart.Program.Main(String[] args) en
            d:\Users\Marteens\Documents\Visual Studio
            2015\Projects\TestSmart\TestSmart\Program.cs:línea 23<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">It seems it’s a problem
            when using System.getProperty(), and it shows up as an
            exception when casting PropertyResourceBundle into an
            OpenListResourceBundle. Is my application missing any DLL
            reference?<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Ian<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="mso-fareast-language:ES">De:</span></b><span
                style="mso-fareast-language:ES"> Ian Marteens
                [<a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>] <br>
                <b>Enviado el:</b> viernes, 27 de octubre de 2017 13:40<br>
                <b>Para:</b> <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a><br>
                <b>Asunto:</b> [Ikvm-developers] Compiling log4j and
                slf4j-api<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Hi, all:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span lang="EN-GB">I’m using IKVM 8.1.5717.
            I’m trying to compile log4j and slf4j-api to DLL.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">When compiling log4j,
            IKVM complains about some javax.jms and javax.mail classes.
            I understand from previous messages that I can ignore the
            warning if I don’t use that bindings.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">My real problem is with
            slf4j-api-1.6.1. and slf4j-log4j12-1.6.1. These are the
            compiling errors I get:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">note IKVMC0002: Output
            file is "slf4j-log4j12-1.6.1.dll"<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.helpers.MarkerIgnoringBase" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.ILoggerFactory" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.spi.MDCAdapter" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.spi.LoggerFactoryBinder" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.spi.MarkerFactoryBinder" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">note IKVMC0002: Output
            file is "slf4j-api-1.6.1.dll"<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.impl.StaticLoggerBinder" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">warning IKVMC0100: Class
            "org.slf4j.impl.StaticMarkerBinder" not found<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">My application use a
            third-party JAR from LCH Clearnet that internally use log4j.
            Execution fails when it tries to load StaticLoggerBinder.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Any clues, please?<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Best regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Ian Marteens<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Comunytek Consultores<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! <a class="moz-txt-link-freetext" href="http://sdm.link/slashdot">http://sdm.link/slashdot</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Ikvm-developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/ikvm-developers">https://lists.sourceforge.net/lists/listinfo/ikvm-developers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------244EC545486CF9BC6AEA659A--


--===============2211558556152538640==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============2211558556152538640==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

--===============2211558556152538640==--