Amit Goda

Ranch Hand
+ Follow
since Jan 21, 2012
Amit likes ...
Netbeans IDE Eclipse IDE Java
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 Amit Goda

I guess we cannot change the default rule applied by java so we will need to handle at DB level.

9 years ago
I guess you should try to find why it is occurring, since you know what exception is being thrown.

Are you sure code in your loops are breaking/completing at some point of time i.e it is not running endlessly ?

The first line of exception says java.lang.StackOverflowError . Click on the link and it will take you to javadocs which will say when this exception is thrown.

9 years ago
Thank you Richard and Joanne for your suggestions.

Richard your suggestion seems to be good. But the thing is the project i am working is almost done and now i came across this error while testing.
Also as i said in my earlier post i am using web services (which are developed by others and not me) and when i generate client classes using those web services using apache axis(eclipse built in) the request and response handlers created have by default fields with data type long. So i just take the parameters set them and send a request to web service through client classes. And at this point when i don't set any particular fields with data type long they go as 0 in request.

Hope i am clear about the functionality.

Can i handle at java level or axis level ?
9 years ago
Hi Ritchie,

Thank you for your reply. Actually i am not passing 0 for those fields. In real scenario, i am not setting those fields ( using the setter methods ).

To be more precise, there i have a class called Rating and there are two fields called currentScaleValue and goalScaleValue both of them are of type long.

Now initially user will set only one value i.e currentScaleValue and user won't set the other field. Now when the object of Rating class is passed with value for currentScaleValue only to the DB by default the other field goalScaleValue is set to 0 (as by default a field of type long in java will have value 0).
When an insert call is made to DB to store the values, since the goalScaleValue is by default 0 ( which cannot be inserted into table since 0 value are not acceptable) i am getting an exception saying that cannot set 0 for goalScaleValue column.

I cannot change the column properties in DB since that is created by other and we cannot modify it.

So how do i avoid passing 0 to DB in my java layer when i am passing the Object ?

PS : I am using Apache Axis for invoking the web service using client classes.
9 years ago
Hi Everyone.

How to avoid sending a default 0 value for a field of type long ?

The problem is, i am sending an object to the web service which in turn will make an insert call to store the values of object. In the object some fields data type is long. When passing the Object via client classes.
In our DB there are some fields which will not except 0 values.

So when we don't set any values for a field that has type long, java by default will set 0 for those fields and which will result in an exception related to database.

SO can anyone suggest how do i avoid sending 0 to DB when particular field of long type is not set ?

Any help will be appreciated !
9 years ago
I guess there is no way since my class names generated by eclipse from WSDL are same and since eclipse is bound to override them. So now i m generating client classes for each web service in a new package.

9 years ago
Hello everyone,

I am using eclipse in-built custom mapping tool to generate the custom package for namespaces present in my WSDL file. Now my concerned is, I have around 20 WSDL's and there some WSDL files that share same namespaces. I want all the classes related to same namespace to be in one package associated with that namespace. And when i try to do that, eclipse ask me to override the contents of client classes that are already present.

SO i want to know, how can i generate client classes in one package for more than one WSDL file sharing the same namespace without overriding the classes that are already present in the package generated by some other WSDL.

Hope i make myself clear.

Any suggestion will be helpful!
9 years ago
Thank you for your reply. I used the class and was able to generate the necessary certificate. Here is the link for the class.

The certificate were created and my program ran.

9 years ago
Hello Everyone,

I have created some client classes based on a WSDL. Using this client classes i have created a class to access web service. When i run this class to access web service its giving me an exception regarding the missing SSL certificate in my JRE. SO can anyone tell me how do i resolve the error. I googled it out but couldn't find satisfactory answer. I am getting the following exception

Thank you!
9 years ago
Hello everyone,

I am developing struts2 application using eclipse and resin pro 4.0.27. Everything was working fine till yesterday but all of sudden when i try to start resin server in debug mode, it doesn't start. Resin starts in normal mode without any problem.
The only note i get is that the

I did increased the timeout to 300 seconds but now note says that resin cannot start in 300 seconds, try increasing the timeout.

Can anyone help me on this???

I googled it out but didn't find relevant answers

Good Day!
9 years ago
Hello again,

There's no reply on this thread, but after two day of googling and trying to solve the above error i finally found the cause.

My struts 2 implementation was using Tiles 2.0.6, and inheritance was not taking place.

Than i found this link which stated that inheritance is taking place but all the files are repeated with each level of inheritance.

Thus the Tiles version below 2.1.3 had bugs related to Tiles put-list-attribute inheritance and it was resolved in version 2.1.3.

Tiles bug 2.1.3 can be seen here

So i changed the Tiles version to 2.2.2.

And hurray my put-list-inheritance worked with the very first try.

9 years ago
Hello everyone,

I am using Tiles 2.1 and I am facing a problem regarding the put-list-attribute inheritance.
Following is my tiles-defs.xml

and following is how i am implementing Javascript and CSS on my baseLayout.jsp

The problem is when home definition is called, it overrides the default value of put-list-attribute, i.e when i view the Login page the style.css and jquery.js are applied to the page,
but when i redirect to the home page, the home definition's put-list-attribute overrides the baseLayout's put-list-attribute

so the home page contains SpryAssets/SpryMenuBarHorizontal.css and SpryAssets/SpryMenuBar.js but my basic style.css and jquery.js is being removed from the page.

This behavior is spoiling the style of my webpage and some scripts based on jquery is not working.

But on my home page i want both the CSS and javacript to be present.

Thank you for your replies in advance.
9 years ago
Hello Everyone,

I am developing a Struts based application using Struts 2.3.4 and JPA (Hibernate4.1.5). I am new to Struts as well as to Hibernate. I have previously worked on eclipseLink so i have knowledge about the flow of application using eclipseLink (such as Data controller, Process controller, MVC Pattern).

So my question is...

Can i develop the same flow in Struts using Interceptors ?

The flow i have thought about the application is

1.) the user request will be intercepted by an interceptor and it will check what has to be done (such as sending some other parameters to action class)

2.) the corresponding action class will be invoked

3.) Action completion will be followed by another interceptor and it will decide how and what data will be displayed to the user.

Can anyone help me in this please?

Any advice will be highly appreciated.
9 years ago
Hello Yogesh Thank you for your reply but that didn't solve my problem. I am using resin 4.0. But yes your suggestion will help me eradicate unwanted code in my application.

I solved the error. Actually it was occurring due to old .tld file in my tils-defs.xml and baseLayout.jsp files.

I replace the previous one

with this new one

You can easily see the difference between the older put tags versus newer put-attribute tags.

But the important thing to change is this URL <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "">


this one <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "">.

Hope it helps some other facing the same problem.


9 years ago