JSF Web Application Error On Glassfish
May 1, 2013
I have my web JSF application on glassfish v2 using java-7-oracle JDK. So glassfish is running correctly on my server ubuntu 12, but when i get my firt page with login, i have this message error from log file :
Horodatage
2 mai 2013 03:13:01.528
Niveau du journal
SEVERE
Journal
javax.enterprise.resource.webcontainer.jsf.application
Paires Nom-Valeur
[Code] .....
View Replies
ADVERTISEMENT
Oct 29, 2014
I don't understand the classpath requirements for facelets and CDI on glassfish. I'm using Netbeans, and have the following:
thufir@dur:~/NetBeansProjects/EntAppWeb$ jar -tf dist/EntAppWeb.ear
META-INF/
META-INF/MANIFEST.MF
lib/
EntAppWeb-ejb.jar
EntAppWeb-war.war
lib/javaee-api-7.0.jar
thufir@dur:~/NetBeansProjects/EntAppWeb$
when I look at javaee-api it has javax.enterprise.context.ApplicationScoped and javax.inject.Named which are the particular imports being used in the bean. The facelets part is working, the template navigates correctly. It deploys to Glassfish and runs, except...there's no output from the @Named bean:
package dur.beans;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
@Named("nextClient")
@ApplicationScoped
public class NextClient implements NextClientLocal {
[code]...
Now it's working. I can't figure what I did for the life of me...that's the desired output, each time the page is accessed the counter increments.Now it works. Is this on the right track? Way off base? I have an entity class from a database which I'd like to link up to this, and output the class.I can inject the entity into NextClient? I'm trying to do the "R" for Read in a CRUD application with CDI and facelets (using templates).
I've found much reference material on EJB, but it seems a mishmash. I just want to use CDI. What am I doing right/wrong, or, besides the PDF from Oracle on Java EE 7, what are good CDI reference material's?
View Replies
View Related
Mar 17, 2015
I have installed the lastest version of GlassFish and I wanna create new datapool using MySQL.
But when I create it and then I ping it, it shows me this error:
Ping Connection Pool failed for Testing. Connection could not be allocated because: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
[Code] ....
View Replies
View Related
Mar 8, 2015
I have an java connection pool using glassfish and mysql jdbc connector. All is fine, my datasource is working using JNDI, etc. But i need to know some info about of connection pool status (maxPoolSize, current active, etc..). I need it to monitoring the connection in the web app.
Some of my configuration.
sun-resources.xml file:
<resources>
<jdbc-resource enabled="true" jndi-name="jdbc/db" object-type="user" pool-name="dbPool">
</jdbc-resource>
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
connection-creation-retry-attempts="0"
connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false"
[Code] ....
All work fine. But i need get de pool size and MysqlDataSource class don't have a method to get it. In tomcat, i use org.apache.tomcat.jdbc.pool.DataSource with getMaxActive() and getActive(). And it work fine. How i can obtain it on glassfish server?
View Replies
View Related
Jul 5, 2014
I have created one new enterprise aplication project called July2014. While creating I have added one new EJB module called July2014EJB for business logic and one new web module Called July2014Web for the UI(I see connector module and application client module what are the uses of them and when should i select them).I have addded one index.jsp with below sample code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert gp title here</title>
</head>
<body>
<h1>test gp senterprise project web module through parent ear</h1>
[code]...
I did multiple times clean, build, publish, restarting the server.I have not done refreshing EAR, EJB and web project. how Refresh is useful and different from clean and build.
View Replies
View Related
Sep 3, 2014
I currently use Eclipse to maintain our Java application. I recently upgraded from Java 6 to Java 7. I updated my Eclipse projects to use the Java 7 .jar files. I can run the application from Eclipse via the Run Configuration.
I can also run the Ant build and it completes successfully. When I install the application on my desktop, I receive the "Java Virtual Machine Launcher: Could not find main class..." error. My CLASSPATH is set to ".".
View Replies
View Related
Nov 17, 2014
convert or move standalone java thread application into Tomcat server container for accessing its JNDI services? Also is it possible to schedule this thread application in Tomcat server? is it possible to keep this app in tomcat as web application and schedule in window's scheduler.
View Replies
View Related
Mar 11, 2014
I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.
1.Created a dynamic web project JWStartProject in eclipse
2.Create a HelloWorld.java class under default package.
import javax.swing.*;
public class HelloWorld extends JFrame {
private static final long serialVersionUID = 4968624166243565348L;
private JLabel label = new JLabel("Hello Java Web START!");
public HelloWorld() {
super("Jave Web Start Example");
this.setSize(350, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
this.setLayout(null);
[Code] ....
Now I exported this project as JWStartProject.war contains following code.
Created Server in Websphere Admin console
Deployed this war file under the server and started.
I have added MIME types also.
I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?
View Replies
View Related
May 22, 2014
For my jsp file, the code editor shows no error, but the projects window shows an error. I built my project again, cleaned the project, restart eclipse twice and summoned cthulhu. But my project still shows an error. How do I find the cause.
Eclipse project -
JSP file -
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="mine" uri="DiceFunctions"%>
[Code] ....
View Replies
View Related
Apr 5, 2014
I have written some error checking code
File name ErrorPage.jsp
<%@ page language="java" isErrorPage="true" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Error</title>
</head>
[code]...
I have put error.jsp and badpage.jsp file in public access folder that is web content in eclipsewhen I am running the code I am status code of 500 and not the errorpage.jsp message .
View Replies
View Related
Dec 24, 2014
today so many website giving facility so can compile and run program online so tell me this process how can i do in my web application.
View Replies
View Related
Sep 13, 2014
What is the best way to run a Swing application on the web? Should I convert it to an applet or do something else?
View Replies
View Related
Feb 5, 2014
I want to know the how to refresh the jsf application after doing something like Faceboook... i.e if i comment or post in my application so automatically the whole application have refresh.
View Replies
View Related
Sep 10, 2014
I am working with DLLs in java.
A while ago, I developed an application in VB.net, and I'm trying to "convert" this application to Java. But this VB.net application uses some specific DLLs and I need to use them in my Java application. However, my knowledge in this respect are quite limited in manupulate DLLs on Java.
Up to this point, I can already load the DLL. I've read some documentation on how to use functions that are in the DLL; but I have some doubts. For example, how can I translate this piece of code to Java?
Java Code:
API = New MyDLL.Base
With API
.para1= "1"
.para2= 2
.para3= True
.para4= False
[Code] ....
View Replies
View Related
May 13, 2015
I am currently faced with a task of creating a web application. This application is meant to be accessed by an admin and also a customer. On the customer side the app should prompt the user to fill in an application for of sort and also allow the user to upload a CV to a database. The information entered by the customer will also be saved on the database. The admin should have the ability to look through all the candidates and their information and CV`s. He should also be allowed to search for candidates with specific key words...I am not a professional programmer but know the core of Java programming. I have a tiny bit of knowledge of MySql.
View Replies
View Related
Nov 13, 2014
I am working on an app that would require an activation code in order to be used after being downloaded (user will get teh code from me) am using Java pro.
View Replies
View Related
Jul 28, 2011
I want to monitor performance of web application, running in java JVM(Java version 1.5.0_22) using tomcat web server, for a given functionality want to find, methods and sql queries how much time taking for execution. i am looking for setting and free tools available.
View Replies
View Related
Dec 3, 2014
I am working on a Java Web Server application.In which server needs to send message to a Mobile no?
What are the way to send message to a mobile no by Java application.
by reading online threads i found like
[URL]
which one I should use and any other approach other than these to send a message using java application?
View Replies
View Related
Jan 5, 2015
Say I have a EAR file. Inside, it has a EJB jar, web war and app client jar file. The (enterprise) app client here is a desktop GUI calling the EJBs accordingly. Now if this EAR is deployed to some app server like JBoss or Glassfish, to access the app client, users will basically use java web start/ JNLP to run the client.
Given this is the case, I'm wondering if the effect is the same as separating the app client (not part of the EAR), have that EJB jar in its library path, and deploy the GUI app as a jar. Hence users not use web start. The only disadvantage I can think for separating the app client is if the EJBs get changed, the client's version will be outdated. But other than that, are there any justification for using an enterprise app client?
View Replies
View Related
Feb 27, 2015
So say I write up a program like a dice roll game, which I see on the forums here. It's all written and good to go and when I hit Run it does what I want it to do, no errors..What do I do with those .class and .java files? Do I compile it somehow into an app I can put on the google play store? What is the NEXT STEP after the program is all written?
View Replies
View Related
Feb 13, 2015
I'm having trouble doing out a class diagram for an app I'm trying to create.The app is a quiz app for students to use in their study. The following objects I have to put in the class diagram are:
Basic Questions attributes:
questionText
correctAnswer
mark (representing the mark awarded for a correct answer)
Answer (representing the answer entered by the user).
Multiple choice question attributes:
questionText
correctAnswer
mark (representing the mark awarded for a correct answer)
option a, option b and option c (representing each of the possible answer)
answer (representing the answer chosen by the user)
Essay Question attributes:
questionText
correctAnswer
mark (representing the mark awarded for a correct answer)
answer (representing the text entered by the user)
maxWordCount (representing the maximum word count for the essay)
Picture Question attributes:
questionText
correctAnswer
answer (representing the text entered by the user)
imageName (representing the image to be displayed with the question)
View Replies
View Related
Apr 13, 2014
Can explain difference between applet and application?
What are differences in code? How to write application?
What are differences in use? I looked for some answers, but I can't understand what they are talking about.
For example:
Application:
Called as stand-alone application as application can be executed from command prompt
Applet:
Requires some third party tool like a browser to execute
But... While I export applet in exclipse I can use it without any browser, just like application(as I and avarage user knows it).
Ok, I understand difference like "Applets cannot read from or write to hard disk files."
So. What should I use while creating what?
For example, something as simple as windows calc, some 2d simply platformer, some more expanded app, like idk, spotify or media player or whatever?
Since after update 51 of java web applets are nearly useless(as I know, maybe I'm wrong?), what is better?
Can application have GUI or it is only applets thing(stupid question?)?
Where can I find any application tutorial? Everything that I found was for applets. Why?
View Replies
View Related
Apr 6, 2014
I am writing a Java Swing GUI application on my pc. I have to give this application to my cousin with another pc, where he is not aware of programming. then how can he execute that application? are there any ways of skipping the "javac" and "java" procedures while executing the app on his computer?
I am using win7 x86 and same at my cousin's place. I am also using eclipse-kepler sr1 ide for app development.
Are there any easy ways of automating this "javac" and "java" process(compilation and execution)? something like...scripting?
View Replies
View Related
Jan 16, 2014
how can I send a sms through java application?
View Replies
View Related
Feb 2, 2014
I want to write an application which stores files inside of itself, like a Zip file, but it will not be a zip or have the zip compression class.
View Replies
View Related
Dec 29, 2014
I have a blog hosting service (like Wordpress) written in PHP and MySQL, I'm gonna make Java Application for it (Runs on Windows, Linux and ...).
My Questions:
1. Can I use Connector/J to connect to my website database (MySQL)?
2. Which one is better? 1.Connect to website database, 2.Use Socket programming.
View Replies
View Related