glassfish

Glassfish native library loading (.dll, .so)

I am using the recently released Glassfish v3 and while using native libraries glassfish would intermittently complain glassfish SEVERE: java.lang.UnsatisfiedLinkError: Native Library already loaded in another classloader The procedure to load native libraries in the previous glassfish release (v2.2) was to simply put the .dll files in...

Explicitly destroying EJB instance on glassfish

How do I explicitly destroy an EJB instance in code and take it out of circulation? I have an ejb class that becomes unusable after it throws a certain exception. After that I need to remove it from the app servers pool of instances. ...

SAP JCo connector loaded forever in GlassFish v2.1 (can't unload)

Hi mates! I've a problem with GlassFish and SAP JCo connector (sapjco3.jar) I load it at start up of an J2EE application (jwm.ear) and initialize it wrapped in a singleton the first time a connection to SAP is needed. The problem is that this jar remains always initialized in memory, I need to restart glassfish to unload the initializ...

Process files in Java EE

I have a system that is supposed to take large files containing documents and process these to split up the individual documents and create document objects to be persisted with JPA (or at least it is assumed in this question). The files are in the range of 1 document to 100 000 in each file. The files come in various types Compressed...

Properties file not working with Struts2 and Glassfish

I have a properties file in my application which is built using S2. The properties files resides in WEB-INF/classes and are mentioned in struts.properties as: struts.custom.i18n.resources=myproperty1,myproperty2 to use the properties i just do the following in my JSP's <s:text name="my.property.title"/> this setup works fine on th...

Different ways to use properties file in j2ee app

I have a j2ee app using Struts2. I have a gloabl properties file which is declared in struts.properties which resides in WEB-INF/classes. It has the following setting: struts.custom.i18n.resources=mypropertyfile mypropertyfile also resides in WEB-INF/classes Say for example it contains the following: pdf.test.title=PDF Test then...

Proper usage of JDBC Connection Pool (Glassfish)

I need a database connection in Java Web service implemented as a session bean, and I'm not sure if I do it right. I created a class public final class SQLUtils { //..... private static DataSource m_ds=null; static { try { InitialContext ic = new InitialContext(); ...

Building a Java EE app on Mac OS X Snow Leopard for Glassfish 3

I'm having a bit of a problem building a Java Enterprise Edition web application on Mac OS X 10.6.2 using Ant 1.7.1, Glassfish v3 and Java EE 6. The problem is that the build process does not find the Java EE libraries which fair enough as I don't think Apple supply them with the default Java installation but I know they exist in the Gl...

How to trace SOAP message on Glassfish 3

I would like to save to a server log SOAP envelopes for web service deployed on Glassfish version 3. I know that I can use Wireshark or similar net sniffing tool, but I would prefer to have the messages stored in Glassfish log. ...

Glassfish can't find activerecord-jdbc-adapter

I'm trying to deploy simple Rails app on glassfish v3 and get the following error: org.jruby.rack.RackInitializationException: Could not find RubyGem activerecord-jdbc-adapter (>= 0) Environment details: App is packaged as war using warbler. JRuby 1.4.0 installed locally, with activerecord-jdbc-adapter gem installed. App is configured...

GlassFish v3 and glassfish-maven-plugin (Mac)

I'm trying to use the glassfish-maven-plugin (https://maven-glassfish-plugin.dev.java.net/) with GlassFish v3 (I'm on a Mac and using Eclipse) and I can't seem to get my web app to deploy. I keep running into: The Master Password is required to start the domain. No console, no prompting possible. You should either create the domain...

Migrate from JavaDB to PostgreSQL and cant access database any longer

Hi all I have an application on Glassfish v2 ( on Mac OS 10.5.8 and Java 1.6 ) that uses JavaDB and Toplinks that comes with the Glassfish bundle. Everything works fine. I have installed PostgreSQL 8.4 and the JDBC v4 driver. Both Glassfish and Postgres server run on localhost. From Netbeans, I create a connection to a database on the P...

Spring 3 on GlassFish 2.1 java.lang.NoSuchFieldError: APPLICATION_CONTEXT_ID_PREFIX

I am trying to deploy a spring 3 application on GlassFish v2.1 and am getting the following error: APPLICATION_CONTEXT_ID_PREFIX at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:431) I found advice on the spring forum http://forum.springsource.org/showthread.php?t=79929 which says t...

Which faces technology for use with GlassFish 2.1 and NetBeans 6.7?

I'm running GlassFish 2.1 and using NetBeans 6.7. I'd like to create a web interface to my data using JSF 1.2. Trouble is, I'm not sure which 'faces' technology to learn (that includes some good documentation). JBoss/RichFaces seem pretty good on documentation, but I'm using GlassFish. Any thoughts? The choices appear overwhelming: ...

request.isUserInRole("ADMIN") also returns true for user not in role ADMIN but role USER

Hi, I'm currently trying out the JDBCRealm in Glasshfish v3: I have 2 roles USER and ADMIN. I have a LoginServlet that redirects to a url (say /admin or /user) based on the request.isUserInRole("ADMIN") method. Problem is when a ADMIN is logged in it returns true, so gets redirected to /admin but he can also access the /user. When a U...

javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20

Hi, I have created simple Java Dynamic Web project in Eclipse. I host my project on Glassfish 2.1.1. When I try open p1.jsf page in browser I got following error: javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20. I have no idea how to correct this error... Here is may p1.jsf definitio...

glassfish v3 server starting problem?

i m using net beans for a jsp project and every thing was working fine but when i re logged in and started working i saw that my glassfish did not start so what i did was i removed the glassfishv3 and again i try to add server now it was asking for domain ,how to start the server and what should i enter please help me to resolve this pro...

Inject a EJB into a JSF converter with JEE6

I have a stateless EJB that acceses my database. I need this bean in a JSF 2 converter to retreive an entity object from the String value parameter. I'm using JEE6 with Glassfish V3. @EJB annotation does not work and gets a NPE, because it's in the faces context and it has not access to the EJB context. My question is: Is it still pos...

301 Redirect with Glassfish

Hi, I'm looking for a way to do a 301 redirect on Glassfish, similar to what you could do with a .htaccess file on Apache by writing something like this: redirect 301 /old/old.htm http://www.mydomain.com/new.htm ...

J2EE or Netbeans with Glassfish?

ive downloaded Netbeans with Glassfish and installed it. do i have to download j2ee then from sun's site? ...