Alpesh Parekh

Greenhorn
+ Follow
since Aug 05, 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 Alpesh Parekh

1) In web.xml and struts-config.xml All path are relative

Check it starts with /

Example:
<param-value>/WEB-INF/struts-config.xml</param-value>

2) make sure following jar files are available in application lib directory

commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
i18n.jar
jakarta-oro.jar
struts.jar

The damn thing is working now ...
18 years ago
Guys, I undoorsdtood the concept of fonal object ref.
But my point is how JVM treats final local variable? It must be different then the non-final local variables.
19 years ago
Because the local variables aren’t guaranteed to be alive as long as the method-local inner class object, the inner class object can’t use them. Unless the local variables are marked final!

But how come local varibles which are final are allowed to access?
19 years ago
Hi,

WSAD 5.0 compile all java source files but at runtime gives java.lang.ClassNotFoundException, for classes in WEB-INF/classes direcory.

I created a J2EE application project with a web module.
WSAD created Prj1 and Prj1Web apllications.
Created a directory called lib in Prj1 and put all jar files there. I added webcontent (JSP/Struts classes) in Prj1Web.
In Prj1Web -> properties -> Java jar dependency, Selectd all jar files added to 'Prj1/lib'. That puts an entry for each jar into MANIFEST.MF file.
WSAD compiles all classes into Prj1Web, but at runtime says class not found. So it seems that its not adding the WEB-INF/classes into classpath.
It find classes in jar file. '.classpath' file has an entry for WEB-INF/classes, still at runtime
Here is the error message.
[/Prj1Web] [Servlet.LOG]: action: Error creating Action instance for path '/services', class name 'com.myPack.ui.ServicesAction': java.lang.ClassNotFoundException: com.myPack.ServicesAction
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:342)

I appreciate your help.
20 years ago
I got it. I was using wrong reference.
JSP/Servlet should use refernces defined in WEB.xml.
When i used
Object homeObj2 = ctx.lookup("java:comp/env/ejb/HelloBeanLocalWEB");
or
Object homeObj2 = ctx.lookup("java:comp/env/ejb/HelloBeanRemoteWEB");
And it started to work.
So enjoy and have nice week end.
20 years ago
HI,
I have developed a simple Session bean with ejb reference. In web module slso i have created local and remote reference for this EJB. When i tried to call ejb (from JSP) by this reference it gives following error.
javax.naming.NameNotFoundException: Name "comp/env/ejb/HelloBeanRemote" not found in context "java:"

1) My JSP code is ...
Object homeObj2 = ctx.lookup("java:comp/env/ejb/HelloBeanRemote");
----------------------------------------------------------
2) I generated descriptor files using AAT (WAS 5.0).
My web.xml is ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
- <web-app id="WebApp_ID">
<display-name>HelloWeb</display-name>
<description>Web module for Hello EJB</description>
- <servlet id="Servlet_1059657965808">
<servlet-name>IndextPage</servlet-name>
<jsp-file>Index.jsp</jsp-file>
</servlet>
- <welcome-file-list id="WelcomeFileList_1059657965818">
<welcome-file>IndexPage</welcome-file>
</welcome-file-list>
- <ejb-ref id="EjbRef_1059658267678">
<description>Reference to remote in WEB</description>
<ejb-ref-name>ejb/HelloBeanRemoteWEB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.ant1.business.hello.HelloHome</home>
<remote>com.ant1.business.hello.Hello</remote>
<ejb-link>HelloEJB</ejb-link>
</ejb-ref>
- <ejb-local-ref id="EJBLocalRef_1059658267678">
<description>Reference to local inteface in web.</description>
<ejb-ref-name>ejb/HelloBeanLocalWEB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.ant1.business.hello.LocalHelloHome</local-home>
<local>com.ant1.business.hello.LocalHello</local>
<ejb-link>HelloEJB</ejb-link>
</ejb-local-ref>
</web-app>
----------------------------------------------------------
3) My ejb-jar.xml is ...
- <ejb-jar id="ejb-jar_ID">
<display-name>HelloBean</display-name>
- <enterprise-beans>
- <session id="Session_1059657489864">
<description>This is a Hello EJB.</description>
<display-name>HelloEJB</display-name>
<ejb-name>HelloEJB</ejb-name>
<home>com.ant1.business.hello.HelloHome</home>
<remote>com.ant1.business.hello.Hello</remote>
<local-home>com.ant1.business.hello.LocalHelloHome</local-home>
<local>com.ant1.business.hello.LocalHello</local>
<ejb-class>com.ant1.business.hello.HelloBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
- <ejb-ref id="EjbRef_1059657489874">
<ejb-ref-name>ejb/HelloBeanRemote</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.ant1.business.hello.HelloHome</home>
<remote>com.ant1.business.hello.Hello</remote>
<ejb-link>HelloEJB</ejb-link>
</ejb-ref>
- <ejb-local-ref id="EJBLocalRef_1059657489884">
<description>Local ref to HelloEJB</description>
<ejb-ref-name>ejb/HelloBeanLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.ant1.business.hello.LocalHelloHome</local-home>
<local>com.ant1.business.hello.LocalHello</local>
<ejb-link>HelloEJB</ejb-link>
</ejb-local-ref>
</session>
</enterprise-beans>
....
</ejb-jar>
------------------------------
20 years ago
Hi,
I want to call a java script function for the 'onClick' event of Check box. Checkbox is created using DOM. I wrote following code. But its not calling the javascript. I want to pass 'this' as an argument to this function. Is it possible?
--------------------
function f1() {
alert("Hi");
}
....
....
newrow = document.createElement("TR");
newrow.setAttribute("id", "row_id_1");
//add checkbox
newtd=document.createElement("td");
newcbx=document.createElement("INPUT");
newcbx.setAttribute("type", "checkbox");
newcbx.setAttribute("name", "C1");
newcbx.setAttribute("value", "id_1");
newcbx.setAttribute("onclick", "f1()");
newtd.appendChild(newcbx);
newrow.appendChild(newtd);
....
Hi,
I have installed WAS 4.0.1
For default_app.war of sampleApp.ear (provided by WAS), it gives response to jsp/Servlets but not to HTML files.

I am calling servlets by - http://localhost:9080/servlet/snoop/*
JSP by - http://localhost:9080/very_simple.jsp
and html by - http://blr02f02:9080/index.html
I added <Uri Name="*.html"/> in plugin-cfg.xml and restarted the server. Still i am not able access html pages. It serves jsp/servlets

What could be the problem, and what needs to be done?
20 years ago
Hi,
I am trying to access index.html page from default_app.war of sampleApp.ear. Web resources are protected by basic authentication. I am getting response for JSP and Servlets but not for .html file. Authentication is based on custom registry.
What could be the problem?
---------------------------------------
Error page exception
The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.
For http://blr02f02a:9080/login.html request it gives following error.

Original Exception:
Error Message: No target servlet configured for uri: /login.html
Error Code: 404
Target Servlet: null
Error Stack:
com.ibm.servlet.engine.webapp.NoTargetForURIException: No target servlet configured for uri: /login.html
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.getTargetServlet(WebAppRequestDispatcherInfo.java:86)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:215)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

Error Page Exception:
Error Message:
Error Code: 0
Target Servlet: null
Error Stack:
java.lang.NullPointerException
at com.ibm.ws.security.web.EJSWebCollaborator.handleException(EJSWebCollaborator.java:252)
at com.ibm.servlet.engine.webapp.WebAppSecurityCollaborator.handleException(WebAppSecurityCollaborator.java:142)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:290)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:111)
at com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:620)
at com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:546)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:92)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
20 years ago
Hi,
I am facing classpath problem in WebSphere AE. I gave name of jar files in CLASSPATH textfield in AAT (seperated by white spaces). Also added jar files in application module as well in webmodule.
WebModule is able to find that JAR but ejb module is not able to find that jar and gives ClassNotFoundException.
If you have faced such problem then suggest the correct approach to specify classpath.
Alpesh
21 years ago
I am deploying an ear file in WEbSphere Enterprise Edition. Also log4j is used for logging purpose.
Bean classes are not able to find this classes.
Jar file containing them is in .ear root.
I am not sure how classpath works here?
Can anybody suggest?
[03.03.19 18:56:55:582 GMT+05:30] 1a987653 ExceptionUtil X CNTR0019E: Non-application exception occurred while processing method loginUser: com.ibm.ejs.container.CreateFailureException: java.lang.reflect.InvocationTargetException; nested exception is:
java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: com/trcinc/wdf/util/services/UtilityServiceFactory
at com.gm.util.FusionLog.getLogger(FusionLog.java:983)
at com.gm.util.FusionLog.logInfo(FusionLog.java:411)
at com.gm.fusion.service.mygbp.PSUserManagerEJB.ejbCreate(PSUserManagerEJB.java:52)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.container.StatelessBeanO.<init>(StatelessBeanO.java:96)
at com.ibm.ejs.container.CMStatelessBeanO.<init>(CMStatelessBeanO.java:29)
at com.ibm.ejs.container.CMStatelessBeanOFactory.create(CMStatelessBeanOFactory.java:17)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:941)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:990)
at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:66)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:171)
at com.ibm.ejs.container.EJSContainer.preInvoke(EJSContainer.java:2152)
at com.gm.fusion.service.mygbp.EJSRemoteStatelessPSUserManager.loginUser(EJSRemoteStatelessPSUserManager.java:244)
at com.gm.fusion.service.mygbp._PSUserManager_Stub.loginUser(_PSUserManager_Stub.java:271)
at com.gm.fusion.process.action.WASPSLoginAction.perform(WASPSLoginAction.java:77)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1619)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1429)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:480)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
21 years ago
Hi,
I am deploying a CMP 1.1 entity bean. During verification its not giving any error. While generating code it gives following error.
What could be wrong?
Alpesh Parekh
-------------------------------------------
Cleanup the expanded directory C:\Documents and Settings\da9261\Local Settings\Temp\Std11App_ear
Deploy module Std11Bean.jar
Starting workbench.
Creating the project.
Creating EJB Project...
Creating EJB Project... Opening: /Std11Bean.jar.
Creating EJB Project...
Creating EJB Project... Setting classpath...
Creating EJB Project...
Updating.
Importing EJB Jar.. Importing Jar..
Importing file..
Updating.
Creating Top-Down Map...
Initializing...
Mapping "Std11Bean"...
Saving...
Generating deployment code
Processing CMP entity bean: Std11Bean
An unexpected exception was thrown. Halting execution.
Shutting down workbench.
invocation target
>com.ibm.etools.ejbdeploy.EJBDeploymentException (invocation target)
java.lang.RuntimeException: invocation target
at com.ibm.ObjectQuery.crud.queryplan.QuerySubplan.initialize(QuerySubplan.java:113)
at com.ibm.ObjectQuery.crud.queryplan.QuerySubplan.<init>(QuerySubplan.java:27)
at com.ibm.ObjectQuery.crud.queryplan.QueryPlan.createSubplan(QueryPlan.java:27)
at com.ibm.ObjectQuery.crud.queryplan.QueryPlan.initialize(QueryPlan.java:72)
at com.ibm.ObjectQuery.crud.queryplan.QueryPlan.<init>(QueryPlan.java:21)
at com.ibm.ObjectQuery.crud.queryplan.WriteQueryCreator.createQueryPlan(WriteQueryCreator.java:49)
at com.ibm.ObjectQuery.crud.queryplan.WriteQueryCreator.insertQueryPlan(WriteQueryCreator.java:70)
at com.ibm.ObjectQuery.crud.queryplan.WriteQueryCreator.createInsertQuery(WriteQueryCreator.java:40)
at com.ibm.etools.ejbdeploy.generators.SqlCreateString.getInitializer(SqlCreateString.java:37)
at com.ibm.etools.java.codegen.JavaFieldGenerator.populateFieldDescriptor(JavaFieldGenerator.java:215)
at com.ibm.etools.java.codegen.JavaFieldGenerator.createFieldDescriptor(JavaFieldGenerator.java:76)
at com.ibm.etools.java.codegen.JavaFieldGenerator.createMemberDescriptor(JavaFieldGenerator.java:95)
at com.ibm.etools.java.codegen.JavaMemberGenerator.analyze(JavaMemberGenerator.java:28)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:41)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:173)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:32)
at com.ibm.etools.java.codegen.JavaMemberGenerator.analyze(JavaMemberGenerator.java:36)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:41)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:173)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:32)
at com.ibm.etools.java.codegen.JavaCompilationUnitGenerator.analyze(JavaCompilationUnitGenerator.java:82)
at com.ibm.etools.codegen.BaseGenerator.analyzeChildren(BaseGenerator.java:41)
at com.ibm.etools.codegen.BaseGenerator.primAnalyze(BaseGenerator.java:173)
at com.ibm.etools.codegen.BaseGenerator.analyze(BaseGenerator.java:32)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.deployCMP(EJBDeployOperation.java:173)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(EJBDeployOperation.java:534)
at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doit(EJBDeployOperation.java:217)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.invokeDeployment(BatchExtension.java:704)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:861)
at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:122)
at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:60)
at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:207)
Delete undeployed module file C:\Documents and Settings\da9261\Local Settings\Temp\Std11App_ear\Std11Bean_source.jar
Save the deployed modules as EAR file E:\devenv\was\projects\EntityBeans\lib\Deployed_Std11App.ear
21 years ago