Caroline Iux

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

Recent posts by Caroline Iux

I need to get a connection a secure page in 3.5.4:
The following code raises connection because it doesn't recognize protocol "https". It seems like the provider is not registered. I know the same code works in WebSphere 4.03. I've tried everything in 3.5.4, with ibmjsse.jar, sun's jsse. No luck
--------------------------------------------
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
URL url = new URL("https://localhost/account/login.jsp");
---------------------------------------------
Please HELP!!!
21 years ago
Anyone knows how to do this?
I checked the temp directory, there are only dat file and class file. I didn't find any related option in Admin Console either.
Thanks.
22 years ago
I am running my application on WebSphere on a Linux box.
I have X Windows System and xvfb installed on the server and it seems like it's connecting to the X windows server OK.
The error msg I am getting is:
-------------------------------------------------
Servlet Error: sun/awt/X11GraphicsEnvironment: java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:134)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:64)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1025)
at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1015)
at org.faceless.graph.output.ImageOutput.<init>(Unknown Source)
at org.faceless.graph.output.PNGOutput.<init>(Unknown Source)
at org.faceless.graph.output.PNGOutput.<init>(Unknown Source)
at com.fmo.supplynet.util.GraphingUtils.createLineGraph(GraphingUtils.java)
at com.fmo.supplynet.action.ViewAMScorecardReportAction.perform(ViewAMScorecardReportAction.java)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at com.fmo.supplynet.action.SNActionServlet.doPost(SNActionServlet.java)
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:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
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:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
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:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
---------------------------------------------
Any help is appreciated!
22 years ago
Craig,
Thanks for you reploy. I am not particularlly in favor of this design. All I am saying is that I've seen people implement it this way and want to bring up a little discussion about it.
To elaborate a little bit on the design:
You have the bean class PersonBean, a remote interface Person. We all know that the bean class should have the implementation of all the remote methods that you want to expose. Some people do this by creating a separate java class called PersonBusiness. (Let's assume this is EJB 1.1) Note contrary to what you mentioned, the PersonBusiness is not an interface, but a class with the implementation of remote methods.

public class PersonBusiness {
public void remoteMethod2()
{
....
}
public void remoteMethod2()
{
....
}
}
Since in EJB 1.1, remote methods in Bean class not longer throw RemoteException but EJBException, we don't need to have throws clause in the method declaration since EJBException is a runtime exception.
And PersonBean will look like this
public class PersonBean extends PersonBusiness implements SessionBean {
...
}
Again I am not saying this is a good or bad design. Some people argue by doing this if they want opt out EJBs, they have PersonBusiness, which is all they need.
Look forward to hearing your opinion.

Originally posted by dean tomlinson:
the ejb's are hosted on a weblogic server, and my web application runs on websphere.
i feel like i have missed something fundamental. i had never even considered that i could configure my websphere app server to do any caching as the ejb's we're actually hosted by someone totally independant.


If EJBs are hosted on weblogic server, then the caching mechanism should be provided by weblogic. What Kyle was saying is many servers provide caching internally, but with differnt implementaions. One application server could have a pool of home instances ready to serve requests while another application server could have something different.
Thanks for you reploy, Kyle.
I understand Session Facade is to encapsulate the business flow and interactions between business objects. I don't think it particularly uses composition though. Could you elaborate on what you mean by "composition"?
Also if you don't have use inheritance, then in the session bean, every remote method will delegate to the seperate java class for processing?
Hi, everyone,
I've seen some people extend their session beans from a java class and put all the business methods in the java class. The argument is by doing this, they gain the flexibility of opting out EJBs if they need too. For example, at the application startup, read a property file which specifies whether or not to use EJB.
I'd like to hear your opinions on this.
Try this:
java.lang.Object homeObject = vjInitContext.lookup(GraphicalAssistantHome.JNDI_LOOKUP_NAME);
GraphicalAssistantHome gaHome = (GraphicalAssistantHome)PortableRemoteObject.narrow(homeObject, GraphicalAssistantHome.class);
22 years ago
I have been using WebSphere for a while. In the IBM world, when you have a foreign key relationship in the database schema, you have to map a ejb-relationship to the foreign key. The information is kept in ibm extension xml file. As the EJB specification 1.1 doesn't really cover EJB-relationship implementation. Using the EJB relationship makes your code unportable in my opinion. Hope people who are using other application servers can shed some light on this.
Stub Wang, can you post your solution here too?
I am using AE 4.0. I have a ejb jar file that was created in WSAD. The jar file has only entity beans and deployed code has already been generated. I have successfully deployed the EJBs (in the format of an ear file of course) and tested it.

Everything sounds fine till this point, right? OK, here comes the problem. I wanted to see how to generate deployed code using AAT, so I opened jar file in AAT and tried to generate deployed code. I got the following exception:
Starting workbench.
Creating the project.
Creating EJB Project...
Creating EJB Project... Opening: /Deployed_EnitityBeanOnly.jar.
Creating EJB Project...
Creating EJB Project... Setting classpath...
Creating EJB Project...
Updating.
Importing Jar..
Importing file..
Updating.
An unexpected exception was thrown. Halting execution.
Shutting down workbench.
Error importing jar: Error importing Module File.
>com.ibm.etools.ejbdeploy.EJBDeploymentException (Error importing jar: Error importing Module File.)
com.ibm.etools.wft.util.WFTWrappedException: Error importing Module File
IWAJ0215E Stack trace of nested exception:
java.lang.NullPointerException
at com.ibm.ejs.models.base.extensions.ejbext.impl.EJBJarExtensionImpl.containsFinderDescriptors(EJBJarExtensionImpl.java:64)
at com.ibm.etools.commonarchive.impl.EJBJarFileImpl.reflectFinderDescriptorsIfNecessary(EJBJarFileImpl.java:251)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.reflectFinderHelperMetaDataIfPossible(EJBJarImportOperation.java:203)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.save(EJBJarImportOperation.java:239)
at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.importModuleFile(J2EEImportOperation.java:225)
at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.execute(J2EEImportOperation.java:136)
at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.execute(EJBJarImportOperation.java:84)
at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation$1.run(HeadlessJ2EEOperation.java:56)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1197)
at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation.run(HeadlessJ2EEOperation.java:70)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.importJar(BatchExtension.java:638)
at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:849)
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:240)
I am not sure if this is because my jar file already has deployed code or what. Any suggestion is welcomed. Thanks!
22 years ago
Hi, does anyone have the original server-cfg.xml for WAS 4.0. I mean with no customizations. I think I screwed up the file when I tried different settings and now the server won't start up. I'd like to restore it to the original file. If anyone has it, please post it here.

Thanks!
22 years ago
I actually caught that error and changed it to the right name. For some reason, it just doesn't work. I've uninstalled the application and installed it again, restarted my PC. Still can not get it to work.

[This message has been edited by Caroline Iux (edited December 17, 2001).]
22 years ago
I followed steps in WebSphere Workbook Chapter 4. I created ejb module, client modules and deployed just fine, but when I tried to run the client code. It looks like it can't find any JNDI name. I got NameNotFoundException for both Cabin Entity Bean and Travel Agent Session Bean.
The error message for Travel Agent Session Bean looks like this( The Cabin Entity Bean error message is similar except that the JNDI name it's looking for is "CabinHomeRemote" ):
WSCL0012I: Processing command line arguments.
WSCL0013I: Initializing the J2EE Application Client Environment.
WSCL0035I: Initialization of the J2EE Application Client Environment has complet
ed.
WSCL0014I: Invoking the Application Client class com.titan.travelagent.Client_3
javax.naming.NameNotFoundException: TravelAgentHomeRemote
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:1246)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:981)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.titan.travelagent.Client_3.main(Client_3.java:21)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContain
erAndLaunchApp(launchClient.java:430)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchCl
ient.java:288)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:63)

I've checked the deployed Enterprise Application for JNDI name. They are "CabinHomeRemote" and "TravelAgentHomeRemote" respectively.
I also checked Naming Service Settings. Not sure if it matters, but the settings are:
Enable checked
Provider Host: localhost
Provider Port: 9070
Provider Classname: com.ibm.ejs.naming.transient.NamingServiceProvider
Persistent Name enabled
I've no clue why it can't find any JNDI name. Any help is greatly appreciated!

22 years ago
I've used Struts with 3.5 and 3.5.3
Please be more specific with your difficulties.
22 years ago