Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Sunil Baboo

Greenhorn
+ Follow
since Aug 12, 2010
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sunil Baboo

Hi,

I am new to Spring DI.

Here is my situation, i have controller and its corresponding dao working in ORACLE DB. Now VERTICA DB has been introduced in application. Controller create new instance of dao. i.e
Controller Class
GRPController.java

Dao Class
GRPDaoOracle.java

For Vertica Dao Class
GRPDaoVertica.java

In controller there is written

public String getFootnote(){
return new GRPDaoOracle().getFooterSentence("02");
}

Can we dynamically inject dao based on chosen DB? How we can inject vertica dao or oracle dao based on chosen DB.
8 years ago
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MYProject 1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (read-properties-file) @ MI-Lsvn ---
[INFO]
[INFO] --- maven-scm-plugin:1.8.1:checkout (update-source) @ MI-Lsvn ---
[INFO] Removing C:\Users\80929\.hudson\jobs\TEST_LSVN\workspace\buildme
[INFO] Executing: cmd.exe /X /C "svn --username 80929 --password ***** --no-auth-cache --non-interactive checkout -r HEAD http://........../CodeBase/ C:\Users\80929\.hudson\jobs\TEST_LSVN\workspace\buildme"
[INFO] Working directory: C:\Users\i80929\.hudson\jobs\TEST_LSVN\workspace
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E170001: PROPFIND of '/svn/lsvn/!svn/vcc/default': authorization failed: Could not authenticate to server: rejected Basic challenge (http://lsvn)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

I had encountered above message while creating build from Jenkins featuring maven.

In maven i had used maven-scm-plugin plugins to checkout/update codebase. I came to know that although i had set correct username and password in plugins configuration, Jenkins User credential overwrites scm authentication provided on plugins configuration or Jenkins is not able to read credential define on maven-scm-plugins. Because if i put pom.xml file from outside .jenkins job directory and hit maven goal mvn scm:checkout or scm:update, it will succeed to do assign goal

Here below is scm plugins implementation in my pom.xml file
<!-- Plugins for source code management -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.8.1</version>
<configuration>
....
<username>...</username>
<password>${svn.password}</password>
......
</configuration>
<executions>
<execution>
<id>update-source</id>
<phase>prepare-package</phase>
<goals>
<goal>checkout</goal>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>

Any suggestion there to solve this problem?


Another solution i got is run scm piror to build by defining repo url and credential on jenkins interface but my aim is to get it done from maven(pom.xml).

Help me!!!

9 years ago
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MYProject 1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (read-properties-file) @ MI-Lsvn ---
[INFO]
[INFO] --- maven-scm-plugin:1.8.1:checkout (update-source) @ MI-Lsvn ---
[INFO] Removing C:\Users\80929\.hudson\jobs\TEST_LSVN\workspace\buildme
[INFO] Executing: cmd.exe /X /C "svn --username 80929 --password ***** --no-auth-cache --non-interactive checkout -r HEAD http://........../CodeBase/ C:\Users\80929\.hudson\jobs\TEST_LSVN\workspace\buildme"
[INFO] Working directory: C:\Users\i80929\.hudson\jobs\TEST_LSVN\workspace
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E170001: PROPFIND of '/svn/lsvn/!svn/vcc/default': authorization failed: Could not authenticate to server: rejected Basic challenge (http://lsvn)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

I had encountered above message while creating build from Jenkins featuring maven.

In maven i had used maven-scm-plugin plugins to checkout/update codebase. I came to know that although i had set correct username and password in plugins configuration, Jenkins User credential overwrites scm authentication provided on plugins configuration or Jenkins is not able to read credential define on maven-scm-plugins. Because if i put pom.xml file from outside .jenkins job directory and hit maven goal mvn scm:checkout or scm:update, it will succeed to do assign goal

Here below is scm plugins implementation in my pom.xml file
<!-- Plugins for source code management -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.8.1</version>
<configuration>
....
<username>...</username>
<password>${svn.password}</password>
......
</configuration>
<executions>
<execution>
<id>update-source</id>
<phase>prepare-package</phase>
<goals>
<goal>checkout</goal>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>

Any suggestion there to solve this problem?


Another solution i got is run scm piror to build by defining repo url and credential on jenkins interface but my aim is to get it done from maven(pom.xml).

Help me!!!




I had developed external launcher program that watch console output for specific interval of time. During period of watch if console output is same as it has previously watched, program assume it was stuck so it kill the process and restart it. Till now it is doing sensible work/
Each URL will be provided from external file (plain text file). Actually application read Directory define on path. These directory contains those external file corresponding to each URL.

I had tested application with Netbean profiler, its has shown 3 Thread on use.

I had web crawler java application that continuously run on do-while loop. Application run fine, accomplishing several loop. After completing several number of loop, java application get stuck. Stuck in sense that Application process is running but application output on terminal/console remain unchanged. There is no any specific place such stuck situation happen, it happen at any situation such as sometime while parsing html, sometime while opening url, sometime while downloading file and so on. Even there will be no exception and error message on terminal/console.

All i am doing now is kill current running process and start application again. This is hectic to me. Can anyone tell me why is that happening.

Also, in my application, in order to reclaim used resource, i that implemented Thread sleep for 5sec, 10sec and so on.

Thank you for your time and consideration.

Hi,

Anybody here who knows about suitable Java API for EDI to XML and vice versa.
10 years ago
Hi,

Can anyone suggest java API that will be used for establishing communication between local machine and different SFTP server (both window and linux).

Thanks in Advanced.

Hello Amit,

yes you are right, the sites that need cookie enabled store session in cookie. so crawler fails to crawl on site that demand cookie enable browser. Am I right?

I know that crawler has no cookie enabled. Can we enable
cookie on crawler by code. Something like web broser embedded crawler?
11 years ago
Actually, my concern is:
I had application that crawl on web link. If login required on web link, it login as well. But there are some sites which required cookie enabled browser. I attempt to login on this site, i always return back with login page. In my application, crawler first request login page, retrive cookie information from this header and request another page after login attaching those server send cookie on it. It has been working for most of the site but not site which ask cookie enable browser. Am i missing something? so that my application crawl on those page after login.

Thanks in advanced.
11 years ago
Hi,

Thanks for your quick response. Well, its java spider. I know this is working great for other web link but I am not sure it can work for web link that required cookie enable browser.


Thank you


11 years ago
Can web crawler be able to extract html source of web url that only run on cookie enable brower?
11 years ago
Some body please help to code on java using HTTPUrlConnection protocol to download file from URL which need posting of URL parameter.

In clear way,

Suppose there is an URL : www.xyz.com?fileid=123 under which file resides. But this url require post parameter: __EVENTTARGERT=123&__EVENTARGUMENT=&__VIEWSTATE=; then only file come up. Hence , scenario here is we need to post data in that url then only file come up which may be zip or pdf or doc.

From direct URL, i know file can be downloaded easily but from URL that require posting on information, i don't know how to do....so can some help me please.

Thankx in advance




11 years ago
I had an application that go through web link and retrieve information needed to me. I had used HTTPURLConnection to accomplish this. It is working for most of the link but for one link it didn't and throw exception.


javax.net.ssl.SSLException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:408)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:746)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.MeteredStream.read(MeteredStream.java:116)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2512)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
SSL peer shut down incorrectly
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)

I though that it might be of socket timeout. Hence i set it to infinite timeout value.
URLConn.setConnectTimeout(0); Still it is not working.

Will someone suggest what is cooking over here. Please note that it is working for most of weblink.
11 years ago