for questions relating specifically to Java Enterprise Edition 7.
0
votes
0answers
16 views
Java EE 7 using Maven gives an error of Unsatisfied Injection Point
I am trying to develop a web application on Java EE 7 using maven in GlassFish server. My project give an error and I could not solve it! I have added a screenshot of my whole project. A session bean ...
-1
votes
0answers
17 views
download and process big amount of files on java
I am doing an application that downloads and processes many files from internet and saves into mongodb or cassandra. I wonder what is the best way to do this.
Can I do this with javaee? in glashfish
...
0
votes
1answer
25 views
Service layer and dao layer in java ee EJBs
Question: Can anyone, in context to JEE and EJBs, show a specific DAO class (or more than one) that has two different methods. and a service class that calls those 2 methods in ONE transactional ...
-5
votes
0answers
13 views
I have seen examples of creating custom annotations, but I am searching for example of custom annotations with custom producers as in Java EE. [on hold]
I have seen examples of creating custom annotations, but I am searching for example of custom annotations with custom producers as in Java EE.
0
votes
1answer
15 views
EclipseLink is reordering predicates?
I have a JPA query and following entities:
product
color
team
person
team
list of persons
color
person
a product can either have a person or a team. Not both. Now i want a query that finds all ...
0
votes
1answer
29 views
Unexpected token “?” during JPA query?
I'm attempting to query a list of Api keys in my db2 database.
The problem is that the actual query JPA comes up with has an extra comparison field that is causing a syntax error.
The error:
[ERROR ...
0
votes
0answers
21 views
Wildfly 8 Session Problems in multi-virtual-host configurations
This is my setup scenario:
EAR application with 2 ejbs, 4 war applications
One standalone war application, absolute with no dependency on the ear artifacts.
Scenario for the standalone war:
...
0
votes
1answer
16 views
spring mvc controller equivallent javaee controller
I used spring.
Is there an equivalent controller strategy for pure plain java-ee 6/7?
Like there is spring controllers which take care of path params, request params, return types, redirecting, ...
0
votes
0answers
16 views
RequestParams and PathParams in pure JavaEE controller servlet
for a @webservlet annotated servlet, how can I do something similar to spring mvc:
@Path = my/custome/path/{id}
and then use the id in the servlet code?
or do
@requestParam (for post) ?
and ...
4
votes
0answers
52 views
mvc pattern in java ee and migrating from spring to java ee 7
I used spring MVC in the following manner:
@Controller
class MyControllerClass {
@RequestMapping...
method(){
ServiceCall()...
//put something to modelAndView object here ...
-1
votes
0answers
12 views
Java EE authentication and authorisation with angularjs
Please, can someone know a good tutorial on how to manage Authentication and Authorization in Java EE 7 as a backend with AngularJS as frontend ?
Thank in advance.
0
votes
0answers
13 views
Missing XMLs in WEB-INF folder
I started learning Java EE. I know this might be a foolish question but I have no idea what to do. I've been following some youtube tutorial. After so many configurations with Maven, Oracle DB, STS ...
1
vote
0answers
48 views
JPA/Hibernate load recursive object graph without N+1/cartesian products
When converting a project from Ibatis to JPA 2.1, I'm faced with a problem where I have to load a complete object graph for a set of objects, without hitting N+1 selects or using cartesian products ...
-1
votes
2answers
24 views
How to refer properties file or excel file located in resources folder?
I created a simple maven project. I placed one properties file and one xlsx file in src/main/resources folder. How can i load the properties/excel files? I tried as below.
InputStream inputStream = ...
0
votes
1answer
14 views
PathParam from previous websocket call is submitted
I am using JavaEE 7 and Glassfish 4 as my project setup and I would like to use websockets. As browser I have used Chrome 35.0.1916.153. My endpoint should receive a message through websockets and ...
1
vote
0answers
68 views
How to write to a file from a web application in Tomcat 8?
I have asked this question before and received a lot of answers within regard to how to fix the issue. However the issue still has not been repaired and I am at a loss when it comes to the right means ...
0
votes
1answer
29 views
Maven generates archetype only for Java EE 6
How can I "force" maven to generate archetypes for Java EE 7? It only generates for "6". I have ubuntu 12.04 LTS, java jdk 7. I go with "maven archetype:generate", then filter with "jboss".
Many ...
0
votes
0answers
18 views
installing java ee 7 on a brand new mac book air
I managed to install JDK 7 thanks to it being a dmg file, but I'm having problems installing Java EE 7... I have registered JAVA_HOME on launchd.conf but its still not finding it... here's the error:
...
1
vote
3answers
96 views
JavaEE: Web Service Deployed Successfully but Tester is not Working
I am a student & totally new in JavaEE development. I created an independent EJB Project and created Web services in it. I am consuming that service in a Java Web Application project using the Web ...
1
vote
1answer
28 views
MultiException and PerseistenceException in javaEE with Beans
I know there are a lot of threads to this topic, but after searching for ~10 hours without a solution I will ask in a new thread.
I got two projects not working (properly).
I use Windows 8.1 64 bit ...
0
votes
0answers
32 views
How to enable authentication/authorization in Java EE7 Rest application? Getting “Client not authorized for this invocation”
I've been banging my heads against the wall for quite some time now, trying to enable authentication/authorization on a Java EE7 REST application using annotations. No matter how hard I try, I keep ...
0
votes
0answers
28 views
Using Spring profiles in order to exclude/include a web.xml or web fragment file
I would like to conditionally exclude a web.xml or a web fragment based on a spring profile i.e. the "dev" profile would not take into account the web.xml/web fragment whereas the "default" profile ...
0
votes
0answers
27 views
Progress monitoring for Web Services
Iam currently exploring the new world of web services in order to exploit them for an application that I build during my PhD.
A brief description of the architecture:
A PHP front end acquires a link ...
0
votes
3answers
37 views
getting javax.persistence.TransactionRequiredException in a container managed Entity Manager
Hi I created a simple JSF + JPA application. my web app consists of an Entity, a ManagedBean and some JSF pages. It's purpose is to create and store an object in the MySQL database. I get ...
0
votes
1answer
80 views
Weblogic 12c and Java 7 Features
As we know, WebLogic Server 12c supports natively Java EE 7.
However, if we take a look at the WebLogic 12c documentation of standards there will be a lot of versions differences. Such as:
Java EE ...
0
votes
1answer
32 views
JSF 2.2 Table conditional rendering not working
Im trying to display a simple table with an @Entity infos using the following tag-libs:
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
Here's the mapped ...
2
votes
1answer
33 views
Glassfish 4 - Using Concurrency API to create Managed Threads
I'm trying to use the new Concurrency API to inject a ManagedThreadFactory and use it per the Oracle tutorial.
Here is an example of what I'm talking about:
@Singleton
@Startup
public class Demo {
...
0
votes
1answer
37 views
Jersey (+jackson) serialization
I am using Jersey framework, with com.fasterxml.jackson as default serializer. I am trying to return json object with specified root name. e.g.:
{
"rootName": {
"key":"value"
...
0
votes
1answer
40 views
“Needs to be compiled” badge on static metamodel classes in JPA 2.1
Given the following environment to run an enterprise application in Java EE 7.
GlassFish Server 4.0
NetBeans IDE 8.0
JDK 1.7
EclipseLink 2.5.1 having JPA 2.1
EclipseLink Metamodel Generator provided ...
0
votes
0answers
65 views
CDI Injection and Java Batch (JSR-352)
TLDR: CDI isn't behaving as I would expect after migrating a web profile sample to a full blown EE application
Let me start off by saying that I'm relatively new to CDI. I like to think that I ...
4
votes
1answer
70 views
Can implementing Java copy constructor result in same instance?
I've implemented a copy constructor in Java 8 and use it like this:
User user = // some object
LOG.debug("{}", user);
this.userAccount = new User(user);
LOG.debug("{}", this.userAccount);
Output:
...
0
votes
1answer
39 views
POST using JAX-RS 2.00 client API
I have a REST Service which exposes a POST service using Form Parameters:
@POST
@Path("/add")
@Produces("text/html")
public Response create(@FormParam("key")String key,
...
0
votes
1answer
61 views
How to get Error message from REST service and show it at proper form field in java EE?
I made a Dynamic web project using Eclipse IDE. I made a simple web app for learning.
I also made a REST service (jersey implementation) which i am using for insert,update,delete and for listing ...
2
votes
0answers
39 views
Servletrequest returns null sessions
I am getting a strange error where the session I get from the request is sometimes null. Code looks like this:
@Stateless
@Path("/login")
public class GetLogin {
@Context
private ...
0
votes
2answers
37 views
Change index.html for index.jsp (JavaEE+Glassfish)
I have a little problem.
Is it possible 'delete' index.html and create (to replace index.html) index.jsp? How?
I don't find any files (web.xml, glassfish-resource.xml) with the address to the home ...
0
votes
0answers
51 views
Wildfly with jaas always results in login-error
For some reason i can't loggin in my application using Wildfly, primefaces and JAAS. I didn't try it in others versions like JBoss 7 AS because i want to see this working on Wildfly.
After try loggin ...
0
votes
1answer
27 views
How can I isolate entity validation in order to prevent transaction rollback of a whole bulk (persist) transaction?
I have entities with validation annotations such as @NotNull. I don't know how to prevent a container managed transaction from rolling back in the case of a ConstraintViolationException in a bulk ...
0
votes
1answer
13 views
Update hibernate-validator in glassfish4
Glassfish-ApplicationServer comes with a bean-validator.jar, which itself includes / was built with hibernator-validator 5.0.0.Final
// From glassfish4-startup:
...
1
vote
1answer
117 views
JSF: Attribute of session scoped managed bean becomes null
I am playing with JavaEE 7 and tried to write a webapp with a simple login mechanism.
There is an EJB entity class persisted with JPA called User holding data about users. In the WAR, a session ...
0
votes
1answer
30 views
Alternate docroot not working on glassfish 4
Im trying to set-up an alternate docroot in order to serve uploaded documents from. I have included the following in my glassfish web xml
<context-root>/dom</context-root>
<property ...
0
votes
0answers
11 views
Content type for .jck file
What will be the content-type to send a KeyStore file of (".jck") with HttpServletResponse.
I am using content-type : application/octet-stream
But file gets corrupted
0
votes
0answers
64 views
Custom realm in Glassfish 4: login module not found
I am trying to create a custom realm and login module for Glassfish 4.
I followed the procedure outlined in The glassfish 4 Application Development Guide p. 4-6, "Creating a Custom Realm".
I also ...
0
votes
1answer
28 views
Where to place static files within a javaee-api maven-project
Situation: I installed Eclipse 4.3 (Kepler) with the JBoss Tools and added the WildFly 8.0 Application Server. Then I created a simple JavaEE7-HelloWorld pom.xml, for maven-support. I included this ...
0
votes
1answer
92 views
GlassFish 4 Error: FATAL: FATAL: JSF1073: javax.el.ELException
I'm trying out things in Java EE 7 and I have build an example application which can be found here https://github.com/kenparker/moviplex7.git.
During the process I have learned how hard is to get ...
0
votes
1answer
26 views
Are the @MultipartConfig configuration elements in a Servlet useless in presence of a Filter?
I've alredy configured a servlet like this:
@WebServlet(name = "TestServlet", urlPatterns = {"/test"})
@MultipartConfig(location = "C://test",
fileSizeThreshold=1024*1024*10, // ...
1
vote
1answer
34 views
Java EE Qualifier annotation not picked up
I am following a simple Java EE 6 annotations video on youtube. I have created a repo on github. There is a servlet to start with that creates a greeting string using annotation.
...
0
votes
0answers
42 views
Java EE7 websocket initialization - implement logic before first @OnOpen
I think this is more a design specific question, than direct coding issue.
I want to implement a websocket service which serves an updated dataset from a foreign http:// resource to the clients.
but ...
0
votes
0answers
36 views
Code I can't make work - is it a JSF bug?
I am not able to make something work that I think should. I posted a week ago but have not had any replies accessing a list within a list in p:datatable.
This is the same question but with specific ...
0
votes
0answers
24 views
Retriving data from refrencing table (using named query)
I've got two tables in the MySQL database - Patient and Doctor. Field attendingDr in Patient is a reference to the field doctor_id in Doctor (attendingDr is a foreign key in table Patient).
In entity ...
1
vote
1answer
18 views
Unable to change @Path in NetBeans and GlassFish
I created a simple entity and then used NetBeans "create rest services from entity" wizard to generate the rest resource. All good so far. It gives a @Path of the entity package to the resource as ...