Ajay Kamble

Ranch Hand
+ Follow
since Jan 23, 2009
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 Ajay Kamble

We are using Websphere 7.

And we want to pass data from one web application to different web application using request dispatcher forward,



How can you do this in websphere?

-Ajay
11 years ago
What do you mean by order?

Please note that in the given scenario there is only 1 page involved.
11 years ago
JSF
Hello,

We are facing a strange scenario.

We have a jsf page and a request scoped bean. When we submit the page, if there are any validation errors then same page is displayed with errors.

On development machines only 1 instance of managed bean is created for above scenario.
[managed bean instance is created -> action method is called -> validation fails -> same page is rendered]

But on our test environment 2 instances are created for the same scenario,
[managed bean instance is created -> action method is called -> validation fails -> a new instance is created -> same page is rendered]

This issue is causing inconsistency in our application.

How do we control this behavior? Is there any configuration in faces-config.xml or web.xml?

*NOTE: We are using websphere portal 7.0 on test machines and 6.1 on local machines.
11 years ago
JSF
Thank you Winston.

I will use your explanation to find the answer.
12 years ago
Hello,

We have a JSF application and we use resource bundle for static text that is to be displayed on JSP pages.

Is it advisable to put constant values as well in resource bundle files (considering that any non Java person can also do the change)?

For example, consider below constant,



It is already a constant and if it changes we will do change at only 1 place. Still should we go ahead and put such constants in resource bundle files?

-Regards
Ajay
12 years ago
I am trying to start/debug websphere portal server from RSA.

I have properly configured the server, have provided correct ports (taken from serverindex.xml file). Still I cannot start server from RSA. I can start server from command line without any issues.

When I try to start from RSA, I get all normal logs, I also see server open for e-business and server shows status as started from command line. But the RSA process does not complete successfully. It remains as Started and then timeouts.

After timeout I can access server normally as it is still started.

What can be wrong in this setup?

-Regards
Ajay
12 years ago
I am using Flex 4 (and BlazeDS) on WebSphere 6.1.0.17.

The setup needed for Flex/BlazeDS is that you put blazeds jars in WEB-INF/lib folder of the project. Below are the jars in WEB-INF/lib,



You also load a Flex servlet in web.xml (just like Struts servlet or JSF sevlet), so that it can intercept Flex requests and delegate to proper components.

When I run application I get below error,



I am not able to understand why Websphere says NoClassDefFoundError for javax.net.ssl.SSLSocketFactory, which is part of Java API.

Below is my classloader hierarchy,



The last ClassLoader [#7] is the one which loads BlazeDS jars from WEB-INF/lib folder. Then as shown in exception stack trace if calls other Flex classes and HttpClient classes (which are available to the same class loader), but when it needs javax.net.ssl.SSLSocketFactory it fails.

I am not sure why this happens. If #7 cannot see this class, is it not true that it should go to its parent class loaders upto the Bootstrap class loader? And it is difficult to imagine why none of the classloaders are unable to load class from Java API.

Please help!
13 years ago
Hello,

Is it necessary to keep BlazeDS jars always in WEB-INF/lib. When using Websphere can we add BlazeDS jars as shared libraries?

I am running into ClassLoader issues by keeping Flex libs in WEB-INF/lib and application libs in shared libraries.

Whatever approach (putting flex libs in WEB-INF/lib or shared libraries) I use I keep getting ClassNotFound errors. When I added flex libs in shared libraries, I get ClassNotFound for class that is in my WEB-INF/classes folder. How to solve this ClassLoader puzzle?

Is there anything that I do not know or it is just that Flex and BlazeDS are not good for production applications?
13 years ago
Hi,

I get below error in my BlazeDS setup on dev machine. The application works on my machine but errors out in dev. I am not able to understand the cause of the error.


On dev, I am just using the binary code (for flex like .swf) that I compile on my machine. I have included flex configuration files and lib files in the web application.

Is this a problem? Is it necessary that I compile flex client code on the dev machine?
13 years ago
I am following Jibx Java-to-xml tutorial. However there is no xml heading in the generated XML file

<?xml version="1.0" encoding="UTF-8"?>

What code/configuration is needed to make sure this heading is output in the XML?
This makes sense!

Now my problem is that I have legacy SQL Server database which is storing data as 2 digit year [YY]. I have to export this data to Oracle, 4 digit year.

But is there a solution to do this [maybe in Java]? How do I do the conversion?

-Regards
Ajay
I am having an Oracle database which is storing date as 'dd-Mon-yy', example date is 14-JAN-97 03.25.03 PM.

When I am getting this data from Hibernate I get date as- '14 January 2097'. How do I correct this?

Here is debug output: DEBUG - returning '14 January 2097' as column: CREATION8_10_0_

However if I execute the SELECT query against database then I get correct date: 14-JAN-97 03.25.03 PM.

Here is how my field is defined in Oracle-
Code:



And here is how it is mapped [mapping generated from Hibernate Tools],
Code:


I changed the type to 'timestamp' in mapping file, but it is still returning wrong date,

DEBUG - returning '2097-01-14 15:25:03' as column: CREATION8_10_0_
Hello All,

I am using below code to read the properties files that are on the classpath,

ClassLoader.getSystemResources("my-config-file.properties");

What I want is that at runtime I may have various jars attached and each jar might have this property file. So with above code I want to read all properties files available and make a combined configuration.

Now this code was working well for the simple java project. But it does not work for a web application (deployed on WebSphere). I guess the reason is that in the case of web applications multiple class loaders might be involved.

What do I do so that my code will read all properties files. Is there any project that is already doing this, for example Commons Configuration?

-Regards
Ajay
13 years ago

1. You imagine this with a datatable which has data for countries, there are two columns, one is country name and other is a checkbox. My concern is that when I submit page I need to know which Country was checked and which was not. The code snippet that I have shown shows how to do this. With this code when I submit page I get values in selectedRows HashMap. This code is explained here- http://balusc.blogspot.com/2006/06/using-datatables.html

2. Now imagine the datatable with one column as country name and other is a drop down to select say timezone options. Now when this form is submitted I need to know what option was selected for which country.

3. I do not want multi-value list. Just one option should be selected for each country. I just want some way to get this data on form submit along with information for which country?

I can do this thing easily with lets say plain Servlet/JSP. JSF simplifies some things but then it is making some simple things hard to do .

-Ajay

13 years ago
JSF