Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Abhishek Rath

Ranch Hand
+ Follow
since Nov 22, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhishek Rath

Hi All

When we are running the  below command from server 10.XXX.XX.21. We have postfix server installed  in 10.XXX.XXX.17 smtpd_tls_cert_file = none in the main.cf file and below are the settings we have done




openssl s_client -starttls smtp -connect 10.XXX.XXX.17:25 we are getting the below error



However when we run the same command with a cipher options , We are getting it connection.

openssl s_client -starttls smtp -connect 10.XXX.XXX.17:25  -cipher aNULL



We run the EHLO  command and found the 250-STARTTLS listed down.

So not sure what could be the reason
5 years ago
We are trying to encrypt the email which our application is sending . We have added mail.smtp.starttls.enable="true" in the root.xml and in the SMTP host , we are using postfix server and there we have added smtp_tls_security_level  = encrypt in the main.cf file.

When our application is sending email , we are getting the below error



So we searched and found the option smtpd_tls_cert_file = none , which we added in the main.cf file. Now we are seeing it is initiating the TLS connection however getting the below error




smtp-zbc-xx01 - is the SMTP server where postfix is running.We are using 25 port.

abc.dd.com - is my tomcat server where java application is running which is sending the email via smtp-zbc-xx01 server.

Any help in this issue will be highly appriciated.

Regards
Abhishek

5 years ago
Thanks. In root.cml we defind the JNDI for mail

<Resource name="mail/Session" auth="Container" <br />        type="javax.mail.Session" <br />        username="<mail account username>" <br />        password="<mail account password>" <br />        mail.debug="false" <br />        mail.user="<mail account username>" <br />        mail.from="My wiki <email@domain.com>" <br />        mail.transport.protocol="smtp" <br />        mail.smtp.host= "<smtp mail host>" <br />        mail.smtp.auth= "true" <br />        mail.smtp.port= "<SMTP Server Port>" <!-- Default 25 --> <br />        mail.smtp.starttls.enable="true" <br />        description="Global E-Mail Resource" <br />    />

So when we set mail.smtp.starttls.enable="true"  , do we need to add the username , password , mail.user and mail.password or these are optional?
5 years ago
Hi

We are using Javamail for sending Email however now I need to implement the TLS. I found that if we add the attribute mail.smtp.starttls.enable="true"/> then it will solve the purpose. However I want to know if we need to change the Java code as below along with setting this attribute?


{code}
Session session = Session.getInstance(props,
         new javax.mail.Authenticator() {
           
           //override the getPasswordAuthentication method
           protected PasswordAuthentication
                          getPasswordAuthentication() {
                                       
               return new PasswordAuthentication(username,
                                                password);
           }
         });
{/code}
5 years ago
When I run the below code





output is

94122|null
94122
null
true

See the last true..Could you please explain why this is happening?

I am using JDK 8 .
6 years ago
In the POM file we have it defined

         <dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>

The earlier version was

<groupId>com.oracle</groupId>
        <artifactId>ojdbc7</artifactId>
        <version>12.1.0.2</version>
     </dependency>

The JDK is 1.8.

So for this version of Oracle and JDL , do we need to use ojdbc7 not ojdbc8?
The Oracle DB version is 12.1.0.2.0 SELECT version FROM V$INSTANCE

The Spring Version used here is 3.1.1 .
Hi

  When I change the POM to use ojdbc8 Jar then I am getting the below error

2017-08.18 04:42:02.647-0700: ERROR: Failed to create status log entry: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO table name (s_id, f_id, p_id, t_type, d_addr, st, desc, f_size) VALUES (88568, ?, ?, ?, ?, ?, ?, ?)]; SQL state [99999]; error code [17068]; Invalid argument(s) in call; nested exception is java.sql.SQLException: Invalid argument(s) in call
2017-08.18 04:42:02.647-0700: CAUSE: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO table name (s_id, f_id, p_id, t_type, d_addr, st, desc, f_size) VALUES (88568, ?, ?, ?, ?, ?, ?, ?)]; SQL state [99999]; error code [17068]; Invalid argument(s) in call; nested exception is java.sql.SQLException: Invalid argument(s) in call
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO QA_DF_OWNER.df_statuslog (stl_id, feed_id, partner_id, trans_type, dest_addr, status, description, file_size) VALUES (88568, ?, ?, ?, ?, ?, ?, ?)]; SQL state [99999]; error code [17068]; Invalid argument(s) in call; nested exception is java.sql.SQLException: Invalid argument(s) in call
       at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
       at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
       at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603)
       at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:843)
       at org.springframework.jdbc.object.SqlUpdate.update(SqlUpdate.java:188)

Caused by: java.sql.SQLException: Invalid argument(s) in call
       at oracle.jdbc.driver.AutoKeyInfo.getNewSql(AutoKeyInfo.java:187)
       at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:4342)
       at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:807)
       at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:807)

Any clue  what could be the reason?

Regards
Abhishek

   
Hi All

  I have the following requirement .

   1. A file will be generated by crystal report and uploaded to a shared path.
   2. I need to write a program to validate the file contents once the upload is completed by crystal report.

 Do I need to use quartz Scheduler or some other mechanism. Could you please suggest the better approach for this requirement?

Regards
Abhishek
6 years ago
Hi All

  In my application we are creating the stub for each request and then on that Stub we are invoking the Login function to login to external vendor database. For last few weeks we are getting the below exception

Connection reset
org.apache.axis2.AxisFault: Connection reset
       at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
       at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
       at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)

On multiple try we are able to get the response. So one of the suggestion the Vendor gave to use the Pooling for Stub with a TTL. SO please let me know how to proceed with this implementation.

7 years ago
Hi

I have a Spring controller which contains a post method and deployed in prod working fine. However while going through the access log I found that few 404 error for the post URL. I could not understand what a post method will throw 404 error. Do you aware of any such reason ?
7 years ago
Hi

I am getting the below exception when trying to connect to the Active MQ server from Java code. The code and MQ server are running on my machine only.

016-04-18 15:57:39 DEBUG DefaultMessageListenerContainer:803 - Could not establish shared JMS Connection - leaving it up to asynchronous invokers to establish a Connection as soon as possible
javax.jms.JMSException: Connect failed: Detected corrupted data in the socket (url=tcp://xxx.xxx.xxx.xx:61616). Connection is terminated.
at com.tibco.tibjms.TibjmsxLinkTcp.syncSendRequest(TibjmsxLinkTcp.java:1097)
at com.tibco.tibjms.TibjmsConnection._doInitMsg(TibjmsConnection.java:1662)

I tried to search in the google on the possible reason for Detected corrupted data in the socket , however could not get any good thread. Any help in this regards will be appreciated.

Regards
Abhishek
7 years ago