Skip to main content

HELP...Does Glassfish *really* work?

13 replies [Last post]
drtubbygooberman
Offline
Joined: 2009-01-12

Please excuse my whining. I am very frustrated.

I can't even get logging working...much less a spring bean to load. see post...http://forums.java.net/jive/message.jspa?messageID=325814#325814

I'm beginning to think I have been scammed by the java gods. Isn't there somewhere a simple example using Spring and Glassfish (with only ONE non-specific standard utilitarian Spring bean configured) that allows me to at the very least System.out.println?

I have attached the SIMPLEST of applications.

I have tried:

log4j
java.logging (commons)
sl4j
System.out

I have followed the instructions on 100's of posts to this forum and others and NOTHING seems to work. nothing.

I WOULD LOVE to see SOMETHING I am trying to print.

Sorry to be such a whiner - just about ready to throw it in on Glassfish, tho.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
drtubbygooberman
Offline
Joined: 2009-01-12

Kedar - could you tell me how to get the war to you?

Thanks,

Sam

drtubbygooberman
Offline
Joined: 2009-01-12

Hi Jacob,

Maybe I'm not getting something, but I do not find a glassfish.jar anywhere on my system.

Do I need to create this from the glassfish home directory?

Thanks,

Sam

Jacob Kessler

Based on the output you gave, it should be in
/Developer/Applications/glassfish/modules. Though, come to thinks of it,
it might not exist since I've only been using V3, so it may not exist if
you are on V2.

I also can't see the server.log that you said you posted in the zip,
unfortunately.

glassfish@javadesktop.org wrote:
> Hi Jacob,
>
> Maybe I'm not getting something, but I do not find a glassfish.jar anywhere on my system.
>
> Do I need to create this from the glassfish home directory?
>
> Thanks,
>
> Sam
> [Message sent by forum member 'drtubbygooberman' (drtubbygooberman)]
>
> http://forums.java.net/jive/thread.jspa?messageID=325861
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

km
Offline
Joined: 2005-10-28

I am really sorry that you are running into this. It shouldn't be that hard.

So, sit back and relax.

I actually tried to deploy your application to GlassFish. Also, note that GF *V2* is what I tried.

But since it uses Spring Framework and I don't have jars handy, it does not work. Can you send
the working (compiled) .war file with working jar for Spring in lib/ folder?

-Kedar

drtubbygooberman
Offline
Joined: 2009-01-12

Thanks for you empathy, Ken. I agree. It shouldn't be this difficult. I will send you the war...it's 10 megs so the forum won't let me update it...

Thank you for your help.

Sam

Jacob Kessler

Are you getting any error messages in your log file? If so, can you post
them?

Related to that, make sure that you can write to the log file. That
might cause nothing to show up.

System.out works from within glassfish, but is redirected to the server
log. If you start Glassfish with java -jar glassfish.jar, it should come
out on your console, but otherwise it will only show up in the log file.

glassfish@javadesktop.org wrote:
> Please excuse my whining. I am very frustrated.
>
> I can't even get logging working...much less a spring bean to load. see post...http://forums.java.net/jive/message.jspa?messageID=325814#325814
>
> I'm beginning to think I have been scammed by the java gods. Isn't there somewhere a simple example using Spring and Glassfish (with only ONE non-specific standard utilitarian Spring bean configured) that allows me to at the very least System.out.println?
>
> I have attached the SIMPLEST of applications.
>
> I have tried:
>
> log4j
> java.logging (commons)
> sl4j
> System.out
>
> I have followed the instructions on 100's of posts to this forum and others and NOTHING seems to work. nothing.
>
> I WOULD LOVE to see SOMETHING I am trying to print.
>
> Sorry to be such a whiner - just about ready to throw it in on Glassfish, tho.
> [Message sent by forum member 'drtubbygooberman' (drtubbygooberman)]
>
> http://forums.java.net/jive/thread.jspa?messageID=325849
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

drtubbygooberman
Offline
Joined: 2009-01-12

Thank you Jacob. I had a smoke and calmed down a bit.

I've attached a new zip containing my latest iteration (src's) as well as the server.log from a single run.

After deployment, the service is up and available. When I click test from the admin console in GF, the expect text box appears and allows input and it displays the expected message, except that testBean is *always* null, so the TestBean Spring bean is either 1) not getting loaded or 2) the testBean attribute is not getting injected. That's a completely different problem pointed to by the link in my original post.

Glassfish is being launched by IDEA like this:

/Developer/Applications/glassfish/bin/asadmin start-domain domain1

There are 2 console windows after launching called "SQL Console" (Don't ask me why) that displays this:

/Developer/Applications/glassfish/bin/asadmin start-domain domain1
Starting Domain domain1, please wait.
Log redirected to /Developer/Applications/glassfish/domains/domain1/logs/server.log.
Redirecting output to /Developer/Applications/glassfish/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server 9.1_02 (build b04-fcs)] with its configuration and logs at: [/Developer/Applications/glassfish/domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services Web ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://sam-loys-computer-2.local:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.

Connected to server
[2009-01-13 04:32:17,782] Facet Web: Facet is being deployed, please wait...
[2009-01-13 04:32:22,917] Facet Web: Facet is deployed successfully

The other is called Glassfish Log and is *always* empty...useless as far as I can tell.

I will try to launch it as you suggested and see what happens.

Thanks again,

Sam

km
Offline
Joined: 2005-10-28

Sam,

Jacob is confused between v2 and v3. In v2, there is no glassfish.jar. And clearly, you are running v2.

Something does not look quite right and if it is 10 MB, it's a problem for me to try out. Can you try the following, assuming that you have a single war file that contains everything:
- create the .war file using IDEA, say foo.war
- /bin/asadmin start-domain domain1
- tail -f /domains/domain1/logs/server.log in a separate console.
- /bin/asadmin deploy foo.war

Access the web application as http://host:8080/context-root ...

-Kedar

drtubbygooberman
Offline
Joined: 2009-01-12

Good morning Kedar. Thanks again for your kind attention.

I followed your instructions below. The output of the log file was exactly the same. When glassfish loads with domain1, it forks the process, thus depriving me of a console. Is the there a way to prevent that?

Also, should I be using version 3? Is that more stable?

Thanks you.

Sam

km
Offline
Joined: 2005-10-28

Sam,

I am sorry that the problem persists.

Yes, v3 might be worth trying. Can you please try it out.

But frankly, V2 should not have problem with this. You are sure that System.setOut or something like that is not called from within the application?

Thanks,
Kedar

drtubbygooberman
Offline
Joined: 2009-01-12

Well, Kedar, I downloaded and fussed with v3 most of the day yesterday. The services tab on the console disappeared, so I couldn't tell what was happening.

I simply bailed on Glassfish. I'm now using Tomcat and everything is working fine.

Thanks for your help,

Sam

km
Offline
Joined: 2005-10-28

Sam,

That's fine. You use what works. That's practical.

But to make GF better, I'd like to understand what your issue was. I must say that it has to do something with your application/environment.

May I request that you send me your environment, some details of your app and exact issue you are seeing? Please use km@dev.java.net/Kedar.Mhaswade@Sun.Com as the ID.

Hope you can help.

Regards,
Kedar

whartung
Offline
Joined: 2003-06-13

Yea, it's really interesting that a WAR that can deploy under Tomcat (particularly a "simple, sample" WAR), yet doesn't deploy under Glassfish. I'm curious to understand what the core problem is as well.