jsosnowski

1

votes
1

answer
100

views

JDBC CallableStatement - call multiple stored procedures in one shot

To call Oracle's stored procedure using only simple JDBC in Java we could do something like this: con.prepareCall('{ call ? = my_procedure(?) }'); callStm.registerOutParameter(1, Types.INTEGER); callStm.setInt(2, -100); callStm.execute() I want to know is it somehow possible to call more then one pr...
jsosnowski
1

votes
0

answer
159

views

Java heap saw pattern

I work with Java system which process data in batch mode. It's reading data from database, doing some calculation and writing results to another database. I notice that Garbage Collector runs very often and clean a lot of heap space - for example from 800 MB to 400 MB (50%). See screenshots below: S...
jsosnowski
1

votes
0

answer
57

views

Oracle WITH clause - force execute unused statement (disable optimization)

Problem: The Oracle DB uses some optimization and doesn't execute WITH component which isn't used in the final query. So no execution of unused queries. Question: Is it possible to disable Oracle's optimization and execute all queries in WITH clause? Are there any special hints for that? Details: I...
jsosnowski
1

votes
1

answer
161

views

JAXB, XJC: Generating field to Class Outline

My question concerns writing JAXB plugins, in particular ClassOutline internals. In com.sun.tools.xjc.outline.ClassOutline there are fields: target ref implClass implRef Code: /** * This {@link ClassOutline} holds information about this {@link CClassInfo}. */ public final @NotNull CClassInfo target;...
jsosnowski
1

votes
1

answer
1.2k

views

What is the securitypack.jar in Java?

I want to know what is the securitypack.jar in Java installation? What is it for? I found that Java downloads this file automatically from: https://javadl-esd-secure.oracle.com/update/securitypack.jar and saves inside: C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\security\securitypack.ja...
jsosnowski
1

votes
1

answer
879

views

How insert data to database using Maven

I have SQL script files with inserts statements: Insert into TABLE (COL1, COL2) values ('1','value'); ... Is it possible to build Maven goal which will execute this SQL in the database? I consider using Oracle or Postgresql database.
jsosnowski
2

votes
2

answer
1.1k

views

Vaadin7 - Grid disable unselecting

How to disable unselecting Grid row in Vaadin 7, but with permission to select another row using keyboard or mouse click? Grid grid = new Grid(container); grid.setSelectionMode(Grid.SelectionMode.SINGLE); For example this is possible for older Table component - SO answer. But I widely use Grid so I...
jsosnowski
2

votes
1

answer
5.4k

views

TinyMCE is blocking only one Polish character

TinyMCE works great - look at example. It works also with characters unique for Polish alphabet, for example: ąźćńół. Except one character: ę Typing this character in TinyMCE text area do noting (try at example page). What I should change in configuration file to fix this problem? Using: Ti...
jsosnowski
5

votes
2

answer
6.5k

views

IE 11 can't find Java Plugin to run Applet

I have application build with Java Applets, which works fine for Windows 7 with IE 9. Now I'm trying move it to another environment. There is Internet Explorer 11. To run applet I'm using Oracle Deployment Toolkit Script with latest version taken from https://www.java.com/js/deployJava.txt. But the...
jsosnowski
3

votes
1

answer
2.5k

views

Zxing NotFoundException

I try to use Zxing to decode Aztec code. I use code from SO answer. Here is a part of it: public static String readQRCode(String filePath, String charset, Map hintMap) throws FileNotFoundException, IOException, NotFoundException { BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer( ne...
jsosnowski
2

votes
1

answer
79

views

Java 8: Interface with single method

Sometime I need to make callback from one method to another: final Integer i = 5; final Integer j = 10; foo('arg1', 'arg2', (x, y) -> { /** do sth which need this context **/ bar(i + x, j - y); }) But in such case I need to write simple interface (somewhere): public interface someName { void noMat...
jsosnowski
4

votes
2

answer
1.8k

views

Vaadin Component as Spring bean

Question: When Vaadin component could be a bean in spring container (@SpringComponent annotation)? Question clarification: I ask this question because I know that Vaadin View could be spring bean after using @SpringView. But if I annotate Button component with @SpringComponent it will be created onl...
jsosnowski
2

votes
1

answer
511

views

Apereo CAS use NTLM instead of Kerberos

I use Apereo Cas 5.1.1 (Central Authentication Service) for such 'architecture': Client browser --> CAS Server --> Active Directory (LDAP) MS Windows 7 Red Hat Microsoft Introduction: CAS Server URL is: http://dev.domain.com:8080/cas We create service user with userPrincipal...
jsosnowski
1

votes
2

answer
1.4k

views

CAS Spnego - KrbException: Checksum failed

I'm trying to use SPNEGO (Kerberos) authentication with Active Directory - with CAS server (github). Here is official instruction: https://apereo.github.io/cas/5.1.x/installation/SPNEGO-Authentication.html I used this template: https://github.com/apereo/cas-overlay-template So pom.xmlis taken from t...
jsosnowski
2

votes
1

answer
208

views

JdbcTemplate insert XmlType failed on larger sizes

I can't insert quite big XML to Oracle XMLType column using JDBC driver and Spring JdbcTemplate. String isn't small, so I create CLOB and pass it to XMLTYPE(?) in insert command: String insertSql = 'INSERT INTO tab (xmlcol) VALUES (XMLTYPE(?))'; int[] types = new int[] {Types.CLOB}; SqlLobValue xml...
jsosnowski
8

votes
5

answer
17.6k

views

Vaadin - Refresh grid after row modification

I create simple grid with data from database: BeanItemContainer container = new BeanItemContainer(Customer.class, customerRepository.findAll()); Grid grid = new Grid(container); To edit each row the button was created: Button edit = new Button('Edit', clickEvent -> openWindow((Customer) grid.getSele...
jsosnowski
5

votes
0

answer
317

views

CAS Authentication - CSRF token not found

I use Apereo CAS (formerly Jasig CAS) (github here). Next, I create a very simple application in Vaadin, which connects to CAS during authentication. Everything works seamlessly until I turned on CSRF from Spring Security. If CSRF is turned on, then the redirection to CAS login page works OK. But af...
jsosnowski
1

votes
2

answer
1.7k

views

Log4j2 doesn't see configuration xml

Probably, I searched all Internet, but I must miss something. I configure Log4j2 and Commons-logging according to documentation. I add log4j2.xml, but its configuration has no impact of application output. I looks like Log4j doesn't read this file. Here is my config: pom.xml 2.3 commons-logging comm...
jsosnowski
4

votes
0

answer
266

views

Apache Spark 2.0 library preference

In short: In Spark 2.0 spark-submit prefers his version of Guava library (14.0.1) - but I want to use recent jar version (19.0). Question: How convince Spark to use version provided in my pom.xml file? My suspicion: I can use spark.driver.userClassPathFirst=true option. But it is experimental featur...
jsosnowski