Trying to Connect Vertica DB with Weblogic 10.3 - jdbc

Working on Linux Redhat
I have two below jars
1>vertica-jdbc-5.1.1.jar
2>vertica-jdk5-6.1.1-0.jar
Steps that i followed:
1 copied the jars to $WL_HOME/server/lib
2 I set the path of the jars to Linux Path like below
export WL_HOME=/usr/local/WL_Server10.3/sever
PATH= ${WL_HOME}/lib:${PATH}
3 I modified ${WL_HOME}/common/bin/commEnv.sh
Added my jars entry like below
# set up WebLogic Server's class path
WEBLOGIC_CLASSPATH="${JAVA_HOME}/lib/tools.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic_sp.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic.
jar${CLASSPATHSEP}${FEATURES_DIR}/weblogic.server.modules_13.1.1.0.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/webservices.
jar${CLASSPATHSEP}${ANT_HOME}/lib/ant-all.
jar${CLASSPATHSEP}${ANT_CONTRIB}/lib/ant-contrib.jar
${CLASSPATHSEP}${WL_HOME}/server/lib/vertica-jdbc-5.1.1.jar
${CLASSPATHSEP}${WL_HOME}/server/lib/vertica-jdk5-6.1.1-0.jar"
export WEBLOGIC_CLASSPATH
//I also tried the below steps googling,................. Optional Step
4> Modified ${WL_HOME}/server/lib/jdbcdrivers.xml
Added required parameter
i didnt get what to fill in the URLClassPathName value so i ignored it.
5>I restarted the Weblogic server and logged into the admin console
6> I added new JDBC Data Source
While Testing the Connection i am getting below Error:
Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error weblogic.application.ModuleException:
Message icon - Error weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: [Vertica][JDBC](10100) Connection Refused: (11640) Required Connection Key(s): user; (11480) Optional Connection Key(s): autocommit, connsettings, directbatchinsert, logintimeout, loglevel, lognamespace, logpath, readonly, resultbuffersize, sessionlabel, ssl, threepartnaming, transactionisolation
It would be great if someone can help me with the steps to connect Vertica Database to the Weblogic 10.3

What connection settings are you providing in:
"6> Added new JDBC Data Source
7>Followed the steps"
The error says you're missing specificying a user:
[Vertica][JDBC](10100) Connection Refused:
(11640) Required Connection Key(s): user;
(11480) Optional Connection Key(s): autocommit, connsettings, directbatchinsert, logintimeout, loglevel, lognamespace, logpath, readonly, resultbuffersize, sessionlabel, ssl, threepartnaming, transactionisolation

Related

liquibase.exception.DatabaseException: Syntax error in SQL statement " CREATE EXTENSION[*] UUID-OSSP;

Im using postgres with liquibase on cloud and h2db on my local machine. When i write sql queries for generating uuid, i get the error during build:
liquibase.exception.DatabaseException: Syntax error in SQL statement " CREATE EXTENSION[*] UUID-OSSP;
So i removed ossp extension and used gen_random_uuid() instead. And i get the below eror:
Caused by: liquibase.exception.LiquibaseException:
liquibase.exception.MigrationFailedException: Migration failed for change set db/scripts/123_Somescripts.sql::raw::includeAll:
Reason: liquibase.exception.DatabaseException: Syntax error in SQL statement "
I start getting this error during build when i include H2 DB dependency. Otherwise the build works fine.
BUT, even if build works fine, i get the error:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
Process finished with exit code 0
I configured postgres db in appication-local.yml, and activated local profile but build still fails.

What's the meaning of: "java.sql.SQLRecoverableException: I/O-Error: Unknown host specified" if TNS-alias specified

Using Oracle JDBC driver with TNS-alias instead of host:port:SID a'la
jdbc:oracle:thin:#TNS_ALIAS
you may get this error message
java.sql.SQLRecoverableException: I/O-Error: Unknown host specified
while calling
java.sql.DriverManager.getConnection
But there is no problem with the hostname specified by TNS-alias.
Sadly this error message does not point to the real reason:
The error occurs if driver cannot find the tnsnames.ora config file.
Solution
You have to ensure that system-property "oracle.net.tns_admin" is set before connecting and points to the directory containing the tnsnames.ora.

Too few bytes (-1) received from OPMN response error

When I entered Oracle Application Server Control panel, an error message was appeared "Too few bytes (-1) received from OPMN response". It doesn't allow to do any deployment. How can I fix this error?
Trace Information:
oracle.ias.opmn.optic.OpticBadConnectException: Too few bytes (-1) received from OPMN response at oracle.ias.opmn.optic.OpmnPhone.rcvResponse(OpmnPhone.java:529) at oracle.ias.opmn.optic.OpmnPhone.makePhoneCall(OpmnPhone.java:193) at oracle.ias.opmn.optic.OpmnPhone.request(OpmnPhone.java:130) at oracle.ias.opmn.optic.OpmnQuery.getBuf(OpmnQuery.java:347) at oracle.ias.opmn.optic.OpmnQuery.getDom(OpmnQuery.java:467) at oracle.ias.opmn.optic.OpmnQuery.getIasCluster(OpmnQuery.java:941) at oracle.sysman.ias.studio.cluster.OpticTopologyAdminBean.initializeAppServers(OpticTopologyAdminBean.java:1117) at oracle.sysman.ias.studio.cluster.TopologyHelper.prepareData(TopologyHelper.java:1278) at oracle.sysman.ias.studio.sdk.AbstractController.prepareData(AbstractController.java:875) at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:391) at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765) at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283) at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:297) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
Error logs in opmn.log file :
.
.
.
16/02/03 10:14:29 [ons-connect] Local connection 127.0.0.1,6100 invalid form factor
16/02/03 10:16:29 [ons-connect] Local connection 127.0.0.1,6100 invalid form factor
16/02/03 10:18:42 [ons-connect] Local connection 127.0.0.1,6100 invalid form factor
16/02/03 10:19:29 [ons-connect] Local connection 127.0.0.1,6100 invalid form factor
.
.
After a long search process, I find that my error is related with owner permissions on oracle server. oracle user manages the instances so files under oracle/ folder must have oracle owner permissions. If you enter with root or other user and change some file permissions by running or rewriting them especially config files under j2ee/home/persistence, opmn/conf, opmn/bin, oracle user can not execute that files. I set files owner permissions with oracle user and restart the server, error was gone.

Adding data source for jidea 11.0.2

i'm trying to connect to a oracle 10g database from inside jidea,i'm using ojdbc6-11.2.0.1.0.jar as the jdbc driver. attached is the error message i'm getting when
i'm trying to connect! can any one help me to solve this issue??
Connection to oracle - albi1dv1 failed
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
Regards,
Rangana
i have used the jdbc driver named ojdbc14_noneXe.jar, it solved my problem. :)
FYI - i'm connecting to a remote oracle development database, not an local installation on my mechine!
You can set the timezone to IDEA. This will prevent this error.
Add the next line to file idea.vmoptions :
-Duser.timezone=your_database_timezone
Here's some explanation on how to get your database timezone
in eclipse go run - > run configuration
in there go to JRE tab in right side panels
in VM Arguments section paste this
-Duser.timezone=GMT
then Apply - > Run

OC4J 10.1.3.3 unable to find ojms.rar setting up database persistences

I'm running into problems with JMS in Oracle AS 10.1.3.3.
The error I am getting is 'connectors\ojms.rar (The system cannot find the path specified)' from EM.
Below are a few bullets on the environment.
This is on a Windows XP SP3 machine.
All configuration is through EM.
The EM is a local instance that has been used for over a year.
This instance has existing db connection management exposed through JNDI.
Oracle_home is set to the directory where I unzip the OC4J zip file. c:\oc4j_10.1.3.3.
ojms.rar file is in %ORACLE_HOME%\j2ee\home\connectors
Configuring OC4J for JMS with Database Persistence
I've create a new data connection for Oracle AQ and exposed the connection through JNDI as jms/flexc
When creating the Resource Adapter through EM, I'm providing the following information:
Resource Name: JMS on FlexC
Adding a new resource
Name : jmsFlexc
Datasource JNDI : jms/flexc (selected from dropdown box)
Very quickly, I get the error below:
An error has occurred.
connectors\ojms.rar (The system cannot find the path specified)
connectors\ojms.rar (The system cannot find the path specified)
[Select to hide information] Hide Additional Trace Information
oracle.sysman.ias.studio.j2ee.deploy.DeployUtil$DeploymentFailureException at
oracle.sysman.ias.studio.j2ee.deploy.DeployUtil.deployArchive(DeployUtil.java:211) at
oracle.sysman.ias.studio.j2ee.deploy.DeployUtil.deployArchive(DeployUtil.java:85) at
oracle.sysman.ias.studio.oc4j.jms.JMXDeployDbProviderAdminBean.deployDBProviderAndConfigure(JMXDeployDbProviderAdminBean.java:121) at
oracle.sysman.ias.studio.oc4j.jms.DeployDbProviderHelper.deployDBProvider(DeployDbProviderHelper.java:242) at
oracle.sysman.ias.studio.oc4j.jms.DeployDbProviderHelper.handleEvent(DeployDbProviderHelper.java:127) at
oracle.sysman.ias.studio.sdk.AbstractController.handleEvent(AbstractController.java:769) at
oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:378) at
oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765) at
oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283) at
oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:385) at
oracle.cabo.servlet.UIXServlet.doPost(Unknown Source) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at
oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75) at
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at
oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85) at
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at
oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80) at
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at
oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68) at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621) at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at
oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at
java.lang.Thread.run(Thread.java:619) Caused by: oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: connectors\ojms.rar (The system cannot find the path specified) at
oracle.oc4j.admin.jmx.shared.util.JarTool.(JarTool.java:122) at
oracle.sysman.ias.studio.j2ee.deploy.DeployPageUtil.getArchiveType(DeployPageUtil.java:105) at
oracle.sysman.ias.studio.j2ee.deploy.DeployUtil.deployArchive(DeployUtil.java:133) ... 33 more Caused by: java.io.FileNotFoundException: connectors\ojms.rar (The system cannot find the path specified) at
java.util.zip.ZipFile.open(Native Method) at
java.util.zip.ZipFile.(ZipFile.java:114) at
java.util.jar.JarFile.(JarFile.java:135) at
java.util.jar.JarFile.(JarFile.java:99) at
oracle.oc4j.admin.jmx.shared.util.JarTool.(JarTool.java:119) ... 35 more
Discovered that this is a bug in OC4J.
The solution was found by a colleague as a comment made to this blog
I also got an error when deploying the
resource adapter. I found that this
was a bug in Oracle Standalone
10.1.3.3.0 (bug 6786060 on Metalink) and can be solved either by using
10.1.3.2.0 or by starting Oracle standalone without the ORACLE_HOME
environment variable. This is made by
the command "java -jar oc4j.jar". I
used the last solution and it worked
fine for me.

Resources