gpt4 book ai didi

java - 将java项目部署到远程glassfish服务器

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:12:21 26 4
gpt4 key购买 nike

我们有一个在 netbeans 7.3 中创建的项目,即将将其部署到远程 glassfish 服务器,一切都已正确配置和设置,我们项目的连接池也在 glassfish 中生成。

目前我们在部署到远程服务器时遇到这个错误:

deploy?DEFAULT=D:\SVN\PTS62\Applicaties\Rekeningrijderwebsite\RekeningRijder\dist\RekeningRijder.war&name=RekeningRijder&contextroot=/RekeningRijder&force=true failed on GlassFish Server 3+

Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Error Code: 0. Please see server.log for more details.

服务器生成的消息:

Caused by: javax.resource.ResourceException: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource

            at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:292)

at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)

at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1307)

at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)

at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)

at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)

... 62 more

谷歌之前不是很有帮助,所以希望你们能帮助我

提前致谢!

最佳答案

您可能需要一个 mysql/java 连接器。

你可以找到它there .从存档中提取 mysql-connector-java .jar。然后将其放入 glassfish 外部 lib 目录 {INSTALL DIR}/glassfish/domains/domain1/lib/ext。

重新启动您的 glassfish 服务器。

还有更多详情on this answer .如果这不是您要找的东西,或者它不起作用,请告诉我们。 @+

关于java - 将java项目部署到远程glassfish服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16192597/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com