[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm unable to compile first java program.

javac is not recognized.  Please see attached.
Hello_World_not_compiling.PNG
0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hello Sirs
I am using serious issues with Charset Encoding in a REST application. I use Spring and the encoding in the bean MessageSource and Tymeleaf resolver  is set to UTF-8.
I get this when I return Json string:
\ufffd replacing special characters like é, or any other letter with accent.
How can I solve this?

Best regards.
0
Dear Experts,

let us know if logger is good for production or we have remove it out ? is that slows down at the applicationl level ?
if we use only after catch is that ok..
logger.warn("proceeding with incomplete request from mobile: {}. cause: {}, message: {}", 
					requestBody.length(), ex.getCause(), ex.getMessage());

Open in new window

let us know  in our application we are using hashmap  is that good or map would be good ?
	@CrossOrigin
	@RequestMapping(value = beneficiaryURL, method = RequestMethod.POST, produces = {"application/json" })
	public HashMap<String, Object> screeningRecord(@RequestBody String requestBody, 
			HttpServletRequest request) throws Exception {
		String remoteAddr = request.getRemoteAddr();
		logger.info("got request from: {}", remoteAddr);
		logger.debug("{}: received message: {}", remoteAddr, requestBody);
		HashMap<String, Object> screeningRespone = new HashMap<>();	
		// Transaction id is generated
		String transactionId = String.format("%s-%s", UUID.randomUUID().toString(), 
				dateTimeFormatter.format(new Date()));
		logger.info("{}: Generated id: {}, url: {}. Saving...", remoteAddr, 
				transactionId, beneficiaryURL);
		SubmissionInfo submissionInfo = new SubmissionInfo(transactionId, requestBody, 
				SubmissionInfo.PENDING, beneficiaryURL);
		Integer partition = null;
		try {
			Map<String, Object> jsonRequest = load(requestBody);
			Long microPlanId = Long.valueOf(jsonRequest.get("microPlanId").toString());
			partition = 

Open in new window

0
Experts,

Please have the code  and let me know what is the issue

@CrossOrigin
	@RequestMapping(value = "microplan/{teamId}", method = RequestMethod.GET, produces = { "application/json" })
	public ResponseEntity<?> visitationPlanMobile(@PathVariable int teamId) throws Exception {

		List<Map<String, Object>> responeObject = new ArrayList<>();
		try {
			responeObject = visitationPointMobile(teamId);
			return new ResponseEntity<>(responeObject, HttpStatus.OK);
		}catch(Exception e){
			e.printStackTrace();
			logger.error("Error Get Micro Plan {}",e.getMessage());
			return new ResponseEntity<>(responeObject, HttpStatus.INTERNAL_SERVER_ERROR);
		}
	}

Open in new window



public List<Map<String, Object>> visitationPointMobile(@PathVariable int teamId) throws Exception {
		Map<String, Object> queryFilter = new HashMap<String, Object>();
		queryFilter.put("team_id", teamId);
		//queryFilter.put("status", VisitationPlan.ACTIVE);
		HibernateDao<VisitationPlan> workerDao = daoFactory.getNewDao(VisitationPlan.class);
		return getVisitationPlanMapMobile(workerDao.findList(queryFilter));
	}

Open in new window


This is error comes some times making our service down

01-10-2018 11:44:34.380 ^[[35m[http-nio-8080-exec-15]^[[0;39m ^[[34mINFO ^[[0;39m c.d.d.c.VisitationPlanController.getVisitationPlanMapMobile - MicroPlan Location Id: 24395
01-10-2018 11:44:34.382 ^[[35m[http-nio-8080-exec-15]^[[0;39m ^[[1;31mERROR^[[0;39m c.d.d.c.VisitationPlanController.visitationPlanMobile - Error Get Micro Plan null
0
Hi Experts,
how to form a dynamic string array from the below inputs

String countries="sg,sk,hk,ke" //this string having country names dynamically
countries max will be five and min will be one value separated with comma(,)


i have to form dynamic string array based on above countries
user can choose any country but max will be 5 countries min 1 country
country values are dynacmic

how to form dynamic string array

exmaple:
new String[] {"sheet one"+ "sg" , "sheet two" + "sk","sheet three" + "hk","sheet four" + "ke","sheet five" + "ug","summary"}
new String[] {"sheet one"+ "sg" , "sheet two" + "sk","sheet three" + "hk","sheet four" + "ke","summary"}
new String[] {"sheet one"+ "sg" , "sheet two" + "sk","sheet three" + "hk","summary"}
0
I would like  to insert a row for  title not a Particular cell but show assign entire row cell for the title
 here is the piece of snippet code, i do not how to add a title for the entire row


....
HSSFWorkbook workbook = new HSSFWorkbook();
    HSSFSheet sheet = workbook.createSheet("EDR Raw Data");

    Row header = sheet.createRow(0);
    header.createCell(0).setCellValue("Header1");
    header.createCell(1).setCellValue("Header2");
    header.createCell(2).setCellValue("Header3");
    header.createCell(3).setCellValue("Header4");
0
Hello Experts,

I was writing a restful apis
I would like to have a snippet of code to  which will handle the exception like
If request was successful, then return 2xx code (3xx for redirect).
 If there was an internal logic error on a server, then return 5xx. If there is anything wrong in client request, then return 4xx code.
 like to have a user friendly description of the errors...

Thanks
0
apache tomcat 8.5.33 doesn't start up when I double click the startup.bat file from the bin directory.The window opens and closes immediately.
Please help.
0
May I know how to popup pdf file in Spring framework?
0
Websocket or TCP or Push Notification ????

I am planning to build a mobile app to see the updates of stocks being added by the user as soon the price got updated.

1. Do we need to use Websocket or TCP or push notification in this case? Which one is better ?
2. Do we have any stock market test API's which supports Websocket or TCP or Push notification to cross check the feasibility, stability, reliability and latency ?
3. What are the differences between websocket vs TCP vs Push Notification ???

Need answers for the above three questions and the final decision as well. Please Suggest.
0
PMI ACP® Project Management
LVL 12
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

HI,
Need experts view on the following line  -
Most NoSQL solutions however are built with the assumption that the data does not fit on a single machine and hence have sharding builtin.

Is it that noSQL solutions have easier or better sharding capabilites than relational databased like mysql ?

And should one use noSQL always in case of sharding ?

Thanks
0
Hi Experts,

java.lang.ArrayIndexOutOfBoundsException is coming after jdbc batch executed

batch size 5000
i have total -5500
batch executed 5000 inserte data successfully
rest of the records failed to execute

if i give batch size 5500
all the date is inserted successfully

refer code here
https://www.experts-exchange.com/questions/29110374/JDBC-Batch-insert-causes-ORA-01000-maximum-open-cursors-exceeded.html
0
Hello there,

I have a 3 web application which I want to run one 1 instance of Tomcat on Ubuntu server. Now at present when i type 192.168.1.6 in the browser from my laptop I can connect to my tomcat server and the web page is shown. Now I went a step forward by, instead of the ip i want to enter the some name like www.zzzzzzzz.com but it is not working, i get a white screen and on the browser title it says Site under construction(dont know where it gets this title from). I am referring to this link for help http://www.ramkitech.com/2012/02/understanding-virtual-host-concept-in.html. Can somebody please help me.

cheers
Zolf
0
Hi Team,

I need an help on Scanner class in java . I need some help on how to use the Scanner(Readable src) , Scanner(ReadableByteChannel src , String charSetName). with an example
Any help is really appreciated.
0
I have installed apache tomcat 7.0.90 on my windows 8 64bit system. This is how I have configured my tomcat-users.xml -

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary. It is
  strongly recommended that you do NOT use one of the users in the commented out
  section below since they are intended for use with the examples web
  application.
-->
<!--
  NOTE:  The sample user and role entries below are intended for use with the
  examples web application. They 

Open in new window

0
what are differences between

stateless
stateful
singleton
mdb enterprise java beans.

when to use which one

any practical examples on them to see differences.

any links, resources, videos?
please advise
0
Hi Experts,

List<String> list = new ArrayList<String>();
            list.add("gh_123");
            list.add("sg_456");
            list.add("hk_789");
            list.add("ke_968");
            
            
O/P:
i have to iterate the list
split the string into two  parts as below
String countries = 'gh','sg','hk','ke';
int custId = 123,456,789,968;
0
Hi Experts,

i want to know table having data or not
in select query i will pass account no dynamically
can i use executeUpdate() for select queries or i have to use execute method

in executeupdate if the table having data it will return>1
else it will return 0.

i have a doubt is it good practive to use or i have to use execute()?
0
Hi Experts,

HashSet<TestData> hashset = new HashSet<>();

using select query getting data from Test1 table and adding data in TestData Object, then finally adding it in hashset.
now hashset is haviing 1000 records.

i want to insert this data in Test2 table(different database).

in Test2 table might have the same record if the record is available need to do update the values
if no data available in Test2 table need to do insetion.

Can some suggest me best way to do insert or update in Test2 table using jdbc.
0
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Hi Team,

According to my work, I have to run 7000+ sql statements in DB2 .I have the java code of the same.But by default DB2 java can only run 1338 dynamic statements at one time.
So what I was doing that Split the input data (7000 + ) into mulitiple txt files and run program more than 7 times .Each time I have to change the input path file.

Now  instead of running program 7+ times and manually changing input path everytime,I m trying to dynamically read all the input files from that folder.
Here I am attaching a part of my program only..only the method to read input file.
Below is the code for single input file case. Assume I have files named as a.txt,b.txt,c.txt.....etc.
Text file contains data in the below format:-
----------------------
abc-465747        
dfr-756372
---------------------
Existing code which executes fine  for single input file

declared input file path
static String fileName="C:\\Users\\john\\Desktop\\policies.txt";

Open in new window


main method.
 public static void main(String[] args)
        
    {
    Pre pd = new Pre();
   
      
    pd.read_Policy_list_file(fileNames);

//other methods as a part of my work
}

Open in new window


read+policy method
public void read_Policy_list_file (String fileName)
		{
			try
			{
				BufferedReader br = new BufferedReader(new FileReader(fileName));
				try {
				    StringBuilder sb = new StringBuilder();
				    String line = br.readLine();

				    while (line != null) 
				    {
				    
				

Open in new window

0
hi,

Wonder why screen 2 approach better than screen 1 approach.
Please advise
screen2.png
screen1.png
0
how utf-8, unicode are different for latin kind of characters with carrot or cap etc on them


in java are those both same?
are they different in other languages?

how html decimal code is different?
what other formats out there?
which one to use when?
which one to use to support sms on emails, sms text and different browsers, gif. pdf kind of reports etc without having to see some junk ?? kind of display issues
0
Hi,
I am writing java code to make api calls to dynamics 365...
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/query-data-web-api
Is there any standard library that i can use to for this...
Especially with the case when in the response i get a new link :
],"@odata.nextLink":"[Organization URI]/api/data/v9.0/accounts?$select=name&$filter=contains(name,'sample')&$skiptoken=%3Ccookie%20pagenumber=%222%22%20pagingcookie=%22%253ccookie%2520page%253d%25221%2522%253e%253caccountid%2520last%253d%2522%257b695EAF89-F083-E511-80D3-00155D2A68D3%257d%2522%2520first%253d%2522%257b655EAF89-F083-E511-80D3-00155D2A68D3%257d%2522%2520%252f%253e%253c%252fcookie%253e%22%20istracking=%22False%22%20/%3E"  

Normally i would fetch the result and then check for nextLink and make an http call then again check ...
Whats the best way to do this... Is there any library..in spring framework.

Thanks
0
Hello:

I would like to know how to disable the Java security warning screen below from coming up each time run a jnlp file from my desktop.  The users complain that this is distracting because you always have to click the check box and the run button every time before the Java program starts.  To run the file you need to enable Java security HIGH and add this site to the exception site http://asycuda.customs.gov.bb/awclient/ASYCUDAWorld.jnlp which we already did but it still isn't disabled.  

What additional setting or command line parameters would disable the warning screen below?

Java Security Warning Screen
0
Hi,
I am using OAuth for Microsoft dynamics CRM.
For some strange reason its not returning accesToken when i used a refreshToken to generate a new token.
Its only retruning refreshToken and idToken. What could be the reason for that ?

Here is the screen shot of postman request -
Screen-Shot-2018-04-15-at-8.03.14-PM.pngScreen-Shot-2018-04-15-at-8.03.32-PM.png
Is this a valid OaUth protocl response ??

Thanks
0

Java EE

17K

Solutions

9K

Contributors

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

Top Experts In
Java EE
<
Monthly
>