When running Lift-1.0.2 and Scala-2.7.5 I am able to compile and run
my code through maven. However, I am concerned about my inability to
run the "mvn clean package" command successfully without first running
the "clean" command in eclipse. I am afraid that this extra eclipse
step may be interfering with the proper creation of the .war file
which may be contributing to the problem. When I try to execute "mvn
clean package" without eclipse I get the following error appearing in
my surefire-report:
-------------------------------------------------------------------------------
Test set: net.genomas.lift.test.AppTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.251
sec <<< FAILURE!
testXml(net.genomas.lift.test.AppTest) Time elapsed: 1.228 sec <<<
ERROR!
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:
195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect
(HttpURLConnection.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect
(HttpURLConnection.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:1049)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity
(XMLEntityManager.java:677)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity
(XMLEntityManager.java:1315)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity
(XMLEntityManager.java:1282)
at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource
(XMLDTDScannerImpl.java:283)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$DTDDriver.next(XMLDocumentScannerImpl.java:1090)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$PrologDriver.next(XMLDocumentScannerImpl.java:1003)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at scala.xml.parsing.FactoryAdapter.loadXML(FactoryAdapter.scala:292)
at scala.xml.parsing.NoBindingFactoryAdapter.loadXML
(NoBindingFactoryAdapter.scala:60)
at scala.xml.XML$.loadFile(XML.scala:42)
at net.genomas.lift.test.AppTest.wellFormed$1(AppTest.scala:52)
at net.genomas.lift.test.AppTest$$anonfun$wellFormed$1$1.apply
(AppTest.scala:48)
at net.genomas.lift.test.AppTest$$anonfun$wellFormed$1$1.apply
(AppTest.scala:48)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.runtime.BoxedArray$AnyIterator.foreach(BoxedArray.scala:45)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24)
at net.genomas.lift.test.AppTest.wellFormed$1(AppTest.scala:48)
at net.genomas.lift.test.AppTest$$anonfun$wellFormed$1$1.apply
(AppTest.scala:48)
at net.genomas.lift.test.AppTest$$anonfun$wellFormed$1$1.apply
(AppTest.scala:48)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.runtime.BoxedArray$AnyIterator.foreach(BoxedArray.scala:45)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24)
at net.genomas.lift.test.AppTest.wellFormed$1(AppTest.scala:48)
at net.genomas.lift.test.AppTest.testXml(AppTest.scala:65)
I am working behind a firewall that is important for the security of
our data where I work, so it cannot be disabled. I also work behind a
proxy but I have configured the maven settings.xml file to get past
the proxy, and that definitely works because I am able to
download .jar files, etc from the internet when I update to newer
versions of scala/lift.
I would like to be able to run "mvn clean package" successfully
without using eclipse at all to ensure that I am getting a correctly
configured .war file. This may be the reason that I am having trouble
deploying to Tomcat. Any ideas regarding how to fix this connection
failure?
Thanks,
David
On Nov 12, 4:59 pm, David Pollak <
feeder.of.the.be...@gmail.com>
wrote:
> Scala is very, very, super ultra mega version fragile. This means that code
> compiled with 2.7.5 will not work with code compiled with 2.7.7 and vice
> versa.
>
> So, in your pom.xml file, please set your scala version to 2.7.5 (nothing
> else... not 2.7.4, not 2.7.7) and lift to 1.0.2
>
> Then mvn clean tomcat:run -- does it work?
>
> Then mvn clean install -- does the WAR file work in Tomcat?
>
> ...
>
> read more »