java-ee

The JavaEE 8 Tutorial, deploy failed on hello1 project

匆匆过客 提交于 2020-01-02 02:55:27
问题 I'm try to learn Java EE 8, I have followed the official guide at https://javaee.github.io/tutorial/ but I have this problem: --- cargo-maven2-plugin:1.4.4:redeploy (deploy) @ hello1 --- [DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.4.4 for container glassfish5x ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 4

What versions of libraries are shipped with WildFly 9.0.1.Final

Deadly 提交于 2020-01-02 02:44:30
问题 I was looking in https://docs.jboss.org/author/display/WFLY9/Documentation, but there is no info. Especially I want't to know version of hibernate-entitymanager & hibernate-jpamodelgen. 回答1: The easiest way is to look at the pom.xml file for the 9.0.1.Final build: https://github.com/wildfly/wildfly/blob/9.0.1.Final/pom.xml The relevant lines you are looking for are probably: <version.org.hibernate>4.3.10.Final</version.org.hibernate <version.org.hibernate.commons.annotations>4.0.5.Final<

Issue while loading a dll library file… java.lang.UnsatisfiedLinkError: Can't load library

。_饼干妹妹 提交于 2020-01-02 02:20:10
问题 While loading a dll file, I am getting the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Transliteration\rlpnc-3.1.0-sdk-ia32-w32-msvc80\rlp\bin\ia32-w32-msvc80\btrntjni.dll: The system cannot find message text for message number 0x%1 in the message file for %2 at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0

Sharing Session object between different web applications

℡╲_俬逩灬. 提交于 2020-01-02 02:19:07
问题 Okay this is the problem I have a Java application running on top of Apache Tomcat & I have this other application too with its own war file running on the same server. Now I want to authenticate user once & pass that session to the other application. We can say cross domain session sharing on same Apache Tomcat .. how should I go about it ....? Thank you 回答1: Create a unique token for the session and put in in a db table that both apps access. Store the token in the users's cookie. This

Quartz vs Java EE 7 scheduler

我只是一个虾纸丫 提交于 2020-01-02 01:05:00
问题 I'm a java EE developer which has used until now frameworks like Quartz to schedule tasks. I can see that Java EE 7 features a ManagedScheduledExecutorService to schedule single or repeating tasks. As I have never used in real projects this new features I wonder if there are still advantages of using Quartz (or others) when you have a portable way to do it ? Thanks! 回答1: I believe that in future projects, there's really no need to use third-party libraries. Java EE 7 is full of scheduling

How to config maven to use servlet 3

痴心易碎 提交于 2020-01-02 00:55:14
问题 I want to upgrade my webapp to use servlet 3.0 (insetd of 2.5). I am using WebLogic Server Version: 12.1.1.0 (12c),maven,java 7_10 and NetBeans 7.3.1 For some reason the only available servlet-api is 3.0-alpha-1 and not 3.0 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <dependencies> <dependency>

Sort a list with SQL or as a collection?

房东的猫 提交于 2020-01-02 00:55:12
问题 I have some entries with dates in my database. What is best?: Fetch them with a sql statement and also apply order by . Get the list with sql, and order them within the application with collection.sort or so? Thanks 回答1: To some extent, it depends on how many values are in the complete collection. If it is, say, 20-30 values then you can sort anywhere — even a relatively poor sorting algorithm can do that quickly (avoid Stooge Sort though; that's terrible) — as that is the sort of size of

java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils from BaseClassLoader

三世轮回 提交于 2020-01-02 00:39:28
问题 I am getting the following error , while running my following code: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils from BaseClassLoader at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.dozer.util.ResourceLoader.getResource(ResourceLoader.java:53) at org.dozer.util.DefaultClassLoader.loadResource(DefaultClassLoader.java:44) at org.dozer.config.GlobalSettings

Handling HTML (multipart form-data) file uploads with Java

血红的双手。 提交于 2020-01-01 19:15:55
问题 I'm working on a multiple file upload solution for a proof-of-concept web application. I'm using a java servlet to handle an AJAX file upload. My question is how does java handle uploading files from an HTML form? If someone could explain how a basic HTML file upload is processed then I could probably port this to my solution. Quick tangent: I'm a web developer with a background in C# & PHP. I'm trying to hop on the Java bandwagon now that I've taken a new position where mycompany believes

Keycloak provider and user storage

旧城冷巷雨未停 提交于 2020-01-01 18:57:05
问题 I have a running java ee application and now i want to integrate keycloak as authentication server. The only thing i have troubles is the user storage. I want to have all the user data in my java application. The problem now: If the user registers on the keycloak frontend, my java application doesn´t know that the user has registered, so i cannot create a new entity. I found out that keycloak is able to load some custom modules (https://keycloak.github.io/docs/userguide/keycloak-server/html