Reputation: 64
I am new to morphia, mongoDB and playframework. I am trying to use these for production. My code was working just fine the last time i run it last week. This morning, i keep getting the following error and i have no idea how to fix it:
10:20:53,048 INFO ~ Starting /home/user/NetBeansProjects/um 10:20:53,056 WARN ~ Declaring modules in application.conf is deprecated. Use dependencies.yml instead (module.morphia) 10:20:53,060 INFO ~ Module morphia is available (/home/user/play-1.2.2/modules/morphia-1.2.1beta6) 10:20:53,062 INFO ~ Module morphia is available (/home/user/play-1.2.2/modules/morphia-1.2.1beta6) 10:20:54,538 WARN ~ You're running Play! in DEV mode 10:20:54,828 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ... 10:21:03,741 ERROR ~
@67c6i5h2e Internal Server Error (500) for request GET /
Compilation error (In {module:morphia-1.2.1beta6}/app/morphia/ObjectIdBinder.java around line 12) The file {module:morphia-1.2.1beta6}/app/morphia/ObjectIdBinder.java could not be compiled. Error raised is : The type ObjectIdBinder is already defined
play.exceptions.CompilationException: The type ObjectIdBinder is already defined at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:246) at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:672) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:516) at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:278) at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:412) at play.Play.start(Play.java:482) at play.Play.detectChanges(Play.java:596) at play.Invoker$Invocation.init(Invoker.java:186) at Invocation.HTTP Request(Play!)
i dont remember changing anything in the code too.
Upvotes: 1
Views: 294
Reputation: 399
This shows that you are including module morphia twice. Once in application.conf. And the second time I asume in the dependencies file.
10:20:53,056 WARN ~ Declaring modules in application.conf is deprecated. Use dependencies.yml instead (module.morphia)
10:20:53,060 INFO ~ Module morphia is available (/home/user/play-1.2.2/modules/morphia-1.2.1beta6)
10:20:53,062 INFO ~ Module morphia is available (/home/user/play-1.2.2/modules/morphia-1.2.1beta6)
Check Your dependencies.yml file in your project conf folder, there should be the "- morphia" or "- play -> morphia" item. As the first is now deprecated, you should probably suppress the following :
module.morphia=../morphia
Upvotes: 3