Java EE





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

its a non technical question to some senior folks out there in software companies
i am planning to take a break from work for a year or 2. i have 9 years experience as a java developer.

does taking a year long break from work lower my chances of getting job ?
should i have a solid reason or do some online course so as to justify it ?
my main reason to take a break is to up my health as i have been stressed out too much. dont know whether that will qualify as a genuine reason.

or it doesnt matter at all ? i clear the interview and i am in.

any suggestions are welcome
Announcing the Winners!
LVL 13
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

hi am having this error in my app http error
import {Http} from '@angular/http';
import {EventEmitter, Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import {map} from 'rxjs/operators';
import {Task} from './task.model';

export class TaskService {

    onTaskAdded = new EventEmitter<Task>();

    constructor(private http: Http) {


    getTasks() {
        return this.http.get('/api/tasks').map(response => response.json());

    saveTask(task: Task, checked: boolean) {
        task.completed = checked;
        return'/api/tasks/save', task).map(response => response.json());

    addTask(task: Task) {
        return'/api/tasks/save', task).map(response => response.json());


app module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { TasksComponent } from './tasks/tasks.component';
import { TasksAddComponent } from './tasks/tasks-add/tasks-add.component';
import { TasksListComponent } from './tasks/tasks-list/tasks-list.component';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';

  declarations: [
  imports: [

  providers: [],

Open in new window

Can someone share the exact steps (step by step) on how to set
X-frame-options in Weblogic (10.3.6, 12.1.3,  & Tomcat
to SAMEORIGIN to fix XFS/clickjacking?

I'm running Solaris 10 & RHEL 6  OS
hi am geting this error
mvn compile
[INFO] Scanning for projects...
[WARNING] Some problems were encountered while building the effective model for guru.springframework:pet-clinic-web:jar:0.0.5
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.junit.jupiter:junit-jupiter-api:jar -> version (?) vs
5.5.0-RC1 @ guru.springframework:pet-clinic-web:[unknown-version], C:\spring5Clinic\pet-clinic-web\pom.xml, line 97, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.mockito:mockito-junit-jupiter:jar -> version 2.22.0 vs
 (?) @ guru.springframework:pet-clinic-web:[unknown-version], C:\spring5Clinic\pet-clinic-web\pom.xml, line 107, column 21
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] tdm-pet-clinic                                                     [pom]
[INFO] pet-clinic-data                                                    [jar]
[INFO] pet-clinic-web                                                     [jar]
[INFO] ----------------< guru.springframework:tdm-pet-clinic >-----------------
[INFO] Building tdm-pet-clinic
hi when creating new spring boot application in eclipse what must i choose
enterprise application or Dynamic web project i also what to add angular in this project and later use hirbinate
hi where do i add this
    DataSource dataSource() throws SQLException {
        OracleDataSource dataSource = new OracleDataSource();
        return dataSource;

Open in new window

hi am not geting the preview
hi am geting error in my app
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version name:   Apache Tomcat/9.0.20
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          May 3 2019 22:26:00 UTC
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version number:
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 10
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            10.0
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Java\jdk1.8.0_111\jre
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_111-b14
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Users\Desmond\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Oct 02, 2019 8:34:09 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software
hi am geting this error
size errorthis my code
    void processFindFormReturnMany() throws Exception {

                .andExpect(model().attribute("selections", hasSize(2)));

Open in new window

hi am having this error when running my java application in interlj
"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -ea -Xmx1024m -XX:MaxPermSize=256m --illegal-access=permit -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\lib\idea_rt.jar=50250:C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\junit\lib\junit-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\junit\lib\junit5-rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\zipfs.jar;C:\Program
Exploring SQL Server 2016: Fundamentals
LVL 13
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

hi am geting a blank screen in my application but i have added component
component am in angular 8
this my application angulari get this when i do insepect
compiler.js:2175 Uncaught Error: Template parse errors:
'app-posts-create' is not a known element:
1. If 'app-posts-create' is an Angular component, then verify that it is part of this module.
2. If 'app-posts-create' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<!--The content below is only a placeholder and can be replaced.-->
<h1>Our First App</h1>
[ERROR ->]<app-posts-create></app-posts-create>
"): ng:///AppModule/AppComponent.html@2:0
    at syntaxError (compiler.js:2175)
    at TemplateParser.parse (compiler.js:11292)
    at JitCompiler._parseTemplate (compiler.js:25837)
    at JitCompiler._compileTemplate (compiler.js:25825)
    at compiler.js:25769
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (compiler.js:25769)
    at compiler.js:25682
    at Object.then (compiler.js:2166)
    at JitCompiler._compileModuleAndComponents (compiler.js:25681)
hi am geting the following error
ERROR in src/app/tasks/tasks-add/tasks-add.component.ts:24:17 - error TS2345: Argument of type '(newTask: Task) => void' is not assignable to param
eter of type '(value: Task[]) => void'.
  Types of parameters 'newTask' and 'value' are incompatible.
    Type 'Task[]' is missing the following properties from type 'Task': id, name, completed, dueDate

24                 (newTask: Task) => {

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.

my code is
import { Component, OnInit } from '@angular/core';
import { Task } from '../task.model';
import {TaskService} from '../task.service';

    selector: 'app-tasks-add',
    templateUrl: './tasks-add.component.html',
    styleUrls: ['./tasks-add.component.css']
export class TasksAddComponent implements OnInit {

    addTaskValue: string = null;

    constructor(private taskService: TaskService) { }

    ngOnInit() {


    onTaskAdd(event) {
        let task: Task = new Task(,false, this.getTodayAsString());
                (newTask: Task) => {
                    // clear the input
                    this.addTaskValue = ' ';

    getTodayAsString() {

Open in new window

hi am trying to download file in oracle form using webutil am geting the following error
Application server file INT.REQ-4805-18152.TXT does not exist or is of zero length
this si the log Java Plug-in x86
Using JRE version 1.8.0_211-b12 Java HotSpot(TM) Client VM
User home directory = C:\Users\username
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
network: Connecting http://hostname:9001/forms/lservlet;jsessionid=CDhmdLLV7Wc2WgSJhyfxshNgpT263YnF3dGfGRTGgyKnbmwgpfq5!2075368613 with proxy=DIRECT
network: Connecting http://hostname:9001/ with proxy=DIRECT
network: Connecting http://hostname:9001/forms/lservlet;jsessionid=CDhmdLLV7Wc2WgSJhyfxshNgpT263YnF3dGfGRTGgyKnbmwgpfq5!2075368613 with proxy=DIRECT
2019-Sep-25  08:42:43.580 WUF[setProperty()] Setting property WUF_GFN_DIRNAME to /usr2/dev/maint/apps/ncs/appfiles/arc/
2019-Sep-25  08:42:43.580 WUF[setProperty()] Setting property WUF_FILENAME to INT.REQ-4805-18152.TXT
2019-Sep-25  08:42:43.580 WUF[setProperty()] Setting property WUF_FILTER to
I really must know how to do this. Security on my workstation only allows confirmed downloaded files and no network interaction with Eclipse Marketplace.

So I require ideally a downloaded binary file I can simply drag and drop to install.

Any special instruction would be great.
H team i worked with DataTable its a tabular structure i wan to do the  same thing with div only how can i implement it .
Hi Experts,

while writing data to file, below is the logic i am using,
when i scan(ibm app scan i used) my code below code showing as suspected code
can some one suggest what is the wrong in my below code.
      fos.write(bytes); suspected code from the below code.

private static void writeDataInFile() throws IOException {
		byte[] buf = null;
		byte bytes[] = null;
		ByteArrayInputStream bais = null;
		GZIPInputStream gzis = null;
		ByteArrayOutputStream baos = null;
		FileOutputStream fos = null;
		try {
			fos = new FileOutputStream("D:\\test\\test1");
			String empName = "srkrao";
			bytes = empName.getBytes();
			if (bytes != null && bytes.length >= 2) {
				byte buffer[] = new byte[2048];
				int length = 0;
				baos = new ByteArrayOutputStream();
				bais = new ByteArrayInputStream(bytes);
				gzis = new GZIPInputStream(bais);
				while ((length = >= 0) 
					baos.write(buffer, 0, length);				
				bytes = baos.toByteArray();
				fos.write(bytes);   //[b]this is the line showing as suspected one[/b]
			} else {
		} catch (Exception ex) {
			// System.out.println("error while setting the data in fos" +
			// ex.printStackTrace());
		} finally {


Open in new window

i have a jsp page where i m uploading a file my requirement is that file should not be save in any folder once i click a upload button in a jsp page request go to
servlet where i want to read the file path only .
what is ideal log file size to be maintained in the servers to have  a optimal performance
Explain effect of file size in performance
How to setup JNDI in apache, better method to connect DB

Please advice the steps
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 13
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

I am using a java web application on Tomcat 9.0 server with ActiveMQ 5. Below is the broker config at context.xml, it works.

<Resource   name="jms/ConnectionFactory"
            description="JMS Connection Factory"

    <Resource name="jms/queue/MyQueue"

It always creates the persistence store directory activemq-data inside tomcat bin folder, adding what parameter I can redirect the store content to my own directory which is outside of tomcat folder. Please help.
In my java project i am using google guice framework.
as it doesnt have any inbuilt facility for scheduling i resorted to quartz scheduler.
please do let me know also if the problem i am describing below can be solved without quartz using something of google guice.

i want to schedule a task that starts at 2.00 am and runs every 30 mins aftwr that ...i think we can do some cron here.
now after a condition is met i want to stop the scheduler
but i also want that it should get scheduled. next day also at 2.00 am timezone IST so stopping it means just stop this particular acheduling ans not cancel it totally

so that next day again at 2 am it runs at the following times - 2.00 2.30 3.00.... till a condition is met.

please help me with the cron and some basic how to write it in quartz and the stopping thing.

I have the following code :
 private CompletionStage<ChannelSftp> getChannel() {
    return sessionManagerInit
        .thenCompose(__ -> sessionManager.establishConnection(timeoutMillis))
        .thenCompose(__ -> sessionManager.openSftpChannel())
        .handle((result, throwable) -> {
          if (throwable == null)
            return result;
          logger.error("Error in getChannel", throwable).attr("message", throwable.getMessage()).log();
          return sessionManager.disconnectChannel().thenCompose(__ -> sessionManager.init());
        }).thenCompose(x -> {
          if (x instanceof ChannelSftp) {
            return CompletableFuture.completedFuture((ChannelSftp) x);
          } else {
  "Renewing channel").log();
            return renewChannel();

Open in new window

I wanted to make this function synchronous so that no two threads can be inside it. Because it could happen that on the same session object
one thread may be connecting on it and other disconnecting on it. which could lead to inconsistent behaviour. So i am using this getChannel() call each time i want to upload something to SFTP. This could call trouble if i am making multiple uploads in async manner due to the above reason i listed.
Please comment on the above approach. It looks flawed to me.
Also i dont see an easy way to add synchronous to this method because the function will anyways exit immediately due to futures invovled.

Please suggest an alternative approach for the same.

I am facing this error on ADF, but I am not able to reproduce the scenario, but the users is getting this error several times during the day, any idea how I can find a solution?

[2019-04-30T09:38:51.255+03:00] [AdminServer] [WARNING] [ADF_FACES-00009] [] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: WDAHER] [ecid: c87619c7-def0-4891-ace9-679f979f364f-00000634,0] [APP: ProviderApp] [partition-name: DOMAIN] [tenant-name: GLOBAL] [DSID: 0000MdgmAT20ZrwN0EFg6F1SlrOI00000D] Error processing viewId: /provider/ProviderView URI: /WEB-INF/com/ba/network/fragments/ProviderView.jsff actual-URI: /WEB-INF/com/ba/network/fragments/ProviderView.jsff.[[
                at oracle.jbo.uicli.binding.JUCtrlHierBinding.bringNodeToRangeKeyPath(
                at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.bringNodeToRangeKeyPath(
                at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(
                at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(
                at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(
                at org.apache.myfaces.trinidad.component.UIXTable.setRowKey(

Open in new window

Hi Experts,

I want to generate client stub using soap wsdl.
i am using Ant build.
can some help me how to generate clientstub for real time environments using Ant project.

I am trying to add an action to a NSButton but it is not working

I create my NSButtton programmatically:

-(NSView *)rowTable:(CGFloat) heightOnPanel :(NSString *) textValue: (CGFloat) width: (CGFloat) height :(int) intColor{
    NSView *viewce = [[NSView alloc] initWithFrame:CGRectMake(0, heightOnPanel, 320, 40)];
    NSButton *layerBt = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, width, height)];

    [layerBt setTitle:textValue];

    [layerBt setButtonType:NSMomentaryPushInButton];
    [layerBt setTarget:nil];
    [layerBt setAction:@selector(buttonPressed:)];
    [viewce addSubview:layerBt];

    return viewce;

Open in new window

and here is IBAction method:

- (IBAction)buttonPressed:(id) sender{
    NSLog(@"hello world");

Open in new window

Could you point me to what I am missing?


Java EE





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