09 July 2018

localstrings

WLS & classloading again...

Caused By: java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings

Goog Analysis : http://azagozdzinski.wordpress.com/2011/02/15/saaj-problem/

06 July 2018

Eclipse Memory Analyzer

Eclipse MAT new version, and as usual I need to change "eclipse" .ini configuration:

./Contents/Eclipse/MemoryAnalyzer.ini

-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.700.v20180518-1200
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin
-data
/Users/German/tmp/workspace_mat
-vmargs
-Xmx5g
 

-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread


27 June 2018

APM list

Based on Java Awesome, this is a simple list of Open Source APM:


-javaagent:/home/kaizen/pinpoint-agent-1.8.0-SNAPSHOT/pinpoint-bootstrap-1.8.0-SNAPSHOT.jar -Dpinpoint.agentId=WLS01 -Dpinpoint.applicationName=Sandbox

-javaagent:/home/kaizen/pinpoint-agent-1.8.0-SNAPSHOT/pinpoint-bootstrap-1.8.0-SNAPSHOT.jar -Dpinpoint.agentId=WLS02 -Dpinpoint.applicationName=Sandbox



admin.json 

  ],
  "web": {
    "port": 4011,
    "bindAddress": "0.0.0.0",
    "contextPath": "/",
    "sessionTimeoutMinutes": 30,
    "sessionCookieName": "GLOWROOT_SESSION_ID"
  },


-javaagent:/home/oracle/foobar/glowroot/glowroot.jar -Dglowroot.agent.id=WLSQux02

https://github.com/glowroot/glowroot/wiki/Agent-Installation-(with-Embedded-Collector)

Hadoop EDW 101

  • Framework para trabajar con aplicaciones distribuidas en un ambiente de varios nodos para maneja de gran volumen de data
  • Distribuido con gran tolerancia a la falla, escalable (HDFS)
  • Usa modelo de programación MapReduce (procesamiento de big data, paralelo, distribuido, permite diferentes lenguajes)
  • Bajo costo en los nodos por poder usar “commodity hardware”. Pudiendo guardar información por un periodo mas largo de tiempo con gran almacenamiento
  • Buen rendimiento al evitar uso excesivo de networking
  • Gran almacenamiento de data “cruda”, para ser procesado por Hadoop MapReduce o proyectos afines (Hive, Spark, Sqoop, etc.)
  • Tiene perfil de ETL (sin ser uno con un gran performance), en donde puede tener procesamiento paralelo
  • Convivencia con EDW, a través de Sqoop (xfr bulk data)
  • Se puede ejecutar queries similares con el uso de Apache Hive que es un data-warehouse sobre Hadoop que sirve para hacer queries y análisis. (HiveQL, abstracción de SQL)
  • Puede parsear diferentes tipos de inputs (web logs, IoT, etc.)
  • No es un reemplazo directo de EDW, pero si en ciertas tareas pueden ser reemplazadas, así mejora el rendimiento
  • Se puede explorar la data antes de llegar a EDW.
  • Existe varios proyectos relacionados a Hadoop para diferentes tareas, cuales son open sources o propietarios tal como IBM BigInsights / Hortonworks HDP
  • Genera un Time-to-Value menor
EDW = Enterprise Data Warehouse
ETL = Extract, Transform and Load)


21 June 2018

Java HTTP Proxy

A pesar que es trivial muchas veves preguntan lo mismo:

http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

//System.getProperties().put("proxySet", "false");
  System.getProperties().put("http.proxyHost", captchaProxy);  // con o sin http. funciona :P
  System.getProperties().put("http.proxyPort", captchaPort);

buscar los diferentes metodos...

mirar mi proyecto web-proxy

http://www.coderanch.com/t/384957/java/java/set-proxy-options-command-prompt

http://stackoverflow.com/questions/3957599/how-to-test-proxy-internet-connection-using-java

Proxy class ?

y otros...

con el FTP tb.

---

Sample code shipped:

public static void main(String[] args) throws ServiceException, RemoteException {
String proxyHost = "proxy.oracle.com";
String proxyPort = "8888";
String proxyUsername = "username";
String proxyPassword = "password";

Proxy p = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, Integer.parseInt(proxyPort)));
HttpTransportInfo info = new HttpTransportInfo();
info.setProxy(p);
info.setProxyUsername(proxyUsername.getBytes());
info.setProxyPassword(proxyPassword.getBytes());

GlobalWeather service = new GlobalWeather_Impl("http://www.webservicex.net/globalweather.asmx?wsdl", info);

GlobalWeatherSoap soap = service.getGlobalWeatherSoap();
System.out.println(soap.getCitiesByCountry("Singapore"));


y otros ???



18 June 2018

Modelio 3.6

Second (maybe third) time I hit a bug about Eclipse RCP impl.

TL;DR :

The screen hangs and nothing it is shown/updated

Solution:

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin
-vmargs


Note:

-vm before -vmargs

- JDK update 131 (and not 160+)

./Contents/Eclipse/modelio.ini

13 June 2018

tzupdater Mac OS X (offline)

wget https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz

gsha512sum /Users/German/bin/tzupdater-2.1.2/tzdata-latest.tar.gz |awk '{print $1}' > /Users/German/bin/tzupdater-2.1.2/tzdata-latest.tar.gz.sha512

sudo java -jar tzupdater.jar -f -v -l file:///Users/German/bin/tzupdater-2.1.2/tzdata-latest.tar.gz 


Note: gsha512sum from brew coreutils

Password:
Using file:///Users/German/Downloads/tzupdater-2.1.2/tzdata-latest.tar.gz as source for tzdata bundle.
java.home: /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre
java.vendor: Oracle Corporation
java.version: 1.7.0_80
tzupdater version 2.1.2-b01
JRE tzdata version: tzdata2018e
Downloaded file to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp/tzdata.tar.gz
javazic: warning: found last rules for Eire inconsistent.
tzupdater tool would update with tzdata version: tzdata2018e
Downloaded file to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp/sha512hash
Extracting files... done.
Renaming /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/zi to /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/zi.tzdata2018e_2
Renaming /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/zi.tzdata2018e to /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/zi
Validating for : tzdata2018e
Validation complete
JRE updated to version : tzdata2018e


just in case,for online:

$ sudo java -jar tzupdater.jar -f -v

UPDATE:

There is a known bug with new format:

Using file:///Users/German/bin/tzupdater-2.1.2/tzdata-latest.tar.gz as source for tzdata bundle.
java.home: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre
java.vendor: Oracle Corporation
java.version: 1.8.0_191
tzupdater version 2.2.0-b01
JRE tzdata version: tzdata2018e
Downloaded file to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/tzdata.tar.gz
tzupdater tool would update with tzdata version: tzdata2019b
Compiling TZDB version 2019b
Parsing file: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/africa
Parsing file: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/antarctica
Parsing file: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/asia
Failed: java.lang.Exception: Failed while parsing file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/asia' on line 1865 'Rule    Japan    1948    1951    -    Sep    Sat>=8    25:00    0    S'
java.lang.Exception: Failed while parsing file '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tz.tmp_2/asia' on line 1865 'Rule    Japan    1948    1951    -    Sep    Sat>=8    25:00    0    S'
    at tools.tzdb.TzdbZoneRulesCompiler.parseFile(TzdbZoneRulesCompiler.java:377)
    at tools.tzdb.TzdbZoneRulesCompiler.compile(TzdbZoneRulesCompiler.java:191)
    at tools.tzdb.TzdbZoneRulesCompiler.(TzdbZoneRulesCompiler.java:307)
    at com.sun.tools.tzupdater.ExternalModule.compileToJSRBinary(ExternalModule.java:153)
    at com.sun.tools.tzupdater.TimezoneUpdater.run(TimezoneUpdater.java:230)
    at com.sun.tools.tzupdater.TimezoneUpdater.main(TimezoneUpdater.java:634)
Caused by: tools.tzdb.DateTimeException: Invalid value for SecondOfDay value: 90000
    at tools.tzdb.ChronoField.checkValidValue(ChronoField.java:173)
    at tools.tzdb.LocalTime.ofSecondOfDay(LocalTime.java:210)
    at tools.tzdb.TzdbZoneRulesCompiler.parseMonthDayTime(TzdbZoneRulesCompiler.java:475)
    at tools.tzdb.TzdbZoneRulesCompiler.parseRuleLine(TzdbZoneRulesCompiler.java:399)
    at tools.tzdb.TzdbZoneRulesCompiler.parseFile(TzdbZoneRulesCompiler.java:354)
    ... 5 more


This is solved by using:

sudo java -jar tzupdater.jar -l https://web.cs.ucla.edu/~eggert/tz/release/2019a/tzdata2019a-rearguard.tar.gz

https://bugs.openjdk.java.net/browse/JDK-8213085

Remote Weblogic Deployer

When deploying to a remote WLS, use -remote -upload or the following BEA error will be triggered:


[Deployer:149003]Unable to access application source information in "/Users/German/Documents/tmp/zz_test_web.war" for application "zz_test_web". The specific error is: No application files exist.


Correct command line:

java weblogic.Deployer -adminurl t3://10.10.10.125:10000 -username weblogic -password welcome1 -deploy -targets wls_cluster -name zz_test_web /Users/German/Documents/tmp/zz_test_web.war -verbose -upload -remote

Blog Archive

Disclaimer

Qux