There are two things I noticed in the code.
First, your frame isn't a "UIPanel". From what I know, UIPanels are some of the build-in frames, like the character, friends, honor, macros, spellbook etc ones. They are those who hide on "escape" and hide each other when you try to show more than two at once.
I might be mixing them, but anyway, to show a "non-special" frame, use FrameName:Show()
UIPanels being handled differently, I think that it's not strange to get an error, even if I haven't checked where exactly it comes from.
Also, the files in your .toc will both be loaded, in the order specified. So it will load your lua and your xml files. If you had the <script> tag in your xml file linking to the same lua file, the lua file will be loaded twice (edit: but it's not what can cause your error, it's just a little note aside).
2nd Edit:
I just pictured I didn't answer about why your frame isn't shown:
It probably is, it's just "empty" somehow. You should add textures or colors to it.
To do so, you have to add something like:
Code:
<Layers>
<Layer level="ARTWORK">
<Texture name="texture name 1" file="file location 1">
< some fields (like anchor etc)/>
</Texture>
<Texture name="texture name 2" file="file location 2">
< some fields />
</Texture>
</Layer>
</Layers>
Here is a good link for a list of most of the fields you can change:
http://www.wowwiki.com/Widget_API
Edit: corrected the xml code a bit.