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?
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
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)
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.
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?
This taglib will have to be installed on local environment. How is it referred in jsp ? I dont see any code in jsp, which refers to the location of JSTL. So how does jsp invoke these tags ? Is it through classpath ?If its so , how is classpath set for JSTL ? Is it just as classpath is set for java ?
I am writing an Ant script using the javac command but the library I need is bundled in an ear file, how can I reference this jar in ear file without extracting the ear file.
I'm trying to run an enterprise java application running glasssfish server from my university ( the open university, distance learning and i recommend it). I get the following error:
The Java EE server classpath is not correctly set up - server home directory is missing.Either open the project in the IDE and assign the server or setup the server classpath manually.For example like this: ant -Dj2ee.server.home=<app_server_installation_directory> BUILD FAILED (total time: 0 seconds)
I am having an issue that I cannot seem to resolve with Ant deployments and my Classpath.
I have a module that is needed to run with Open Wonderland but for some reason when I run this particular module deployment it doesn't recognize part of the classpath.
On my server I have a class called JadeRunner.class and it is included in my classpath. I can verify but running the following code:
public class testClassPath{ public static void main(String args[]){ String classArg = args[0]; try{ Class testClass = Class.forName(classArg); }catch(ClassNotFoundException e){ e.printStackTrace(); } } }
I just enter the name of the class as an argument and if I get no errors that it can find the class. This works if I enter it directly from the command line. However with my ant deployment I get a ClassNotFoundException for this class. I run my ant deployment as root but I use the -E switch so it picks up my environment variables. The ant deployment finds all my other environment variables except this one.
I have some sample outputs:
$ java testClassPath org.jdesktop.wonderland.modules.mas.jade.weblib.JadeRunner (this give no output, so it finds the class) $ sudo -E java testClassPath org.jdesktop.wonderland.modules.mas.jade.weblib.JadeRunner (again no output, so it finds the class) $ sudo -E ant deploy
This gives ClassNotFoundException: org.jdesktop.wonderland.modules.mas.jade.weblib.JadeRunner
I need to start a new JVM. To do this my (production-) code pick a certain jar and starts a class in it. The name of this class is not fix. The picked jar has other jars in its Manifest class path section.
For my tests I want to replace my jars red from the main jar with the compile target folders of my Eclipse projects that make up my Application.
Getting that folders is quite easy because i configured the Starter project to depend on the other Projects of my app so that they are available via System.getProperty("java.class.path"). But eclipse creates absolute path in there. The result is that I cannot use the output of System.getProperty("java.class.path") as command line parameter, it's simply to long.
I tried to put the class path in a temporary jar file but it looks like that the jars class path is not added to the resulting class path when i is simply added as another classpath entry at command line. On the other hand I cannot run this temporary jar file via -jar option because the main class cannot be found if it is not located in the temporary jar...
Meanwhile I found that the main problem is not so much the other Projects but the 3rd party libs which eclipse refers them in their maven repository location. They blow up my classpath. I tried to convert their paths to relative but this didn't change that much...
So my question is: 1. is there a way to provide the classpath in a text file to java executable on command line? 2. is there a way to run a jar with the -jar option if the main class is outside the jar (but within the classpath in the jars manifest)? 3. is there any other way to solve my problem resulting from the limited command line length?
During runtime, I need to load the JAR files and relevant config files( .cfg files and .properties file) into CLASSPATH and run a specific java program from one of the JAR which is available in CLASSPATH.
Any relevant Java API details or a sample java program to implement the above use case.
This the output of java from my PC under linux platform (rhel 6.5).
[pentaho@vertica-srv1 Downloads]$ java -version java version "1.7.0_79" Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
[Code] ....
But the problem is while trying to open ETL program under linux platform [pentaho@vertica-srv1 data-integration]$ ./spoon.sh .... I received the following error messages.
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH? Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH? Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Warning, not in CLASSPATH? Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH? [KnowledgeFlow] Loading properties and plugins...
If I try CLASSPATH: C:Program FilesMicrosoft JDBC Driver 4.0 for SQL Serversqljdbc_4.0enusqljdbc4.jar I receive a "Could not find or load main class" error.
When I assign a classpath-relative URL to an ImageView's 'Image' property, SceneBuilder is unable to display the Image in the Preview. It shows the text "Image not found" instead as a placeholder, which makes sense. What I'd like to do is add a classpath entry to SceneBuilder such that it is able to locate and display the Images. Any way to accomplish this (or similar)?