我一直在尝试从 oracle 数据库中获取 spring roo 生成实体。
但是我不断收到错误 JDBC driver not available fororacle.jdbc.OracleDriver
我已经将我的安装ojdbc14.jar
到我的本地 Maven 存储库
mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.2 -Dpackaging=jar -DgeneratePom=true
我检查了我的 pom.xml,它指向正确的版本,当我 mvn clean install 时,它可以正确编译。
我不确定我错过了什么。我已经使用 MySql 工作了,但没有使用 Oracle 工作。
我究竟做错了什么 ?
Roo version 1.2.2.RELEASE
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.2</version>
<classifier />
</dependency>
……
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.2</version>
</dependency>
#Updated at Tue Nov 13 22:43:01 NZDT 2012
#Tue Nov 13 22:43:01 NZDT 2012
database.driverClassName=oracle.jdbc.OracleDriver
database.url=jdbc\:oracle\:thin\:@[server.ip]\:1521\:orcl
database.username=MYUSER
database.password=MYPASSWORD
其中 [server.ip] 是数据库 IP 地址
你好,
我没有对 OSGI 做任何事情。
下载你提到的jar后。(从这里下载它http://www.java2s.com/Code/Jar/b/DownloadbizaQutebndjar.htm)
我运行了你给我的命令,但它产生了一个错误。
oracle/sql/converter_xcharset lx20001.glb lx20002.glb lx2001f.glb lx200b2.glb
一个错误 1:未解决的对 [javax.naming, javax.naming.directory, javax.naming.spi, javax.net, javax.net.ssl, javax.resource, javax.resource.spi, javax.resource.spi.端点、javax.resource.spi.security、javax.security.auth、javax.security.cert、javax.sql、javax.sql.rowset、javax.sql.rowset.spi、javax.transaction.xa、javax.xml。 parser, oracle.i18n.text.converter, oracle.ons, oracle.security.pki, org.w3c.dom, org.xml.sax, org.xml.sax.helpers] 按 Bundle-Classpath 上的类[Jar:ojdbc14.jar]: [oracle/jdbc/pool/OracleConnectionCacheManager$1.class, oracle/jdbc/rowset/OracleCachedRowSetReader.class, oracle/jdbc/pool/OracleRuntimeLoadBalancingEventHandlerThread$1.class, oracle/jdbc/rowset/OracleWebRowSet.class , oracle/jdbc/internal/OracleConnection.class, oracle/jdbc/connector/OracleManagedConnectionMetaData.class,oracle/jdbc/xa/OracleXAConnection.class、oracle/jdbc/xa/OracleXAException.class、oracle/jdbc/xa/OracleXADataSource.class、oracle/jdbc/pool/OracleOCIConnectionPool.class、oracle/jdbc/connector/OracleConnectionManager.class、 oracle/jdbc/rowset/OracleJDBCRowSet.class、oracle/net/nt/TcpsConfigure.class、oracle/jdbc/rowset/OraclePredicate.class、oracle/jdbc/pool/OracleRuntimeLoadBalancingEventHandlerThread.class、oracle/jdbc/connector/OracleResourceAdapter.class、 oracle/jdbc/pool/OracleConnectionCacheTimeOutThread.class、oracle/net/jndi/CustomSSLSocketFactory.class、oracle/jdbc/rowset/OracleRowSetMetaData.class、oracle/jdbc/driver/T4CXAResource.class、oracle/jdbc/rowset/OracleFilteredRowSet.class、 oracle/jdbc/xa/OracleXid.class、oracle/jdbc/rowset/OracleWebRowSetXmlWriter.class、oracle/jdbc/rowset/OracleJoinable.class、oracle/jdbc/pool/OracleConnectionCacheImpl.class、oracle/jdbc/connector/OracleManagedConnectionFactory.class、oracle/jdbc/pool/OracleFailoverEventHandlerThread$1.class、oracle/sql/converter/CharacterConverterFactoryOGS.class、oracle/jdbc/pool/OracleConnectionEventListener.class , oracle/jdbc/rowset/OracleWebRowSetXmlReaderImpl.class, oracle/jdbc/pool/OracleXAConnectionCacheImpl.class, oracle/jdbc/rowset/OracleWebRowSetXmlWriterImpl.class, oracle/jdbc/driver/PhysicalConnection.class, oracle/jdbc/xa/client/OracleXADataSource .class、oracle/net/jndi/TrustManagerSSLSocketFactory.class、oracle/jdbc/xa/client/OracleXAResource.class、oracle/jdbc/xa/OracleXAResource.class、oracle/jdbc/pool/OracleConnectionCacheEventListener.class、oracle/jdbc/rowset /OracleRowSetListenerAdapter.class,oracle/jdbc/rowset/OracleWebRowSetXmlReaderDomHandler.class,oracle/jdbc/connector/OracleConnectionRequestInfo.class、oracle/jdbc/pool/OracleDataSourceFactory.class、oracle/net/jndi/JndiAttrs.class、oracle/jdbc/rowset/OracleJoinRowSet.class、oracle/jdbc/rowset/OracleWebRowSetXmlReader.class、 oracle/jdbc/xa/client/OracleXAHeteroConnection.class、oracle/jdbc/driver/T4CXAConnection.class、oracle/net/nt/CustomSSLSocketFactory.class、oracle/net/nt/TcpsNTAdapter.class、oracle/jdbc/rowset/OracleCachedRowSetWriter。类、oracle/jdbc/rowset/OracleCachedRowSet.class、oracle/jdbc/pool/OraclePooledConnection.class、oracle/jdbc/pool/OracleFailoverEventHandlerThread.class、oracle/jdbc/xa/client/OracleXAConnection.class、oracle/jdbc/pool/ OracleConnectionPoolDataSource.class、oracle/jdbc/driver/LogicalConnection.class、oracle/jdbc/pool/OracleConnectionCacheManager.class、oracle/jdbc/rowset/OracleRowSet.class、oracle/jdbc/pool/OracleImplicitConnectionCache.class、oracle/jdbc/connector/OracleManagedConnection.class、oracle/jdbc/pool/OracleConnectionCache.class、oracle/jdbc/xa/client/OracleXAHeteroResource.class、oracle/jdbc/driver/OracleDriver。类、oracle/jdbc/rowset/OracleWebRowSetXmlReaderContHandler.class、oracle/jdbc/connector/OracleLocalTransaction.class、oracle/net/jndi/TrustManager.class、oracle/jdbc/pool/OracleDataSource.class]
所以我没有得到预期的结果。
对此有任何想法吗?
谢谢您的帮助。