Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant run in Eclips #348

Closed
xizoaziz opened this issue Nov 19, 2015 · 5 comments
Closed

cant run in Eclips #348

xizoaziz opened this issue Nov 19, 2015 · 5 comments

Comments

@xizoaziz
Copy link

hi all
i just downloaded TraccarWeb source and when i tried to run it it gives me this error

Compiling module org.traccar.web.Traccar
   Ignored 5 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:121)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:296)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
    at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:67)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
    at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:95)
    at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:351)
    at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:149)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:145)
    at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
    at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:600)
    at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:569)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
    at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1505)
    at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:870)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1305)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1038)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.precompile(JavaToJavaScriptCompiler.java:954)
    at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.precompile(MonolithicJavaToJavaScriptCompiler.java:303)
    at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:38)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:286)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
    at com.google.gwt.dev.Compiler.run(Compiler.java:206)
    at com.google.gwt.dev.Compiler.run(Compiler.java:158)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
    at com.google.gwt.dev.Compiler.main(Compiler.java:127)
Caused by: java.lang.UnsupportedClassVersionError: com/squareup/javapoet/TypeName : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.github.nmorel.gwtjackson.rebind.ObjectMapperGenerator.generate(ObjectMapperGenerator.java:35)
    at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:760)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:160)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
    at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:87)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:485)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:443)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:576)
    at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:306)
    at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:248)
    at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
    at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
    ... 40 more
      [ERROR] at ReportsController.java(41): GWT.create(ReportsController$ReportMapper.class)
         com.google.gwt.dev.jjs.ast.JMethodCall
      [ERROR] at ReportsController.java(41): (ReportsController$ReportMapper) GWT.create(ReportsController$ReportMapper.class)
         com.google.gwt.dev.jjs.ast.JCastOperation
      [ERROR] at ReportsController.java(41): final ReportsController$ReportMapper reportMapper = (ReportsController$ReportMapper) GWT.create(ReportsController$ReportMapper.class)
         com.google.gwt.dev.jjs.ast.JDeclarationStatement
      [ERROR] at ReportsController.java(39): {
  final Messages i18n = (Messages) new Messages_();
  final ReportsController$ReportMapper reportMapper = (ReportsController$ReportMapper) GWT.create(ReportsController$ReportMapper.class);
}
         com.google.gwt.dev.jjs.ast.JBlock
      [ERROR] at ReportsController.java(39): {
  final Messages i18n = (Messages) new Messages_();
  final ReportsController$ReportMapper reportMapper = (ReportsController$ReportMapper) GWT.create(ReportsController$ReportMapper.class);
}
         com.google.gwt.dev.jjs.ast.JMethodBody
      [ERROR] at ReportsController.java(39): private final void $init();

         com.google.gwt.dev.jjs.ast.JMethod 
@vitalidze
Copy link
Owner

I think your version of java is too old (1.6 probably). Try running it on java 7+.

@xizoaziz
Copy link
Author

hi vitalidze

thanks for your fast replay

when i changed it to 1.7 it gives me compile error in

XMLOutputFactory.newFactory()

in GPXParser and ExportServlet

but why it works fine in old version

@vitalidze
Copy link
Owner

New version includes 'javapoet' library, which requires 1.7 version minimum. Are you sure you are using the 1.7 JDK? I am using Oracle's JDK and it works just fine.

@vitalidze
Copy link
Owner

Try to update with latest code from github repo. Then try to build it from maven.

@xizoaziz
Copy link
Author

i checked out the new version it is work fine now but when i run it first time it gives me this error .

Caused by: java.lang.IllegalArgumentException: Parameter value [60] did not match expected type [java.lang.Integer (n/a)]
    at org.hibernate.jpa.spi.BaseQueryImpl.validateBinding(BaseQueryImpl.java:874)
    at org.hibernate.jpa.internal.QueryImpl.access$000(QueryImpl.java:80)
    at org.hibernate.jpa.internal.QueryImpl$ParameterRegistrationImpl.bindValue(QueryImpl.java:248)
    at org.hibernate.jpa.spi.BaseQueryImpl.setParameter(BaseQueryImpl.java:620)
    at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:180)
    at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:49)
    at org.traccar.web.server.model.DBMigrations$SetDefaultMinIdleTime.migrate(DBMigrations.java:179)
    at org.traccar.web.server.model.DBMigrations.migrate(DBMigrations.java:57)
    at org.traccar.web.server.model.DataServiceImpl.init(DataServiceImpl.java:66)
    ... 26 more

so i changed this tow in Device Entity class

    public static final int DEFAULT_TIMEOUT = 5 * 60;
    public static final int DEFAULT_MIN_IDLE_TIME = 1 * 60;

from short to int and it is run now .

i will test it and if i found any other issues i will inform you .

many thanks for support and time .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants