arfeen khan

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

Recent posts by arfeen khan

Hi All,

I am writing a program to connect with JIRA and create tickets automatically.
For this i used JIRA rest API. The code is done in Eclipse-Kepler using java as a stand alone program.

For some request, this program is throwing "Bad Request" and response code "400".
I want to debug what is wrong with a particular request. Is there any plug in to debug that?
I tried using Rest client in eclipse, but its asking for URL to hit in this tool.
I want if I run my program as Java, some tool can show me the required debug statements.

9 years ago
Hi All,

I am new to windows 64 bit and eclipse (64 bit-Kepler) as well. I just downloaded and started importing my project. My project is based on Maven 3.
Whenever i am importing my project as "Existing maven project", its giving error--
"No marketplace entries found to handle maven-jaxb-plugin:1.1.1:generate in Eclipse. Please see Help for more information."

I tried to search for plugin using marketplace, but no luck.

Can anybody point out, where i am doing wrong or what are the correct steps?

Thanks in advance.
Thank you Peter for valuable response.
Let me see what can i do with custom plugin.
10 years ago

This problem faced while migrated the code from maven 2 to maven 3.

I have a master POM and project pom structure.
In project pom (means a project having their own pom which inherits some properties form master pom)
version uses expression which is defined in master pom.
Earlier we were using Maven 2, and there was not any issue, until we migrated to maven 3.

Warning coming is-

[WARNING] Some problems were encountered while building the effective model for com.mycompany.myservice:myservice:jar:MyBranch-1.0
[WARNING] 'version' contains an expression but should be a constant. @ com.mycompany.myservice:myservice:${myserviceVersion}, pom.xml line 11, column 14
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

Following is the structure in project pom--


"myserviceVersion" is defined in master pom as follows--



Got this link where it shows that similar issue is in OPEN state--

Need a thought if we have any workaround for this?

10 years ago
In the system, let say there are two different tools are available, Tool-A_Uses_JPA and Tool_B_Uses_JDBC.
As the name of tools is self explanatory what persistence technology used by tools.
Say,there is a table COMMON_TABLE. This can be used by both tools to perform CRUD operation.

Lets see the problematic scenario-

Tool_B_Uses_JDBC tries to insert some new rows in COMMON_TABLE, by performing following tasks--
(Tool_B_Uses_JDBC already calculated how many rows will be inserted into COMMON_TABLE. Let's say it is 5.)

1. Read JPA_GENERATED_KEYS table for getting last_value for COMMON_TABLE. Let's say it is 30.
2. Add (last_value + number of rows to be inserted), here it 30+5 =35.
3. Update the JPA_GENERATED_KEYS table for last_value of COMMON_TABLE by the value calculated in step 2.
In my example it was updated by 35.

Above three steps done in a single transaction.

Now, ideally if any other tool use this COMMON_TABLE to perform any insert operation, the last_value from
JPA_GENERATED_KEYS should be 35. But for Tool-A_Uses_JPA, JPA cache is enabled. So this tool still get
last_value as 30, rather 35. And hence Tool-A_Uses_JPA, does not work properly.

So to resolve this issue, i thought to write a code to update JPA cache while updating the last_value.
Is there any way to update and/or send notification to all other tools to update JPA cache when updating
last_value form NON_JPA code?
Or is there any other way to resolve this issues?

Thank you all for posting the reply.
Though there was not a exact answer, but some how satisfying response.
Is there any way to fetch the column name name for which SQL exception occurred?

For example a table MyTable is defined as --

Now if issue following insert it will raise ORA-01722-
INSERT INTO testchild VALUES(5, 'tes')
as AGE column expects a number, but we are providing a string.
So i want in my JDBC program to get for which column (here age) this error occurred.

Please help on this.
Thank you so much Martin for the descriptive link and your sincere suggestion.
Hello There,

I am trying to handle SQLExceptions. The database used is Oracle 11g.
The purpose is to show user friendly messages based on the error codes.
To do this, i can find one way to go for error codes.
In the catch i will write switch statement having cases for different error codes and i will show
user friendly messages based on that.

The problem is, i did not found the list of error codes for oracle.
Can anybody please help on this.

Hello Rancher's,

During my test program i found a weird behavior for equal operator .

The Problem is:
If i try to print the return value of "equal operator" for two reference variable pointing to same string object.
the result always comes FALSE.

Following is the code snippet--

Actual Result is:

inside if -- Got true for sr1==sr2
End of Program.

Expected Result:
inside if -- Got true for sr1==sr2
The value of sr1==sr2 [true].
End of Program.

The red marked line should come.

Can any Rancher, please suggest why this happening.

11 years ago
Thank You Winston Gutkowski for your reply.

Thank you Ivan Jozsef Balazs for suggestion.
11 years ago
Hello there,

I read in java blogs that String objects are represented as UATf16 format.
Can we proof it by any piece of code?
Meaning any program that can show us that String is represented by UTF16.

Thanks in advance,
11 years ago
Thank you Tsang for the reply.
Your anology seems to be good for me.
Anybody else please comment on this.

Hello there,

I am bit surprised if i can my java program on cloud.
And also if i want to run Spring/Hibernate/Struts based project on cloud with same look and feel as eclipse.

Do anybody aware of any such link?
Please share it.

I know how to run DB queries on cloud without installing anything on my laptop.

Thank you,
11 years ago
Hello there,

I tried to find out what is the full form of OOPS.
Till OOP is fine (Object Oriented Programming), but when "S" cmoes,
mind comes up with multiple answers - Structure, System.
Also, when i Google it out, some link says there is no meaning of S in OOP.

Can anybody please let me know exact meaning of "S"?