Skip to main content

Not able to run the Java EE tutorial helloservice-basicauth successfully.

1 reply [Last post]
vganesh62
Offline
Joined: 2003-06-11
Points: 0

Not able to run the Java EE tutorial helloservice-basicauth successfully.

Hello,

I have followed the instructions in Java EE 6 Tutorial volume 1 (820-7627.pdf file) Chapter 2 Using the Tutorial Examples. I have installed the required software and defined the home variable and path variable on a Windows 7 laptop as shown below:

C:\Users>set | findstr HOME
ANT_HOME=C:\apache-ant-1.8.0
APPSERVER_HOME=C:\glassfishv3\glassfish
CATALINA_HOME=C:\apache-tomcat-6.0.26
HOMEDRIVE=C:
JAVA_HOME=C:\Sun\Java\jdk1.6.0_20
TOMCAT_HOME=C:\apache-tomcat-6.0.26

C:\Users>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Sun\SDK\bin;C:\Sun\Java\jdk1.6.0_20\bin;C:\Program F
iles (x86)\CVSNT\;C:\apache-ant-1.8.0\bin;C:\Sun\Java\jdk1.6.0_20\bin;C:\apache-
maven-2.2.1\\bin;C:\glassfishv3\glassfish\bin;C:\glassfishv3\\bin

From Netbeans IDE 6.8, I am able to open the project C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\jaxws\helloservice-basicauth successfully and build it too. However, when I run it, I see the following error message

http://localhost:8080/helloservice-basicauth/

HTTP Status 404 -

type Status report

message

descriptionThe requested resource () is not available.

I am able to verify that the URL http://localhost:8080/ is working successfully and I see the following output

Sun GlassFish Enterprise Server v3
Your server is now running

To replace this page, overwrite the file index.html in the document root folder of this server. The document root folder for this server is the docroot subdirectory of this server's domain directory.

To manage a server on the local host with the default administration port, go to the Administration Console.
...

In Glassfish v3 Domain output tab, I see the message shown below. Any idea how I can test helloservice-basicauth web application successfully?

May 3, 2010 11:51:37 AM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-k - Mon May 03 11:51:41 EDT 2010
INFO: Starting Grizzly Framework 1.9.18-k - Mon May 03 11:51:41 EDT 2010
INFO: Grizzly Framework 1.9.18-k started in: 93ms listening on port 8181
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Grizzly Framework 1.9.18-k started in: 15ms listening on port 7676
INFO: Grizzly Framework 1.9.18-k started in: 62ms listening on port 4848
INFO: Grizzly Framework 1.9.18-k started in: 46ms listening on port 3700
INFO: Grizzly Framework 1.9.18-k started in: 124ms listening on port 8080
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider = org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider@15e6b72
INFO: SEC1002: Security Manager is OFF.
SEVERE: SEC5054: Certificate has expired: [
[
Version: V1
Subject: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
Signature Algorithm: MD2withRSA, OID = 1.2.840.113549.1.1.2
Key: Sun RSA public key, 1000 bits
modulus: 6144706769222379850430183405655235862870193813433361902309516534729547168229223442088128897090426025874990958624426272027915771330043379079076269082776443120496525109458437435793974957144923190172655546279112796066635455545786300647745888353781002359412766112775410851780140804282673804950495744761467
public exponent: 65537
Validity: [From: Tue Nov 08 19:00:00 EST 1994,
To: Thu Jan 07 18:59:59 EST 2010]
Issuer: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
SerialNumber: [ 02ad667e 4e45fe5e 576f3c98 195eddc0]
]
Algorithm: [MD2withRSA]
Signature:
0000: 65 DD 7E E1 B2 EC B0 E2 3A E0 EC 71 46 9A 19 11 e.......:..qF...
0010: B8 D3 C7 A0 B4 03 40 26 02 3E 09 9C E1 12 B3 D1 ......@&.>......
0020: 5A F6 37 A5 B7 61 03 B6 5B 16 69 3B C6 44 08 0C Z.7..a..[.i;.D..
0030: 88 53 0C 6B 97 49 C7 3E 35 DC 6C B9 BB AA DF 5C .S.k.I.>5.l....\
0040: BB 3A 2F 93 60 B6 A9 4B 4D F2 20 F7 CD 5F 7F 64 .:/.`..KM. .._.d
0050: 7B 8E DC 00 5C D7 FA 77 CA 39 16 59 6F 0E EA D3 ....\..w.9.Yo...
0060: B5 83 7F 4D 4D 42 56 76 B4 C9 5F 04 F8 38 F8 EB ...MMBVv.._..8..
0070: D2 5F 75 5F CD 7B FC E5 8E 80 7C FC 50 ._u_........P
]
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: WS00018: Webservice Endpoint deployed
Hello listening at address at http://localhost:8080/helloservice-basicauth/Hello
INFO: WSSERVLET12: JAX-WS context listener initializing
INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/helloservice-basicauth-HelloService-HelloPort
INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/helloservice-basicauth-HelloService-HelloPort
INFO: WSSERVLET14: JAX-WS servlet initializing
INFO: JAXRPCSERVLET14: JAX-RPC servlet initializing
INFO: Loading application helloservice-basicauth at /helloservice-basicauth
INFO: Loading helloservice-basicauth Application done is 14305 ms
INFO: GlassFish v3 (74.2) startup time : Felix(3416ms) startup services(17114ms) total(20530ms)
INFO: Binding RMI port to *:8686
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Sun\sges-v3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CONTRA~1\AppData\Local\Temp\fileinstall-8269373352831771599, felix.fileinstall.filter = null}
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://Contractor1-PC.aepsc.com:8686/jndi/rmi://Contractor1-PC.aepsc.com:8686/jmxrmi
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Sun\sges-v3\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CONTRA~1\AppData\Local\Temp\fileinstall-5682950856843122687, felix.fileinstall.filter = null}
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Grizzly Framework 1.9.18-k started in: 15ms listening on port 8080
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-k started in: 0ms listening on port 8181
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\Sun\sges-v3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Sun\sges-v3\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CONTRA~1\AppData\Local\Temp\fileinstall-4910300325651177103, felix.fileinstall.filter = null}
INFO: Invalid wsdl request http://localhost:8080/helloservice-basicauth/Hello for web service HelloService

Thanks and regards

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jendrock
Offline
Joined: 2004-04-07
Points: 0

The current version of the tutorial uses /examples/security/hello2_basicauth for its basic authentication example.

Instructions for running the example start on pg. 729 in the PDF file here:

http://docs.oracle.com/javaee/6/tutorial/doc/javaeetutorial6.pdf

or at http://docs.oracle.com/javaee/6/tutorial/doc/bncbx.html in the online version of the tutorial.

The tutorial examples (and the most up-to-date documentation) can be obtained from the Update Center through the Update Tool. Instructions for getting the latest IPS package for the tutorial can be found here:

http://docs.oracle.com/javaee/6/tutorial/doc/gexaj.html#giqtt

Hope that helps.