简体   繁体   English

日志中的Heroku错误:java.lang.ClassNotFoundException:org.apache.derby.jdbc.ClientDriver

[英]Heroku error in logs: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

I am a total newbiew to heroku deployments. 我是heroku部署的新手。 I have a java application pushed to Heroku using only the heroku toolbelt . 我有一个Java应用程序仅使用heroku工具带推送到Heroku。 I have put the .war file in my app. 我已将.war文件放入我的应用程序。

the servelet is in turn talking to derby db. 然后,servelet与derby db通信。

Now when i try and access the same from my client the heroku logs show an error: 现在,当我尝试从客户端访问相同文件时,heroku日志显示错误:

java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

when i use the same .war file in glassfish server locally it works fine. 当我在本地glassfish服务器中使用相同的.war文件时,它工作正常。

Not sure about if i need to seperately install derby.jar to heruko? 不知道我是否需要将derby.jar单独安装到heruko? , if so how do i add it using toolbelt. ,如果是这样,如何使用Toolbelt添加它。

or is there something i am missing here 还是我在这里想念的东西

The Glassfish server you are using locally is providing the derby JAR file for you app. 您在本地使用的Glassfish服务器正在为您的应用程序提供derby JAR文件。 This makes it an unmanaged external dependency (which is bad). 这使其成为不受管理的外部依赖项(这很不好)。

In order to run your application on Heroku, you would need to include the derby driver in your Maven dependencies. 为了在Heroku上运行应用程序,您需要在Maven依赖项中包括derby驱动程序。 Probably something like this: 大概是这样的:

<dependency>
  <groupId>org.apache.derby</groupId>
  <artifactId>derbyclient</artifactId>
  <version>10.11.1.1</version>
</dependency>

However, keep in mind that the Heroku filesystem is emphemeral, and Derby won't persist. 但是,请记住,Heroku文件系统是临时的,Derby不会持久存在。 You could try the free PostgreSQL database that Heroku provides . 您可以尝试Heroku提供免费PostgreSQL数据库

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建数据库时出错:java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver - An error occurred while creating the database: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver 线程“主”java.lang.ClassNotFoundException 中的异常:org.apache.derby.jdbc.ClientDriver - Exception in thread “main” java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver java.lang.ClassNotFoundException:org.apach.derby.jdbc.ClientDriver - java.lang.ClassNotFoundException: org.apach.derby.jdbc.ClientDriver org.apache.derby.jdbc.ClientDriver 在哪里? - where is org.apache.derby.jdbc.ClientDriver? java-找不到类[org.apache.derby.jdbc.ClientDriver] - java - Class [org.apache.derby.jdbc.ClientDriver] not found java.lang.ClassNotFoundException:org.apache.derby.jdbc.EmbeddedDriver - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver org.apache.derby.jdbc.ClientDriver ; 无法连接 - org.apache.derby.jdbc.ClientDriver ; unable to connect Apache Derby 10.15.* - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver - Apache Derby 10.15.* - java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver 无法使用org.apache.derby.jdbc.ClientDriver建立与MySQL的连接 - Cannot establish connection to MySQL using org.apache.derby.jdbc.ClientDriver 未找到类[org.apache.derby.jdbc.ClientDriver]。 尝试连接到db时 - Class [org.apache.derby.jdbc.ClientDriver] not found. When trying to connect to db
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM