Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

I want to  filter my datatable then select row, i do this but the select return null after filter ?!

my xhtml page:
      <p:dataTable id="dt" var="s" value="#{searchBean.tvList}" emptyMessage="No Object found with this id" rowKey="#{s.tag}" >
            <f:facet name="header">SELECT FROM DATABASE</f:facet>
            <p:column headerText="TAG" filterBy="#{s.tag}" filterMatchMode="contains" style="text-align: center">
                  <h:outputText value="#{s.tag}" />
            <p:column headerText="TEXT" filterBy="#{s.text}" filterMatchMode="contains" style="text-align: center">
                  <h:outputText value="#{s.text}" />
            <p:column style="text-align: center">
             <h:commandButton value="SELECT" action="#{searchBean.printResult()}">
                <f:setPropertyActionListener value="#{s}" target="#{searchBean.selectedTV}" />

and my managebean:-

emphasized text@ViewScoped
public class SearchBean {
      private TV selectedTV;
      private List<TV> tvList;
      public TV getSelectedTV() {
            return selectedTV;

      public void setSelectedTV(TV selectedTV) {
            this.selectedTV = selectedTV;
      public List<TV> getTvList() {
            return tvList;
      public void loadData() {
            tvList = new ArrayList<TV>();
            Operations dao_pojo = new Operations();
            tvList = dao_pojo.get_all_data_TV();

      public void printResult() {
            if(selectedTV == null) …

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Dear sirs,
I would like to have a sample code demonstrating how to download a ZIP file using Spring RestTemplate.
I can do it using Jersey, I have hard time doing with Spring RestTemplate.
Please, assist

When first time deploy war file, after the completion I made a http request for the system (example: http://localhost:9080/CSW/login/login.jsp).

Receiving the following error:
Virtual host/WebGroup not found: The web group CSW/login/login.jsp has not been defined.

Could you please help with it? Why I get this error?
Every 15 mins mail should trigger to my mailbox using java program. i have content of mail which should send in every 15 minutes to my mail box.
Hello, Currently I was working on Struts 1 Application and I need to know whether it is possible to integrate the current application with Spring framework. What can be suitable method to do so? Or do I need to switch my current Struts framework with Spring.
Hello dear friends. I started to study Java and want to make the program "hello", but not quite simple.
I've already learned how to write simple programs, but with more complex programs I have problems.
Therefore, I am asking for help. My question (it is highlighted) is below. First a short introduction.
Now I'm learning Java (I'm using Eclipse) and I came across the following learning example - a variation of the text-to-speech (TTS) program in Java.

The essence of the program (it contains 2 classes and 1 referenced library jl1.0.1) is as follows:

1. Link your project with JLayer library for mp3 playing from java (I used jl1.0.1.jar).

2. Create instance:
GoogleTextToSpeech gtts = new GoogleTextToSpeech()

Open in new window

3. Use:
gtts.say("Hello everybody", "en")

Open in new window

First argument is phrase to say, second is language.

I added my comments to the code and commented out unwanted line, now the program (`Main class` and `GoogleTextToSpeech class`) looks like  

I am starting the code by press `Run as → Java Application` on `Main.java`.

I have this (in Eclipse console):

java.io.IOException: Server returned HTTP response code: 503 for URL: 

Open in new window

hi am having this error when trying to install my java jdk am in window 7
I am trying to view my report but it give me that error:-

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Report file TestParam.rpt not found---- Error code:-2147215356 Error code name:fileNotOpened

java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
      at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)
      at javax.faces.FactoryFinder.getFactory(Unknown Source)
      at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)
      at com.sun.faces.config.ConfigureListener.contextDestroyed(Unknown Source)
      at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4690)
      at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5327)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
      at org.apache.catalina.manager.ManagerServlet.stop(ManagerServlet.java:1356)
      at org.apache.catalina.manager.HTMLManagerServlet.stop(HTMLManagerServlet.java:684)
      at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:213)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at …
Following are the logs when i start my spring web application in IntellIj Idea. It takes around 5 minutes to start it in debug mode!!.. Dont know how do i fix it. Shouldnt take that long. Whereas if i just start it normally it takes only 13 seconds.
Connected to the target VM, address: '', transport: 'socket'
23:20:55.358 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
23:20:55.364 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
23:20:55.365 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/Users/robinsuri/Checkout/workflow-app/target/classes/]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 :: Spring Boot ::        (v1.5.9.RELEASE)

2017-12-12 23:20:56.324  INFO 77876 --- [  restartedMain] c.f.a.w.WorkflowAppApplication           : Starting WorkflowAppApplication on DDVMACROBINSU with PID 77876 (/Users/robinsuri/Checkout/workflow-app/target/classes started

Open in new window

Dear sirs,
I would like to integrate the Bar Code functionality into a POS System. Any suggestion in terms of library, tutorials, etc.. or any advice will be highly appreciated.

Concerto Cloud for Software Providers & ISVs
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

I'm a Crystal Reports newbie, I want to write a simple java application that is print my data (using hibernate and jsf).
This is my method in my managebean:

public void print(List<Child> list) {
            try {
                  // Instantiate the report object
                  String report_Location;
                  report_Location = "/com/reports/Report1.rpt";
                  // This interface provides a common service point for getting a report source that is used to view and export reports.
                  IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
                  // It is recommended to use the ReportClientDocument to obtain an IReportSource object.
                  // it's also Creates a new reportsource for the report specified.
                  Object reportSource = null;
                  reportSource = rptSrcFactory.createReportSource(report_Location, java.util.Locale.getDefault());
                  // creating a Fields object, populating it with the parameter values then adding that to the viewer.
              CrystalReportViewer viewer = new CrystalReportViewer();
               * Before parameter fields can be set in a report, the fields must first be created and initialized.
               * Individual parameter fields are all stored in a Fields object.
               * The Fields object is simply a collection of different fields that can be passed to the viewer.
              // Create a Fields object to store the parameter fields in.
              // Returns an object that contains the parameters in the report.…
HI Experts,

Name i have added french language displaying properly
billername i have added korean language displaying as ????
how to resolve this issue

try  {
			OutputStream out = new FileOutputStream("example.properties");
			Properties properties = new Properties();
			properties.setProperty("name", "Rapport de paiement de facture");
			properties.setProperty("billername", "\u767C\u55AE\u4EBA\u540D\u7A31");
			properties.setProperty("version", "1.0");			
			properties.store(out, "This is a sample for java properties");

		} catch (IOException e) {

		try  {
			BufferedReader in = new BufferedReader(
			   new InputStreamReader(
	                      new FileInputStream("example.properties"), "UTF8"));			
			Properties prop = new Properties();

			System.out.println("####Properties.stringPropertyNames usage####");
			for (String property : prop.stringPropertyNames()) {
				String value = prop.getProperty(property);
				System.out.println(property + "=" + value);
		} catch (IOException e) {
			// TODO Auto-generated catch block

Open in new window


####Properties.stringPropertyNames usage####
billername=?????                        //COMING AS ? INSTEAD OF KOREAN LANGUAGE
name=Rapport de paiement de facture
I want to populate data into the model from inside a controller.
Suppose there is a controller method  fetchResponse(Task task) That takes some Task object...
and returns a json TaskResponse object.

now here could be one implementation :

fetchResponse(Task task  @(RequestParam))

TaskResponse taskResponse = new TaskResponse(task);
return serialize taskResponse.

TaskResponse {

TaskResponse(Task task)
populate attributes

This is one way in which all the attributes of the TaskResponse object will be filled inside the TaskResponse object which will be serialized and sent .

Please suggest any pros and cons of this aproach... Also any alternatives.

A user can mention another user on my page.. That is he just writes something like hello @rohit.
So i need to save this comment in Database. If i save the exact comment "hello @rohit" the problem is that if the user changes its display name from rohit to rohit1 This wont get reflected on the page..
So i need to store hello someId  which corresponds to the user.. And while returning the response i need to replace the id's with the name.
Please suggest exact ways how i can accomplish this... As obviously in the above the user may actually type in hello someId and so there should not be any parsing.
I have one approach but dont know if its effecient or work well..
a cooment like hello @rohit  will go in the db like hello <user>id</user>
Basically we will use a xml tag . And also convert the rest of the string which is hello here... may be encode it so that it doesnt mix with xml...And then while returning the response we just parse the user tag and replace every id with name.

Please suggest pros and cons of the above. And any alternative ways.
Hello all,

Currently, i am using smb server but now I want to change it into afp server.

what will be the exact way to change it and connect using afp server?

currently these library are used in the project:
import jcifs.smb.NtlmPasswordAuthentication;
import jcifs.smb.SmbFile;

Thanks in advance.

hi am having this error when seting my java home am in window 7
[code]C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries

C:\Users\userpc>java -version
Error occurred during initialization of VM
Unable to load native library: Can't find dependent librarie

C:\Users\userpc>set JAVA_HOME=C:\java6


C:\Users\userpc>JAVA -VERSION
'JAVA' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\userpc>set JAVA_HOME=C:\java6


C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.


C:\Users\userpc>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

Open in new window


I'm currently facing the following issue with a javafx-application under NetBeans IDE.

When I'm adding a specific maven dependy (bcprov158- bouncycastle provider), I can't build program anymore:

failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project

Does anyone know how to solve this?

I'm following this LDAP authentication code

LDAP Authentication code

replaced parameters with my own parameters to authenticate  with OpenLDAP 2.4.31

public static void main(String[] args)
		String username = "jsmith";
		String password = "password@123"; 
		String base = "ou=people,dc=nodomain";
		String dn = "uid=" + username + "," + base;
		String ldapURL = "ldap://xx.xx.xx.xx:389";

		// Setup environment for authenticating
		Hashtable<String, String> environment = 
			new Hashtable<String, String>();
		environment.put(Context.PROVIDER_URL, ldapURL);
		environment.put(Context.SECURITY_AUTHENTICATION, "simple");
		environment.put(Context.SECURITY_PRINCIPAL, dn);
		environment.put(Context.SECURITY_CREDENTIALS, password);

			DirContext authContext = 
				new InitialDirContext(environment);
			System.out.println("authentication success!");
			// user is authenticated
		catch (AuthenticationException ex)
			System.out.println("authentication failed!");   // I'm getting this print
			// Authentication failed

		catch (NamingException ex)

Open in new window

I am getting authentication failure message . ..what I'm doing wrong ?  ..unable to find the root cause.
Do I need to send password encrypted  ?
Hi all,

I get the error in the below code in .NET schema validation. The schema file is shared by some one else using J2EE.  My client is .NET.

"Attribute name="nonEmptyString"  not allowed" => in xs:simpletype

<xs:element name="ID" minOccurs="1" nillable="false">
        <xs:simpleType   name="nonEmptyString">
          <xs:restriction base="xs:string">
            <xs:pattern value="(\s*[^\s]\s*)+"/>
            <xs:maxLength value="15"/>

Open in new window

[Webinar] Database Backup and Recovery
LVL 11
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

I have the following piece of code :
    @Type(type = "com.JSONUType", parameters =
            {@Parameter(name = "classType", value = "com.ContactInfo")})

    private ContactInfo initiator;

And this info is getting stored in the form {"type" : "ALL"} in the mysql table.
The contactinfo is like :

[b]@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        setterVisibility = JsonAutoDetect.Visibility.NONE)
public class ContactInfo implements Serializable {

    public enum Type {

Open in new window

And JsonUType is fairly complex :
public class JSONUType implements UserType, ParameterizedType, Serializable {

    private static final long serialVersionUID = 1L;

    private static final ObjectMapper MAPPER = new ObjectMapper();

    private static final String CLASS_TYPE = "classType";
    private static final String TYPE = "type";

    private static final int[] SQL_TYPES = new int[] { Types.LONGVARCHAR, Types.CLOB, Types.BLOB };

    private Class<?> classType;
    private int sqlType = Types.LONGVARCHAR; // before any guessing

    public void setParameterValues(Properties params) {
        String classTypeName = params.getProperty(CLASS_TYPE);
        try {
            this.classType = 

Open in new window

I am using hibernate for persistence.
Here are the two classes which i am using as entities :

@Entity(name = "workflow_template")

public class WorkflowTemplate {

 @GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;

    @OneToMany(cascade = {CascadeType.ALL})
@JoinColumn(name = "workflow_id")
@OrderColumn(name = "task_idx")
 private List<TaskTemplate> taskTemplates;

@Entity(name = "task_template")

public class TaskTemplate {

    @GeneratedValue(strategy = GenerationType.AUTO)
  private Integer id;

    @JoinColumn(name = "workflow_id", nullable = false)
private WorkflowTemplate workflowTemplate;

Open in new window

Now for deletion of the workFlowTemplate row i first need to delete the task template row and then delete the workflow_template row.
Is there a way where i could just specify delete the workflowTemplate row and it automatically deletes all the rest of such things which have a join in them.
Suppose i make a json like {"name" : "xya", "title" :"sample"}
Now suppose someone wants to make this json and send it to the server without the title element.
There are two ways {"name" : "xya"} or {"name" : "xya", "title": null}
Now obviously it is upto the code at server side how it handles. But ideally i feel they should be handled in the same way. Or there is any reason to handle the two different. I mean in a well designed codebase should there be any difference in how this should be handled ?

I am try to connect to web services and this show that error:

ERROR App Error sin controlar ---> com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect
      at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:132)
      at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:223)
      at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:145)
      at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:110)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
      at com.sun.xml.ws.client.Stub.process(Stub.java:463)
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:191)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
      at com.sun.proxy.$Proxy41.updateEmail(Unknown Source)
      at com.bancoexterior.sf.SF.actualizarMail(SF.java:73)
      at com.bancoexterior.SF.updateMail(SF.java:317)
      at com.bancoexterior.App.accion(App.java:253)
      at com.bancoexterior.App.main(App.java:140)
Caused by: …
I see the below exeception without much details. Not sure the root cause of it
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at some.other.package.RoleRestoreFilter.doFilter(RoleRestoreFilter.java:115)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at some.package.SecurityFilter.doFilter(SecurityFilter.java:321)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:203)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at …
What driver to choose below, when creating Database connection, to connect to SQL server DB?

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