XML parsing error in unicode characters
---------------------------------------
Key: JRUBY-1445
URL: http://jira.codehaus.org/browse/JRUBY-1445
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Environment: Mac OS X 10.5
JDK 1.6.0
Reporter: Changshin Lee
I tested JRuby trunk on Rails 2.0 PRE1 with an JRoR application which uses
ActiveResource.
1. Download the application from
http://ias.springnote.com/pages/512602/attachments/238570 (or open
http://ias.springnote.com/pages/512602.xhtml and click rails2_ares_test.zip
link)
2. Unzip it and run "jruby script/server".
3. Access http://localhost:3000/ with your browser and you can see the
following error:
REXML::ParseException in PagesController#index
#<RuntimeError: Illegal character '&' in raw string
"스프링북 ">
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/rexml/text.rb:90:in
`initialize'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/rexml/parsers/treeparser.rb:44:in
`new'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/rexml/parsers/treeparser.rb:44:in
`parse'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/rexml/document.rb:190:in
`build'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/rexml/document.rb:45:in
`initialize'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb:952:in
`new'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activesupport/lib/active_support/vendor/xml_simple.rb:952:in
`parse'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb:29:in
`xml_in_string'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb:40:in
`xml_in_string'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb:159:in
`from_xml'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb:19:in
`decode'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activeresource/lib/active_resource/connection.rb:74:in
`get'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activeresource/lib/active_resource/base.rb:442:in
`find_every'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/activeresource/lib/active_resource/base.rb:385:in
`find'
/Volumes/FLASHBACK/workspace/rails2_ares_test/app/controllers/pages_controller.rb:7:in
`index'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/base.rb:1104:in
`perform_action'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/filters.rb:695:in
`call_filters'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/filters.rb:687:in
`perform_action_with_filters'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
`perform_action_with_benchmark'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/rescue.rb:175:in
`measure'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
`perform_action_with_benchmark'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/rescue.rb:175:in
`perform_action_with_rescue'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/base.rb:512:in
`process'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/filters.rb:683:in
`process_with_filters'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/session_management.rb:122:in
`process_with_session_management_support'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/base.rb:372:in
`process'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:165:in
`handle_request'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in
`dispatch'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in
`dispatch_cgi'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in
`dispatch'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/railties/lib/webrick_server.rb:112:in
`handle_dispatch'
/Volumes/FLASHBACK/workspace/rails2_ares_test/vendor/rails/railties/lib/webrick_server.rb:78:in
`service'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/webrick/httpserver.rb:65:in
`run'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/webrick/server.rb:173:in
`start_thread'
/Volumes/FLASHBACK/java/tool/jruby-1.1/lib/ruby/1.8/webrick/server.rb:95:in
`start'
...
Illegal character '&' in raw string "스프링북 "
Line: 166
Position: 7359
Last 80 unconsumed characters:
Note that MRI doesn't cause this error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email