GithubHelp home page GithubHelp logo

eclipse-ee4j / glassfish Goto Github PK

View Code? Open in Web Editor NEW
370.0 44.0 136.0 2.91 GB

Eclipse GlassFish

Home Page: https://eclipse-ee4j.github.io/glassfish/

Java 91.96% Roff 1.56% HTML 4.68% PHP 0.12% CSS 0.37% SourcePawn 0.03% JavaScript 0.18% Shell 0.49% Batchfile 0.03% TSQL 0.03% PLSQL 0.01% SQLPL 0.01% GAP 0.46% XSLT 0.03% Makefile 0.02% Brainfuck 0.01% Ruby 0.01% Emacs Lisp 0.01% Groovy 0.01% Dockerfile 0.01%

glassfish's Introduction

Eclipse GlassFish

About

Eclipse GlassFish is a Jakarta EE compatible implementation sponsored by the Eclipse Foundation.

Compatibility

  • Eclipse GlassFish 7.0.0 is Jakarta EE 10 compatible, requires Java 11, supports Java 17 and Java 21
  • Eclipse GlassFish 6.2.0 is Jakarta EE 9.1 compatible, requires Java 11, supports Java 17
  • Eclipse GlassFish 6.1.0 is Jakarta EE 9.1 compatible, requires Java 11
  • Eclipse GlassFish 6.0.0 is Jakarta EE 9 compatible, requires Java 8
  • Eclipse GlassFish 5.1.0 is Java EE 8 and Jakarta EE 8 compatible, requires Java 8

Distribution

The Zip distributions can be found on following paths:

  • appserver/distributions/glassfish/target/glassfish.zip (Full Profile)
  • appserver/distributions/web/target/web.zip (Web Profile)

Building

Prerequisites

  • JDK11+, we strongly recommend using JDK17 to build GlassFish with all features.
  • Maven 3.9.0+

Execution

  • mvn clean install - Full build including documentation, automatic QA and maven managed tests. Excludes just Ant and TCK tests. Typical time: 15 minutes.
  • mvn clean install -Pqa - Building all distribution artifacts, running QA and all maven managed tests. Excludes Ant, TCK and documentation. Typical time: 10 minutes.
  • mvn clean install -Pfast - Building all distribution artifacts, running just unit tests. Excludes QA, integration tests, Ant, TCK and documentation. Typical time: 7 minutes.
  • mvn clean install -Pfastest -T4C - Building all distribution artifacts as fast as possible. Excludes everything not serving this purpose. Typical time: 1.5 minutes.

You can use also some maven optimizations, see Maven documentation. Especially -am, -amd, -f, -pl, -rf and their combinations are useful.

If you want to see more logs you can use the -Dtest.logLevel=FINEST option set to an appropriate log level. Note that this applies just for tests which are executed by Maven and which use the GlassFish Java Util Logging Extension (GJULE).

Special Profiles

  • staging - In some development stages may happen that some dependencies are available just in OSSRH staging repository. Then you have to use this profile, which is not enabled by default.
  • jacoco - enables the JaCoCo agent in tests, so you can import it's output to you editor, ie. Eclipse, and see the code coverage.
  • jacoco-merge - merges all JaCoCo output files found in subdirectories and merges them into one. It is useful to see code which wasn't even touched by tests.

Special Scripts

  • ./updateVersion.sh 6.99.99.experimental - useful for custom distributions, so you can avoid conflicts with version in master branch.
  • ./runtests.sh [testBlockName] [?glassfishVersion] - useful to run old additional tests locally
  • ./validateJars.sh - uses the bnd command to check OSGI dependencies in all target directories

Additional Testing

After building the GlassFish distribution artifacts you can execute also additional tests managed by bash scripts. They are quite old and have high technical debt, but at this moment they still provide useful service.

QuickLook

mvn -f appserver/tests/quicklook/pom.xml test -Dglassfish.home=$(pwd)/appserver/distributions/glassfish/target/stage/glassfish7/glassfish

Old Additional Tests

⚠️ If the script fails, sometimes it doesn't stop the domain and you have to do that manually.

⚠️ Some of the scripts do inplace filtering or generate other sources which remain and later affect next executions. You have to remove those changes manually.

  • ./runtests.sh batch_all - Usual time: 1 minute

  • ./runtests.sh cdi_all - Usual time: 6 minutes

  • ./runtests.sh connector_group_1 - Usual time: 16 minutes

  • ./runtests.sh connector_group_2 - Usual time: 3 minutes

  • ./runtests.sh connector_group_3 - Usual time: 4 minutes

  • ./runtests.sh connector_group_4 - Usual time: 16 minutes

  • ./runtests.sh deployment_all - Usual time: 8 minutes

  • ./runtests.sh ejb_group_1 - Usual time: 10 minutes

  • ./runtests.sh ejb_group_2 - Usual time: 7 minutes

  • ./runtests.sh ejb_group_3 - Usual time: 18 minutes

  • ./runtests.sh ejb_group_embedded - Usual time: 4 minutes

  • ./runtests.sh ejb_group_all - Usual time: 4 minutes

  • ./runtests.sh jdbc_all - Usual time: 20 minutes

  • ./runtests.sh naming_all - Usual time: 2 minutes

  • ./runtests.sh persistence_all - Usual time: 3 minutes

  • ./runtests.sh security_all - Usual time: 8 minutes

  • ./runtests.sh web_jsp - Usual time: 8 minutes

  • ./runtests.sh webservice_all - Usual time: 10 minutes

  • ./gfbuild.sh archive_bundles && ./gftest.sh ejb_web_all - Usual time: 4 minutes

  • ./gfbuild.sh archive_bundles && ./gftest.sh ql_gf_web_profile_all - Usual time: 2 minutes

  • ./gfbuild.sh archive_bundles && ./gftest.sh ql_gf_full_profile_all - Usual time: 4 minutes

  • many tests under appserver/tests subdirectories; they are still waiting for someone's attention.

Basic Usage

  • Starting Eclipse GlassFish: glassfish7/bin/asadmin start-domain
  • Visit http://localhost:4848
  • Stopping Eclipse GlassFish: glassfish7/bin/asadmin stop-domain

Professional Services and Enterprise Support

This section is dedicated to companies offering products and services around Eclipse GlassFish.

The Eclipse GlassFish project does not endorse or recommend any of the companies on this page. We love all our supporters equally.

Professional Services and Enterprise support are available through following companies:

glassfish's People

Contributors

11rx4f avatar arjantijms avatar avpinchuk avatar bshannon avatar cousjava avatar dependabot[bot] avatar dmatej avatar edbratt avatar escay avatar gerdogdu avatar glassfish-bot avatar gurunrao avatar hs536 avatar hussainnm avatar ivargrimstad avatar jansupol avatar jayasheelankumar avatar jgauravgupta avatar kaido207 avatar lukasj avatar mattgill98 avatar ondromih avatar pzygielo avatar rohitkumarjain avatar romain-grecourt avatar samsonsouley avatar senivam avatar smillidge avatar tomjenkinson avatar vinayvishal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glassfish's Issues

Java EE 5 API documentation

It would be very helpful to have online Java EE 5 API documentation like Mustang at http://
download.java.net/jdk6/docs/api/index.html .

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[9.0pe]

create-domain fails on ejbtimer database creation

The command fails when the user types it in and when the setup.xml commmand executes.

Here is the output of the command...

bin/asadmin create-domain --domaindir ~/gf-domains --adminport 4848 --adminuser admin test1
Unable to read system environment. No system environment will be used.
Please enter adminpassword>admin321
Please enter adminpassword again>admin321
Please enter the master password>changeit
Please enter the master password again>changeit
Using default port 8,080 for HTTP Instance.
Using default port 7,676 for JMS.
Using default port 3,700 for IIOP.
Using default port 8,181 for HTTP_SSL.
Using default port 3,820 for IIOP_SSL.
Using default port 3,920 for IIOP_MUTUALAUTH.
Using default port 8,686 for JMX_ADMIN.
Failed to create database '/Users/vbk/gf-domains/test1/lib/databases/ejbtimer', see the next
exception for details.
CLI130 Could not create domain, test1

Environment

Operating System: Mac OS X
Platform: Macintosh

Affected Versions

[9.0pe]

JavaServer Faces application throws exception on glassfish

This is for Milestone 3: We have a simple JavaServer Faces application that used
to work fine on app-server 8.1, but does not work on glassfish anymore. The
exception that we get on the browser is:

type Exception report

message

description The server encountered an internal error () that prevented it from
fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw
exception
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:197)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:550)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:433)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

root cause

java.lang.NullPointerException
javax.faces.webapp.FacesServlet.init(FacesServlet.java:148)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:125)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:197)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:550)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:433)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

note The full stack trace of the root cause is available in the Sun Java System
Application Server Platform Edition 9.0 logs.
Sun Java System Application Server Platform Edition 9.0

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Documentation error for start|stop-domain --savemasterpassword

asadmin help start-domain
and
asadmin help stop-domain

Both list --savemasterpassword as one of the options. However if you try to use
it, it says there is no such option.

From Kedar Mhaswade:
This is a bug. Please file it. Only create-domain has --savemasterpassword not
start-domain.

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

Cannot install on graphic-less server

Uhm, aren't most servers installed without graphics support???? Don't you think
it might be a common use-case to install on systems lacking graphics support???

[root@host3 gf]# java -Djava.awt.headless=true -Xmx256m -jar
../glassfish-installer-9.0-b19.jar
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which
requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.(Window.java:317)
at java.awt.Frame.(Frame.java:419)
at java.awt.Frame.(Frame.java:384)
at
javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1666)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1743)
at javax.swing.JDialog.(JDialog.java:212)
at com.sun.tools.xjc.installer.LicenseForm.(LicenseForm.java:44)
at com.sun.tools.xjc.installer.Main.main(Main.java:37)

Environment

Operating System: All
Platform: Linux

Affected Versions

[9.0pe]

Patch on com.sun.enterprise.webservice.JAXWSServlet

The current JAXWSServlet has some code trying to assign WebServiceEngineImpl
singleton instance to a new local variable, but actuall there's an instance
field for that.

Index: JAXWSServlet.java

RCS file: /cvs/glassfish/appserv-
core/src/java/com/sun/enterprise/webservice/JAXWSServlet.java,v
retrieving revision 1.12
diff -u -r1.12 JAXWSServlet.java
— JAXWSServlet.java 22 Sep 2005 18:50:41 -0000 1.12
+++ JAXWSServlet.java 23 Sep 2005 07:41:34 -0000
@@ -110,8 +110,6 @@
HttpServletResponse response)
throws ServletException {

  • WebServiceEngineImpl wsEngine_ = WebServiceEngineImpl.getInstance();

    if ("Tester".equalsIgnoreCase(request.getQueryString())) {
    Endpoint endpt = wsEngine_.getEndpoint(request.getRequestURL
    ().toString());
    if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor
    ().getDebugging())) {
    @@ -170,7 +168,7 @@

if ("Tester".equalsIgnoreCase(request.getQueryString())) {

  • Endpoint endpt = WebServiceEngineImpl.getInstance().getEndpoint
    (request.getRequestURL().toString());
    • Endpoint endpt = wsEngine_.getEndpoint(request.getRequestURL
      ().toString());
      if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor
      ().getDebugging())) {
      Loader loader = (Loader) endpt.getDescriptor
      ().getBundleDescriptor().getExtraAttribute("WEBLOADER");
      if (loader != null) {

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Setting http-listener-1.address = 127.0.0.1 cause startup failure

On Linux box running Fedora Core 2:
Using milestone 2: glassfish-image-9.0-b09.jar

To reproduce:

$ asadmin setserver.http-service.http-listener.http-listener-1.address=127.0.0.1

Then check it worked:
$ asadmin get "server.http-service.http-listener.http-listener-1.*"
server.http-service.http-listener.http-listener-1.acceptor-threads = 50
server.http-service.http-listener.http-listener-1.address = 127.0.0.1
server.http-service.http-listener.http-listener-1.blocking-enabled = false
server.http-service.http-listener.http-listener-1.default-virtual-server = server
server.http-service.http-listener.http-listener-1.enabled = true
server.http-service.http-listener.http-listener-1.external-port =
server.http-service.http-listener.http-listener-1.family = inet
server.http-service.http-listener.http-listener-1.id = http-listener-1
server.http-service.http-listener.http-listener-1.port = 20801
server.http-service.http-listener.http-listener-1.redirect-port =
server.http-service.http-listener.http-listener-1.security-enabled = false
server.http-service.http-listener.http-listener-1.server-name =
server.http-service.http-listener.http-listener-1.xpowered-by = true

Have a look at netstat before the bounce:
$ netstat -a | grep 20801
tcp 0 0 localhost.localdo:20801 : LISTEN

^^^^ Not at that point it is actually correct, it's listening on localhost, not all interefaces . Must have
dynamically reconfigured itself correctly.

Now bounce the app server:
$ asadmin stop-domain appserver
Domain appserver stopped.

Check netstat to make sure it did stop:

$ netstat -a | grep 20801
$

Yep it stopped.

$ asadmin start-domain appserver
Starting Domain appserver, please wait.
Log redirected to blah.../appserver/logs/server.log.
Successfully backed up configuration to blah.../appserver/config/domain_bu.xml
Domain appserver is ready to receive client requests. Additional services are being started in
background.

Quickly check netstat while it's still starting:
$ netstat -a | grep 20801
tcp 0 0 *:20801 : LISTEN
$ netstat -a | grep 20801
tcp 0 0 *:20801 : LISTEN
$ netstat -a | grep 20801
$

^^^^ Note on the first two netstats while the app server was coming up that it was listening on all
interfaces not just localhost (127.0.0.1). The last one is after the server shuts down due to the
errors in the log.

The errors in the log are:

[#|2005-07-27T17:08:10.608
0400|INFO|TestAbbrevProductName9.0|javax.enterprise.system.container.web|_ThreadID=10;|http
listener 20801 uses pipeline: com.sun.enterprise.web.connector.grizzly.Linked
ListPipeline|#]

[#|2005-07-27T17:08:10.610
-0400|SEVERE|TestAbbrevProductName9.0|javax.enterprise.system.container.web|_ThreadID=10;

| WEB0701: Error initializing endpoint
java.net.BindException: Address already in use: 20801
at com.sun.enterprise.web.connector.grizzly.SelectorThread.initEndpoint(SelectorThread.java:468)
at com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol.init(GrizzlyHttpProtocol.java:111)
at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1469)
at org.apache.catalina.startup.Embedded.start(Embedded.java:906)
at com.sun.enterprise.web.WebContainer.start(WebContainer.java:691)
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:633)
at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:305)
at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220) |
| #] |

[#|2005-07-27T17:08:10.611
-0400|SEVERE|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|Service
com.sun.enterprise.web.PEWebContainerLifecycle@49e161 cannot be started! : com.su
n.appserv.server.ServerLifecycleException: WEB0105: An error occurred while starting the web
container|#]

[#|2005-07-27T17:08:10.611
-0400|SEVERE|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|CORE5071: An
error occured during initialization
com.sun.appserv.server.ServerLifecycleException: WEB0105: An error occurred while starting the web
container
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:642)
at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:305)
at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
Caused by: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address
already in use: 20801
at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1471)
at org.apache.catalina.startup.Embedded.start(Embedded.java:906)
at com.sun.enterprise.web.WebContainer.start(WebContainer.java:691)
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:633)
... 4 more

| #] |

[#|2005-07-27T17:08:10.612
-0400|SEVERE|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|Server Startup
failed. Exiting...|#]

[#|2005-07-27T17:08:10.612
-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|Server shutdown
in progress...|#]

[#|2005-07-27T17:08:10.613
-0400|WARNING|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|CORE5061:
Exception :
com.sun.appserv.server.ServerLifecycleException
at
com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onShutdown(JmxConnectorLifecycle.java:
119)
at com.sun.enterprise.server.ApplicationServer.onShutdown(ApplicationServer.java:419)
at com.sun.enterprise.server.PEMain.run(PEMain.java:317)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)

| #] |

[#|2005-07-27T17:08:10.614
-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.system.container.web|_ThreadID=10;

| WEB0303: Stopping Sun-Java-System/Application-Server. | #] |

[#|2005-07-27T17:08:10.615
-0400|SEVERE|TestAbbrevProductName9.0|org.apache.coyote.tomcat5.CoyoteConnector|_ThreadID=10
;|Coyote connector has not been started|#]

[#|2005-07-27T17:08:10.616
-0400|SEVERE|TestAbbrevProductName9.0|org.apache.coyote.tomcat5.CoyoteConnector|_ThreadID=10
;|Coyote connector has not been started|#]

[#|2005-07-27T17:08:10.616
-0400|SEVERE|TestAbbrevProductName9.0|org.apache.coyote.tomcat5.CoyoteConnector|_ThreadID=10
;|Coyote connector has not been started|#]

[#|2005-07-27T17:08:10.757
-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.system.core|_ThreadID=10;|CORE5051:
Shutting down all J2EE applications ...|#]

etc... the rest of the log is just about shutting down...

This is similar to issues #16 and #17 that I raised, however none of them caused the app server to stop
after the restart.

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

ClassLoader's getResources() implementation.

EJBClassLoader seems not to implement findResources()/getResources(), and using
base class implementation is not enough, because it seems to finally return an
empty Enumeration.

This avoid the usage of module discovering, for example using this:

http://openide.netbeans.org/lookup/

Environment

Operating System: All
Platform: All
URL: https://glassfish.dev.java.net/source/browse/glassfish/appserv-core/src/java/com/sun/enterprise/loader/EJBClassLoader.java?rev=1.2&view=markup

Affected Versions

[9.0pe]

LoginContextDriver.doPasswordLogin() looses the thrown stack from a custom login module

On Linux box running Fedora Core 2:
Using milestone 2: glassfish-image-9.0-b09.jar

Hi I'm using a custom com.sun.appserv.security.AppservPasswordLoginModule and
com.sun.appserv.security.ProgrammaticLogin to do my logins.

My login module throws various different exceptions (all extending LoginExceptions) based on what
goes wrong at login time.

However when com.sun.enterprise.security.auth.LoginContextDriver.doPasswordLogin() catches my
exception it only records the message from my exception - the whole stack trace is lost making it hard
to debug, and very hard for my programic login code to adjust it's behaviour based on what kind of
exception. e.g. for a bad password, send them back to the login page, but for a database error - show
the error.

I'm tempted to fix the problem myself, it would be easy - the problem is in:

glassfish:/appserv-core/src/java/com/sun/enterprise/security/auth/LoginContextDriver.java

The current code looks like:

280 } catch (Exception e) {
281 if (_logger.isLoggable(Level.INFO))

{ 282 _logger.log(Level.INFO, "java_security.audit_auth_refused", 283 user); 284 }

285 if(AUDIT_MANAGER.isAuditOn())

{ 286 AUDIT_MANAGER.authentication(user, realm, false); 287 }

288 throw new LoginException("Login failed: " + e.toString());
289 }

That last throw line should be replace with something like:

if (e instanceof LoginException) {
throw e;
} else {
throw (LoginException)new LoginException("Login Failed").initCause(e);
}

That way you'd never loose the stack trace of the original exception - and if it is an actual
LoginException (or a subclass) then the same one is thrown.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

Can't deploy webapp using adminGUI with 20050618 nightly

Here's the log. I think this is due to Jan's checkin to fix servlet 2.5 issue #18.

This fix has also broken JSF, as reported in
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=47

[#|2005-08-18T14:54:32.202-0400|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=16;|WebModule[][ERROR]
Uncaught application exception
java.lang.IllegalStateException: Unable to set character encoding because
request parameters have already been read, or getReader() has been called
at
org.apache.coyote.tomcat5.CoyoteRequest.setCharacterEncoding(CoyoteRequest.java:1569)
at
org.apache.coyote.tomcat5.CoyoteRequestFacade.setCharacterEncoding(CoyoteRequestFacade.java:320)
at
javax.servlet.ServletRequestWrapper.setCharacterEncoding(ServletRequestWrapper.java:162)
at
com.sun.enterprise.tools.admingui.AdminGUIServlet.initializeRequestContext(AdminGUIServlet.java:326)
at
com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:578)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:202)
at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:384)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at
org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at
org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
at
com.sun.enterprise.tools.admingui.servlet.UploadServlet.doPost(UploadServlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:384)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:226)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:131)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:190)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:542)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:437)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

| #] |

[#|2005-08-18T14:54:32.247-0400|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=16;|ApplicationDispatcher[]
Servlet.service() for servlet AdminGUIServlet threw exception
java.lang.IllegalStateException: Null request object
at
org.apache.coyote.tomcat5.CoyoteRequestFacade.getParameter(CoyoteRequestFacade.java:360)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.getPageName(BaseServlet.java:173)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.handleException(BaseServlet.java:281)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:207)
at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:384)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
at
org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
at
org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
at
com.sun.enterprise.tools.admingui.servlet.UploadServlet.doPost(UploadServlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:384)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:273)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:226)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:131)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:560)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:530)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:190)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:542)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:437)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

| #] |

[#|2005-08-18T14:54:32.255-0400|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=16;|WebModule[]Null
request object class java.lang.IllegalStateException|#]

Environment

Operating System: Mac OS X
Platform: Macintosh

Affected Versions

[9.0pe]

missing cvs email notification

GlassFish developers have been experiencing missing cvs email notifications when
commits are made. This issue is created to better collect the data need to
solve the problem.

Please copy below and add comment with answers.

  • User
  • date/time of incident
  • list of files checked in and not notified or just link to the cvs mail
    message in archive
  • file sizes
  • cvs client used
  • does this happen every time you commit?

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

jmx-connector.system.address=127.0.0.1 does nothing

On Linux box running Fedora Core 2:
Using milestone 2: glassfish-image-9.0-b09.jar

This command seem to have no effect on how the listener binds to the port:

asadmin set server.admin-service.jmx-connector.system.address=127.0.0.1

I after I do that set, I restart the domain.
I can verify that my changes have saved with this get:

asadmin get -passwordfile .appserver.pw --user dbrice --port 21801 "server.admin-service.jmx
connector.system.*"
server.admin-service.jmx-connector.system.accept-all = false
server.admin-service.jmx-connector.system.address = 127.0.0.1
server.admin-service.jmx-connector.system.auth-realm-name = admin-realm
server.admin-service.jmx-connector.system.enabled = true
server.admin-service.jmx-connector.system.name = system
server.admin-service.jmx-connector.system.port = 22801
server.admin-service.jmx-connector.system.protocol = rmi_jrmp
server.admin-service.jmx-connector.system.security-enabled = false

However when I do a netstat:
$ netstat -a | grep 22801
tcp 0 0 *:22801 : LISTEN
tcp 0 0 host.name...:41027 host.name...:22801 TIME_WAIT

You can see that it's bound (listening) to all interefaces , instead of just localhost (127.0.0.1).
That's also exactly how it looked when it was set to 0.0.0.0.

I can also verify the problem by using telnet to connect to the port on both the machines IP address and
127.0.0.1. It connects on both but should only connect on 127.0.0.1.

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

deploying a war file is 4x to 10x slower than an ejb jar when admin port is unsecured

I created two component. A web component (with an index.jsp), packaged as a war file and an EJB jar
file with a simple EJB 3.0 stateless session bean.

I downloaded the June 17th build and ran 'ant -f setup.xml'.

I used asadmin to start the default domain.

I used asadmin to deploy the ejb-jar file. It took about 3 seconds.

I used asadmin to deploy the war file. It took about 20 seconds.

I was a bit surprised, so I used asadmin a couple more times to deploy the files some more.

The ejb jar redeployed in a fairly consistent range of times: 3 to 5 seconds.

The war file redeployed in time ranging between 8 seconds (the best time) and 50 seconds. the
average time of my trials was about 23 seconds.

If I enable security on the admin http port, both types of modules deploy in 4 to 6 seconds.

Environment

Operating System: Windows XP
Platform: PC

Affected Versions

[9.0pe]

Documentation error in asadmin help create-domain

asadmin help create-domain
has the following text for the --passwordfile option:

This
file can also contain the AS_ADMIN_ADMINPASSWORD and
the AS_MASTERPASSWORD. The syntax for each is the same
as the syntax for AS_ADMIN_PASSWORD.

That it should read "AS_ADMIN_MASTERPASSWORD" not "AS_MASTERPASSWORD".

Also it doesn't really make it clear that the create-domain option doesn't read the
"AS_ADMIN_PASSWORD" field which is used by other commands. It should be made
clear that AS_ADMIN_ADMINPASSWORD and AS_ADMIN_MASTERPASSWORD are the only
two values that create-domain uses.

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

download page missing important detail

In the past, the page said to use the jar command to explode the jar file that I
download.

I know how the jar command behaves, so I would create a new directory and then
unjar the downloaded bits into that new empty directory.

Now, we have switched to a real installer... The installer asks me to accept a
license. I accept it and the it "basically" explodes the jar in the directory
where I was when I triggered the installer....

Since we have an installer, I guess I had expected the installer to ask me...

where do you want this code dumped?

Like most other installers....

When it just dumped bits 'right here', I was a bit surprised.

please:

a) change the download page to indicate that the person doing the install may
want to create a new directory

OR

b) create an installer that isn't just a self-extracting zip file (with a
license 'hook').

Environment

Operating System: Solaris
Platform: Sun

Affected Versions

[9.0pe]

NPE in Endpoint of appserv-tests/devtests/webservices/annotations/warservice

After deploying the service on GlassFish b18 (and 19), I tried to call it but failed with the following error
message from the server.

java.lang.NullPointerException
com.sun.enterprise.admin.wsmgmt.agent.GlobalMessageListenerImpl.preProcessRequest
(GlobalMessageListenerImpl.java:98)
com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl.preProcessRequest
(WebServiceEngineImpl.java:245)
com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:128)
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:197)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:451)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:365)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:261)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:77)

It seems that an Endpoint instance passed by JAXWSServlet to WebServiceEngineImpl is null.

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[9.0pe]

Setting orb-listener-1.address=127.0.0.1 has no effect

On Linux box running Fedora Core 2:
Using milestone 2: glassfish-image-9.0-b09.jar

These commands seem to have no effect on how the listener binds to the port:

asadmin set server.iiop-service.iiop-listener.SSL.address=127.0.0.1
asadmin set server.iiop-service.iiop-listener.SSL_MUTUALAUTH.address=127.0.0.1
asadmin set server.iiop-service.iiop-listener.orb-listener-1.address=127.0.0.1

I can verify that my changes are saved, as I can see the value change in the admin GUI, however I can
still connect to those listeners on the actuall machines IP address and not just via 127.0.0.1 as I would
expect. The changes are done on a newly created domain with no other config changes.

How did I test this? For example if the port number for orb-listener-1 is 24801

  1. telnet localhost 24801
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    ^]cl
    telnet> cl
    Connection closed.
    ^^^^ That was the expected result

[dbrice@www2 dbrice]$ telnet www.hostname.com 24801
Trying 82.X.X.X...
Connected to www2.outreach.net.
Escape character is '^]'.
^]cl
telnet> cl
Connection closed.

^^^^ That is wrong, should have got a connection refused message.

For your reference:

  1. asadmin get "server.iiop-service.iiop-listener.orb-listener-1.*"
    server.iiop-service.iiop-listener.orb-listener-1.address = 127.0.0.1
    server.iiop-service.iiop-listener.orb-listener-1.enabled = true
    server.iiop-service.iiop-listener.orb-listener-1.id = orb-listener-1
    server.iiop-service.iiop-listener.orb-listener-1.port = 24801
    server.iiop-service.iiop-listener.orb-listener-1.security-enabled = false

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

password set in setup.xml not honored

I'm building on a JDS GNU/Linux machine entirely outside of Sun.

The build was successful and I was able to log into the admin console (using
Opera, but that's another bug (#2)). I wanted to change the default password
so I changed the password entries in setup.xml and did maven delete-config
configure-runtime.

After restarting the domain, I was unable to log in with the new userid and
password, but the default of admin adminadmin worked.

Environment

Operating System: All
Platform: Other

Affected Versions

[9.0pe]

glassfish\appserv-core\build.xml doesn't work for NetBeans

I have latest Revision 1.14 of glassfish\appserv-core\build.xml

Line 40:

<property file="$

{glassfish.maven}/project.properties"/>

should be

instead.

Because ${glassfish.maven}

is defined in ../bootstrap/project.properties

If you doing a complete glassfish build, then this error doesn't show up.
However, this will prevent NetBeans from building just the appserv-core module.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

setup.xml: asenv.bat.template not found

Installed b14
followed instructions.
But ant -f setup.xml fails as follows:

D:\glassfish-b14>ant -f setup.xml
Buildfile: setup.xml

all:
[mkdir] Created dir: D:\glassfish-b14\bin

get.java.home:

setup.init:

do.copy.windows:

BUILD FAILED
D:\glassfish-b14\setup.xml:83: The following error occurred while executing this
line:
D:\glassfish-b14\setup.xml:102: Warning: Could not find file D:\glassfish-b14\li
b\install\templates\asenv.bat.template to copy.

Total time: 0 secondsD:\glassfish-b14>ant -f setup.xml
Buildfile: setup.xml

all:
[mkdir] Created dir: D:\glassfish-b14\bin

get.java.home:

setup.init:

do.copy.windows:

BUILD FAILED
D:\glassfish-b14\setup.xml:83: The following error occurred while executing this
line:
D:\glassfish-b14\setup.xml:102: Warning: Could not find file D:\glassfish-b14\li
b\install\templates\asenv.bat.template to copy.

Total time: 0 seconds

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

improve search presence of glassfish

I went looking for glassfish, via google and the results weren't very good.

http://www.google.com/search?hl=en&q=Java+EE+5+Application+Server&btnG=Google+Search
results in glassfish showing up as the third item. This is okay

http://www.google.com/search?q=Application+Server&num=100&hl=en&lr=&start=400&sa=N
I could not find glassfish in the first 500 entries. No so good...

http://www.google.com/search?num=100&hl=en&lr=&q=java+Application+Server&btnG=Search
I found a blog mention of glassfish in the first ~50 hits.
I found the "front-page" for glassfish around hit 375.

http://www.google.com/search?num=100&hl=en&lr=&q=open+source+java+Application+Server&btnG=Search
first mention: 17th hit
front page: 21st hit. behind: JBoss, Enhydra, Resin, Jetty and Jonas

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Port 8080 is in use

On WinNT, installed a promoted build.

When running "ant -f setup.xml" I get the following:

[exec] WARNING: The --adminpassword option is insecure and should not be us
ed since it can compromise your password. Please use either the command prompt
or the --passwordfile option.
[exec] Port 8080 is in use.
[exec] CLI130 Could not create domain, domain1

However, there is nothing running on port 8080. (netstat -a does not give
anything on port 8080).
To be sure, I run tomcat on 8080, and everything is fine.

I exited every application, and tried again, but it does not work.
Changing to port number to another value is the workaround I had to use.

– Pierre

Environment

Operating System: Windows NT
Platform: All

Affected Versions

[9.0pe]

create-domain does not document properly a way to set the jmx admin port

asadmin create-domain does not seem to have any way to set the JMX_ADMIN port.

All the ways I've tried either endup in errors or with it printing:
Using default port 8,686 for JMX_ADMIN.

asadmin help create-domain talks about a --admin.jmxport option, but using that option always
results in the error:
CLI019 Invalid number of operands. Number of operands should be equal to 1.

There does not seem to be a value that you can set for --domainproperties, and if there is one, it's not
documented in "asadmin help create-domain"

Here's a note about this from Kedar Mhaswade to Jane Young about it:

There is no option like --admin.jmxport. The correct option way is: --domainproperties
admin.jmxPort=.
The create-domain help is broken as you correctly identified. But there is already a bug that I filed on
this: 6207363, which we will fix for 9.0.
I think we fixed this for 8.1 UR1/UR2, but apparently it is not ported to 9.0 codebase.

Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

Remove WARNING during setup

I downloaded the Milestone 3 build
(https://glassfish.dev.java.net/downloads/24Aug05_SCF.html). While running the
setup.xml script, I got the following warning:

create.domain.windows:
[exec] WARNING: The --adminpassword option is insecure and should not be us
ed since it can compromise your password. Please use either the command prompt
or the --passwordfile option.

This WARNING should be removed.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Provide build information (release notes)

It would be great to have some kind of short release notes in the cvs (or
published after milestone builds) to see what features are working and which
ones are not yet implemented.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Mac build failure.

Buildfile:
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/build.xml

init:
[echo] Building component appserv-commons

compile:
[javac] Compiling 33 source files to
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/build
[javac]
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/src/java/com/sun/enterprise/deployment/annotation/handlers/DenyAllHandler.java:12:
cannot find symbol
[javac] symbol : class DenyAll
[javac] location: package javax.annotation.security
[javac] import javax.annotation.security.DenyAll;
[javac] ^
[javac]
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/src/java/com/sun/enterprise/deployment/annotation/handlers/PermitAllHandler.java:12:
cannot find symbol
[javac] symbol : class PermitAll
[javac] location: package javax.annotation.security
[javac] import javax.annotation.security.PermitAll;
[javac] ^
[javac]
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/src/java/com/sun/enterprise/deployment/annotation/handlers/DenyAllHandler.java:37:
cannot find symbol
[javac] symbol : class DenyAll
[javac] location: class
com.sun.enterprise.deployment.annotation.handlers.DenyAllHandler
[javac] return DenyAll.class;
[javac] ^
[javac]
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/src/java/com/sun/enterprise/deployment/annotation/handlers/PermitAllHandler.java:38:
cannot find symbol
[javac] symbol : class PermitAll
[javac] location: class
com.sun.enterprise.deployment.annotation.handlers.PermitAllHandler
[javac] return PermitAll.class;
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 4 errors

BUILD FAILED
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/appserv-commons/build.xml:62:
Compile failed; see the compiler error output for details.

Total time: 7 seconds
Java Result: 1

BUILD FAILED
File......
/Users/edburns/Projects/J2EE/workareas/glassfish-workspace/glassfish/glassfish/maven.xml
Element... fail
Line...... 237
Column.... 28
No message
Total time: 2 minutes 52 seconds
Finished at: Fri Jun 17 16:22:37 EDT 2005

Compilation exited abnormally with code 70 at Fri Jun 17 16:22:37

Environment

Operating System: Mac OS X
Platform: Macintosh

Affected Versions

[9.0pe]

Memory Leak in SystemLogHandler

/org/apache/jasper/util/SystemLogHandler.java
and
/org/apache/tomcat/util/log/SystemLogHandler.java

had a memory leak in tomcat until 2005-02-08. I submitted a patch which
unfortunately was only applied to the 5.5 and the 4.1 versions of tomcat, 5.0 is
still not patched.

I looked at the two classes in glassfish and at least locally the code is the
same, so it has the memory leak problem. I didn't check all the way up, but I
assume, that glassfish will experience the problem too.

The memory leak shows up, when you are creating lots of working threads (and
destroy them again), e.g. having applications with varying loads running for a
longer time you will notice a slow increase in tenured space.

Please find the discussion and my original patches for the two classes at

http://issues.apache.org/bugzilla/show_bug.cgi?id=33368

Thanks for considering.

Environment

Operating System: All
Platform: All
URL: http://issues.apache.org/bugzilla/show_bug.cgi?id=33368

Affected Versions

[9.0pe]

NPE in running Client of appserv-tests/devtests/webservices/annotations/warservice

I successfully deployed the endpoint in the case, but met the following error message in run-client:

run-client:
[unjar] Expanding: D:\java\workspace\glassfish\appserv-tests\lib\reporter.ja
r into D:\java\workspace\glassfish\appserv-tests\build\module\classes\client
[exec] java.lang.NullPointerException
[exec] at client.Client.doTest(Client.java:27)
[exec] at client.Client.main(Client.java:21)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[exec] Value of key is:war-with-endpointimpl-only
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:585)
[exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility
.java:249)
[exec] at com.sun.enterprise.appclient.Main.(Main.java:661)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:170)

The line is

Hello port = service.getHello();

so, it's obviously due to service's null value, which should be populated from @WebServiceRef
annotation.

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[9.0pe]

Troubles with "register your product now"

I've got a fresh install of glassfish and as the "Getting Started Guide" says, I ran

bin/asadmin start-domain

NOTE: The guide doesn't say what URL will be active at the time. But I assumed
that the :8080 port might be up. And it is.

However the page there says I need to register the "product". Nowhere along the
product registration pages is there a "glassfish" choice. It starts me out
here: https://softwarereg.sun.com/software/product_registration/index.jsp

But I'm left wondering, why is registration required, and if one does register
which product do you register under?

Environment

Operating System: All
Platform: Linux

Affected Versions

[9.0pe]

deployment uri interoperability issues

The current JSR-88 deployment URI for glassfish has the form

deployer:Sun:AppServer:::[:https].

This duplicates the form of the deployment URI recognized by the
DeploymentFactory implementation of Sun Java System Application Server 8.1.

This will cause issues for JSR-88 tools, that use the DeploymentFactory's
handlesURI method to determine whether the tool can create a DeploymentManager
from the DF, to deploy to glassfish.

If a user configures the tool with the DF from both implementations, the tool
has a 50% chance of asking the wrong DF for a DM. Note: even if the glassfish
DM could deploy to SJSAS 8.1, there is the real possibility that a tool will ask
the 8.1 DF for a DM to deploy bits to a glassfish instance.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

HttpSession not available on postback, even when we know it's there.Checking in ContentLengthAlgorithm.java; /cvs/glassfish/appserv-http-engine/src/java/com/sun/enterprise/web/connector/grizzly/algorithms/ContentLengthAlgorithm.java,v <-- ContentLength

This problem cropped up after the 19 September version glassfish, starting with
B19. I first observed it when trying to get the blueprints ajax JSF progress
bar working with that glassfish build.

As you may know, JSF allows the user to specify if their page state should be
saved in client or on server. If on server, the http session is used. The
state is stored in the session when the page is rendered, and restored from the
session when the postback is processed. I'm observing that the state
successfully goes into the session, but on postback, the session is null.

I'm attaching a war that shows this problem.

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[9.0pe]

Fix path separator for QuickLook-README.txt in appserv-tests

\ is used in Windows.

Index: QuickLook-README.txt

RCS file: /cvs/glassfish/appserv-tests/QuickLook-README.txt,v
retrieving revision 1.2
diff -u -r1.2 QuickLook-README.txt
— QuickLook-README.txt 6 Jun 2005 17:20:22 -0000 1.2
+++ QuickLook-README.txt 23 Sep 2005 07:59:34 -0000
@@ -21,7 +21,7 @@
% setenv PATH $S1AS_HOME/bin;$JAVA_HOME/bin;$MAVEN_HOME/bin;$PATH

On Windows:

  • % set PATH=%S1AS_HOME%/bin;%JAVA_HOME%/bin;%MAVEN_HOME%/bin;%PATH%
    • % set PATH=%S1AS_HOME%\bin;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%PATH%

b) Modify the installation properties under $APS_HOME/config.properties to
match your installation.
e.g. admin.password, http.port etc.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Can't log into admin console after building from Java.net

I built glassfish from scratch on a completely non Sun internal GNU/Linux box
running JDS. The build was successful and I was able to completely bring up the
instance. However, using Firefox 1.0, I was unable to log in to the admin
console, while with Opera I am able to do so.

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[9.0pe]

Need to modify java.security to get JSF to run

The JSF Impl in Glassfish uses DESede to encrypt the client side state. By
default, this will cause a NoSuchAlgorithmException: Algorithm DESede not found
to be thrown. I'm not exactly sure why this is, but it only happens on the MAC.
Other platforms work fine "out of the box".

The offending code is doing

SecretKeyFactory.getInstance("DESede");

If I modify $JAVA_HOME/lib/security/java.security and make
com.sun.crypto.provider.SunJCE the 2nd in the list, while making
com.apple.crypto.provider.Apple the 5th in the list, I don't get the
NoSuchAlgorithmException.

Is there some way to make it so the user doesn't have to make this change?

Should I add this to the wiki?

Ed

Environment

Operating System: Mac OS X
Platform: Macintosh

Affected Versions

[9.0pe]

Deployer fails to add stub locations?

Hello,

this code fails: (EJBClassPathUtils:103)

// adds stubs dir for this application
classpath.add(apps.getStubLocation(appName));

The stack trace can be found in the bottom. I'm using the promoted version 9.0-
b17.

A probable reason for the failure is that the Deployer.loadDescriptors() (deeper
in the stack) sets the Application.registrationName only later (at line 311.)
The basic cause of the exception is that the registrationName is null.

This case happened with the AppReDeployer, but as the possible defect is in the
Deployer, it may effect all deployments (app, connector, ejb, web.)

And finally, as I haven't used any stubs yet, I have no experience on the
possible effects of this issue. The only sign for me is the annoying stack
trace...

The stack trace:

[#|2005-09-14T00:46:32.269+0300|SEVERE|sun-appserver-pe9.0|javax.enterprise.
system.core.classloading|_ThreadID=17;_Threa
dName=Thread-33;|LDR5101: Could not get classpath
java.lang.IllegalArgumentException
at com.sun.enterprise.util.StringUtils.makeFilePath(StringUtils.java:
404)
at com.sun.enterprise.instance.ApplicationEnvironment.
createAppPath(ApplicationEnvironment.java:78)
at com.sun.enterprise.instance.ApplicationEnvironment.
(ApplicationEnvironment.java:65)
at com.sun.enterprise.instance.InstanceEnvironment.
getApplicationEnvironment(InstanceEnvironment.java:1574)
at com.sun.enterprise.instance.AppsManager.getStubLocation(AppsManager.
java:89)
at com.sun.enterprise.loader.EJBClassPathUtils.
getAppClassPath(EJBClassPathUtils.java:104)
at com.sun.enterprise.deployment.backend.AppDeployerBase.
getModuleClasspath(AppDeployerBase.java:301)
at com.sun.enterprise.deployment.backend.Deployer.
loadDescriptors(Deployer.java:290)
at com.sun.enterprise.deployment.backend.AppDeployerBase.
loadDescriptors(AppDeployerBase.java:313)
at com.sun.enterprise.deployment.backend.AppDeployer.
explodeArchive(AppDeployer.java:286)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.
java:177)
at com.sun.enterprise.deployment.backend.AppDeployer.
doRequestFinish(AppDeployer.java:123)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.
java:167)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.
executePhase(DeploymentPhase.java:87)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.
executePhases(PEDeploymentService.java:652)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.
deploy(PEDeploymentService.java:207)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.
deploy(PEDeploymentService.java:539)
at com.sun.enterprise.management.deploy.DeployThread.
deploy(DeployThread.java:167)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.
java:196)

| #] |

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

JSTL xml foreach tag causes exception on glassfish

This is for Milestone 3: I have a JSP 2.0 application that uses JSTL xml foreach
tag. This is causing the following exception:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from
fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoClassDefFoundError
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:914)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:847)
org.apache.jsp.test_jsp._jspService(test_jsp.java:138)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:335)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:397)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:308)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:197)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:550)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:433)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

root cause

java.lang.NoClassDefFoundError
org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTag.java:49)
javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:245)
org.apache.jsp.test_jsp._jspx_meth_x_forEach_0(test_jsp.java:168)
org.apache.jsp.test_jsp._jspService(test_jsp.java:122)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:335)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:397)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:308)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:67)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:197)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:550)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:433)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:353)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:257)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:258)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:71)

note The full stack trace of the root cause is available in the Sun Java System
Application Server Platform Edition 9.0 logs.
Sun Java System Application Server Platform Edition 9.0

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

unjarring of the installation should happen in a sub-directory

I downloaded the Milestone 3 build
(https://glassfish.dev.java.net/downloads/24Aug05_SCF.html). When I unjared the
downloaded, it expanded everyone in my current directory. This was quite
annoying since if done on desktop, it is quite challenging to clean-up. The
download should instead create a subdirectory with a suitable name, and then
unjar the contents there.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Correcting PATH and JAVA_HOME doesn't fix UnsupportedClassVersionError for second install attempt

If a user downloads a gf build and follows the instructions to do the "install",
they may have forgotten to change their "default" JVM to J2SE 5.

When setup.xml hits the create.domain.unix target, it fails.

If the user then changes their PATH and JAVA_HOME values to correct the issue,
the error returns anyway, since the AS_JAVA variable was set to an incorrect
value by the previous ant -d setup.xml invocation.

The fallback for the user is to delete the whole mess and restart.

Environment

Operating System: All
Platform: Sun

Affected Versions

[9.0pe]

Unable to get View for ViewDescriptor 'webApplications'

Sometimes the appserver gets into a mode where I can't use the admin console to
manage webapps.

I get the following error when clicking on the web applications tree node:

A "com.sun.enterprise.tools.guiframework.exception.FrameworkError" was caught.
The message from the exception: "Unable to get View for ViewDescriptor
'webApplications'"

The root cause is
"com.sun.enterprise.admin.common.exception.MBeanConfigException: Component not
registered"

See the HTML source for more detailed (stack trace) information.

The server.log shows:

[#|2005-07-20T14:44:28.080-0400|SEVERE|TestAbbrevProductName9.0|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[][ERROR]
Uncaught application exception
com.iplanet.jato.command.CommandException: Handler method
"handleShowContainerRequest" threw an exception
Root cause = [com.sun.enterprise.tools.guiframework.exception.FrameworkError:
com.sun.enterprise.tools.guiframework.exception.FrameworkException:
java.lang.reflect.InvocationTargetException while attempting to process a
'beforeCreate' event for 'webAppsTable'.]
at
com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:217)
at
com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
at
com.iplanet.jato.view.RequestHandlingTreeViewBase.handleRequest(RequestHandlingTreeViewBase.java:525)
at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
at
com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
at
com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
at
com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
at
com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:202)
at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:459)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:260)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:264)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at com.sun.enterprise.web.WebModule.invoke(WebModule.java:454)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:131)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:180)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:517)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:424)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:384)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:283)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:256)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:69)

Root cause:
com.sun.enterprise.tools.guiframework.exception.FrameworkError:
com.sun.enterprise.tools.guiframework.exception.FrameworkException:
java.lang.reflect.InvocationTargetException while attempting to process a
'beforeCreate' event for 'webAppsTable'.
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.beforeCreate(DescriptorViewHelper.java:360)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.createChild(DescriptorViewHelper.java:258)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.createChild(DescriptorViewBeanBase.java:141)
at com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:187)
at com.iplanet.jato.view.ContainerViewBase.getChild(ContainerViewBase.java:541)
at
com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor.registerChildren(ViewDescriptor.java:208)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.registerViewDescriptorChildren(DescriptorViewHelper.java:84)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.registerViewDescriptorChildren(DescriptorViewBeanBase.java:133)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.(DescriptorViewBeanBase.java:76)
at
com.sun.enterprise.tools.guiframework.view.descriptors.ViewBeanBaseDescriptor.getInstance(ViewBeanBaseDescriptor.java:53)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewManager.getView(DescriptorViewManager.java:215)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewManager.getView(DescriptorViewManager.java:175)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewManager.getViewBean(DescriptorViewManager.java:75)
at
com.sun.enterprise.tools.admingui.tree.IndexTreeNode.handleSelection(IndexTreeNode.java:645)
at
com.sun.enterprise.tools.admingui.tree.IndexTreeView.handleNode(IndexTreeView.java:446)
at
com.sun.enterprise.tools.admingui.tree.IndexTreeView.handleShowContainerRequest(IndexTreeView.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
at
com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
at
com.iplanet.jato.view.RequestHandlingTreeViewBase.handleRequest(RequestHandlingTreeViewBase.java:525)
at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
at
com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
at
com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
at
com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
at
com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
at
com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:202)
at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:459)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:289)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:172)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:260)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:264)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at com.sun.enterprise.web.WebModule.invoke(WebModule.java:454)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:131)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:180)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:517)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:424)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:384)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:283)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:256)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:69)
Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException:
java.lang.reflect.InvocationTargetException while attempting to process a
'beforeCreate' event for 'webAppsTable'.
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.dispatchEvent(DescriptorViewHelper.java:793)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.beforeCreate(DescriptorViewHelper.java:353)
... 65 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandler(DescriptorViewHelper.java:879)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandlers(DescriptorViewHelper.java:816)
at
com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.dispatchEvent(DescriptorViewHelper.java:791)
... 66 more
Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException:
com.sun.enterprise.tools.guiframework.exception.FrameworkException:
javax.management.MBeanException: Operation 'getStatus' failed in 'applications'
Config Mbean.
Target exception message: Component not registered
at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:69)
at
com.sun.enterprise.tools.admingui.handlers.DeploymentHandler.getAppStatus(DeploymentHandler.java:898)
at
com.sun.enterprise.tools.admingui.handlers.DeploymentHandler.getAppStatusSummary(DeploymentHandler.java:1638)
at
com.sun.enterprise.tools.admingui.handlers.DeploymentHandler.loadDeploymentTableModel(DeploymentHandler.java:981)
... 73 more
Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException:
javax.management.MBeanException: Operation 'getStatus' failed in 'applications'
Config Mbean.
Target exception message: Component not registered
at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:167)
at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:58)
... 76 more
Caused by: javax.management.MBeanException: Operation 'getStatus' failed in
'applications' Config Mbean.
Target exception message: Component not registered
at
com.sun.enterprise.admin.MBeanHelper.extractAndWrapTargetException(MBeanHelper.java:390)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:401)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:288)
at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:160)
... 77 more
Caused by: com.sun.enterprise.admin.common.exception.MBeanConfigException:
Component not registered
at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.getStatus(ApplicationsConfigMBean.java:1992)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:324)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:379)
... 88 more

| #] |

Looks like a Jato error.

The error persists after appserver shutdown and restart, and even after reboot.

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

LifecycleEvent.STARTUP_EVENT fires after Servlet.init().

On Linux box running Fedora Core 2:
Using milestone 2: glassfish-image-9.0-b09.jar

The documentation (actually for 8.1):
http://docs.sun.com/source/819-0217/dglfcycl.html#wp16901 says that:

After the STARTUP_EVENT, the server loads and initializes deployed applications.

However that's not how it is implemented. If you deploy a lifecycle listener and a servlet with a "load-
on-startup" value, the servlets init() method gets called before the LifecycleEvent.STARTUP_EVENT is
fired.

This is also a bug in App Server 8.1EE running on a Solaris 9 Sparc box, as I've tested it there also. It
worked as documented in App Server 7.0 EE.

I need this fixed because I want to bind objects to JNDI in the lifecycle startup event (it can't be done in
the INIT_EVENT) that my servlets need before they initialize. My current work around is to have the
servlets start another thread and wait for those objects to appear in JNDI. But it's not a perfect work
around as if they fail, the app server still comes up because they were running in another thread.

Here's some sample output I got from some of the test code I that I attached:

[#|2005-08-16T12:59:49.986-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.s
ystem.stream.out|_ThreadID=10;|Lifecycle: INIT_EVENT|#]
....
[#|2005-08-16T12:59:58.976-0400|INFO|TestAbbrevProductName9.0|org.apache.catalin
a.core.StandardEngine|_ThreadID=10;|Starting Servlet Engine|#]

[#|2005-08-16T13:00:00.268-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.s
ystem.stream.out|_ThreadID=10;|
TestServlet's init() method was called.|#]
.....
[#|2005-08-16T13:00:01.227-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.s
ystem.container.web|_ThreadID=10;|WEB0712: Starting Sun-Java-System/Application-
Server HTTP/1.1 on XXXXX|#]

[#|2005-08-16T13:00:01.292-0400|INFO|TestAbbrevProductName9.0|javax.enterprise.s
ystem.stream.out|_ThreadID=10;|
Lifecycle: STARTUP_EVENT|#]

The test code that I used to produce the above log entries is:

===============================
Lifecycle Class (deployed with a load startup order of 1):

package test;
import com.sun.appserv.server.LifecycleListener;
import com.sun.appserv.server.LifecycleEvent;

public class Life implements LifecycleListener {

public void handleEvent(LifecycleEvent event) {
switch (event.getEventType())

{ case LifecycleEvent.INIT_EVENT: System.out.println("Lifecycle: INIT_EVENT"); break; case LifecycleEvent.STARTUP_EVENT: System.out.println("Lifecycle: STARTUP_EVENT"); break; case LifecycleEvent.READY_EVENT: System.out.println("Lifecycle: READY_EVENT"); break; }

}
}

Servlet Class:

...
public class TestServlet extends HttpServlet {

public void init(ServletConfig config) throws ServletException

{ System.out.println("TestServlet's init() method was called."); }

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException

{ ... }

}

web.xml:

.... Test.servlet ...TestServlet 100 ...

===============================
Thanks,
Dan.

Environment

Operating System: Linux
Platform: Linux

Affected Versions

[9.0pe]

glassfish test issue 1

glassfish test issue 1

Environment

Operating System: All
Platform: All

Affected Versions

[9.0pe]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.