users@glassfish.java.net

Re: [Jersey] Problem deploying Jersey Hello World Resource example with Eclipse w/GlassFishv3

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 04 Jan 2010 12:59:56 +0100

Hi Dave,

What about:

   http://localhost:8084/RESTfulWS/helloworld

?

Did you change the default port, 8080, to be 8084 when you installed?

The port 8181 is usually reserved, in GF, for HTTPS, so the following
may work:

   https://localhost:8181/RESTfulWS/helloworld


I am CC'ing users_at_glassfish as there might be an issue with the
GlassFish Tools Bundle For Eclipse or an obvious answer to your issue
(i am not familiar with the Bundle).

Paul.


On Jan 4, 2010, at 12:41 PM, Dave101 wrote:

>
> Thanks Paul,
>
> I tried the url: http://localhost:8181/RESTfulWS/helloworld with no
> success.
>
> I may have indirectly. What I did was created a project in eclipse
> and
> called it RESTfulWS.
>
> Inside of the project I dragged in the package
> com.sun.jersey.samples.helloworld.resources from the jersey samples
> source
> directory. The HelloWorldResource.java class has not changed.
>
> Inside of the eclipse Project Explorer, I dragged in the WEB-INF
> directory
> and contents from the helloworld-webapp's WEB-INF sample directory.
> The
> web.xml has not changed.
>
> I have not changed anything else, although it could have indirectly.
> Everything is right out of the box. I could have, the tutorial said
> GlassFish uses 8080, but mine responds to 8181.
>
> I started with the GlassFish tutorial then went back to the Jersey
> documentation and then back to the Jersey wiki and supporting
> documentation
> on the sample files.
>
> Thanks again,
>
> Dave
>
>
>
> Paul Sandoz wrote:
>>
>> Hi Dave,
>>
>> From the logs the application deployed OK.
>>
>> Did you make any modifications to the hello world web application,
>> including deployment modifications to the context path at which the
>> war is deployed?
>>
>> For example, i see the following:
>>
>> INFO: Loading application RESTfulWS at /RESTfulWS
>>
>> which implies the context path is "/RESTfulWS" and not "/helloworld-
>> webapp". Did you configure via eclipse the string "RESTfulWS"?
>>
>> Try the URL:
>>
>> http://localhost:8181/RESTfulWS/helloworld
>>
>> Paul.
>>
>> On Jan 4, 2010, at 1:23 AM, Dave101 wrote:
>>
>>>
>>> Hello,
>>>
>>> I am new to Jersey and GlassFish and have been trying to get the
>>> sample
>>> files to work. I know this is probably something with my
>>> understanding with
>>> maven or GlassFish. But if you know of something I might be
>>> overlooking,
>>> please chime in.
>>>
>>> I have just downloaded GlassFish Tools Bundle For Eclipse version
>>> 1.2,
>>> jersey-archive-1.1.4.1, and Jersey 1.0.3.
>>>
>>> I have been trying to get the helloworld-webapp to run out of the
>>> box with
>>> no success.
>>> When I start the server, the eclipse console reports the following:
>>>
>>> Waiting for DAS to start ........
>>> Started domain: domain1
>>> Domain location:
>>> C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1
>>> Log file:
>>> C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1\logs\server.log
>>> Admin port for the domain: 4860
>>> Command start-domain executed successfully.
>>>
>>> The logs is as follows:
>>>
>>> Jan 3, 2010 7:18:57 PM
>>> com.sun.enterprise.admin.launcher.GFLauncherLogger
>>> info
>>> INFO: JVM invocation command line:
>>> C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\jre\bin\java.exe
>>> -cp
>>> C:/Tools/Eclipse with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/glassfishv3/glassfish/
>>> modules/glassfish.jar
>>> -XX:+UnlockDiagnosticVMOptions
>>> -XX:MaxPermSize=192m
>>> -XX:NewRatio=2
>>> -XX:+LogVMOutput
>>> -XX:LogFile=C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1/logs/jvm.log
>>> -Xmx512m
>>> -client
>>> -javaagent:C:/Tools/Eclipse with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/glassfishv3/glassfish/lib/
>>> monitor/btrace-agent.jar=unsafe=true,noServer=true
>>> -Dosgi.shell.telnet.maxconn=1
>>> -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
>>> -Dfelix.fileinstall.dir=C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish/
>>> modules/autostart/
>>> -Djavax.net.ssl.keyStore=C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1/config/
>>> keystore.jks
>>> -Dosgi.shell.telnet.port=6666
>>> -Djava.security.policy=C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1/config/
>>> server.policy
>>> -Dfelix.fileinstall.poll=5000
>>> -Dcom.sun.aas.instanceRoot=C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1
>>> -
>>> Dcom
>>> .sun
>>> .enterprise
>>> .config
>>> .config_environment_factory_class
>>> =
>>> com
>>> .sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
>>> -Dosgi.shell.telnet.ip=127.0.0.1
>>> -Djava.endorsed.dirs=C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish/
>>> modules/endorsed;C:\Tools\Eclipse
>>> with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish/lib/
>>> endorsed
>>> -Dcom.sun.aas.installRoot=C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish
>>> -Djava.ext.dirs=C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\jre/lib/ext;C:\Tools
>>> \Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\jre/jre/lib/ext;C:\Tools
>>> \workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1/lib/ext
>>> -Dfelix.fileinstall.bundles.new.start=true
>>> -Djavax.net.ssl.trustStore=C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1/config/
>>> cacerts.jks
>>> -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
>>> -Djava.security.auth.login.config=C:\Tools\workspace\.metadata
>>> \.plugins\com.sun.enterprise.jst.server.sunappsrv92\domain1/config/
>>> login.conf
>>> -DANTLR_USE_DIRECT_CLASS_LOADING=true
>>> -Dfelix.fileinstall.debug=1
>>> -Dorg.glassfish.web.rfc2109_cookie_names_enforced=false
>>> -Djava.library.path=C:/Tools/Eclipse with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/glassfishv3/glassfish/
>>> lib;C:/Tools/Eclipse
>>> with GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/jre/bin;C:/Tools/
>>> Eclipse with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/glassfishv3/glassfish;C:/
>>> Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Tools/Eclipse
>>> with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/jre/jre/bin/client;C:/
>>> Tools/Eclipse
>>> with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/jre/jre/bin;C:/Windows/
>>> System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0
>>> com.sun.enterprise.glassfish.bootstrap.ASMain
>>> -domainname
>>> domain1
>>> -asadmin-args
>>> start-domain,,,--domaindir,,,C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92,,,--debug=false,,,--
>>> verbose=false,,,domain1
>>> -instancename
>>> server
>>> -verbose
>>> false
>>> -debug
>>> false
>>> -asadmin-classpath
>>> C:/Tools/Eclipse with
>>> GF/GlassFish-Tools-Bundle-For-Eclipse-1.2/glassfishv3/glassfish/
>>> modules/admin-cli.jar
>>> -asadmin-classname
>>> com.sun.enterprise.admin.cli.AsadminMain
>>> -upgrade
>>> false
>>> -domaindir
>>> C:/Tools/workspace/.metadata/.plugins/
>>> com.sun.enterprise.jst.server.sunappsrv92/domain1
>>> -read-stdin
>>> true
>>> Jan 3, 2010 7:18:57 PM
>>> com.sun.enterprise.admin.launcher.GFLauncherLogger
>>> info
>>> INFO: Successfully launched in 28 msec.
>>>
>>> INFO: Running GlassFish Version: GlassFish v3 (build 74.2)
>>>
>>> INFO: Perform lazy SSL initialization for the listener 'http-
>>> listener-2'
>>> INFO: Starting Grizzly Framework 1.9.18-k - Sun Jan 03 19:19:00 EST
>>> 2010
>>> INFO: Starting Grizzly Framework 1.9.18-k - Sun Jan 03 19:19:00 EST
>>> 2010
>>> INFO: Grizzly Framework 1.9.18-k started in: 146ms listening on port
>>> 8084
>>> INFO: Grizzly Framework 1.9.18-k started in: 80ms listening on port
>>> 3700
>>> INFO: Grizzly Framework 1.9.18-k started in: 128ms listening on port
>>> 8181
>>> INFO: Grizzly Framework 1.9.18-k started in: 79ms listening on port
>>> 7676
>>> INFO: Grizzly Framework 1.9.18-k started in: 118ms listening on port
>>> 4860
>>>
>>> INFO: The Admin Console is already installed, but not yet loaded.
>>> INFO: Using
>>> com
>>> .sun
>>> .enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as
>>> the delegate
>>>
>>> INFO: Created HTTP listener http-listener-1 on port 8084
>>> INFO: Created HTTP listener http-listener-2 on port 8181
>>> INFO: Created HTTP listener admin-listener on port 4860
>>> INFO: Created virtual server server
>>> INFO: Created virtual server server
>>> INFO: Created virtual server __asadmin
>>> INFO: Created virtual server __asadmin
>>> INFO: Created virtual server __asadmin
>>>
>>> INFO: Virtual server server loaded system default web module
>>> INFO: Virtual server server loaded system default web module
>>> INFO: Virtual server server loaded system default web module
>>> INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider =
>>> org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider_at_15b9e0
>>>
>>> INFO: Done with starting web container
>>> INFO: SEC1002: Security Manager is OFF.
>>>
>>> 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: Scanning for root resource and provider classes in the
>>> packages:
>>> com.sun.jersey.samples.helloworld.resources
>>>
>>> INFO: Root resource classes found:
>>> class com.sun.jersey.samples.helloworld.resources.HelloWorldResource
>>> INFO: Provider classes found:
>>> INFO: GlobalStatsProvider registered
>>> INFO: Initiating Jersey application, version 'Jersey: 1.1.4.1
>>> 11/24/2009
>>> 01:37 AM'
>>> INFO: Adding the following classes declared in
>>> META-INF/services/jersey-server-components to the resource
>>> configuration:
>>> class
>>> com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider
>>> class com.sun.jersey.multipart.impl.MultiPartConfigProvider
>>> class com.sun.jersey.multipart.impl.MultiPartReader
>>> class com.sun.jersey.multipart.impl.MultiPartWriter
>>>
>>> INFO: Loading application RESTfulWS at /RESTfulWS
>>> INFO: Loading application RESTfulWS at /RESTfulWS
>>> INFO: Loading application RESTfulWS at /RESTfulWS
>>> INFO: Loading RESTfulWS Application done is 2387 ms
>>> INFO: GlassFish v3 (74.2) startup time : Felix(3013ms) startup
>>> services(4552ms) total(7565ms)
>>>
>>> INFO: Binding RMI port to *:8686
>>> INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
>>>
>>> INFO: JMXStartupService: Started JMXConnector, JMXService URL =
>>> service:jmx:rmi://192.168.30.2:8686/jndi/rmi://192.168.30.2:8686/
>>> jmxrmi
>>> INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir =
>>> C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1\autodeploy
>>> \bundles,
>>> felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start =
>>> true,
>>> felix.fileinstall.tmpdir =
>>> C:\Users\dean\AppData\Local\Temp\fileinstall-81235891996841751,
>>> felix.fileinstall.filter = null}
>>> INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir =
>>> C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish
>>> \modules\autostart,
>>> felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start =
>>> true,
>>> felix.fileinstall.tmpdir =
>>> C:\Users\dean\AppData\Local\Temp\fileinstall-5676883471246163163,
>>> felix.fileinstall.filter = null}
>>> INFO: Started bundle:
>>> file:/C:/Tools/Eclipse%20with%20GF/GlassFish-Tools-Bundle-For-
>>> Eclipse-1.2/glassfishv3/glassfish/modules/autostart/osgi-web-
>>> container.jar
>>> INFO: Started bundle:
>>> file:/C:/Tools/Eclipse%20with%20GF/GlassFish-Tools-Bundle-For-
>>> Eclipse-1.2/glassfishv3/glassfish/modules/autostart/
>>> org.apache.felix.scr.jar
>>>
>>> INFO: Updating configuration from
>>> org.apache.felix.fileinstall-autodeploy-bundles.cfg
>>> INFO: Installed C:\Tools\Eclipse with
>>> GF\GlassFish-Tools-Bundle-For-Eclipse-1.2\glassfishv3\glassfish
>>> \modules\autostart\org.apache.felix.fileinstall-autodeploy-
>>> bundles.cfg
>>> INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir =
>>> C:\Tools\workspace\.metadata\.plugins
>>> \com.sun.enterprise.jst.server.sunappsrv92\domain1\autodeploy
>>> \bundles,
>>> felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start =
>>> true,
>>> felix.fileinstall.tmpdir =
>>> C:\Users\dean\AppData\Local\Temp\fileinstall--8231412546016174885,
>>> felix.fileinstall.filter = null}
>>>
>>> And the URL I am trying to use is:
>>> http://localhost:8181/helloworld-webapp/helloworld
>>>
>>> When I try to connect to the url, it just gives me a blank screen.
>>>
>>> Thanks for any help you can give me.
>>>
>>> Dave
>>>
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Problem-deploying-Jersey-Hello-World-Resource-example-with-Eclipse-w-GlassFishv3-tp4247809p4247809.html
>>> Sent from the Jersey mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>>
>
> --
> View this message in context: http://n2.nabble.com/Problem-deploying-Jersey-Hello-World-Resource-example-with-Eclipse-w-GlassFishv3-tp4247809p4249525.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>