Great fan of Scala, but SBT keeps giving me tooth aches in places without teeth.
Usually I manage, but this one has me somewhat baffled.
Can anyone help me with the following:
TL/DR
While re-importing my sbt-project, I encountered the following error.
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\cucumber-junit-5.7.0.pom.lock
It seems that the import encountered some corrupt path including a tab character while resolving the cucumber dependency. The weird thing is, that this was a re-import; it imported fine before. Also, the actual path C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\ cannot be found, neither via the explorer or the shell.
The error first occurred while importing the project into Intellij, but using SBT via the shell yielded the same.
Details below.
Does anyone know how to:
- solve this?
- prevent it from happening again?
Project can be found here
Full SBT log:
[info] Loading global plugins from C:\Users\-username-\.sbt\1.0\plugins
[info] Loading settings for project sandbox-build from plugins.sbt ...
[info] Loading project definition from C:\coding\modules\scala\sandbox\project
[info] Loading settings for project sandbox from build.sbt ...
[info] Set current project to sandbox (in build file:/C:/coding/modules/scala/sandbox/)
[error] java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[error] at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[error] at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
[error] at java.base/java.io.File.toPath(File.java:2311)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:35)
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:508)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] Total time: 1 s, completed 4 jun. 2020 13:57:57```
Already tried to
clear the Coursier cache by deleting the C:\Users\-username-\AppData\Local\Coursier\cache\ directory
clear the project by deleting the ./target and ./project/target directories
update the offending Cucumber dependencies to 6.0.0-RC2
It seems that the lock file still exists somewhere and SBT can't re-download itself?
As the exception reports there are 6 spaces or a tab to many. Exactly the ones in your build.sbt file on line 52: "io.cucumbe\t r". Happy programming!
Related
I don't have any idea about this, I have also tried to change its version to 11 but it doesn't works
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.098 s
[INFO] Finished at: 2021-08-31T17:21:13Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project chatroom: Fatal error compiling: invalid target release: 16 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
! ERROR: Failed to build app with Maven
We're sorry this build is failing! If you can't find the issue in application code,
please submit a ticket so we can help: https://help.heroku.com/
! Push rejected, failed to compile Java app.
! Push failed
Thanks in advance
make sure the installed version of jdk is 16 (or above) and check your project in your development environment if its configured for this version too.
invalid target release: 16
I am currently trying to deploy an instance of the latest Sakai 12.1 on Tomcat, but when I run the
mvn clean install sakai:deploy -Dmaven.tomcat.home=$CATALINA_HOME -Dsakai.home=$CATALINA_HOME/sakai -Dsakai.cleanup=true -Djava.net.preferIPv4Stack=true command, if executes without errors until the "Sakai Core Kernel Implementation" modules (out of the 413), returning this:
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:30 min
[INFO] Finished at: 2018-05-17T13:33:19+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project sakai-kernel-impl: There are test failures.
[ERROR]
[ERROR] Please refer to /home/usuario/sakai/kernel/kernel-impl/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :sakai-kernel-impl
I have seen the error log and the first one is in the RoleAccessTest test.
The log info:
...
13:29:15,161 INFO PoolBase:505 - sakai - Driver does not support get/set network timeout for connections. (not supported feature)
13:29:15,168 ERROR PoolBase:441 - sakai - Failed to execute connection test query (insufficient user privileges or object not found: DUAL).
13:29:15,169 ERROR HikariPool:541 - sakai - Exception during pool initialization.
java.sql.SQLSyntaxErrorException: insufficient user privileges or object not found: DUAL
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
...
[EDIT: Looking at the preceding log, why does HSQLDB arises in the error stack? Isn't supposed to be only MySQL?]
Later, in another line:
WARN JdbcServicesImpl:195 - HHH000341: Could not obtain connection metadata
The Mysql Driver JAR is correctly copied in /opt/tomcat/lib, and the DB user and credentials correctly set in /opt/tomcat/sakai/local.properties
I do not want to deploy Sakai without running test as this is a complete fresh installation and there should not be any errors...
Any help?
Look in your sakai.properties or local.properties. It probably has the line
# validationQuery#javax.sql.BaseDataSource=select 1 from DUAL
This is the SQL query Sakai issues by default to check whether the database is reachable. It looks as though the database system you're using doesn't support that query, so you'll either need to set that property to some other query, or switch the database system you're using. MySQL supports this query, so if you have
vendor#org.sakaiproject.db.api.SqlService=mysql
I'm wrong and it must be something else.
I'm trying to install Sakai 10.2 and it gives me an error every time. I've reinstall everything, including de OS. And the error persist.
This is my current configuration:
Sakai 10.2
Maven 3.2.5
Tomcat 7.0.59
This the error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------ ------
[INFO] Total time: 02:00 min
[INFO] Finished at: 2015-03-17T17:56:31+01:00
[INFO] Final Memory: 347M/829M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project entitybroker-restimpl: There are test failures.
[ERROR]
[ERROR] Please refer to C:\opt\sakai-10.x\entitybroker\rest\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :entitybroker-restimpl
These are de reports of the test.
EntityDescriptionManagerTest
EntityHandlerImplTest
[EntityBrokerServlet]http://pastebin.com/vWmbNXxa
There appears to be an error in the tests.
Build Sakai with -Dmaven.test.skip.
Could you also file a Jira at http://jira.sakaiproject.org with the test errors and someone can take a look.
Ok. Problem solved. I don't know how and I don't know the cause of the problem.
I've update JDK to _076 version and skip the test. It have no sense for me.
But it's done.
Thank you for your time and your help.
mvn clean install causes build error
here is the error what I am getting..
... 24 more
{[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.707s
[INFO] Finished at: Thu Jun 12 14:09:51 IST 2014
[INFO] Final Memory: 9M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency- plugin:2.1:unpack-dependencies (get-test-data) on project neo4j-spatial: Error unpacking file: /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/20100819/osm-test-data-20100819.jar to: /home/dev237/Projects /spatial/target
[ERROR] org.codehaus.plexus.archiver.ArchiverException: Error while expanding /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/20100819/osm-test-data-20100819.jar: Negative seek offset
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/
Try renaming the repository folder "/home/dev237/.m2/repository" to make maven create a new repository and download all dependencies again.
I ran into a similar issue. This is what I did to resolve it:
cd into /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/
rm -rf 20100819 (remove the problematic dependencies)
Re-run mvn clean install
At which point it built successfully.
This solution is arguably better than TekTimmy's as it avoids re-downloading all dependencies, regardless of if they're problematic or not. If they're all causing issues however, it may be easier to go with their solution.
I have a test class that uses #Autowired annotation and #ContextConfiguration and #Category annotations.
The test tuns fine when its run through eclipse.
But when i try running it through Command line, it is throwing the following error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.690s
[INFO] Finished at: Wed Jun 12 09:56:48 GMT+05:30 2013
[INFO] Final Memory: 31M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test (default) on project OmnitureSeleniumTests: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test failed: There was an error in the forked process
[ERROR] java.lang.NoSuchMethodError: org.junit.runner.Request.classes(Lorg/junit/runner/Computer;[Ljava/lang/Class;)Lorg/junit/runner/Request;
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createReqestAndRun(JUnitCoreWrapper.java:128)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:111)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:84)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:138)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
I am using junit 4.8.2 and
maven-failsafe-plugin:2.14.1
There could be many configuration / environmental differences when running maven from Eclipse vs command line:
The maven version / path. In Eclipse the actual maven binary can be default / explicitly set via preferences, whereas in command line your OS will pick the first one available on your PATH env var. Check maven version using mvn -version
Maven user / global settings.xml. When running through command line typically ~/.m2/settings.xml is used but this can be explicitly overridden on Eclipse preferences
Maven local repository cache. If you have discrepancy on 1 and/or 2, you could end up with different local repository cache. Incorrect artifact distribution could cause build to fail if performed against different local repository cache.
Eclipse maven could use different version of JVM than your command line.
i have changed the version of maven-failsafe-plugin to 2.6 and it is running fine thru command line now :)