I have a java webapp on heroku. It runs perfectly on the cloud. But when run locally it appears to use a stale resource. My jar is called nymmbl1-1.0.jar. I have 100% verified the resource is correct in target\nymmbl1-1.0.jar and ~.m2\repository\com\nymmbl\nymmbl1\1.0\nymmbl1-1.0.jar. When run locally the resource is old. It's as though heroku local is using some cached version.
Has anyone ever seen anything like this?
The out-of-date resource is a local read-only SQlite database. When running "heroku local" the database is accessed but the content returned is different than the actual database content in the current jar. The content returned is from an older version of the SQLite DB that is not in the current JAR.
As I said, this problem is not observed when run on the cloud.
My guess is that "heroku local" is doing something I don't expect. Can you suggest what may be the problem or how to debug this?
This problem disappeared upon updating some maven artifacts. For the record here's what I changed:
org.springframework.boot spring-boot-starter-parent, changed from
1.5.2.RELEASE to 1.5.7.RELEASE
webjars-bootstrap.version, from 3.3.6 to 3.3.7-1
webjars-jquery-ui.version 1.1.14 => 1.12.1
webjars-jquery.version 2.2.4 => 3.2.1
thymeleaf.version 3.2.5.RELEASE => 3.0.7.RELEASE
Related
I am trying to link my Neo4j db with Elasticsearch using the recommended approach on the Neo4j website, with this GitHub repository https://github.com/neo4j-contrib/neo4j-elasticsearch
I have done all the steps that they say to do, but when I run it in terminal I get this error (everything works normally except that nothing is getting pushed to Elasticsearch):
Failed to load `org.apache.commons.logging.impl.AvalonLogger` from
plugin jar
`/Users/tkralj/Documents/Neo4j/default.graphdb/plugins/neo4j-
elasticsearch-3.1.4.jar`: org/apache/avalon/framework/logger/Logger
2017-07-13 20:21:46.911+0000 WARN [o.n.k.i.p.Procedures]
Failed to load `org.apache.commons.logging.impl.Log4JLogger` from
plugin jar
`/Users/tkralj/Documents/Neo4j/default.graphdb/plugins/neo4j-
elasticsearch-3.1.4.jar`: org/apache/log4j/Category
2017-07-13 20:21:46.911+0000 WARN [o.n.k.i.p.Procedures]
Failed to
load `org.apache.commons.logging.impl.LogKitLogger` from plugin jar
`/Users/tkralj/Documents/Neo4j/default.graphdb/plugins/neo4j-
elasticsearch-3.1.4.jar`: org/apache/log/Logger
I am running Neo4j 3.1.5, while this plugin was created for 3.1.4 and I think that may be the issue; however, there is no plugin made for 3.1.5, and I cannot find a way to download the older version of Neo4j.
Looks like old question but still answering for future googlers.
I was facing the same problem with 3.1.x version . For me it's working fine with version 3.2
The closest stackoverflow question that explains my symptoms is here - How can I deploy a Grails 3.0.1 war file in Tomcat7?
I am in the process of upgrading a Grails 2.3.4 application to Grails 3.1.10 and everything is working with 'grails run-app'.
When i deploy to a war i get nothing but 404's for any url.
The war deploys without any error messages in catalina.out.
The tomcat access logs show my access attempts. (not linux problem?)
I can get to the tomcat manager, and the tomcat manager shows my app as "running" as true. (no errors)
Manager shows myapp-0.1 because the war file was myapp-0.1.war .. this is fine for now.
I am running Grails 3.1.10.
I have tried against Tomcat 7.0.55 as well as 8.0.92.
I have tried changing grails.serverUrl in application.groovy to various values. It is now:
//fix war name after get working
grails.serverUrl = "/myapp-0.1"
System.setProperty("server.contextPath","/myapp-0.1")
I have tried the above without "-0.1". (i was suprised to learn this was necessary - https://stackoverflow.com/a/23664531/104993)
I have tried changing "org.springframework.boo:spring-boot-starter-tomcat" from "compile" to "provided" in the build.gradle file.
Please let me know what I need to elaborate on. It's difficult to paste log outputs and config files. (i'm behind a firewall)
You add the following task to your build.gradle it will name the war what ever you want:
task wrapper(type:Wrapper){
war.archiveName='myWar.war'
}
Then when you deploy it should have the correct name and you can go to https://localhost:8080/myWar
Problem/Issue: I am trying to read data from splunk in a spring application(splunk java sdk) using spring integration. I received an error "Server chose unsupported or disabled protocol: SSLv3" while deploying the code in a TCserver. This worked fine in local environment/builds/servers.
The current version I have for spring-integration-splunk is 1.1.0.M2. I understand that old splunk version(1.1.0) has this issue and it's fixed in latest versions. But, when I try to upgrade the spring-integration-splunk dependency with latest version(1.1.0.RELEASE), The dependency pulls splunk 1.3.0 jar which is not available in Maven. And I got this error
"Failed to read artifact descriptor for com.splunk:splunk:jar:1.3.0"
Is there an alternative or solution to this problem. (Either by adding a fix in the code or by changing the dependencies)?
I created a dummy Maven project that wraps CMU Sphinx4 in a servlet. The dependencies are sphinx4-core:1.0-SNAPSHOT and sphinx4-data:1.0-SNAPSHOT. When running locally (Eclipse) it works great, but then I deploy it to AWS Elastic Beanstalk and I get the following exception:
Property exception component:'null' property:'null' - java.io.FileNotFoundException: JAR entry edu/cmu/sphinx/models/en-us/en-us//means not found in /var/lib/tomcat8/webapps/ROOT/WEB-INF/lib/sphinx4-data-1.0-SNAPSHOT.jar
edu.cmu.sphinx.util.props.PropertyException: java.io.FileNotFoundException: JAR entry edu/cmu/sphinx/models/en-us/en-us//means not found in /var/lib/tomcat8/webapps/ROOT/WEB-INF/lib/sphinx4-data-1.0-SNAPSHOT.jar
Caused by: java.io.FileNotFoundException: JAR entry edu/cmu/sphinx/models/en-us/en-us//means not found in /var/lib/tomcat8/webapps/ROOT/WEB-INF/lib/sphinx4-data-1.0-SNAPSHOT.jar
I suspect it's that double slash in there but I cannot explain why it doesn't happen on my dev machine (OSX).
thanks!
Edit:
My dev machine: OSX running Eclipse Luna with AWS plugin. I am using a J2EE project with a single servlet, and getting Sphinx JARs (core & data) through Maven. When I run the server in my dev machine (port 8080) I feed it a WAV file through a POST message, the file gets loaded correctly and I get the analysis as a textual response.
My prod machine: AWS Elastic Beanstalk. I deploy using AWS plugin. When I comment out the Sphinx part of the code, the server works (i.e. gets the file, and returns it to me, etc.)
If the problem is not the double slash, then the JARs are not being cooked right. This would make sense since the file it's looking for is not a class so the JAR cooking part of Maven should be told how to include resource files in the JAR it makes when it deploys.
Any idea how to do this ?
thanks again!
Double slash seems to be a problem on some JVMs, on other JVMs it works.
I've just committed an update to avoid double slashes. Please update sphinx4 and try again.
Turns out the problem was I was developing (OSX) on Java 7 and deploying to AWS to Tomcat/Java 8. Once I deployed to Tomcat/Java 7, everything worked as expected.
I'm trying to download a file from my app, when I'm running on localhost everything is fine and in using this path in order to download the file
../myapp/public/files/67784.pdf
But on Heroku I'm getting java.io.FileNotFoundException. How can I find location of the file on Heroku?
Thanks!
Public assets in Play are packaged in the Jar on compilation (makes it very convenient for moving everything around, and get them from a plugin or whatever). So you have to get them from you app Jar.
I think that you can use the Play's resource helper (http://www.playframework.com/documentation/2.2-SNAPSHOT/api/java/play/Application.html), but I haven't tried.
Play.Application.resource("public/filename")
Note that on Heroku, any file modification/addition on the server is lost whenever you redeploy, or restart or add an instance... The only files that persist are the ones in your Git repo.