Heroku

180 views
Skip to first unread message

Matt Raible

unread,
Feb 5, 2016, 9:17:05 PM2/5/16
to JHipster dev team
Hey guys,

When I deploy a 2.x app to Heroku, it succeeds based on logs, but I see the following message in my browser.

Your request cannot be processed
Sorry, an error has occurred.

Status: Not Found (Not Found)
Message: No message available

Any ideas?

Matt Raible

unread,
Feb 6, 2016, 12:14:03 PM2/6/16
to Julien Dubois, JHipster dev team
I’m not sure what’s up. If I try npm link and do it from the 2.x maintenance branch, it doesn’t work. It looks like it starts up OK (according to the logs), but there’s a 404 in the browser. If I install the latest release, it works. If I use the master branch, it works. I’ll just use the master branch for my video.

Cheers,

Matt


On Feb 5, 2016, at 10:35 PM, Julien Dubois <julien...@gmail.com> wrote:

It might be because Heroku is doing some HTTP get request to know if the server is up.
Don't you have the requested URL in the logs? If not we should first improve the log.

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev...@googlegroups.com.
To post to this group, send email to jhipst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/89C49EF1-4DA6-4E16-90E3-443991C84417%40raibledesigns.com.
For more options, visit https://groups.google.com/d/optout.

Matt Raible

unread,
Feb 6, 2016, 12:34:48 PM2/6/16
to Julien Dubois, JHipster dev team
Hey everyone, 

Here’s some minor issues I found when practicing my blog demo on the master branch. First of all, here’s my .yo-rc.json:

{
  "generator-jhipster": {
    "jhipsterVersion": "2.27.0",
    "baseName": "blog",
    "packageName": "org.jhipster.blog",
    "packageFolder": "org/jhipster/blog",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": "no",
    "websocket": "no",
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": "elasticsearch",
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "rememberMeKey": "fb1fa8c197291fa0940030d74d6f0197338d71b4",
    "useSass": false,
    "enableTranslation": true,
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling"
    ]
  }
}

When I start the app with “mvn spring-boot:run”, I see the following in my logs. It doesn’t seem to cause any issues, but obviously might not look to good in a screencast.

2016-02-06 10:27:46.937  WARN 29009 --- [blog-Executor-1] o.j.b.c.liquibase.AsyncSpringLiquibase   : Starting Liquibase asynchronously, your database might not be ready at startup!
2016-02-06 10:27:46.942  WARN 29009 --- [blog-Executor-1] com.zaxxer.hikari.util.DriverDataSource  : Registered driver with driverClassName=org.h2.jdbcx.JdbcDataSource was not found, trying direct instantiation.
2016-02-06 10:27:46.945  WARN 29009 --- [blog-Executor-1] com.zaxxer.hikari.util.DriverDataSource  : Could not instantiate instance of driver class org.h2.jdbcx.JdbcDataSource, trying JDBC URL resolution

java.lang.ClassCastException: org.h2.jdbcx.JdbcDataSource cannot be cast to java.sql.Driver
at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:71) ~[HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.pool.PoolElf.initializeDataSource(PoolElf.java:157) [HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:113) [HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:96) [HikariCP-2.4.1.jar:na]
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388) [liquibase-core-3.4.2.jar:na]
at org.jhipster.blog.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:63) [classes/:na]
at org.jhipster.blog.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$31(AsyncSpringLiquibase.java:49) [classes/:na]
at org.jhipster.blog.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$25(ExceptionHandlingAsyncTaskExecutor.java:47) ~[classes/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65]

objc[29009]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
2016-02-06 10:27:48.011 DEBUG 29009 --- [blog-Executor-1] o.j.b.c.liquibase.AsyncSpringLiquibase   : Started Liquibase in 1074 ms

The second issue is that after logging in, the user’s name is not present in the success message. I’d love to get these fixed before creating my screencast. Anyone know how to fix these?

You are logged in as user “”.

Deepu K Sasidharan

unread,
Feb 6, 2016, 12:41:18 PM2/6/16
to Matt Raible, Julien Dubois, JHipster dev team

Thats strange Matt,  im doing a demo app for work using latest master and its the same config as yours except for build coz i use gradle, but I dont have any of that issues. Anyway tomorrow ill try to generate and run your config.

Matt Raible

unread,
Feb 6, 2016, 12:58:09 PM2/6/16
to Deepu K Sasidharan, Julien Dubois, JHipster dev team
I see the same error when using Gradle:

2016-02-06 10:47:12.576  WARN 30130 --- [blog-Executor-1] com.zaxxer.hikari.util.DriverDataSource  : Registered driver with driverClassName=org.h2.jdbcx.JdbcDataSource was not found, trying direct instantiation.
2016-02-06 10:47:12.580  WARN 30130 --- [blog-Executor-1] com.zaxxer.hikari.util.DriverDataSource  : Could not instantiate instance of driver class org.h2.jdbcx.JdbcDataSource, trying JDBC URL resolution

java.lang.ClassCastException: org.h2.jdbcx.JdbcDataSource cannot be cast to java.sql.Driver
at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:71) ~[HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.pool.PoolElf.initializeDataSource(PoolElf.java:157) [HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:113) [HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:96) [HikariCP-2.4.1.jar:na]
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388) [liquibase-core-3.4.2.jar:na]
at org.jhipster.blog.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:63) [main/:na]
at org.jhipster.blog.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$2(AsyncSpringLiquibase.java:49) [main/:na]
at org.jhipster.blog.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:47) ~[main/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_65]

Changing application-dev.yml to have the following seems to fix this issue:
driver-class-name: org.h2.jdbcx.JdbcConnectionPool

Pascal GRIMAUD

unread,
Feb 6, 2016, 1:27:58 PM2/6/16
to Matt Raible, Deepu K Sasidharan, Julien Dubois, JHipster dev team
You're right, Matt

Look travis logs. I think it comes from https://github.com/jhipster/generator-jhipster/pull/2803 => @cbornet, can you have a look plz ?





Christophe Bornet

unread,
Feb 6, 2016, 1:39:32 PM2/6/16
to JHipster dev team, ma...@raibledesigns.com, d4u...@gmail.com, julien...@gmail.com
Yes I saw that. I will fix it.
Matt


To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev+unsubscribe@googlegroups.com.

To post to this group, send email to jhipst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/89C49EF1-4DA6-4E16-90E3-443991C84417%40raibledesigns.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev+unsubscribe@googlegroups.com.

To post to this group, send email to jhipst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/E627EE3D-2C46-4A69-9EC5-7977C7263DAE%40raibledesigns.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev+unsubscribe@googlegroups.com.

Christophe Bornet

unread,
Feb 6, 2016, 4:26:17 PM2/6/16
to JHipster dev team, ma...@raibledesigns.com, d4u...@gmail.com, julien...@gmail.com
Actually, the DatabaseBuilder is able to detect the driver from the url.
So just removing the driver-class-name property is enough to get rid of the warning.
Anyone sees a problem if I remove the driver-class-name property ?

Julien Dubois

unread,
Feb 6, 2016, 7:21:42 PM2/6/16
to Christophe Bornet, Matt Raible, Deepu K Sasidharan, JHipster dev team

It's OK for me. This code is full of hacks I was doing a couple of years ago, but now all this is unecessary.

Deepu K Sasidharan

unread,
Feb 6, 2016, 9:46:32 PM2/6/16
to Julien Dubois, Christophe Bornet, Matt Raible, JHipster dev team

Oh that explains it I might not have updated the app after this PR.

@cbornet just double check that for all DB, it can identify from url including oracle, posgres etc

Christophe Bornet

unread,
Feb 7, 2016, 12:31:09 PM2/7/16
to JHipster dev team, julien...@gmail.com, bornet...@gmail.com, ma...@raibledesigns.com
@deepu, I couldn't test with Oracle. Can you do it ?

Deepu K Sasidharan

unread,
Feb 7, 2016, 1:07:23 PM2/7/16
to Christophe Bornet, Julien Dubois, Matt Raible, JHipster dev team

I can do but will take few days. In the meantime lets go ahead and if there is an issue we can fix it before release.

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev...@googlegroups.com.

To post to this group, send email to jhipst...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages