Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Wednesday, February 27, 2008

Installing BEA WebLogic on Mac OS X

WebLogic Server is not supported on Mac OS X, but you can still run WebLogic on Mac OS X and here is how. (Of course I wouldn't doing this in production, but doing this in development should be fine.)

  1. Download WebLogic Server listed in the Package Installer section. In the Select OS drop-down, choose IBM AIX. This will give you the WebLogic generic package.
  2. From the command line, run: java -Dos.name=unix -jar server922_generic.jar. Follow the wizard to complete the installation.
  3. Edit the file ~/bea/weblogic92/samples/domains/wl_server/bin/setDomainEnv.sh look for the line where the MEM_ARGS environment variable is set. Add this declaration: -XX:MaxPermSize=128m.
  4. Start WebLogic: ~/bea/weblogic92/samples/domains/wl_server/bin/startWebLogic.sh. Once the server is started you will see the following message on the console: Server started in RUNNING mode.
  5. Access your instance of WebLogic at http://localhost:7001/. You should see the WebLogic "getting started" page.
To deploy a web application (war file):
  1. Uncompress the war file in the directory where you would like the application to be deployed.
  2. Go to the WebLogic Administration Console from http://localhost:7001/console/. The default login/password is weblogic/weblogic.
  3. Click the Lock & Edit button (top left).
  4. Under Deployments select Install.
  5. Select the directory you created in #1. Two screens later, under Source accessibility, make sure you select the radio button I will make the deployment accessible from the following location. This way WebLogic won't copy your web application to its own private directory but will instead use directly the files in the directory you mentioned.
  6. Finish the deployment, save. Under Deployments, start the application.
  7. Access your application from http://localhost:7001/orbeon/, if orbeon was the name the directory you choose in step #5.
Once your application is running, you might want to monitor the following log files:
  • ~bea/weblogic92/samples/domains/wl_server/servers/examplesServer/logs/examplesServer.log - The main WebLogic log file.
  • bea/weblogic92/samples/domains/logs/orbeon.log - If the application you are deploying is Orbeon Forms, then this will be the location of the Orbeon Forms log file.
References:

Wednesday, December 12, 2007

IntelliJ: Showing Unversioned Files

Q: With IntelliJ, how do you know what are the files you have on your disk, but that are not checked in your Subversion repository?

A: Simple, go the menu Windows, Tool Windows, Changes. In the Changes window, make sure you are looking at the Local tab. There you will have the list of the files you have on disk, but that are not checked in. You can see this as a flat list, or organized by directory, as shown in this screenshot.

Monday, November 12, 2007

Can't switch betweens files in IntelliJ with Leopard

I still haven't upgraded to Leopard. Call this prudence. So far the reports I have read have been mostly positive. Many were disappointed to see that Leopard didn't ship with Java 6, but it looks at least like Java 5 is running pretty well on Leopard.

With one exception: in some cases (all cases?), you can't switch between multiple files you have open in IntelliJ. This unfortunately is a major issue. One workaround is not to use the Mac OS X look & feel. I am not sure if this is a complete blocker for an upgrade to Leopard, but I will sure wait a little longer and see what happens with this one.

Update Nov 13, 2007: Great news: Dmitry mentioned in a comment that this issue should now be fixed in the 7.0.2 EAP build. Thank you Dmitry. For sure, those IntelliJ guys aren't sleeping!

Friday, November 02, 2007

Vote for Java6 on Leopard!

As The Sun BabelFish Blog puts it:

Java developers on OSX are upset at Apple's silence as to its intentions with respect to the release of Java 6. There used to be a developer preview available, which was pulled recently with no indication as to when a replacement would be available.
They started an open petition to get Apple to realize how important the Java platform is for Mac users. So here is my vote:
13949712720901ForOSX
Now make sure to vote yourself.

Thursday, October 18, 2007

IntelliJ Plugins

JetBrain released IntelliJ 7. I upgraded, and in the process had to reinstall some of the plugins I have been using in the past. Here are the plugins that I find the most useful:

  • Auto-Format Text - Adds to IntelliJ the ability to reformat text. This is particularly useful when editing Javadoc comments or files with free text paragraphs (like text files or XML document). (Sorry for the shameless plug: I wrote this one years ago, and still find it very useful.)
  • DragNDrop - This plugin will allow a user to drag and drop files into the main pane of IntelliJ.
  • Axis TCP Monitor - Monitor your HTTP connections and check exactly what is going through the wire.
  • TabSwitch - Lets you switch between buffers with ctrl-tab, in the same way you would switch between applications with alt-tab.

Monday, August 20, 2007

Tomcat and Symbolic Links

I didn't expect Tomcat would really care about symbolic links. Say you put together a web application in a directory and want to use a web.xml you have elsewhere. Instead of copying web.xml to the WEB-INF directory, you create a symbolic link.

You would expect this work out of the box, wouldn't you? Well, no. For security reasons Tomcat won't follow your symbolic links, unless you specify on the Context of your web application allowLinking="true", as in:

<context path="/my-app" docBase="/Users/avernet/my-app"
allowLinking="true"/>