Deepa More

Ranch Hand
+ Follow
since May 22, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Deepa More

how to use JMXNotificationAppender to log messages so that notification will be produced/given to AlarmTable in jboss web-console ?
One can configure it in conf/log4j.xml in jboss but what is the usage of above appender to send the notifications?
11 years ago
We are migrating from JSF1.2 to JSF2 using Websphere 8 server (in IRAD8) and using apache myfaces for JSF.
Web.xml is changed to version 3.0

and faces-config.xml to version 2.0


In my web project, I have following jars in WEB-INF/lib:
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.8.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.3.jar
tomahawk20-1.1.14.jar

While rendering jsf page that has ui:composition tag, it gives NPE at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57).

After debugging I found that for ui:composition tag it creates org.apache.myfaces.view.facelets.compiler.TrimmedTagUnit object in org.apache.myfaces.view.facelets.compiler.CompilationManager.pushTag(Tag) method line 221.
On this TagUnit when createFaceletHandler() is invoked it further calls org.apache.myfaces.view.facelets.tag.CompositeTagLibrary.createTagHandler(..) that checks if the list of namespaces (these are namespaces in .taglib.xml file in META-INF of the jars present in WEB-INF/lib directory) contains required namespace of facelet "http://java.sun.com/jsf/facelets".
There is no jar in WEB-INF/lib that contains the taglib and hence it returns handler as null.

What could have gone wrong here? Did I missed any library to add in lib folder?
11 years ago
JSF
Hi, we are migrating our web application from JSF 1.1 to JSF 2.0 but while accessing the application using context root getting 404 error.
web.xml contains:


in index.html the page is redirected to jsf page using javascript function on load event as:


In console following error message is getting printed:


I am running this on Websphere 8 and I have <my-project>/resources/itm/web/Content/Content.xhtml located in my IRAD project.
Any help is appreciated.
Thank you.
11 years ago
JSF
I am using IRAD 6.0.1.2 and set path and java_home pointing to Jdk1.5 dir.
eclipse was working properly, but when I copied svn plugins to plugins & features dir. of eclipse, and restarted it, I am getting error in start up only.
And its not opening now.
Error log is:


!SESSION Sep 30, 2009 14:14:53.794 ---------------------------------------------
eclipse.buildId=I200406192000
java.fullversion=J2RE 1.4.2 IBM J9 2.2 Windows XP x86-32 j9n142-20070708 (JIT enabled)
J9VM - 20070530_2321_lHdSMR
JIT - r7_level20070315_1745
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -plugincustomization C:\Program Files\IBM\Rational\SDP\6.0\eclipse\default\plugin_customization.ini

!ENTRY initial@reference:file:c:/Program Files/IBM/Rational/SDP/6.0/eclipse/plugins/org.eclipse.update.configurator_3.0.0/ 0 0 Sep 30, 2009 14:14:53.794
!MESSAGE FrameworkEvent.ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.update.internal.configurator.ConfigurationActivator.start() of bundle org.eclipse.update.configurator.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186)
at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104)
Caused by: org.eclipse.core.runtime.CoreException: Cannot create configuration in file:/c:/Program Files/IBM/Rational/SDP/6.0/eclipse/configuration/
at org.eclipse.update.internal.configurator.Utils.newCoreException(Utils.java:66)
at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:110)
at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:71)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958)
at java.security.AccessController.doPrivileged(AccessController.java:231)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186)
at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104)
Root exception:
org.eclipse.core.runtime.CoreException: Cannot create configuration in file:/c:/Program Files/IBM/Rational/SDP/6.0/eclipse/configuration/
at org.eclipse.update.internal.configurator.Utils.newCoreException(Utils.java:66)
at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:110)
at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:71)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958)
at java.security.AccessController.doPrivileged(AccessController.java:231)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186)
at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104)

!ENTRY org.eclipse.osgi Sep 30, 2009 14:14:53.825
!MESSAGE Startup error
!STACK 1
java.lang.IllegalStateException: Bundle initial@reference:file:c:/Program Files/IBM/Rational/SDP/6.0/eclipse/plugins/org.eclipse.update.configurator_3.0.0/ [2] is not active.
at org.eclipse.core.runtime.adaptor.EclipseStarter.ensureBundlesActive(EclipseStarter.java:303)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:227)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)



I tried to open using -clean option, but getting same error.
Can anybody please help me?

Thanks
The problem solved.
It needs some flushing to be done for cached data.
So I called one finder method after insertion of records. Now it returns all records properly.

Thanks again.
Deepa
We are using the WAS version 6.0 and database is DB2 using JDBC driver type 4 - "DB2 UDB" and jars used are :
db2jcc.jar, db2jcc_license_cu.jar, db2java.zip.

Thanks
Deepa
[ August 18, 2008: Message edited by: Deepa More ]
The transaction is like this:
In a first class it calls mstHome.create(..,..,..,....) method to insert a record in a table for say 4 times in loop.
This successfully creates records. Still data is not committed.
Then the next class in chain fires JDBC select statement on the same table to get newly entered ids- which returns only 3 records instead of 4.
Finally while committing, 4 records gets committed.

I am bit confused about the behavior of transaction as if there are 3 inserts, select returns 2 records and so.
As the project is large & complex, I'll not be able to post exact code here. And there are no errors in between transaction processing.

Thanks in advance,
Deepa
The problem I am getting is that in a single transaction, if there are suppose 4 insert statements fired, and in next sequence select query is fired on same table then that select returns only 3 records and not 4 (total uncommitted records) which is wrong, it does not return the last inserted record to select query. But while committing it saves all 4 records.
What will be the problem why select gets only 3 records instead of 4?
We are using EJB 2.1
Thanks for reply.
I solved my problem with the help of these posts:
http://www.symphonious.net/2007/06/19/caching-in-tomcat/
and
https://coderanch.com/t/290800/JSP/java/Invalid-url-pattern-filter-web
I used filter concept of servlet.

Thanks
Deepa
[ April 24, 2008: Message edited by: Deepa More ]
16 years ago

You could simply keep all your static content in the HTTP Server's context.


What do you mean by this?
I am using Apache tomcat5 server and back end as MySQL db.
Do you mean the call to static pages has to undergo via struts-config.xml
i.e. there might be some forward to call these pages?
Or anything else?
Please explore.

Thanks
Deepa
16 years ago
I am using Struts1.2 framework.
On logout I call LoginAction which invalidate session.
The problem is browser's back button problem as users information remains.
I have read posts related to this which mentions setting headers in response object like Cache-Control,Expires and Pragma.
But I have lots of jsp pages, so do I need to include part of setting response header in all jsp pages? Is there any better option to do this at one place?
Also I tried setting "controller" tag in Struts-Config.xml where "noCache" can be specified but there are some static jsp pages for which there is no action written and these are called directly using anchor tag, so facing same back button problem for these pages. Do I need to change calling of static jsp pages?
I want central point to control this, dont want to set response headers on each jsp page. How do I solve this?

Thanks
Deepa
16 years ago
How to write test case for classes that calls database operations using entity beans and data of test case should be read from or write into some xml file?
How to use mock objects here?
The application is J2EE based uses EJBs and back end as db2.
Any examples available?

Thanks
Deepa
16 years ago
Hi,
I am developing website application using struts backend as MYSQL.
Web application is hosted at remote server.
The application on server can be accessed using two urls:
http://{hostname}:8080/ and www.{hostname}/
Everything works with first url i.e. http://{hostname}:8080/
But error is thrown when it is accessed using www.{hostname}/


Not Found
The requested URL /login.do was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
------------------------------------------------------------------------


I am not able to see the tomcat logs.
Any help is appreciated.

Thanks
Deepa
[ December 01, 2007: Message edited by: Deepa More ]
16 years ago
On click of link what are you calling?
If you are calling a servlet to download/open that file, then set response headers like:

And then using FileInputStream read the file contents, write them on response using response.getOutputStream() and call write() method on it.

Thanks
Deepa

[ October 17, 2007: Message edited by: Deepa More ]
[ October 17, 2007: Message edited by: Deepa More ]
There is no answer for this or what?
Can anybody please suggest me on this problem.

Thanks
Deepa
17 years ago