Trouble getting jConnect3 working with Sybase IQ in struts2 - jdbc

I am trying to get jconn3.jar driver to connec to Sybase IQ in a struts app. Here is my config file:
<jdbc-driver-params>
<url>jdbc:sybase:Tds://myhost:2641/LDW</url>
<driver-name>com.sybase.jdbc3.jdbc.SybDriver</driver-name>
<properties>
.
.
.
Unfortunately, this is what the log says:
<Creating Connection Pool named jConnectLDW, URL = jdbc:sybase:Tds://myhost:2641/LDW, Properties = user=myUsername;hostname=foo;.>
<registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver#1092d6d2]>
<java.sql.SQLException: JZ003: Incorrect URL format. URL:
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
I have done quite a bit of hunting and I cannot see a problem with the URL. Can anyone spot a problem here?

You do have the wrong URL in your code.
In the examples the URL is shown as jdbc:sybase:Tds:host:port with examples like jdbc:sybase:Tds:myserver:3767
In these cases the host is just the name of the machine and has no path separators (i.e. the \ or /) so try jdbc:sybase:Tds:myhost:2641/LDW

Related

Jmeter - Plugins behind the proxy

I placed plugin manager in "lib\ext" folder and tried to open it showed error:
java.io.IOException: Repository responded with wrong status code: 407
Jmeter version - 3.3
Plugin version - 0.16
Jmeter is invoked from command line by using the following parameters:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -H Proxyserver -P 1234 -u princen -a ***
Parameters modified as suggested here
JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***" C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat
Above try gives the following error message
Windows cannot find "JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
When I tried to changes command to the following:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
I received an error:
java.io.IOException: Repository responded with wrong status code: 407
Can someone please correct parameters required to load the plugin manager?
Ensure you use last version of jmeter-plugins download manager.
Regarding your parameters, you're mixing different configurations, just set (for both http and https):
JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=john -Dhttps.proxyPass=password -Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=john -Dhttp.proxyPass=password"
Where password is your real password.
None of above methods working for me. Its really tough to work with Java(due to Loadrunner background). I added Ultimate thread alone and its working fine.
Thank you all for your inputs..
JMeter is using the official proxy configuration from Oracle (like here: https://memorynotfound.com/configure-http-proxy-settings-java/)
The problem is that the jmeter documentation is wrong about the password parameter: it should be http.proxyPassword not http.proxyPass.
Also you must use the https. properties for secured urls you want to access using the proxy. And the http. properties for non secured.

unable to connect Sql Developer using JDBC URL

I have jdbc URL as follows.
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=8888))(LOAD_BALANCE = on)(CONNECT_DATA =(SERVER=DEDICATED) (SERVICE_NAME=XXX.XXX.XXX.XXX.com)))
When I connect using this URL from sql developer getting error as follows.
error ora 00604 error occurred at recursive sql level 1 ora-01882 timezone not found
I'm using Mac. If I go to .sqldeveloper -> 4.1.x -> product.conf.
There was a suggestion to change the tz to AddVMOption -Duser.timezone=CET . But I dont find any file called "sqldeveloper.conf".
Any idea here.
Resolved it by adding timezone values in sqldeveloper in product.conf file.
The path was : /Users/username/.sqldeveloper/4.1.5/product.conf (in MACS).
Added line was:
AddVMOption -Duser.timezone=GMT

Jmeter 2.10 and 2.11 don't let me start a HTTP Script Recorder

I'm having trouble starting a proxy server for jmeter 2.10 and 2.11. I found a couple links here on SO and apache.org but my error message is slightly different that what's written on these links. Per the wiki from apache.org, I don't think I have trouble finding keytool because it returns the path when I do a
which keytool
/usr/bin/keytool
and I don't have trouble creating a file in the jmeter-210 and jmeter-211/bin dirs. This is the error message I get in my jmeter.log file:
ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Command :'"keytool" "-genkeypair" "-alias" ":root_ca:" "-dname" "CN=_ DO NOT INSTALL unless this is your certificate (JMeter root CA), OU=Username: COMPANY\user.name, C=US" "-keyalg" "RSA" "-keystore" "proxyserver.jks" "-storepass" "randomstr1" "-keypass" "randomstr1" "-validity" "7" "-ext" "bc:c"' failed, code: 1
keytool error: java.io.IOException: Invalid escaped character in AVA: 's'
I don't know what this "invalid escaped char in AVA" is. My company and username don't have the string "AVA" and I didn't find it in any of the property files in jmeter-21x/bin.
Not sure if this is affecting it but I'm running jmeter from Darwin on a MBP, OSX 10.7.5.
JMeter 2.9 doesn't give me any proxy issues, although, I ran into other issues with it, which is why I tried using these 2 newer versions, which are giving me problems with the proxy server. I'll try going down to 2.8 to see what happens but I'd rather not if I can help it. That and I'm super curious what the issue is with 2.1x and my laptop. Thanks in advance for your help.
EDIT: The COMPANY/user.name part of the error message was changed this way to sanitize the error message, although, I will try at home on my linux box to see if the funny username representation is the cause.
As per sebb response on User Mailing List:
"I suspect it might be in the string "COMPANY\user.name" which is
derived from the Java system property "user.name".
You could try redefining it on the command line (or in
system.properties) to something simpler, for example:
-Duser.name=foobar
A bug has been opened to fix this issue with "\" character:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56178

Connection to Oracle DB with Play Framework failed

I have this exception when I am trying to connect my oracle database to my application on Play! Framework 2.1.5 (the problem concerns the ebean.default="models.*" line) :
Configuration error
path parameter: Invalid path ' - could not find datasource for default': Token not allowed in path expression: '-' (Invalid number: '-') (you can double-quote this token if you really want it here)
In C:\MyApps\oracleCrud2\conf\application.conf at line 54.
51# You can declare as many Ebean servers as you want.
52# By convention, the default server is named `default`
53#
54 ebean.default="models.*"
55
56# Logger
57# ~~~~~
58# You can also configure logback (http://logback.qos.ch/), by providing a logger.xml file in the conf directory .
Some help would be appreciated :)
I am answering my own question. Here is the working part of the application.conf that deals with Oracle connection with Play! :
db.default.driver=oracle.jdbc.driver.OracleDriver
db.default.url="jdbc:oracle:thin:#//127.0.0.1:1521/xe"
db.default.user=play
db.default.password=play
Hope that I helped, have a good one !
-Ramzi

Hibernate seems not to resolve alias correctly

since some days I'm facing the following problem:
I am using Hibernate to do the following Restriction on a criteria:
...
criteria.add(Restrictions.sqlRestriction("1=1 CONNECT BY PRIOR {ProcessEntityworkflowProject}.ID = {ProcessEntityworkflowProject}.PARENT_ID"))
Where "ProcessEntityworkflowProject" is the alias which should be resolved by hibernate.
This alias is set in code properly. I also debugged the code and inspected criteria:
There I could see that a subcriteria in subcriterialist of criteria has this correct alias bound to the association path.
But in SQL logs I see that it is not resolved:
... and this_.EXTERNAL_KEY is not null and 1=1 CONNECT BY PRIOR {ProcessEntityworkflowProject}.ID = {ProcessEntityworkflowProject}.PARENT_ID and processent4_.TYPE_ID=? ...
... or is this output correct and it is resolved later internally?
And in tomcat.log I see that there is a NPE:
java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:876)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:831)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:295)
I already found out that this NPE is cause because Oracle JDBC driver can not parse the brackets "{" "}". So I guess that the alias was not resolved properly.
Does anyone of you have an idea what could be wrong or how I could investigate deeper?
Some additional info:
I am using Hibernate 3.2.0 (CR1 afaik), tomcat 5.5, ojdbc14.jar.
Running on RHEL 6.4 and Oracle 11g
Many thx in advance if some of you have an idea ;)
Cheers
Sascha

Resources