Abhilesh Khatri

Ranch Hand
+ Follow
since Oct 02, 2002
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 Abhilesh Khatri

Hi Balachandran,
Is your issue resolved? If yes can you share what is the solution?

regards
abhilesh

Originally posted by Jessica Sant:
if you're going to go through the effort to rename your image files -- I'd remove the space entirely. Some browsers (like older versions of netscape) don't do well with a space in a file name unless it IS encoded.
I'm surprised that it doesn't work with the encoding.


Ultimately thsts what i ended up doing. I removed the spaces in between the names of the image. This works fine.
Thanks for your comments
venkatesh
21 years ago
JSP
I am facing a problem with <IMG> tag.
In my application i need to construct source attribute of the IMG tag dynamically. I have imgaes created accorindly.
ON of the iMage nme is "Disney Channel". THere for the src attribute of the Img tag is bound to /Disney Channel.gif.
With this it is searching for the image /Disney%20Channel.gif!
The image file i have is Disney Channel.gif. Due to this mismatch i am unable to display the image on the browser.
I need to know work around for this situation. Simple way would be to rename the image name itself to 'Disney%20Channel.gif' instead of 'Disney Channel.gif'. BUt this is not the best approach. Is there a simpler and better way of handling this situation?
Thanks
Venkatesh/Abhilesh
21 years ago
JSP
Hi Every body.
As the saying goes necessity is the mother of all inventions, urgency of this task made us to explore and resolve this issue.
This is quite straight forward but involves some basic understanding of th WSAD tool.
TO do this, use EJB-RDB to add a new EJB in the application.
CReate the tablein the database
Add a new schema for this newly added table.
From the mappings provide a mapping for the SChema and newly added ejb.
From the EJb extension editor provide the required relationhsips if required.
Check that JNDI name is properly created. WHen a new EJb is added, some times the jndi name is not created properly.
At this juncture there may be lot of errors in the task bar. This will be resolved when RMIC is gererated.
TEst the EJB from the EJB test environment of the studio.
Thanks to every body adn hope this informations is helpful to people who might be facing similat situation
venkatesh
21 years ago
Hi
We are using WSAD-IE 4.1.1 to develop an EJB application.
Initially we had the entire database structure ready. Hence used bottom-up mapping to generate the EJBs.
After the development has begun, we realised that we need to alter the existing database so that new table has to be added. This new table need to have a relationship with existing table.
Also we need to remove few attributes from the existing EJB and then in database aslo.
we explored various options that are provided in the EJB-RDB mapping tool. But did not come across any feature in that tool that can solve my problem.
Has any one tried this before. If yes please advice us how to achieve this task. This will be really a great help
thanks
abhilesh/venkatesh
21 years ago
I have an application developed in Websphere application developer integeration edition(4.1.1).
I am using struts. It works very well on WSAD4.1.1.
I created a war file and tried to deploy on application server 4.0.1. Getting the following error:
[03.02.08 15:31:27:773 GMT+05:30] 54b369b1 ServletInstan X SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: (class: com/effigent/noc/resources/BusinessDelegateFactory, method: init signature: ()V) Incompatible object argument for method call
at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:817)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:137)
at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:243)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:103)
at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:388)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:84)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:226)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:357)
at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1001)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:133)
at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:234)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:139)
at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:633)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:615)
at com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:333)
at com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
[03.02.08 15:31:27:913 GMT+05:30] 54b369b1 WebGroup X Servlet Error-[action]: Failed to load servlet: java.lang.VerifyError: (class: com/effigent/noc/resources/BusinessDelegateFactory, method: init signature: ()V) Incompatible object argument for method call
at com.effigent.noc.web.AuthenticatingActionServlet.initializeApplicationResources(AuthenticatingActionServlet.java:173)
at com.effigent.noc.web.AuthenticatingActionServlet.init(AuthenticatingActionServlet.java:36)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:802)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:137)
at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:243)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:103)
at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:388)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:84)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:226)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:357)
at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1001)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:133)
at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:234)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:139)
at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:633)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:615)
at com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:333)
at com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
Can a application developed on wsad 4.1.1 deployable on websphere app server version 4.0.1.
Thanks for any inputs on this.
regards
venkatesh
21 years ago
Hi Kyle,
If you could elaborate on deployment mechanism i.e how to deploy a war/ear file created from wsad on websphere studio it will be of great help to readers. When i worked on this issue, i got very little literature on this front.
regards
venkatesh/abhilesh

Originally posted by Kyle Brown:
Hi folks!
We're in the process of updating my book "Enterprise Java Programming with IBM WebSphere" for WebSphere 5.0. We're giving you a chance to give us some feedback -- what kind of topics would YOU like to see in a book on WebSphere 5.0? We're planning to cover all the basics like using WSAD, Installing WebSphere, deploying to WebSphere, using ANT with WebSphere, and including a ton of examples and best practices (like in the first edition) but what other topics would you like to see? Any new ideas?
Kyle

21 years ago

Originally posted by Kyle Brown:
Hi folks!
We're in the process of updating my book "Enterprise Java Programming with IBM WebSphere" for WebSphere 5.0. We're giving you a chance to give us some feedback -- what kind of topics would YOU like to see in a book on WebSphere 5.0? We're planning to cover all the basics like using WSAD, Installing WebSphere, deploying to WebSphere, using ANT with WebSphere, and including a ton of examples and best practices (like in the first edition) but what other topics would you like to see? Any new ideas?
Kyle

21 years ago
The problem may not be because of querying from entity beans.
I am doing applicatiosn where lot of queries ar eperformed from the entoty beans.
You may want to try and increase size of default connections and check this out.
hope this helps
venkatesh/abhilesh
21 years ago
Found the solution.
Actually the thing that was going wrong was the order in which the SELECT queries in the EJSJDBCPersisterCMPRatingBean.java file were constructed. This file is generated as a part of "Generate Deploy and RMIC code" process.

To elaborate,

Say Entity "Rating" has following columns at database.

colA,
colB,
colC,
colD,
colE,
colF

Of these columns, colC to colF are foreign keys and bound to certain relationships.

Hence, the generated SELECT query came as follows:

SELECT colA, colB, colC, colF, colD, colE from Rating

ideally it should come as :

SELECT colA, colB, colC, colD, colE, colF from Rating


Hence, we figured out from where it is reading such a sequence. In the EJB Extension editor, we found the relationships for Rating entity were not in proper sequence as its there for other entities.

We deleted these relationships, re-created them in the desired order, generated "Deploy and RMIC code" for Rating entity and tested the application. Every thing worked fine.

Make sure that you do these from the EJB Extension editor and not by individually going to the files. Since, Extension editor updates more than one file which we may miss out.


Hope this helps.
regards
abhilesh
[ January 29, 2003: Message edited by: Abhilesh Khatri ]
21 years ago
Continued....
As a workaround to the above mentioned problem, we had a vector of Ratingdata objects rather that Rating remote objects.
but when tried to access the foreign keys (relationships), its alltogether giving some junk ID's which doesn't exist in database.
Entity :- Rating
Attributes:
ratg_id---primary key
ratg_value---attibute holding some business value
rtnt_id ---relationship to --- RatingNumberType entity bean
netw_id ---relationship to --- Network entity bean
airing_id---relationship to --- EpisodeAiring entity bean
demographic_id---relationship to --- Demographic entity bean
(Many ---------------------------------------> One)

When printed the Id's of this relationship we are getting some junk data as mentioned earlier.
Some how the ratg_id i.e. primary key of Rating entity was coming correct. Hence,
we thought of refetching the entity bean from the database by invoking
findByPrimaryKey().
But with this, however we are getting the entity bean. But the attibutes are getting shuffled. I mean,
when we printed the rtnt_id, networkId was displayed.
when printed airingID, rtnt_id was displayed.
We are using the custom finder method (to get the list of rating objects) wherein the query is prepared dynamically. After constructing the query, we printed it to the console. It looks like its coming correctly and even working when executed on DB2 command center. The column sequence adheres to the columns sequence in the entity bean. But still the data captured is shuffled.
We Couldn't understand what is going wrong for such strange behavior from entity beans.
Also, this is the only entity bean that's giving problems all other entity beans are working fine.
Please somebody help?

regards
abhilesh
21 years ago
Hi there
I'm getting the following exception when trying to invoke a method on the remote entity object.

To elaborate:
I have an entity named 'Rating'. I'm calling a Session Bean method in my webApplication to get a vector of 'Rating' objects.
I'm getting vector populated with size 20.
while iterating through the list I'm getting the remote reference and invoking a method on that object as follows:

Where RatingData is the DataAccess beans generated by WSAD.
ratingObj is getting printed in the console. But any invocation from that object is leading to above mentioned error.
I have also tested these entity methods on EJB Test environment(provided by WSAD) and its working fine.
I couldn't figure out why the hell its not working from the web application.
Can somebody put some light on this?
I have searched for this on net. And found one link where the same problem is posted. (the only thing is its in Chinese.) here is the link:
http://www.huihoo.com/cgi-bin/forum/viewthread.php?tid=1127
Thanks in advance.
My work envt is :
IBM websphere application server 4.0
WSAD 4.0
Database: db2
platform : Win2K.
regards
abhilesh
[ January 23, 2003: Message edited by: Abhilesh Khatri ]
[ January 23, 2003: Message edited by: Abhilesh Khatri ]
[ January 29, 2003: Message edited by: Abhilesh Khatri ]
21 years ago
Thanks a lot for all your inputs.
As pointed out, the problem was with
" reportDir.mkdirs(); ".
I removed this and added code that creates directory only when the directory is not there. With this the access probelm has been solved.
Thanks agian for all your inputs and feed back
ABhilesh

[Added [code] tags for readability & reformatted overlong lines - Jim]
[ January 07, 2003: Message edited by: Jim Yingst ]
Hi all,
I am working ona application, where in i use threads to write reports. I need to write about 8 html files into a single directory.
I spawn eight threads one each for each report. At the time of writing the file i am getting "Access Denied Exception"
I guess the problem could be thread might be locking the directory making it unavailable for other threads to write its corresponding reports in the same directory.
For the time being i am using join() on the threads which makes them to que one after the other.
This is leading to performance issue. Each threads takes an average of 3 minutes to writ the html file. Now for the 8 report it is consuming 25 minutes.
If i can solve the access denied exception and make the threads write in the same directoru simultaneously it may take less than 5 minutes, which is what we desire.

Is this a limitation on the part of the threads? Or is there awork around for this issue?
Thanks in advance for all your inputs
abhilesh