Thursday, February 24, 2011

AccuTimeCard for vWorker (RAC) crashes

The AccuTimeCard for vWorker (previously RAC – Rent A Coder) crashes when you first run it.

The exception dump is listed below is a Google-friendly search helper for people having the same issue.

I’m running Windows 7 (Ultimate) x64 and got this exception as soon as I ran the application. Thankfully, the application was written in .net so I was able to use the .Net Reflector to resolve the issue. The exception was occurring in the Form Load event in the application so I took that into disassembly in the reflector coming up with the following:

private void Form1_Load(object sender, EventArgs e)
{
this.Visible = false;
StringBuilder builder
= new StringBuilder();
builder.Append(
"-classpath ");
builder.Append(
".;");
builder.Append(
@"resources\jars\axis.jar;");
builder.Append(
@"resources\jars\commons-discovery-0.2.jar;");
builder.Append(
@"resources\jars\forms-1.1.0.jar;");
builder.Append(
@"resources\jars\jaxrpc.jar;");
builder.Append(
@"resources\jars\JMF2_1_1e\lib\jmf.jar;");
builder.Append(
@"resources\jars\org.apache.commons.logging_1.0.4.v200706111724.jar;");
builder.Append(
@"resources\jars\saaj.jar;");
builder.Append(
@"resources\jars\wsdl4j-1.5.1.jar ");
builder.Append(
"RacTimeCard");
string arguments = builder.ToString();
Process.Start(
"javaw.exe", arguments);
this.Close();
}





The offending line, the file it cannot find is, of course, Process.Start(“javaw.exe”, arguments); One quick check concluded that the path to the Java-Runtime was not present in my PATH environment variable.

Since non-technical people now use vWorker.com I will try to explain how to add this path to your own environmental variable PATH. These instructions are for Windows 7 and will likely work fairly closely to Vista (for those of you who are masochists and still use that OS Smile)

 

First, find your install of the Java runtime. Mine was located at: C:\Program Files (x86)\Java\jre1.6.0_13\bin. If you’re not using a 64 bit operating system it should be under C:\Program Files\Java\jre1.6.0_13\bin. Copy that path to your clipboard.

Open up your Control Panel and go to “System and Security”, “System”, “Advanced System Settings”. I’m sure there’s a faster way to do this but that’ll work for now. Go to the advanced tab: we’re getting really advanced now! Click on “Environment Variables”. In the second list box you’ll need to local your PATH variable. Double click on that and you should see something like the following when you’re done pasting at the end of your variable setting. Please note it’s very important you add a semi-colon “;” (no quotes) between the last path setting and your newly pasted path to your Java Runtime binary folder.

image

 

 

microsoft.NET Framework
The sistem cannot find the file specified
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at RacTimeCardLauncher.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
RacTimeCardLauncher
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/octa/AppData/Local/Exhedra/RacTimeCard/RacTimeCardLauncher.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

4 comments:

Rajamanickam Antonimuthu said...

I had used vWorker for more than 100 projects. But I never used Time Card.

Is time card mode having any advantage?

And, I had published a blog post about vworker review. If you get a chance share your vworker experience there.

Nick said...

Really Superb Post.....

Food Jockey is an iPhone App to let you discover food, eating places around you and as per your interest.

Unknown said...

Thanks Nick - hope it helped.

Unknown said...

I am working in https://www.xplace.com/ XPlace. Good conditions for freelancers!It has wide variety of job offers in different specialties and hourly pay is higher than on similar sites! Also the main thing on the site is no commission!