I get this error when trying to use the lift-json library with scala play: "The file could not be compiled. Error raised is : error while loading Diff, class file needed by Diff is missing. reference type Serializable of package scala refers to nonexisting symbol."
I added "- net.liftweb -> lift-json 2.9.0-1-2.4" in my dependencies.yml file. I'm not sure what's producing this error.
Do play dependencies --sync, and redo play netbeansify or play eclipsify.
Related
I have tested a small project with a hello world grammar on intellij (windows) and moved the antlr4 generated files from gen to src to be able to create a "Mylistener" class and everything works well. Now i am trying a new project to modify postgresql grammar by adding a clause to the select statement so i copied postgresql lexer and parser from https://github.com/antlr/grammars-v4/tree/master/sql/postgresql i added my new clause and generated the files with antlr4 and everything worked well (i was able to see my new clause in the parsing tree even if i had an error saying "empty or bad grammar") but when i configured antlr to generate the files in the src directory (like i did in the hello world project), all the classes come with errors and when i build the project i have 100 erros like this :
Error:(14, 39) java: cannot find symbol
symbol: class PostgreSQLParserBase
Error:(753, 9) java: method does not override or implement a method from a supertype
Error:(14, 39) java: cannot find symbol
symbol: class PostgreSQLParserBase
Error:(753, 9) java: method does not override or implement a method from a supertype
Error:(781, 17) java: cannot find symbol
symbol: variable _interp
location: class PostgreSQLParser
Error:(781, 50) java: incompatible types: PostgreSQLParser cannot be converted to org.antlr.v4.runtime.Parser
Error:(788, 77) java: cannot find symbol
symbol: variable EOF
location: class PostgreSQLParser
All the errors are about some symbols that are not found in class PostgreSQL. I searched many similar questions here but i don't understand where the problem is (i have antlr jar as a project library ). Any help is welcomed.
Imported the gradle project from the "complete" folder and received the following error:
Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'
I am using the latest version of Eclipse, 2020-12, with groovy tools installed.
From grails guide
https://guides.grails.org/gorm-without-grails/guide/index.html
Downloaded code sample from github
https://github.com/grails-guides/gorm-without-grails.git
It seems likely to be a version mismatch, but I cannot determine how to correct this problem.
I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.
The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?
I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.
The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94
Our project uses multiple routes files.
The conf/routes file contains something like:
/some/stuff
...
-> /api/admin admin.Routes
-> /api/user user.Routes
We then have conf/admin.routes and conf/user.routes files, which contain the prefixed API routes.
I’m trying to upgrade from Play 2.6 (where this setup has worked fine, as well as on earlier versions), to Play 2.7. When compiling I get the error:
[error] /usr/src/backend/conf/admin.routes:401: value concatPrefix is not a member of object play.api.routing.Router
[error] GET /myAdminRoute #com.my.some.controllers.MyControl.list()
[error] /usr/src/backend/conf/user.routes:140: value concatPrefix is not a member of object play.api.routing.Router
[error] GET /myUserRoute #com.my.other.controllers.MyControl.list()
Looking at Play migration for 2.7:
I’m not using StaticRoutesGenerator https://www.playframework.com/documentation/2.7.x/Migration27#StaticRoutesGenerator-removed
Looks suspicious: https://www.playframework.com/documentation/2.7.x/Migration27#StaticRoutesGenerator-removed Router#withPrefix should always add a prefix`. But I’m just using Play conf/routes, so I’m not sure what I should be changing?
I assume the issue is because of that Router withPrefix change, but I’m not sure how to interpret it in terms of what I need to update. Has anyone else had this issue with Play 2.7?
I've just had another play with this, the first time was a few weeks ago - and I'm not getting the same error. I can repro if I start again and forget the SBT unlock; reload; lock cycle, which is probably the mistake I made before. This leaves me with Play 2.6 libraries installed with the Play 2.7 plugin.
While I'm trying to obfuscate simple DataLoader.class file in ProGuard I get this error:
Reading program directory [C:\Users\uzytkownik\Documents\NetBeansProjects\ProTest\build\classes\Files\DataLoader.class]
Warning: class [DataLoader.class] unexpectedly contains class [Files.DataLoader]
Warning: there were 1 classes in incorrectly named files.
You should make sure all file names correspond to their class names.
The directory hierarchies must correspond to the package hierarchies.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
If you don't mind the mentioned classes not being written out,
you could try your luck using the '-ignorewarnings' option.
Please correct the above warnings first.
Here is the project:
http://www49.zippyshare.com/v/14668241/file.html
I will be grateful for your help.
Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
This is the issue I had and I tried few options mentioned below:
-keep class module-info
-keepattributes Module*
-dontwarn module-info
The option worked for me is 3.
Not sure why but it solves my problem and I am able to make the jar.
This issue comes when you upgrade something like I upgrade the spring-boot version and the project starts failing.
Please check the maven dependencies as well.
With the options -injars and -libraryjars, you should specify the proper base directory (or jar) of your classes, just like a classpath. In this case: classes, not classes\Files\DataLoader.class.
See the ProGuard manual > Troubleshooting > Warning: class file ... unexpectedly contains class ...
I am having some issues with importing library which is needed to complete an assignment that I have been set.
I'm not sure if I have added the library to the project, but the classes from the library appear to be in the libraries section of the project.
http://imgur.com/Co6IOzq,qCJaXHh,ZJVUnbZ
I added the libraries by right clicking on project1 and going to properties:
http://imgur.com/Co6IOzq,qCJaXHh,ZJVUnbZ#1
However whenever I have "package project1" at the top of Project1.java I receive a message that MaInput - which is one of the classes in this library - is not recognised:
cannot find symbol:
symbol: class MaInput
Whenever I take away "package project1" when trying to compile it reads:
Error: Could not find or load main class project1.Project1
Java Result: 1.
The problem is that you are trying to access a class from default package from a named package and this is not allowed by the Java Specification.
So, in this case, create your assignment in the default package as well.