Wednesday, September 30, 2009

Oracle 10g not for testing

Update 2009-10-01: If you run into the following story - you have to run Oracle 10 g on Windows Server 2003 R 2 - Use Oracle Database 10g Release 2 (10.2.0.1.0)

2009-09-28: Just a "quick" install of Oracle 10g Standard Edition (10.1.0.2.0) on a virtual server to test creation of a database from a template built off an existing oracle database instance on another server.

The installation reports a Java VM installation error "details in hs_err_pid.log" Update 2009-10-01: the log does not appear to exist on the machine D:\oracle\product\10.1.0\db_1\BIN\*.log.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77BD8FA7
Function=wcsncpy+0x16
Library=C:\WINDOWS\system32\MSVCRT.dll ...


The DBCA - Database Configuration Assistant works for every activity except when walking through the process of creating a database from a template... When Step 10 of 12 : Initalization Parameters is set to hit NEXT (good bye DBCA) - No Log, No Warning, Nothing - just a gone DBCA.

Attempt to reinstall the tool (installer - custom - show all - reinstall) provides you the same none descriptive Java VM installation error message.

Google searches on "Java VM installation error", "Oracle 10g installation error", "Database Configuration Assistant Crashes" leads one to believe this is a known bug in Java HotSpot VM - bug where is a simple to understand download/update of it?

The best that I can understand is that this is a known bug in Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) that is causing the crash.

From what I see via Oracle and Sun – Java "Support" {build 1.4.2.x is very old – upgrade to a newer version}

I wonder where to get the newest build of 1.4.2.x, old from Sun’s perspective, but what Oracle 10g R1 is using.

http://www.oracle.com/technology/products/oraclenet/pdf/ADsupport_10g.pdf
Oracle® Database
Platform Guide
10g Release 1 (10.1) for Windows
Part No. B10113-02
June 2004

Section 3.2 Pg 51, 52

Creating a Database on Windows Using Database Configuration Assistant
Oracle recommends you use Database Configuration Assistant to create a database,
because it is easier. It offers the same interface and operates the same way on all
supported platforms, so no step-by-step procedures or screen shots are included here.
Database Configuration Assistant enables you to:
■ Create a Database
■ Configure Database Options in a database
■ Delete a Database
■ Manage Templates
An initialization parameter file is an ASCII text file containing parameters. It can be
used to create and modify a database using command-line tools. When you create a
database using Database Configuration Assistant, a server parameter file (SPFILE) is
created from the initialization parameter file, and the initialization parameter file is
renamed. Oracle does not recognize the renamed file as an initialization parameter file,
and it is not used after the instance is started.
If you want to modify an instance created with Database Configuration Assistant after
it starts up, you must use ALTER SYSTEM statements. You cannot change the SPFILE
itself, because it is a binary file that cannot be browsed or edited using a text editor.
The location of the newly-created SPFILE is ORACLE_BASE\ORACLE_
HOME\database. The SPFILE filename is spfileSID.ora.
See Also: "Managing Initialization Parameters Using a Server
Parameter File" in Oracle Database Administrator's Guide

Saturday, September 12, 2009

FileUpload failed in Firefox worked in IE6, IE7, IE8

I am not a graphics designer and most of what I consider to look professional and clean is not what is approved for a web based user interface. It was therefor a massive pain in my rear end to take a mess of hobbled together presentation that started very clean and concise from an extremely good web designer and was completely mucked up by stakeholders into a CSS 2.1 compliant presentation that looked consistent on IE 6, IE 7, IE 8 and Firefox.
Getting the presentation right for Firefox handled IE 7 actually, but took a lot of work and only minor modification via conditional overriding CSS sheets was needed for IE 8 and IE 6.
The thing was, we found that one particular piece of functionality, an ASP.NET 2.0 Web Application FileUpload process was not working in Firefox.

The cause was the rendering of the HTTPInputButton used to trigger the FileUpload clicked event. The original code which works fin in IEs was

<input type="button" runat="server" id="btnUpload" value="Upload File" onclick="this.disabled=true; this.value='Sending...'; document.aspnetForm.submit();" />

The fix was to switch to call this.click; which renders as a _doPostBack method in IE 6,7,8 and Firefox 3.5.x browsers

<input type="button" runat="server" id="btnUpload" value="Upload File" onclick="this.disabled=true; this.value='Sending...'; this.click;" />

I’ve found a lot of resizing issues to cope with, but at least the functionality is back on track.

Silverligt 3 ComponetOne ASP.NET 2.0 Integration

Silverlight 3 requires user-initiation for opening file dialogs operations
User-initiated operations in Silverlight by Ashish Shetty On Saturday, May 09, 2009

Silverlight 3 will not honor user-initiated operations that start from an HTML element, have a JavaScript handler which calls into a Silverlight scriptable API or other such endpoint.

Which means a completely natural integration of a Muliple File or File Part upload tool such as ComponentOne's Silverlight Uploader into a click event on an existing ASP.NET 2.0 web application to meet user requirements will require rethinking, rewriting and probably more steps for the user than the stakeholder wants the user to take, unless I pull together a credible workaround that does not require knowledge and/or action on the part of the user.

So currently a user clicks an ASP.NET 2.0 Web Application Page GridView Record Button which should launch Silverlight 3.0 ComponentOne Silverlight Uploader process which would open one or many files, load and catalog them. Of course, this throws the "User-Initiated" SecurityException.
If however you click a button in the embedded silverlight panel the process works and the presentation works.
The original design was ten upload inputs with an associated drop down list to pick the associated transcript header record (GridView Record) waiting at the bottom of the page.
It appears I'll have to keep that design, with a dropdown list and button within the Silverlight panel and do the presentation by transcript header record.
It still seems chunky - unclean - to me.

Thursday, September 10, 2009

ASP.NET Session state is not available in the current context

I actually ran into the issue discribed in Siderite Zackwehdex's Blog: Session state is not available in the current context

An almost duplicate reprint of his article with my own specific account wired in follows ...

An ASP.Net web site that was recently switched to ASP.Net 3.5 and is suddenly returning "Sys is undefined"
Upon entering the url of the offending item into the browser address bar the ASP.Net error page displays "Session state is not available in this context.".

The reason - in global.asax - code was attempting to work with Session.
The error was returned by the Session property of the HttpApplication object, the one that the global.asax file represents!

First mistake: there was Session property available and it was immediately assumed that is the same as Page.Session or HttpContext.Current.Session. While the HttpApplication Session is nearly identical, it throws an error if the underlying Session object is null.

Ok, but why is Session null? You are a smart .Net developer and you know that the Session should be available in that event. Any documentation says so! Well, yes, but it applies to your page, not to all the IHttpHandler implementations, like the ScriptResource.axd! The css and image problems only occured for me only when seeing the site in Cassini, not in IIS, so maybe it opens separate threads to load those resources and ignores the session or something, at least at that level.

Well, how does one fix it? Adding in global.asax a condition on Session not being null throws the same error. Ok, then add it on HttpContext.Current.Session. In other words:

if (HttpContext.Current.Session!=null) //do stuff with sessions.

Maybe this problem occurs in other places as well, but only the Session property of the HttpApplication will throw the "Session state is not available in this context." error.