java-ee-7

Supported source version RELEASE_6 from annotation processor org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor less than source1.7

做~自己de王妃 提交于 2019-11-30 11:39:43
I have an enterprise application running in the following environment. Mojarra 2.2.7 PrimeFaces 5.0 final PrimeFaces Extension 2.0 final OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 GlashFish 4.0 NetBeans IDE 8.0 JDK 1.7 I have changed the source levels to 1.7 from 1.6 in the project.properties file under nbproject in all three modules (Java EE module, EJB module and WAR module) to have support for Java EE 7. It is not a Maven project. j2ee.platform=1.7 javac.source=1.7 javac.target=1.7 Earlier they all were 1.6. After these changes, the following warning appears while cleaning the project

Stop launch of web app from `ServletContextListener` method `contextInitialized` [duplicate]

China☆狼群 提交于 2019-11-30 09:22:04
问题 This question already has answers here : How can I make a ServletContextListener stop the Java EE application? (2 answers) Closed 3 years ago . I have implemented a ServletContextListener in a Java Servlet web app via the @WebListener annotation. In my contextInitialized method I do some set-up work and verify that expected resources are available. If I determine in that contextInitialized method that something is wrong, how do I stop the web app from continuing onwards with executing

CompletableFuture/parallelStream in JavaEE app server

删除回忆录丶 提交于 2019-11-30 03:45:30
问题 Given the new Java8 we are getting really nice features for asynchronous tasks, e.g. CompletableFuture and .paralellStream(). If you run this in Java SE as I've understood it you will utilize the ForkJoinPool, but what happens if I run the following examples in e.g. Wildfly or TomcatEE? //Here I start a comp.Future without giving an Executor test = CompletableFuture.supplyAsync(() -> timeConsumingMethod()); //Here I start a parallel stream mList.paralell().filter(...).collect(Collectors

java.lang.NullPointerException at org.eclipse.persistence.platform.server.ServerPlatformUtils.createServerPlatform(ServerPlatformUtils.java)

冷暖自知 提交于 2019-11-30 03:26:36
问题 EclipseLink 2.6.1 (final) throws the following exception upon deploying a Java EE application on GlassFish Server 4.1. This had not been happening prior to upgrading from 2.6.0. Warning: java.lang.NullPointerException at org.eclipse.persistence.platform.server.ServerPlatformUtils.createServerPlatform(ServerPlatformUtils.java:101) at org.eclipse.persistence.sessions.factories.SessionManager.init(SessionManager.java:77) at org.eclipse.persistence.sessions.factories.SessionManager.<clinit>

Supported source version RELEASE_6 from annotation processor org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor less than source1.7

。_饼干妹妹 提交于 2019-11-29 17:12:05
问题 I have an enterprise application running in the following environment. Mojarra 2.2.7 PrimeFaces 5.0 final PrimeFaces Extension 2.0 final OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 GlashFish 4.0 NetBeans IDE 8.0 JDK 1.7 I have changed the source levels to 1.7 from 1.6 in the project.properties file under nbproject in all three modules (Java EE module, EJB module and WAR module) to have support for Java EE 7. It is not a Maven project. j2ee.platform=1.7 javac.source=1.7 javac.target=1.7

Stop launch of web app from `ServletContextListener` method `contextInitialized` [duplicate]

荒凉一梦 提交于 2019-11-29 15:32:01
This question already has an answer here: How can I make a ServletContextListener stop the Java EE application? 2 answers I have implemented a ServletContextListener in a Java Servlet web app via the @WebListener annotation. In my contextInitialized method I do some set-up work and verify that expected resources are available. If I determine in that contextInitialized method that something is wrong, how do I stop the web app from continuing onwards with executing servlets? Those servlets should not execute if the environment is not suitable (such as no database available). How to gracefully

Custom bean validation does not `@inject` CDI beans and does not interpolate message?

谁都会走 提交于 2019-11-29 13:09:06
I am using GF4 with bean validation. I am trying to @Inject a service bean in my custom validator but I get a null value. public class TestValidator implements ConstraintValidator<>{ @Inject Service myService; } Isn't this suppose to be working with JEE7? Also, I am trying to find built-in dynamic message interpolation (Without writing my own MessageInterpolator ). I did see some examples but they are not very clear. What I am looking for is to pass dynamic parameters from the ConstraintValidator.isValid . For example: Message_test={value} is not valid And somehow weave this, in the same way

How to convert Gregorian string to Gregorian Calendar?

自闭症网瘾萝莉.ら 提交于 2019-11-29 11:40:01
I have to compute something based on the Calendar's date, but I am receiving the complete Gregorian Calendar's String value. Eg i/p received {may be - "new GregorianCalendar().toString()"} as String :- java.util.GregorianCalendar[time=1410521241348,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000

Intellij IDEA artifact 'XXXX:war exploded' has invalid extension

僤鯓⒐⒋嵵緔 提交于 2019-11-28 21:14:10
问题 Every time I make even the tiniest change to my POM Intellij removes the .war extension for my exploded artifact in the Project Structure output directory setting. This causes an error in Intellij's Run/Debug configuration: Artifact 'XXXX:war exploded' has invalid extension. In order to resolve the issue I must manually override the Project Structure output directory setting. Every time I make even the tiniest change to the POM I must go back to the Output directory setting and manually

How to get an existing websocket instance

扶醉桌前 提交于 2019-11-28 19:20:22
问题 I'm working on an application that uses Websockets (Java EE 7) to send messages to all the connected clients asynchronously. The server (Websocket endpoint) should send these messages whenever a new article (an engagement modal in my app) is created. Everytime a connection is established to the websocket endpoint, I'm adding the corresponding session to a list, which I could be able to access outside. But the problem I had is, when I'm accessing this created websocket endpoint to which all