java-ee

Could not open the editor: Null charset name

人走茶凉 提交于 2019-12-24 23:56:52
问题 i am using eclipse helios 3.6 when i tried to open xhtml pages with web page editor i got the following error: Could not open the editor: Null charset name yesterday it was working fine, but today it keeps giving me above error for all xhtml pages. any ideas how to solve it ? UPDATE : Full StackTrace java.lang.IllegalArgumentException: Null charset name at java.nio.charset.Charset.lookup(Charset.java:429) at java.nio.charset.Charset.isSupported(Charset.java:479) at org.eclipse.wst.sse.core

User authentication with J2EE

六眼飞鱼酱① 提交于 2019-12-24 22:24:49
问题 in my website I'm allowing my users to login using their name and their password (this data is stored in my database). But now I want to allow them to login by using their social networks account, like facebook, gmail... My website is running on a JBOSS application server. And the users authentication is done by a form-based authentication, kinda like this example http://dont-panic.eu/blogs/2012/sep/form-based-authentication-against-custom-database-jboss-7. Is it possible to add this new

java.rmi.MarshalException: Failed to communicate

自古美人都是妖i 提交于 2019-12-24 21:49:09
问题 I'm using jbossIDE Eclipse 1.6. when deploying my .ear app, I get a java.rmi.MarshalException. what's surprising is that just a few min ago, everything was OK. I feel like this jbossIDE Eclipse thing is really useless. it's crashing all the time. java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo; local class incompatible: stream classdesc serialVersionUID =

Eclipse: no shown variables in debugging Java EE

泪湿孤枕 提交于 2019-12-24 21:35:29
问题 Platform I am using : Fedora 20; mariadb-5.5.34-2.fc20.x86_64; Eclipse Kepler Service Release from www.eclipse.org I am implementing example See here and I am trying to manage to work the login interface. Actually I am configuring TomEE to use JAAS auth technology. Since I am having some troubles, I would like to solve them with the help of Eclipse debugging mode. To do that, I: setted breakpoint at line number 79 of LoginController.java; started TomEE in debug mode; executed login.xhtml in

Application Deployment Descriptor in Java EE 6

我的未来我决定 提交于 2019-12-24 21:15:01
问题 I would like to set the context-root of the web application part of my enterprise application (bundled as an EAR). I added an "application.xml" file which looks like this: <application> <module> <web> <web-uri>SearchResulter-war.war</web-uri> <context-root>/searcharoo</context-root> </web> </module> </application> The thing is, I have EJBs in the project as well. It seems that the Java EE 5/6 magic previously did not require me to include an "application.xml" file, and that was all good until

communicate between wars and jar inside ear

感情迁移 提交于 2019-12-24 20:16:20
问题 I'm new to creating ear and communicaton between wars and jar... I was having two wars having completely independent functionality. Now I've to create a Ear, where two application have to work on same functionality, which is enclosed in a jar.But requirement is I must not include the jar in Pom.xml of both but make use of that jar, where all 3 are under single ear.is this is possible? I've tested Ear with 2 independent wars and it's working fine now how to achieve above I'm not getting this.

how to ignore the annotations at runtime of the Ant File

爱⌒轻易说出口 提交于 2019-12-24 19:36:56
问题 I'm trying to deploy my application through the generation of a War file using an Ant File, in which I've wrote this code: <project name="HelloWorldWS" default="dist" basedir="."> <description> Web Services build file </description> <!-- set global properties for this build --> <property name="src" location="src"/> <property name="build" location="build"/> <property name="dist" location="dist"/> <property name="webcontent" location="WebContent"/> <target name="init"> <!-- Create the time

@Inject gives a NullPointer Exception in java EE

天大地大妈咪最大 提交于 2019-12-24 19:27:43
问题 I'm trying to create a webservice that gives some results taken through hibernate from the database. @Path("/book") public class BookService { @Inject private dbController db; @GET @Produces(MediaType.TEXT_PLAIN) public String getBookTitle() { return "H2G2"; } @GET @Path("/users") @Produces(MediaType.APPLICATION_JSON) public Response getUsers(){ List<UserEntity> users = db.getUsers(); return Response.ok(users,MediaType.APPLICATION_JSON).build(); } } the db variable whenever I call http:/

How to run a time consuming task on startup in a web application while deploying it

泄露秘密 提交于 2019-12-24 19:23:21
问题 we are facing an issue with initializing our cache at server startup or application deployment. Initializing the cache involves Querying a database to get the list of items Making an rmi call for each item Listening to the data on a JMS queue/topic Constructing the cache This initialization process is in startup code. All this is taking lot of time due to which the deployment is taking lot of time or server start time is increasing. So what I proposed is to create a thread in the startup and

iText PdfTextExtractor getTextFromPage exception “Error reading string at file pointer”

China☆狼群 提交于 2019-12-24 19:15:26
问题 I am using iText PdfTextExtractor to extract text from the PdfReader, where the PdfReader is created from a byte array, byte[] pdfbytes = outputStream.toByteArray(); PdfReader reader = new PdfReader(pdfbytes); int pagenumber = reader.getNumberOfPages(); PdfTextExtractor extractor = new PdfTextExtractor(reader); for(int i = 1; i<= pagenumber; i++) { System.out.println("============PAGE NUMBER " + i + "=============" ); String line = extractor.getTextFromPage(i); System.out.println(line); } The