Questions tagged as 'java'

1
answer

Criteria bringing duplicate data from hibernate to JSF

I'm getting duplicate data or sometimes missing data until, how can I fix it? This is my DAO: public List<Produto> filtrados(Filtro filtro) { try { Criteria criteria = criarCriteriaParaFiltro(filtro); criteria.se...
asked by 25.06.2016 / 03:34
0
answers

Robot java and program blocking the clicks of the same

I'm making a very simple robot for a game. my code: if(e.getKeyChar() == 'e'){ Point p = new Point(); p = MouseInfo.getPointerInfo().getLocation(); textField1.setText(""+p.x); textField2.setText(""+p.y); } if(e.getKeyChar() == 's'){ try {...
asked by 19.06.2016 / 20:10
0
answers

How to handle exceptions with JTA?

I have a project where I'm using JPA with JTA. In the gravar method, I put the @Transactional(Transactional.TxType.REQUIRED) annotation and there is a call to a validation method that can throw an exception called ValidacaoException...
asked by 18.06.2016 / 18:49
1
answer

How to get latitude and longitude without internet on Android? [duplicate]

How do I get the latitude and longitude in Java to Android without using the internet, only with GPS. I think there is some way to do it, because the "Maps" application of Android does not use the internet. If anyone knows...
asked by 16.04.2014 / 17:29
1
answer

Entity Spring Repository Error with Relationships

I'm having a project using Spring Boot to serve JSON in a WebService. An error occurred when I add the Repository class. If you remove it the program starts normally (no errors in the console, I do not speak of features). The error is: link...
asked by 08.07.2016 / 20:04
1
answer

Doubt about filling a two-dimensional array in Java

I'm doing an exercise and I need help. Here is the statement:    Calculate the average temperatures of each month. To do this, create a list containing the names of each month in the rows, and the number of days of each month in the columns....
asked by 10.07.2016 / 03:09
0
answers

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: DataSource must not be null

When doing a query in a dao class, the following error appears: My spring-context.xml is: <mvc:interceptors> <bean class="br.com.softwarescomerciais.os.interceptor.AutorizadorInterceptor"></bean> </mvc:interceptor...
asked by 07.01.2017 / 19:03
0
answers

java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf. Glassfish 4.1, HIbernate 5.2, Spring 4.3 [closed]

I can not upload an application in Glassfish 4.1. It seems to me that the problem is the dependency org.jboss.logging I already added it to the project in version 3.3.0 but the error persists. The strange thing is that the same application "ru...
asked by 28.12.2016 / 16:52
1
answer

How to get the Android version number?

I would like to know how to get the version number of Android in which my application that uses WebView is running, to put in the UserAgent, as in the code below: mWebView.getSettings().setUserAgentString("Mozilla/5.0 (Linux; App Mobile Andro...
asked by 07.11.2016 / 05:35
1
answer

no such table: tbcarro

Following some examples, I'm in doubt about the following error: 11-24 20:49:14.803 18215-18215/tiburski.rg.cadastrocarro E/SQLiteDatabase: Error inserting nome=ggggg modelo=ggggg placa=hhhh android.database.sqlite.SQLiteException: no such tab...
asked by 25.11.2016 / 00:05