• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simple jsp runs in tomcat but not in glassfish

 
Ranch Hand
Posts: 182
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to glassfish and java ee. I have installed glassfish and tomcat on my system and in eclipse, and I am making dynamic web projects in eclipse. When I try to run a simple jsp on glassfish, glassfish starts and stops without an error. But I don't see the jsp running. The jsp runs on tomcat though. Can someone please help me to figure this out ? Am I at a disadvantage if I use tomcat
instead ?

Steps I did to run the jsp -
jsp - run as - run on server. If server = tomcat, jsp runs in browser. If server = glassfish, nothing happens. Server runs and stops.

I think glassfish is a pain because of all the issues I had during setup and this one.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ali Gordon wrote:
Steps I did to run the jsp -
jsp - run as - run on server. If server = tomcat, jsp runs in browser. If server = glassfish, nothing happens. Server runs and stops.




It looks like you are using some IDE and the issue is more a IDE problem than a GlassFish problem. Have you tried deploying the application and accessing the JSP without using the IDE for doing that?
 
Rancher
Posts: 989
9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ali Gordon wrote:
jsp - run as - run on server. If server = tomcat, jsp runs in browser. If server = glassfish, nothing happens. Server runs and stops.


If the server is stopping abruptly then you should check to log files to find out the reason why the server is stopping.
 
Ali Gordon
Ranch Hand
Posts: 182
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:

Ali Gordon wrote:
Steps I did to run the jsp -
jsp - run as - run on server. If server = tomcat, jsp runs in browser. If server = glassfish, nothing happens. Server runs and stops.




It looks like you are using some IDE and the issue is more a IDE problem than a GlassFish problem. Have you tried deploying the application and accessing the JSP without using the IDE for doing that?



Yes, I am using Eclipse IDE. Can you please tell me what made you think it could be related to IDE ?
Thanks.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ali Gordon wrote:
Yes, I am using Eclipse IDE. Can you please tell me what made you think it could be related to IDE ?



Because outside of the IDE, running a JSP, usually involves deploying the application, then accessing the JSP at a specific URL. Each one of those tasks can be individually tracked/debugged if something fails and would have relevant stacktraces and details. I'm not saying that it is an IDE issue, but it's better to rule that out and try and fix the real problem (if there is one).
 
Ali Gordon
Ranch Hand
Posts: 182
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

E Armitage wrote:

Ali Gordon wrote:
jsp - run as - run on server. If server = tomcat, jsp runs in browser. If server = glassfish, nothing happens. Server runs and stops.


If the server is stopping abruptly then you should check to log files to find out the reason why the server is stopping.



I have the logs, but I cannot understand why my glassfish is not working. Can you please see the logs and help me to find the problem ?
Thank you.



[2014-06-15T09:00:39.299-0900] [glassfish 4.0] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Running GlassFish Version: GlassFish Server Open Source Edition 4.0 (build 89)]]

[2014-06-15T09:00:39.303-0900] [glassfish 4.0] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]

[2014-06-15T09:00:39.563-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2014-06-15T09:00:39.576-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2014-06-15T09:00:39.591-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

[2014-06-15T09:00:40.235-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 64ms - bound to [/0.0.0.0:8,080]]]

[2014-06-15T09:00:40.303-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 19ms - bound to [/0.0.0.0:8,181]]]

[2014-06-15T09:00:40.335-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 20ms - bound to [/0.0.0.0:4,848]]]

[2014-06-15T09:00:40.538-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Authorization Service has successfully initialized.]]

[2014-06-15T09:00:40.628-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 26ms - bound to [/0.0.0.0:3,700]]]

[2014-06-15T09:00:40.643-0900] [glassfish 4.0] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]

[2014-06-15T09:00:41.057-0900] [glassfish 4.0] [INFO] [] [] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
this.makeModuleFor(org.glassfish.main.web.glue, null) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.web.glue [263]], State = [READY]]]

[2014-06-15T09:00:41.058-0900] [glassfish 4.0] [INFO] [] [] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
this.makeModuleFor(org.glassfish.web.javax.servlet.jsp, null) returned OSGiModuleImpl:: Bundle = [org.glassfish.web.javax.servlet.jsp [149]], State = [READY]]]

[2014-06-15T09:00:41.161-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
visiting unvisited references]]

[2014-06-15T09:00:41.555-0900] [glassfish 4.0] [SEVERE] [java_security.expired_certificate] [javax.enterprise.system.ssl.security.com.sun.enterprise.security.ssl.impl] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 1000] [[
SEC5054: Certificate has expired: [
[
Version: V3
Subject: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

Key: Sun RSA public key, 2048 bits
modulus: 123456
public exponent: 65537
Validity: [From: OneDay TimeZone 1998,
To: AnotherDay 15 16:59:00 TimeZone 2013]
Issuer: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
SerialNumber: [ 01b6]

Certificate Extensions: 4
[1]: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:5
]

[2]: ObjectId: 2.5.29.32 Criticality=false
CertificatePolicies [
[CertificatePolicyId: [1.2.840.113763.1.2.1.3]
[] ]
]

[3]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Crl_Sign
]

[4]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
some random hex numbers
]
]

]
Algorithm: [SHA1withRSA]
Signature:
blah blah blah...
]]]

[2014-06-15T09:00:41.587-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1002: Security Manager is OFF.]]

[2014-06-15T09:00:41.654-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1010: Entering Security Startup Service]]

[2014-06-15T09:00:41.658-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.]]

[2014-06-15T09:00:41.723-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
SEC1011: Security Service(s) Started Successfully]]

[2014-06-15T09:00:42.054-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080]]

[2014-06-15T09:00:42.068-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181]]

[2014-06-15T09:00:42.074-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Created HTTP listener admin-listener on host/port 0.0.0.0:4848]]

[2014-06-15T09:00:42.110-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Created virtual server server]]

[2014-06-15T09:00:42.113-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Created virtual server __asadmin]]

[2014-06-15T09:00:42.506-0900] [glassfish 4.0] [INFO] [AS-WEB-CORE-00306] [javax.enterprise.web.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1234482506] [levelValue: 800] [[
Setting JAAS app name glassfish-web]]

[2014-06-15T09:00:42.507-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00201] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Virtual server server loaded default web module ]]

[2014-06-15T09:00:43.712-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
visiting unvisited references]]

[2014-06-15T09:00:43.731-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
visiting unvisited references]]

[2014-06-15T09:00:44.205-0900] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Loading application [Testmart] at [/Testmart]]]

[2014-06-15T09:00:44.208-0900] [glassfish 4.0] [INFO] [NCLS-CORE-00022] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Loading application Testmart done in 3,416 ms]]

[2014-06-15T09:00:44.306-0900] [glassfish 4.0] [INFO] [NCLS-CORE-00017] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
GlassFish Server Open Source Edition 4.0 (89) startup time : Felix (5,515ms), startup services(5,193ms), total(10,708ms)]]

[2014-06-15T09:00:44.324-0900] [glassfish 4.0] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=58 _ThreadName=pool-6-thread-2] [timeMillis: 1] [levelValue: 800] [[
HV000001: Hibernate Validator 5.0.0.Final]]

[2014-06-15T09:00:45.233-0900] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=57 _ThreadName=pool-6-thread-1] [timeMillis: 1] [levelValue: 800] [[
Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...]]

[2014-06-15T09:00:46.734-0900] [glassfish 4.0] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=59 _ThreadName=Thread-8] [timeMillis: 1] [levelValue: 800] [[
JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://mycomputer.home.network:8686/jndi/rmi://mycomputer.home.network:8686/jmxrmi]]

[2014-06-15T09:00:46.965-0900] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 39ms - bound to [/0.0.0.0:7,676]]]

[2014-06-15T09:00:47.066-0900] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1] [levelValue: 800] [[
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@16fee161 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@45348334.]]

 
Ali Gordon
Ranch Hand
Posts: 182
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One error caught my eye for some reason. "SEC5054: Certificate has expired:" I searched for glassfish + certificate has expired error.
I got the fix-

The technique to remove it is quite simple if you are using a basic GlassFish installation. This is a combination of posts from the resources listed in the references below.
In windows, use cmd and cd into the directory

${GLASSFISH_INSTALLATION_DIRECTORY}/glassfish/domains/domain1/config/ directory. You will need to repeat this if you have multiple domains.

Execute the first line below and follow the other lines:



Restart server, and the expired certificate warning will disappear.

Now, restart glassfish and the error won't appear anymore in your log file. However, then original problem in my post still exists.
I'll figure out a way to fix it. I am betting of the presence of (stopped) tomcat and port conflicts as the reason for my problem.


 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic