Sun application server crashes / Glassfish server crashes

June 27, 2008

Ok this is quite obscure so I’m sure that it will help someone.

We had a couple of Sun Application servers that we would start by logging into terminal services and starting the server manually (it was just the way they were set up).

Upon logging off of terminal services, the glassfish server would crash (obviously if you just close the terminal server session you are still running it and that was fine).

Solution:

Uninstall the glassfish/sunapp server and reinstall, make sure you check the box that says “Run as windows service.” and then the system won’t have a problem, however DO NOT use the start menu to stop and start the app server, use the administrative tools/services programme.

 


Solaris new version of SL Windlight

June 19, 2008

Click the page above for the new version of Second Life windlight for Solaris


Using SQL Server 2000 with Netbeans 6.1 (can’t see any tables)

June 16, 2008

Right

I’m just starting a HUGE project which has a SQL sever 2000 database at the back. So I configured up the SQL database and couldn’t see any tables…

The problem?

I needed to select the dbo schema not the name of the database. So your settings should be like this:-

Connection String: jdbc:sqlserver://192.168.100.11:1433;databaseName=(database name)
Schema (this is the important bit) : dbo

For some reason I mistook the Schema for the DATABASE NAME which in NB is a completely different thing.

I also tried the jtds driver and decided to use that - it’s open source and provides even faster connection.

Note that ODBC is old hat now and you should not use it as it’s really slow and probably ends up using the same sort of code you would use directly but with extra layers.

 

 


Resolution to Checkbox problem

June 4, 2008

Ok, I’ve just installed the latest patch upgrades to Netbeans 6.1 and it seams that checkboxes bound to boolean fields in MYSQL databases now work (WOOHOO!)

Just map the “SELECTED” property to the database field and make sure selected value is not set to anything (could be set to true if you like).

It also seems to be much faster with the compiled code for java server faces which is a big help.

I am marking bug:-

http://www.netbeans.org/issues/show_bug.cgi?id=132885

 

As resloved


Netbeans Board of Governance…please vote

June 3, 2008

I am nominated for the NB board of governance, please do vote if you are a NB user.

http://www.netbeans.org/community/articles/nbelections.html

Please do read through the profiles first and then vote for the person you think is going to make the right decisions etc. (I’m Paul Clevett BTW).

This is not one of those elections where I’m going to raise a “VOTE FOR ME” and start some huge election campaign. I just think that we should together vote for the people who will give the best to the community and there are some great people there. That is your judgement! Enjoy!

..and a short note that I didn’t post last week as I was on Holiday on the River with my boat so my NB playing was a bit limited. I am looking at bringing LISP into Netbeans at present probably using SBCL.

 

 


Deploying to the Glassfish Server…

May 12, 2008

Ok, so you’ve built your world cracking application, how do you get it onto the production glassfish server? You could ofcourse configure your netbeans to look at the server and just hit Deploy but that isn’t always possible. Sometimes the server is out there on a remote network or behind a firewall. Luckily its not rocket science.

1. Set up your db connections

Easiest way to do this is to run Netbeans and run your project. Then pull up the admin console to your current glassfish server in the web browser:-

http://localhost:4848

Username is normally admin password is adminadmin unless you’ve WISELY changed it to something else (which I always do ESPECIALLY on remote systems).

Now pull up the REMOTE glassfish server and copy the settings (sorry it’s manual!), you’ll need to create a connection pool (this is the thing that connects to the DB) and a JDBC resource to connect. Copy it from your settings, make any changes you need like the database server may be somewhere else.

Now deploy your application.

Click on Applications/Enterprise Applications then DEPLOY then you need to find the “dist” folder in the root of your project, and upload and deploy the file ending in .ear

TADA!

Incremental Deployment

Ok so what happens when we want to do an update - great news is you don’t have to log everyone out and make them wait for you to drink coffee, have a lunch break and update.

Simply Deploy the project under a different name then you can get them to login to the different URL. You could for instance have a redirect from a URL which you just change to point at the new site. Then as people relog they get the new version.

Ofcourse if you’re clustering just take the server offline you want to update. They will carry on on the other servers, do it one by one….and off you go.

Problems

Databases arghghhhghhgggh - If you can make sure your database username/password you used to develop on is the same as the one on your deployment server. Otherwise your Persistance Unit won’t work.

Copying the MYSQL driver to the right place - really it should be included in the setup of glassfish (Sun own MYSQL, Sun own App Server, 1+1=2?). Despite all the stuff around on where to copy that file (which I did) in the end I created a NB project on the server with some MYSQL an published it and that installed the driver and solved the problem.

In the end I have quite a nice set up where I set up my remote glassfish server in NB and published directly to the remote server - once you’ve done that updates are easy.

 


I’m speaking at JAVAONE in Second Life next Tuesday

May 1, 2008

http://blogs.sun.com/sdnblog/entry/communityone_and_javaone_in_second

About 3/4 of the way down “Using Netbeans in Industry”


MYSQL Workbench SE

May 1, 2008

Well, I downloaded the community edition of MYSQL workbench and stopped pretty quick when I realised you needed the standard edition to reverse engineer database structures….after a lot of paperwork and purchase orders I now have the full SE version.

Good Points

It’s quick
It looks great
It has a LOT of options
Reverse engineering the database was faultless and really made it quick for me to do a database diagram.
PDF export is standard

Bad Points

On a system with 2 screens work bench gets very confused about where the middle of the screen is. Us programmers have terrible double vision so we have two screens, one for the source and one for the run. So I had to switch back to using one screen then work bench sorted itself out.

Printing, would it print in landscape? no, in the end I popped out the diagram to PDF first then printed it from there.

Is it worth £60 a year? yes, without a doubt. It’s not perfect by a long shot but runs pretty well. Only other complaint is (SUN ARE YOU READING THIS?) I have to run it under Windoze but my operating system of choice is (SUN) SOLARIS. So the SUN Workbench really needs to work on the SUN operating system since it’s owned by SUN.

 


MySQL is Not pronounced MY SQL

April 29, 2008

Ok - this is not exactly hot news. But I went to an EXCELLENT seminar on Friday last week with Sun and MYSQL. Which according to the founder is pronounced “MESQL” as the “MY” is the name of his daughter. Well, translated it’s “MY” not “ME”, I tried saying MESQL but it makes me sound like a Texan. (sorry if you Texan). So I’m sticking to MYSQL.

They spent a lot of time trying to convince us that the open source software model (that Sun use) is the way to go for software. You know, install it, make it work - if you want support pay for it. I liked this for a number of reasons and didn’t like it for other reasons.

Why I Like Open Source

- Customer and you can get the software, run it, test it, see if it’s what they need and then upgrade to a commercial license and support whent they are happy
- Customer can get the “best of breed” and mix and match
- Source code is available if supplier goes bust (ok, I know Sun & MYSQL are not going bust but it’s a thought)
- For the developer its less pressure than working on a project where you are up against deadlines for a client. However this also means the development may be less focussed on solving a particular problem, one of the comments was that Open Source payroll “Isn’t mature enough yet”, well that’s fine but its not cheese. It won’t just mature, someone, somewhere has to fund the development (see bad points). In this model:- 

a. Customer pays a license fee to use the commercial version (they call it Enterprise in the Open Source World)
b. Customer pays a support fee to use the commercial version - or hires in house people to support it
c. Customer pays when they are happy or at least ready to get professional help.
d. I like the 15 minute rule, if I can’t install it and have it running in 15 minutes (even though it mike take 2 hours) to download then its probably not ready.
- Open source is better for the smaller company because they can get other developers to contribute and people to file bug reports for example when something is not working.
- Open source means that developers get recognition in the developer community for work they have done especially if it is pioneering. Developers need encouragement and sometimes in a small team they don’t get it. Especially being the only developer in a company, it’s unlikely that those outside of the software engineering world have any understanding about the elegance and effort put into a peice of software, I’ve seen bad software that looks great but is terrible and great software that looks terrible but works like a dream. (often us developers need to hire a designer!).

Bad Points about open source

- Developers need to feed their kids - so unless someone funds the development then Developer doesn’t feed kids until someone pays a support contract, most developers are not rich enough to live on thin air.
- Unless someone funds it a project may take longer to develop than with the conventional hire a developer model and not be “quite” what the customer was looking for in the first instance. Thus the best open source software is the GENERAL stuff, that is not focused on doing a specific job, like payroll or transport. Because from the base platform you can build up to do something specific.

So, it’s scarey and nice at the same time. Yes, I love open source but Yes, I need to be paid to develop so I can feed my family (and they are hungry, especially the cat).

So what about MySQL itself, well it’s great, thats all there is too it. I love the way I can change database engines PER TABLE which means that for instance if I have an archive I can just use an archive database, I love the clustering, I even like the logo. Good job.

Sun buying it? Well I wrote an article about this on this blog anyway so you can trawl through if you like and read it.

Great Seminar, well worth going, only thing was, not enough freebies. Good grief Sun I travelled an hour accross London. I expect at least a CD and T-Shirt, not just a pen! A PEN!, ok they were giving away an IPhone, which was nice but I never found out who got that. I guess one of the big banks who were there.

If you fancy doing the presentations to yourself you can download them here.


Build Plugins for Firefox EASY!

April 24, 2008

http://wiki.netbeans.org/MozillaAddonDevelopment

Funnily enough there are not a lot of plugins that make me excited but this one does! You can build plugins for Netscape and other products USING OUR BELOVED NETBEANS!

Short post but high quality!