java-ee

Where is Web container's default locale defined?

I was reading i18n chapter from java blueprint and I came across this "the system default locale for a Web component is the Web container's default locale" (@ http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/i18n/i18n4.html). I am wondering if there is anything like that. Also, I see that faces-config.xml p...

JPA: question about merging an entity before removing it.

I know I have to merge the entity before removing it, but I never thought I have to do it inside EJB. First I have these: e = (Event) scholarBean.merge(e); scholarBean.remove(e); in my managed bean. It give me this error java.lang.IllegalArgumentException: Entity must be managed to call remove: com.scholar.entity.Event@998, try mergi...

Install log formater in glassfish

Hello, I don´t like the output of the com.sun.enterprise.server.logging.UniformLogFormatter which might be uniform but not very helpfull. So in a first step I just replaced it with the java.util.logging.SimpleFormatter. This actualy works fine but for a java.lang.ClassCastException exception: java.lang.ClassCastException: java.util.log...

Exception when using @SchemaValidation annotation on JAX-WS endpoint in Weblogic

I am trying to get schema validation working for a JAX-WS Web Service deployed on Weblogic 10.3.3. According to the documentation, this should be as simple as adding the annotation "@SchemaValidation" to the endpoint class. However when I try this the following exception is thrown when the application is deployed: Caused by: javax.xm...

how to send a message from jsp/servlet/swing?

thank you t give me answer of my past quetion. this question is for the swing/jsp/servlet. i want a code for send a message by smtp or other using swing / jsp / sevlet.. and how to make a jar file f our swing program in netbeans.. thanks you mihir ...

Deploying a Spring application in a Tomcat server instance

Hello! I am a newbie and I want to deploy a Spring project which I get via SVN to my Tomcat application server. I did a checkout in Eclipse (Subclipse) and so the project is located in my workspace. I downloaded the 6.0.29 Tomcat server and extracted it to a directory. Then I create a new Tomcat server in the Server tab of Eclipse. I c...

Spring-WS and Straight-JPA (EclipseLink) Configuration and Deployment

Hey guys, I've implemented an EJB3/JPA web service without any major problems, and now I've moved on a Spring-WS/JPA web service. Both are being deployed to Glassfish. My understanding of JPA is limited, but by default transactions are container managed? How do you change this? With EJB3 things were straight forward as I could just inj...

Unable to get my custom JSF Login Portlet working

Hi, I am using webSphere portal 6.1. I wrote my own custom login portlet and placed in the Login page from the portal server. The page loads fine the problem is when I try to login. It takes 2 attempts to login. The first time when I try to login, the page refreshes (I don’t see any exception on the consol). If I enter the user id/passwo...

override persistence.xml in ejb3

I am facing issue to override persistence.xml in jboss and with Hibernate JPA provider, I spent couple of nights but I couldn't solve it. I am using jboss + hibernate + mysql + ejb3. My requirement is I will provide the connection URL and the persistence unit will connect to the DB but it will be dynamically. so my code below. If anyone ...

JEE for beginners

Hi guys, I am back from vacations and in my company there are new students that just started with their study. My exercise is to show them a little bit of JEE. They already know Java Basics. So my questions is what's the best knowledge to learn as a beginner? Infomation should not be too dry ;-) Hope you can help me .-) Cheers ...

JMS sync request-reply from stateless EJB

Hi, I have a system based on JMS queues that enable the whole system to work in async fashion. Now, for some periodic tasks I need to execute some non time consuming tasks in sync way, so that I can do something with the result right away, without using a database for storing request and pairing it with result (as with async operation)...

javax.naming.NameNotFoundException

Hi I am running an example of ejb using JBoss5 Container. I am using an example from here(Part one). In the example I deployed bean in JBoss and an application in Tomcat(to acces the bean from JBoss). I am getting the error in the screen of tomcat server javax.naming.NameNotFoundException: greetJndi not bound ( greetJndi is the jndi-...

Websphere : deployment logs location?

I am a newbie to websphere. I am trying to deploy an EAR while i get the following exception: DeploymentDescriptorLoadException: META-INF/ejb-jar.xml When I searched about this error, the answers I got was to check the deployment log file to find the root cause of this error. I am not sure where the deployment logs would be. Checking ...

How to intercept custom HTTP header value and store it in Wicket's WebSession?

I need to grab a certain custom HTTP header value from every request and put it in WebSession so that it will be available on any WebPage later on. (I believe the Wicket way to do this is to have a custom class extending WebSession that has appropriate accessors.) My question is, what kind of Filter (or other mechanism) I need to be abl...

Glassfish v2.1.1 Deploy error

Error: Undeploying ... While undeploying, trying to stop application in target server failed; com.sun.enterprise.deployment.backend.IASDeploymentException: com.sun.enterprise.config.ConfigException: I/O error while loading deployment descriptor for: hello2 cause: C:/eepassion/UnZip/servletbasics/samples/hello2/build/web com.sun.en...

Help setting up a Java EE development environment in Windows 7 Ultimate machine

I installed the following in that order: Java Runtime Java SE SDK Netbeans 6.9.1 (which components should I choose?) XAMPP 1.7.3 for the MySQL database server ???? I don't know whether that is enough for developing Java EE applications. What are the things I should install and in what order, so that I can develop Java EE application...

Where to go next when I want to "update my self in advanced java technologies and frameworks"

"Update yourself in the latest core java language, and some of the advanced Java technologies and frameworks" is the advice I got from a fellow senior programmer as a pre-requisite to looking for a better job. I want to do that. Background: I am a beginner java developer. I have several years of experience writing Java SE (Console) and ...

In EJB3, How to implement inheritance for Session Bean?

We want to achieve following things: Create Abstract Stateless session bean Create stateless bean by extending the above bean. In Service class, based on type container will inject appropriate ejb bean ...

Browse database tables inside Netbeans with transaction type JTA

Hi, I'm currently learning about Java EE development. I've been using a persistence unit with transaction type RESOURCE_LOCAL up until now, and it was possible to browse the database tables inside Netbeans under the Services tab. I'm using the Derby database org.apache.derby.jdbc.ClientDriver. I had to change transaction type to JTA i...

Where is an easy J2EE demo war/ear file I can deploy?

Looking for a simple J2EE war/ear that can be deployed that is bare-bones but does a simple read-write to an Oracle db. I'm happy to configure the database or run scripts to make the relevant table. Need something today to prove to a third party host and use to compare against our own apps. Thanks ...