Comments (19)
Which scala version are you using ? Did you updated your scala version recently ?
from scala-xml.
@Chikooo starting with Scala 2.11.x you can only use XML literals if you add an explicit dependency to scala-xml to your build. How to do this depends on the build system you use. The most recent artifact is currently this one: http://search.maven.org/#artifactdetails|org.scala-lang.modules|scala-xml_2.11|1.0.5|bundle
If you use sbt you need to add this line to your build definition:
libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.11" % "1.0.5"
@biswanaths I think the problem is that there's a Scala compiler error message that points to https://github.com/scala/scala-xml without giving enough information about what is wrong if you are a Scala/Java beginner. Maybe the README could contain a section that helps these users to solve the immediate problem.
from scala-xml.
jrudolph:
Exactly without even giving what is wrong it is redirecting to GitHub. I am a scala beginner. I have added that line too in build.sbt
I am trying out spray project using sbt on IntelliJ
biswanaths:
I am using latest version of scala.
from scala-xml.
@jrudolph , Lets augment the non-existent wiki with most commonly faced problems. I think that will be helpful and quick turnaround for common problems faced by the user.
from scala-xml.
@biswanaths
Do you have any idea how to do it in IntelliJ?
I am facing this issue since yesterday and couldn't find solution for it.
from scala-xml.
@Chikooo you need to provide much more details. What did you try exactly? How did you come so far? How did you create your original IntelliJ project? What does it mean that you are "facing this issue since yesterday"? Time is probably not the reason that it now fails if it worked before so something else must have changed as well.
from scala-xml.
@jrudolph
Sorry for abrupt explanation.
I have started reading about Spray from 2 days and wanted to run basic web service to explore how it runs.
I have created a Scala SBT project in IntelliJ.
I have edited "build.sbt" file for the error I have mentioned above but still facing the same issue.
Can you tell me like for "scala-xml" what all files I need to change? and what changes I need to do?
OR
If you are familiar with IntellJ, can you tell me exacts steps to create Spray service from "scratch"?
Later will be helpful.
from scala-xml.
@Chikooo , can you post your sbt file ?
from scala-xml.
Will be closing this issue as without more information, I strongly believe this is a either a sbt configuration issue or intellij issue.
@Chikooo , Please do reopen the issue, if the issue is still persisting with more information.
from scala-xml.
@biswanaths : i could successfully run the code. I have added some line of code to the sbt file. thanks for your help. If you have basic sample spray codes can you send them to me?
If in case I face some issue in future i'll post here.
from scala-xml.
Great that you resolved your issue. I work with spary, but will try to find any basic spray template and send it to you.
You are more than welcome to reach out, if you face any problems.
Have a good day.
from scala-xml.
@biswanaths
I am trying to build Spray service to fetch data from MySQL using scala.
Can you tell me which all files I need to create?
As far as I know, we need to edit
- application.conf
- case class file
- build.sbt
- plugins.sbt
Is there anything else I need to create? Do you have sample example for this?
from scala-xml.
@Chikooo you can try asking questions like this on either stackoverflow.com or on the spray-user mailing list at https://groups.google.com/forum/#!forum/akka-user.
This is not the place where you will get answer for a questions about a totally different topic :)
from scala-xml.
@jrudolph oops. I am really sorry. :) I'll ask there.
from scala-xml.
Scala newbie here with a solution including steps for updating the libs and refreshing in Eclipse.
If you want to use scala.xml and get compile errors in Eclipse try this:
Add this line to the build.sbt file as the @jrudolph mentioned above.
libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.11" % "1.0.5"
$ sbt
> update
> eclipse
Go to Eclipse and refresh the project
The compile errors in Eclipse should be gone.
from scala-xml.
Hey @derek-pappas , thanks for the steps. This will help lot of people down the line. I will try to put this in wiki. Thanks again.
from scala-xml.
Hi
You are welcome. Thank you taking care of the code!
I was stuck until I guessed I had to use set update. I was glad I stuck
with it. I am tired of Java and Python. I can see that Scala can cut my
programming time significantly and make the code more maintainable. But the
entry curve into the language is steep because of the tools. I had problems
getting Eclipse and Intellij working until I figured out that I needed to
upgrade to Java 8. Neither Intellij or Eclipse told me to update the system
to Java 8.
What would be really cool is if in Eclipse and Intellij the error message
would actually tell the user what to do to fix the problem. There is a big
disconnect between what the error message says to do and what actually
needs to be done. I know that this improvement would help newbies like
myself immensely. I have used 6-7 different build tools and ~8 different
languages but the set problem had me stumped. I am not complaining but
informing you of the situation facing newcomers to the Scala/SBT world.
Some message like:
The blah blah lib has not been downloaded to your machine.
The blah blah lib should either be available by running an SBT update which
will then download the lib to the local cache or by setting your Nexus vars
to point to your Nexus server. Blah Blah Blah.
Splitting out the library makes sense but there needs to be a clear set of
instructions not just for scala.xml but for all libs that have to be added
to get the code to compile.
Looking in the ~/.ivy cache after I discovered it gave me a clue about what
the problem was.
Derek Pappas
On Fri, Sep 11, 2015 at 10:28 PM, biswanaths [email protected]
wrote:
Hey @derek-pappas https://github.com/derek-pappas , thanks for the
steps. This will help lot of people down the line. I will try to put this
in wiki. Thanks again.—
Reply to this email directly or view it on GitHub
#79 (comment).
from scala-xml.
Hi Guys
I've a big issue in the same context , I was struggling running this code https://github.com/alejopelaez/VirtualP2P but i couldn't , Please , could anyone give a hand how to resolve this , I'm using eclipse, java 1.8 and scala 2.12
thank you
from scala-xml.
@ratibbrahim try https://users.scala-lang.org perhaps, and show exactly what you tried and what error you got
from scala-xml.
Related Issues (20)
- Publish 2.0.0 HOT 1
- Update CHANGELOG.md HOT 2
- Shut down Gitter room, enable GitHub Discussions? HOT 4
- CDATA in MarkupParser HOT 3
- ConstructingParser does not tolerate start of file whitespace HOT 1
- ConstructingParser throws NoSuchMethodError in Scala 3 HOT 6
- Release 2.0.1
- versionPolicyCheck fails for scalajs-library HOT 4
- ""
- Publish next release (to publish Scala 3 Native support) HOT 15
- Version 2.10 null pointer on toString
- Name predicates: which XML version? HOT 2
- Re-enable versionPolicyCheck HOT 2
- Update CHANGELOG, README? HOT 1
- Drop support for Scala 2.11? HOT 5
- Unused value warnings for XML literals starting with Scala 2.13.9 HOT 1
- Infinite loop caused by mismatched quotes HOT 3
- Roll a 2.2 release HOT 5
- Release 1.3.1 HOT 10
- FactoryAdapter loadDocument() modifies XMLReader and breaks it HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-xml.