java-ee

Glassfish - Unable to open Admin Console - throws NPE

ぃ、小莉子 提交于 2019-12-12 15:23:45
问题 I have a Glassfish 3.1 production server that is suddenly acting up. Last week it was fine. This morning the it is throwing an NPE when attempting to load the admin console (localhost:4848). It is also throwing this same error when trying to run 3 of the 4 applications on the server. One of the apps works fine. All of the apps are JSF with LDAP security. I have a test server on a different box that uses nearly the same configuration files and works fine. The server is Win2003R2SP2. Java is

Context Path Wildfly 8.2 Management UI

穿精又带淫゛_ 提交于 2019-12-12 15:13:18
问题 is it possible, and when how, use the Management UI of the Wildfly 8.2 with a path. Default: http://localhost:9990/console How i would like to do it: http://localhost:9990/wildfly/console Is this possible? And if it is, how? Sub-Context: i like to have a AJP Proxy that the URL will be http://host/wildfly and not http://host:9990/ 回答1: mod_proxy can do that if correctly configured. Something like: ProxyPass /wildfy/ http://localhost:9990/ ProxyPassReverse /wildfly/ http://localhost:9990/ 来源:

Java: exception when casting to itself(?)

╄→尐↘猪︶ㄣ 提交于 2019-12-12 15:09:01
问题 Im working with Oracle WebLogic, Netbeans 6.9.1. I have the following lines of code: Query query=entityManager.createNamedQuery("Items.findById").setParameter("id", Integer.parseInt((String) request.getParameter("id"))); Items it=(Items) query.getSingleResult(); and they throw an exception: java.lang.ClassCastException: entity.Items cannot be cast to entity.Items Even if that seem impossible, i saw similar question on SO: here Author havent published the solution but one of participants made

Teracotta and Hibernate Search

浪尽此生 提交于 2019-12-12 14:55:00
问题 Does anyone have experience with using Terracotta with Hibernate Search to satisfy application Queries? If so: What magnitude of "object updates" can it handle? (How's the performance) What kind of performance do the Queries have? Is it possible to use Terracotta Hibernate Search without even having a backing Database to satisfy all "queries" in Memory? 回答1: I am Terracotta's CTO. I spent some time last month looking at Hibernate Search. It is not built in a way to be clustered transparently

How to integrate JSF with custom servlets?

瘦欲@ 提交于 2019-12-12 14:19:52
问题 I'm just getting started on JavaServer Faces and it looks very attractive. However I'd like to use my own servlets in the same web application as JSF. This might be really obvious, but what are the best practices for integrating JSF with a "normal" servlets-based application? This would include accessing JSF data from the servlets (read and write ). 回答1: If your servlets are well-written, they should already not have any business logic inside, but just pure request/response controlling

How to load big file in background during initialize() method of Javafx?

人盡茶涼 提交于 2019-12-12 13:53:25
问题 My javafx desktop application load and big text file during the initialization of the application in the @Override public void initialize(URL url, ResourceBundle rb) { loadAppConfigurationFile(); } private void loadAppConfigurationFile() { Task<Void> task = new Task<Void>() { @Override public Void call() throws InterruptedException { //read file and do some operation return null; } }; new Thread(task).start(); } But the problem here is my application GUI doesn't appear till this process it

How can I disable javax.validation.api in JBoss 6.4

天涯浪子 提交于 2019-12-12 13:34:52
问题 Similar questions: How to use bean validation 1.1 in JBoss EAP 6.4.0? How to change bean-validation version on jboss EAP 6.3? Can you use bean validation 1.1 (JSR 349) in JBoss EAP 6.4.4? There seems to be some uncertainty if we can use Bean Validation 1.1 in JBoss 6.x. My current jboss-deployment-structure.xml: <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <dependencies> <!-- list of modules taken from https:/

When deploying an EAR into WebSphere, what's the cause of a “duplicate entry” SaveFailureException?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 13:10:01
问题 When attempting to install the EAR, the following exception results: Caught Exception installing ApplicationName com.ibm.ws.scripting.ScriptingException: com.ibm.websphere.management.application.client.AppDeploymentException: AppDeploymentException: [] org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: META-INF/application.xml META-INF/application.xml duplicate entry: META-INF/application.xml org.eclipse.jst.j2ee.commonarchivecore.internal.exception

Access Get parameter with a scriptlet

微笑、不失礼 提交于 2019-12-12 12:45:20
问题 I hava a url such as search.do?offset=20 offset sometimes is in the url sometimes not. When it is not in the URL i want it to be 0. i try, without success, to retrieve the value with a scriptlet as follows: <% Integer offset = (pageContext.findAttribute("offset")==null) ? new Integer("0") : new Integer((String) pageContext.findAttribute("offset")); %> Anyone knows what i am doing wrong? 回答1: You should use this instead. <% Integer offset = request.getParameter("offset") != null && request

The NetBeans IDE issues unusual compiler errors on “Clean and Build” or external changes.The IDE becomes unaware of the JPA generated static metamodel

限于喜欢 提交于 2019-12-12 12:40:25
问题 I'm completely tired of using the NetBeans IDE 8.x (currently using 8.0.1) for months - it just looks like a hell (seriously). When some external changes are made to the project (especially a Java EE web application - containing hundredth of Java classes in different packages) or an attempt is made to Clean and Build to project (especially to the enterprise module), Background Scanning of Projects is initiated which unusually propagates compile-time errors in almost all classes in which