java-ee-6

Can't instantiate javax.servlet.ServletException

Hello, experts! I am trying to create instance of class javax.servlet.ServletException with following code public class MyTroubleViewer { public static void main(String[] args) { javax.servlet.ServletException servletException = new javax.servlet.ServletException("Hello"); System.out.println(servletException.getMessage()); } } ...

Confused about using SpringMVC Vs JEE project in Netbeans

Hi all, I want to start a my first JEE project. I have read a lot that springMVC framework is a good choice (never used though) My earlier experience with java is not much. only some small app development using Netbeans. so I have some experience using Netbeans. but I see that I can start a JEE project in Netbeans. so what kind of ...

How to connect remote EJB module from application client

Hi guys, I have a EJB module in remote Glassfish server and application client in my computer. I want to connect from the application client to the remote EJB. Here is the my EJB interface: @Remote public interface BookEJBRemote { public String getTitle(); } Here is the my ejb: @Stateless public class BookEJB implements BookEJ...

How to inject a non-serializable class (like java.util.ResourceBundle) with Weld

I want to create a Producer that makes it possible to inject a java.util.ResourceBundle into any class in order to get localized Strings easily. My ResourceBundle-Producer looks like this: public class ResourceBundleProducer { @Inject public Locale locale; @Inject public FacesContext facesContext; @Produces p...

CMIS explorer webapp

CMIS is a recently approved standard for accessing ECM repositories. My idea is to create a repository explorer using CMIS, under the form of an open source Java/JEE Web Application. The main interest would probably be for integrators, using it as a framework on which to quickly build repository access intranet/extranet applications. ...

Inject a EJB into JAX-RS (RESTfull service)

I'm trying to inject Stateless EJB into my JAX-RS webservice via Annotations. Unfortunately the EJB is just null and I get a NullPointerException when I try to use it. @Path("book") public class BookResource { @EJB private BookEJB bookEJB; public BookResource() { } @GET @Produces("application/xml") @Path(...

httpOnly Session Cookie + Servlet 3.0 (e.g. Glassfish v3)

By default, Glassfish v3 doesn't set the httpOnly flag on session cookies (when created as usual with request.getSession()). I know, there is a method javax.servlet.SessionCookieConfig.setHttpOnly(), but I'm not sure, if that's the best way to do it, and if yes, where the best place would be to put that line. BTW, of course it can't be...

JSON Web Service over simple HTTP GET/POST

Hi; Can you suggest a way or a framework or etc. for JEE in order to make simple HTTP GET/POST calls to some web services like in SOAP web services but transport format must be JSON; not XML and there must not be any wrapper around(may be some vey lightweight header) like SOAP etc. In short, my purpose is to serve web services using JSO...

SAP Netweaver JEE AS

Where is it possible to download a trial/community/developer version of SAP Netweaver Java EE Application Server? Thanks a lot! ...

JSF 2.0 Temlating and injection of MB || CDI bean

Hi everyone! Problem: managed bean not injecting by template. Goal: I wan to decelerate logout button in template. Scenario: I am building j2ee 6 application with jsf 2.0 for web part. template file layout/template.xhtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tr...

User preferences in JEE application

I have a growing web application which now needs to be able to store user and system preferences / settings. In the past I've always rolled my own preferences system for web applications but I was wondering what other people do to solve this problem? Are there any preference libraries for web applications that people could recommend? Id...

Any simple JSF commandButton samples available?

I've been struggling with trying to get my commandButtons to perform an action (yet oddly, I have no problem pulling data from beans to include in my page). Have even posted up my code elsewhere and had it reviewed by others. So far, no luck. So, I'm thinking perhaps a different tact is in order. Can anyone point me to some very simp...

How do I get annotations working for JSF2 in Netbeans?

I added and have been using the faces-config.xml in my Netbeans 6.9/JSF2.0 project due to annotations not working. Not sure what I'm doing wrong, but when I use annotations, my beans are completely inaccessible. Properties for the project show that it is indeed JSF 2.0 (and not 1.1). ...

Difference Hibernate 3.5 / JPA 2.0

So far, I always prefered to use Hibernate directly rather than JPA 1.0, because JPA was lacking some of the important features I needed and Hibernate provided: Criteria API, second level cache, unidirectional OneToMany and a few others. Now, with the advent of JPA 2.0 and all the new features that come with it and that were initially m...

Is it illegitimate to name an JPA entity "Group"?

I'm developing a JEE6-application, using JPA 2.0 and Hibernate 3.5.2-Final as the Provider (and MySQL 5.1.41). My Application Server is Glassfish V3.0.1. I already have a working CRUD-app with some entities and relationships. Now i added an (really simple) entity with the name "Group". The entity class looks like this: package model //...

Weblogic 11g and JavaEE 6

I was wondering if Weblogic 11g already supports JavaEE 6. As I didn't find anything about it in google, I thought that it didn't, until I found a comment saying that Oracle WebLogic Server 11g is JEE 6 complaint. Despite that, I haven't found yet the modules to support the new JavaEE 6 features. Does somebody knows something about thi...

EJB 3.1 in war package in WEB-INF/classes - javax.ejb.CreateException: Could not create stateless EJB

I think, I misunderstood rules of packaging ejb beans in war package. Goal: I want to use ejb beans in war package. Scenario: I have some bean in my war: @Stateless public class RegistrationServiceBean { @PersistenceContext(unitName = "Utopia") EntityManager em; public RegistrationServiceBean() {} @Schedule(hour = "...

CDI not working in ear deployed to glassfish v3.0.1

I have some problem with using weld logger injection. Scenario: I have ear with ejb-jar inside. This is my ejb bean: @Stateless @LocalBean public class PartnersService { @Inject Logger log; @PersistenceContext(unitName = "Utopia") EntityManager em; public PartnersService() { } public OasysPartnerEntity g...

Server can not find class in .ear

Hello, I have some problems with my .ear file. The structure of the file is: app.ear |-xxx.jar -yyy.jar -zzz.jar -ektorp.jar -app-ejb.jar -app-web.war |-WEB-INF |-lib |-xxx.jar |-yyy.jar |-zzz.jar |-ektorp.jar When I try to deploy my application, I get ClassNotFoundException, with class wihch is in ...

CDI with ejb 3.1 , weld-logger on glassfish v3.0.1

Scenario: 1) create maven ear project, create war project inside 2) add beans.xml to war project`s WEB-INF/ 3) creat simple @Steateless bean project - http://drp.ly/1j5C3t ejb bean : @Stateless @LocalBean public class TestEjb { @Inject Logger log; public TestEjb() { } @Schedule(hour = "*", minute = "*", secon...