You have to hand it to Mike Myers! Vanessa Kensington: Mr. Powers, my job is to acclimatize you to the nineties. You know, a lot’s changed since 1967. Austin Powers: No doubt love, but as long as people are still having promiscuous sex with many anonymous partners without protection while at the same time experimenting with mind-expanding drugs in a consequence-free environment, I’ll be sound as a pound!
In order to have an effective build environment we must check-in all the resources needed to build the project from scratch; this includes support libraries and support applications. For example one of my projects arrives as an installable deliverable, but in order to create it we need a Java compiler, Java source, property files, NSIS (A scriptable win32 installer/uninstaller system by Nullsoft), Doxygen (documentation generator), JUnit (unit tester) and a whole host of support libraries. So in order to truly build the project from scratch all these products need to be saved. Clearcase, while being an excellent source controller, leaves a lot to be desired when it comes to importing a directory structure into its control. So lets pretend that we have just finished off our testing and it’s check-in time. For the sake of space I’ll only show you how to check in one of the set of support applications, in this case JUnit. Our support software is located at:
Z:\java\libs\junit\latestI would like to import it into:
Z:\java\libs\junit\junit-4.7and then create a clearcase symbolic link called latest to point to
junit-4.7. This is a really handy way of testing new libraries without changing lots of aspects of your environment.
- Firstly find out what the name of the view is that you are going to import into. In my case “t2_6_14″.
- Open a command shell as the VOB owner using the command:
runas /user:research\ccadmin cmd
- You are now logged in as the VOB owner so your Z: drive (with the shell) is gone. You only have the K: drive which is used by the views directly.
- In the location where you want to do the import, create a folder with the same name as the folder you are importing e.g.
- Run the import command with full paths:
clearfsimport -recurse k:\t2_6_14\java\libs\junit\latest\* K:\t2_6_14\Quentin\ManagerLibs\junit\junit-4.7
- Hopefully, it should start chugging away.
- When it has finished delete the latest folder.
- Oddly the directory you created will be renamed to “junit-4.7.keep” and a new folder will be created by clearcase called “junit-4.7″, and this will contain the imported files. It is now safe to delete the unchecked-in “junit-4.7.keep”
- As a final touch we will create our symbolic link to join “junit-4.7″ to “latest".
- Checkout parent folder:
- Run the link command:
cleartool ln -s junit-4.7 latest
- Lastly, check in the junit folder.
Got attacked by a virus which went straight through Firefox’s defences then straight through McAfee’s defences then destroyed half of my machine. It’s still not running right, but I think the virus is now gone. The virus attacked my Java installation and destroyed the classpath. When I tried to run Eclipse it flashed the splash screen and disappeared. There did not appear to be any error message from Eclipse to give me a clue as to the problem so I had to run Eclipse from the command line to find out what was going on.
- Open a command prompt
- Change directory to the root of Eclipse’s installation e.g.
- Call the Eclipse executable directly e.g.
Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/ObjectMy normal java setup still appeared to be fine, it was just Eclipse that wasn’t working. So I tried running Eclipse from the command line, avoiding the eclipse.exe executable. I used the following command line to kick start the equinox package manager and launch Eclipse. In my example I’m using Eclipse 3.5 Galileo, but in your version of Eclipse the launcher version may be different.
java -jar plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jarThis worked and launched Eclipse, but it immediately started to have problems with Java heap space which in turn caused problems for Background Indexer Crash Recovery and Initializing SpringSource Bundle Repository index. I eventually had to kill it. Next, I tried launching Eclipse with extra command line options found in eclipse.ini:
java -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m -jar plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jarIt seemed to work, but then I got:
Error while logging event loop exception: java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:183) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:576) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:477) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:465) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:445) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:452) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$CopyToClipboardEnablementPolicy.canCopyToClipboard(CopyToClipboardAction.java:333) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$CopyToClipboardEnablementPolicy.canCopyAllToClipboard(CopyToClipboardAction.java:324) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$CopyToClipboardEnablementPolicy.canEnable(CopyToClipboardAction.java:312) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction.canEnable(CopyToClipboardAction.java:134) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction.selectionChanged(CopyToClipboardAction.java:100) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:262) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:257) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1160) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1190) Logging exception: java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen spaceI tried increasing the memory allocations with:
java -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx700m -jar plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jarbut it just delayed the problem. The next stage was to remove Java from my system. The current installations were corrupted to the point that I couldn’t use the Add or Remove Programs to uninstall them. I used regedit to search the registry for any entries that contained references to Java/JDK/JRE and deleted them. To end the clean up I deleted all the installation files from disk. Finally, I installed the JDK. I placed the JDK in
c:\Java\Java\jdk1.6.0_16and let the installer choose the location for the JRE. Re-ran the Eclipse’s shortcut and all was well.
I was looking through my Control Panel, doing a bit of house keeping and saw an entry I didn’t recognise. The title was just “0.2″! I wanted to get the properties of it and find out what it was. Unfortunately there is no right-click properties, so how can I find out what the entry in the Add and Remove Programs actually points to? And once I have found it can I rename it to something more sensible? But where do I start? Registry criteria for inclusion in Add or Remove Programs An entry will appear in the Add or Remove Programs (part of the Control Panel) if the following requirements are satisfied:
- There is a key in the registry location:
- The key contains a String Value called DisplayName which is not empty.
- The key contains a String Value called UninstallString.
key and search for “DisplayName"="<what ever is in the control panel list>". As it turned out the entry titled “0.2″ was pointing to GenIconXP, which is a discontinued Open Source Project. Its installer had added the wrong name. I went into the registry (with regedit) and opened up
and changed the DisplayName from “0.2″ to “GenIconXP 0.2″. Loaded Add or Remove Programs and it now displayed the GenIconXP’s title in a more user friendly manner.
Creating a MySQL user that can only access a particular database instance, is a bit tricky to do from the MySql command line. Fortunately, the people at Plesk have added it into the appliance administration software. Previous incantations of the Plesk software tried to tackle adding database users, but it wasn’t obvious or straightforward how to go about doing it. Plesk 9.2.1 has come along in leaps and bounds and is much easier to use. Here is a step-by-step guide for adding a MySQL database, and adding a MySQL database user to access it.
- Log in to the Plesk interface as admin.
- Click Domains on the left hand side.
- Select the domain you would like to add the database instance too from the list on the right hand side.
- Click the Applications & Services section header and select Create Database.
- Fill in the form call the database name something like example_com_my_db_name and click ok.
- You will be forwarded to the section that allows you to create users, so click the Add New Database User.
- Fill in the user name and passwords, then click ok.