Glass fish server not starting - java

Hi am creating a web application using NetBeans 6.9.1 IDE and am trying to deploy GlassFuish server without success.

I know this sounds silly, but are you sure Glassfish won't start? It is under Start/Programs/Sun/Start Default Server.
If that is what you are doing, I want you to know that I have had a problem with GlassFish not starting. You may want to check your log to see what kind of error you are getting Sun/AppServer/domains/domain1/log/server
Review that and see what that says. It may be giving you a bunch of different errors. In general, though - if she won't start she needs to be uninstalled.
So, uninstall both applications.
Before you install anything make sure that you have the correct jdk installed. For instance, if you are installing NetBeans 6.9.1 IDE, go back and check to make sure you are installing the correct JDK first. I am sorry I don't know what JDK goes with this, but if you check the page/documentation for NetBeans 6.9.1, it should tell you.
Hello, try a custom deployment after, when you do the custom install, since this is a bundle, uncheck the following:
Prelude (Sun GlassFish Enterprise Server v3 prelude) -- if you see that, if not, just keep going.
Also, do you have any system or environment variables that need to be set? What os are you working on?

Related

Adding Glassfish Server 5.0 in netbeans 8.2

When i specify the directory of Glassfish 5.0, i get this message in the IDE :
No usable default domain. Use Next to create a personal domain.
But, there is already a domain (domain1) and i don't want to create another one.
My question is : How to solve this problem ?! Or how can i make Netbeans find the existing domain ?
After a lot of research, it turned out, that, to be able to perform such task, you have to run NetBeans 8.2 as Administrator (under Windows). If you do so, the "No usable default domain. Use Next to create a personal domain." will not be displayed.
I hope it can help other people.
Run your NetBeans 8.2 as administrator then this problem will be solved..

Why Java Applet working only on my computer, but not on the others?

I just wonder something about java applet with awt. I quite disappointed with this problem and want to throw it away sometimes. Below are my descriptions:
I already created one application using java applet with awt controls on my own computer, let's say computerA using Window 7 32bit Operating System. To up and running this application, I update java version to the latest one.
Application is working fine with computerA. However, this application also need to run on the others as well. As my own situation, I run with another computer, let's say computerB using Window 7 64bits Operation System. I knew that the application created with 32bits java version, thus I decided to install this java version on computerB. However, when I run the application it can only display interface on browswer, but some of its function did not work.
Yet I didn't throw it away, I decided to configure in the last computer, let's say computerC. This computer use Window 8 32bits Operating System. I did configure as I did with computerA and computerB. The result is still exact as computerB.
I also checked up this solution on here, but it is not fit my problem.
Here are my questions:
What is the exact problem on here?
Where does the problem come from?
Is it solvable?
How can I solve this kind of problem? Any helps?
Update:
PostgreSQL Database also install in other local computers as well.
I noticed that If I convert my code into eclipse project, it worked fine. No problem at all.
Thanks in Advance.

Debugger not stopping at breakpoints: Websphere in Eclipse

I've recently had my app moved from Websphere Application Server 6.1 to WAS 7.5, due to end-of-life for 6.1. Consequently, I needed to update my debugging server. I found this to be an opportune time to move my application from an IBM RAD IDE to Eclipse (already had Indigo installed). Or so I thought.
Anyway, the powers that be, here, have recommended taking my debugger all the way to WAS 8.5, since I'm only using it to debug.
But the issue that I'm encountering is that I cannot get the debugger to stop on my breakpoints. I've got approx. 10 breakpoints in my opening page, all in JSP/Java code.
I'm running Java 1.6.0_32 and Java SE Runtime Environment build 1.6.0_32-b05. I really don't know how to check which JDK I've got loaded. I've seen recommendations to "go back" to JDK 1.5, but I can't be certain that's not what I'm running.
And to cover a few other bases, I have JUST started my system for the day, opened the IDE, started the server in debug (says "Debugging, Synchronized"), put focus on the opening page of the application and clicked "Debug on server". The front page opens without stopping at any of the breakpoints.
Does anyone have ideas or suggestions?
If you use eclipse's debugger and running the application outside eclipse environment , we have to configure it as remote java application.
Also check if the code deployed in server is in sync with the one present in workspace.
anything wrong of the ecplise's site.
Run->Skip all breakpoints
Well, I had recently faced this problem, where the code did not use to stop at breakpoints while I was in debugging mode and was sure that the particular piece of code is executing. In order to solve the problem, I did a clean-build-republish but it did not work, recreated the profile and readded the server with new profile, still did not work then finally re-installed RAD and web-sphere but It still did not work. Then I found the below article
https://www-304.ibm.com/support/docview.wss?uid=swg21240896
and realized it could be a problem due to some other OS process interfering with debug process/port so I performed a system restore. After restore when I deployed the application, debugger started working properly.
I'd like to say I found the answer to this, but I never did. I ended up dropping RAD and moving to debugging on Jetty. My local testing isn't EXACTLY as it would be on the test server, but it works. Not sure if this should be flagged as "answered" or not.
UPDATE: I have left this project but before I did, the entire development platform was moved to IDEA and debugging was no longer an issue. I don't know if I should find a way to mark this question as inactive or closed or whatever so that it's not just sitting out here getting views and responses when it's no longer an issue for me.

JavaDB dual installation

on WIN XP SP3 and Netbeans 6.7.1 IDE,
I have installed Java SDK 6.17 which includes JavaDB. I set the JavaDB directory to ...\Java\JavaDB at the Java installation script with %DERBY_HOME% set accordingly and %PATH% including %DERBY_HOME%\bin
Later on I installed GlassFish-V3 Prelude which - surprise surprise - comes with its own JavaDB and silently installs that into a JavaDB directory under the GlassFish path.
Q's
I don't want to have duplicates. Can
I remove one of these installations
without spoiling Netbeans.
How can I verify which of the two
JavaDB's Netbeans is actually using
Can I eventually configure GlassFish
in a way to use the JavaDB I
installed as part of the SDK
Thanks for any hints (as on superuser.com I didn't get any replies :-( )
I don't want to have duplicates. Can I remove one of these installations without spoiling Netbeans.
If really you want to remove one of them, I'd suggest to remove the one that comes with your JDK and to leave the one bundled with GlassFish v3 (GlassFish expects it to be there when using some commands which can be extremely handy, e.g. during development). But honestly, I wouldn't spend too much time for the 4.5 MB extra space used.
How can I verify which of the two JavaDB's Netbeans is actually using
To verify, go to the Services tab, expand the Databases node and right-click on Java DB and select Properties.... You should get the following window:
alt text http://netbeans.org/images_www/articles/65/ide/java-db/javadb-props.png
As documented in Working with the Java DB (Derby) Database, "If you have the GlassFish Server registered in your NetBeans IDE installation, Java DB will already be registered for you."
Can I eventually configure GlassFish in a way to use the JavaDB I installed as part of the SDK
I don't know, but... why would you do that, why is it such a concern, don't you think you're wasting your time? Now, as I said, if this is really an issue, remove the version bundled with your JDK instead.
PS: GlassFish v3 is out, GlassFish v3 prelude is outdated, you should upgrade.
MikeD!
After many years, I am using NetBeans again. As I realized many features are included but others get "lost". I am planning to install several versions.
In NetBeans 6.7.1, to know what version of Java DB NetBeans is using, right click the Java DB node and ckeck the properties.
The path next to the label Java DB Installation tells you what installation is currently in use.
The path next to the label Database Location is used as the value for the property derby.system.home. This property tells Java DB where to create/find the individual databases folders. Besides, this folder holds two files called derby.properties and derby.log.
*derby.properties* establishes persistently system-wide properties.
Do not worry about duplicates. As you can see NetBeans uses 1 at a time. Nevertheless, as a recommendation, choose an installation and stick to it. During my tests I changed the path to the Java DB Installation several times and played with the user authentication properties inside derby.properties and eventually NetBeans could not create new databases in the regular way. So, I had to re-install NetBeans (I use the OS independent zip).
Regarding GlassFish, I have not experimented yet. But, it is reasonable to think that there is some limited set of options about using a different version of Java DB. For example, NetBeans 6.7.1 Java DB support fails if you set the netbeans_jdkhome property so that it points to a JDK version equal or higher than 1.7.0. That tells us something, right?
I will try to tell you anything useful I find out during my tests.
George

Launching Eclipse as a debugger

What’s the equivalent of
System.Diagnostics.Debugger.Break();
in the Java world?
Purpose: I have a tomcat based webapp launched by a custom build tool and need to debug the application in eclipse. In the .net world the above statement when encountered will prompt the OS to attach a debugger and I can attach Visual Studio to debug. I am trying to achieve the equivalent in java with eclipse
Here's an excellent article on remote debugging using Eclipse. They even have a section discussing Tomcat.
Here's a link that I used to debug web apps on Tomcat. It goes through installing Eclipse, Tomcat and Java and then setting up Tomcat to run in Eclipse. Towards the bottom explains how to debug a servlet in Eclipse.
http://www.windofkeltia.com/j2ee/wtp-tutorial.html
In general the Java program cannot tell if the JVM runs in debug mode or not, and there is no way to from your program to say that you always want to start a debugger HERE.
You can, however, tell the DEBUGGER that you want to have a breakpoint at a given location, and you will then enter the debugger when the program reaches that spot.
EDIT: You will need to investigate your launcher to see how you can trick it to contain the options needed to enable debugging in the JVM. You may also see if jvisualvm can give you the information you need as it can attach to an unprepared Sun JVM.

Categories