RavenDB Importing dump files

194 views
Skip to first unread message

greg

unread,
May 16, 2012, 5:41:38 AM5/16/12
to ravendb
When I export my database file using:-

Raven.Smuggler out http://localhost:8080 categories.raven --
database=Category

I get my categories.raven dump file as expected. I can import this
using:-

Raven.Smuggler in http://localhost:8080 categories.raven

Now this works and impoprts the data into the Default database but I
want to import into a test database as follows:-

Raven.Smuggler in http://localhost:8080 categories.raven --
database=test

I get an InvalidOperationException: could not parse Json error

Any idea Why I cannot do this, something obvious I am missing perhaps?

Thanks
Gregor

Itamar Syn-Hershko

unread,
May 16, 2012, 5:43:12 AM5/16/12
to rav...@googlegroups.com
Greg, can you try Smuggler from the latest unstable?

Itamar Syn-Hershko

unread,
May 16, 2012, 5:44:19 AM5/16/12
to rav...@googlegroups.com
And a full stack trace for the current error would be nice to have, too

greg

unread,
May 16, 2012, 5:55:30 AM5/16/12
to rav...@googlegroups.com
I was using build 888 and exported Categories.raven dump file from a tenant called Category - then tried to import into a new tenant called test.
 
And here is the full stack trace:-
 
D:\RavenDB\RavenDB-Build-888\Smuggler>Raven.Smuggler in http://localhost Categor
ies.Raven --database=test
System.InvalidOperationException: Could not parse json:
<html>
    <head>
        <title>A potentially dangerous Request.Path value was detected from the
client (:).</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:bl
ack;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5p
x}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red
}
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maro
on }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy;
cursor:hand; }
        </style>
    </head>
    <body bgcolor="white">
            <span><H1>Server Error in '/' Application.<hr width=100% size=1 colo
r=silver></H1>
            <h2> <i>A potentially dangerous Request.Path value was detected from
 the client (:).</i> </h2></span>
            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>An unhandled exception occurred during the exec
ution of the current web request. Please review the stack trace for more informa
tion about the error and where it originated in the code.
            <br><br>
            <b> Exception Details: </b>System.Web.HttpException: A potentially d
angerous Request.Path value was detected from the client (:).<br><br>
            <b>Source Error:</b> <br><br>
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code>
An unhandled exception was generated during the execution of the current web req
uest. Information regarding the origin and location of the exception can be iden
tified using the exception stack trace below.</code>
                  </td>
               </tr>
            </table>
            <br>
            <b>Stack Trace:</b> <br><br>
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>
[HttpException (0x80004005): A potentially dangerous Request.Path value was dete
cted from the client (:).]
   System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +11494187
   System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +184
</pre></code>
                  </td>
               </tr>
            </table>
            <br>
            <hr width=100% size=1 color=silver>
            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.
0.30319; ASP.NET Version:4.0.30319.272
            </font>
    </body>
</html>
<!--
[HttpException]: A potentially dangerous Request.Path value was detected from th
e client (:).
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext
context)
--> ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered w
hile parsing value: <. Line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue() in d:\Development\Releases\Jso
n\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 1117
   at Newtonsoft.Json.JsonTextReader.ReadInternal() in d:\Development\Releases\J
son\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 557
   at Raven.Json.Linq.RavenJObject.Load(JsonReader reader) in c:\Builds\RavenDB-
Stable\Raven.Abstractions\Json\Linq\RavenJObject.cs:line 149
   at Raven.Json.Linq.RavenJObject.Parse(String json) in c:\Builds\RavenDB-Stabl
e\Raven.Abstractions\Json\Linq\RavenJObject.cs:line 232
   --- End of inner exception stack trace ---
   at Raven.Json.Linq.RavenJObject.Parse(String json) in c:\Builds\RavenDB-Stabl
e\Raven.Abstractions\Json\Linq\RavenJObject.cs:line 238
   at Raven.Abstractions.Connection.HttpRavenRequest.SendRequestToServer(Action`
1 action) in c:\Builds\RavenDB-Stable\Raven.Abstractions\Connection\HttpRavenReq
uest.cs:line 183
   at Raven.Abstractions.Connection.HttpRavenRequest.ExecuteRequest() in c:\Buil
ds\RavenDB-Stable\Raven.Abstractions\Connection\HttpRavenRequest.cs:line 153
   at Raven.Smuggler.SmugglerApi.EnsureDatabaseExists() in c:\Builds\RavenDB-Sta
ble\Raven.Smuggler\SmugglerApi.cs:line 372
   at Raven.Smuggler.SmugglerApi.ImportData(Stream stream, SmugglerOptions optio
ns) in c:\Builds\RavenDB-Stable\Raven.Smuggler\SmugglerApi.cs:line 183
   at Raven.Smuggler.SmugglerApi.ImportData(SmugglerOptions options) in c:\Build
s\RavenDB-Stable\Raven.Smuggler\SmugglerApi.cs:line 177
   at Raven.Smuggler.Program.Parse(String[] args) in c:\Builds\RavenDB-Stable\Ra
ven.Smuggler\Program.cs:line 110
 
D:\RavenDB\RavenDB-Build-888\Smuggler>

Itamar Syn-Hershko

unread,
May 16, 2012, 5:57:56 AM5/16/12
to rav...@googlegroups.com
Ok, this was fixed after v888

Oren Eini (Ayende Rahien)

unread,
May 16, 2012, 6:43:25 AM5/16/12
to rav...@googlegroups.com
You should be able to use the smuggler from a later version against 888 without any issues.

t3rse

unread,
May 16, 2012, 9:01:30 AM5/16/12
to rav...@googlegroups.com
I'm running into the same issue... where can I get a build > 888? 
http://builds.hibernatingrhinos.com/builds/RavenDB  - seems to have 888 as the last official release. 

Matt Warren

unread,
May 16, 2012, 9:11:51 AM5/16/12
to rav...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages