Articles

Affichage des articles du 2017

Java 9

error: the unnamed module reads package com.google.thirdparty.publicsuffix from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.xml from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.util.concurrent from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.reflect from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.primitives from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.net from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.math from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.io from both selenium.server.standalone and guava error: the unnamed module reads package com.google.common.html from both selenium.se

bootstrap class path not set in conjunction

 [options] bootstrap class path not set in conjunction with -source 1.8

Java executable not found in JDK, evaluating java executable in RT instead

     Warning: java executable not found in JDK, evaluating java executable in RT instead.      Warning: java executable not found in JDK, evaluating java executable in RT instead.      Warning: java executable not found in JDK, evaluating java executable in RT instead.      error: modules are not supported in -source 1.8 java

Change GlassFish JSP from 1.5 to higher

ERROR MESSAGE : org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: The source value 1.5 is out of date, will delete all the releases of the future PWC6199: Generated servlet error: The target value of 1.5 is out of date, will delete all the releases of the future PWC6199: Generated servlet error: To hide the obsolete option warning, please use the -Xlint:-options. PWC6197: An error occurred at line: 12 in the jsp file: /WEB-INF/jsp/view/viewCart.jsp PWC6199: Generated servlet error: -Source 1.5 does not support the diamond operator (please use -source version 7 or higher to enable the diamond operator) Solution On MAC : go to /Users/username/GlassFish_Server/glassfish/domains/domain2/config open   the default_web.xml file find the <servlet-name> jsp</servlet-name>  add <init-param> <param-name>compilerSourceVM</param-name> <param-value>1.8</param-val

The point : vector vs raster image

If you're not sure whether you should create a raster or vector file, follow this simple rule of thumb: If you're drawing something from scratch with only a few colors, go with vector. If you're editing a photo with multiple colors, go with raster. Many projects use vector drawings and vector images together - A  brochure , for example, might include a corporate logo (vector) plus an image of happy customers (raster). 

could not create the Java Virtual Machine : Mac OS X Error

 Mac OS X Error  : could not create the Java Virtual Machine Solution :  Can't create Java Virtual Machine because you typed a wrong command/argument.

sweet swift Return function : wish in Java

import UIKit import Darwin func average(nums: Int ...) -> Double {     var sum = 0          for num in nums {         sum += num     }     return Double (sum) / Double (nums. count ) } func sum(nums: Int ...) -> Double {     var sum = 0          for num in nums {         sum += num     }     return Double (sum) } func doMath(mathOp: String )-> ( Int ...)-> Double {     if mathOp == "average" {         return average     } else {         return sum     } } var mathFunc = doMath (mathOp: "average" ) print ( mathFunc ( 1 , 3 , 4 , 5 , 6 , 78 , 67 , 5 , 4 , 4 , 9 ))

net.sf.jasperreports.engine.JRException: Error executing SQL statement for:

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: arrivagk. at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: arrivagk. at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:344) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437)

Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour

Error ? Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour Solution : LocalDate  represents just a date, not a DateTime. So "HH:mm:ss" make no sense when formatting a  LocalDate . Use a  LocalDateTime  instead, assuming you want to represent both a date and time. Take a close look !! MinuteOfHour is unsupported /** Map of letters to fields. */ private static final Map < Character , TemporalField > FIELD_MAP = new HashMap <>(); static { FIELD_MAP . put ( 'G' , ChronoField . ERA ); FIELD_MAP . put ( 'y' , ChronoField . YEAR_OF_ERA ); FIELD_MAP . put ( 'u' , ChronoField . YEAR ); FIELD_MAP . put ( 'Q' , IsoFields . QUARTER_OF_YEAR ); FIELD_MAP . put ( 'q' , IsoFields . QUARTER_OF_YEAR ); FIELD_MAP . put ( 'M' , ChronoField . MONTH_OF_YEAR ); FIELD_MAP . put ( 'L' , ChronoField . MONTH_OF_YEAR ); FIELD_MAP . put (