RE: Invoking EJB from Action classes
I assume you are accessing the beans through JNDI. I also assume you are using IntitialContext ctx = new InitialContext(); -to generate your initial context object. You May create a jndi.properties file that contains the following: java.naming.factory.initial= java.naming.provider.url=http://www.customware.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 12:03 PM To: [EMAIL PROTECTED] Subject: Invoking EJB from Action classes Hi all, I have developed the web front end using Struts framework. When i was trying to deploy the application on Websphere 3.5.2 i am facing problems. >From the Action class i am not able to invoke the session bean or entity bean. When the session and entity beans were deployed on the websphere Access permissions were applied on it. Because of these permissions i think i am not able to invoke the beans from my Action objects. How can i invoke the EJB's from Action classes? Thanks in advance. Cheers Rafee ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.Kindlesystems.com **
RE: Thread error....WHY?
It is a good idea to add . ( current directory ) to your CLASSPATH -also get in the habit of compiling your classes so that any required package structure is created properly. You do this by specifying an output directory for the javac command. If you wanted to compile the class starting from the current directory: not my favorite technique ) D:\XALAN\SAMPLES\SIMPLE~1>javac -d . SimpleTransform.java If you wanted to compile the class into an established directory which is already a part of your classpath: ( My favorite technique ) if CLASSPATH were: d:\jdk1.3;d:\jdk1.3\bin;d:\jsdkee1.3;d:\ant\lib\ant.jar;D:\Progra~1\junit3.6 ;d:\xalan\xalan.jar;d:\xalan\xerces.jar;d:\testClasses D:\XALAN\SAMPLES\SIMPLE~1>javac -d d:\testClasses SimpleTransform.java ALWAYS pass the fully-qualified package name and class name to the java command: example package name == com.fred.stuff class name == SomeClass command line used to run that class: d:\>java com.fred.stuff.SomeClass If you do not do one of the above, make sure you have navigated to the directory from which your interesting root package name directory has been created. example: your java source has a package declaration of: package fred; You compile using javac as shown in your email: D:\XALAN\SAMPLES\fred>javac Example.java You would then have to navigate up the directory tree to the directory that contained fred ( the root package name ) before attempting to invoke java with that class as the argument: D:\XALAN\SAMPLES\fred>cd.. D:\XALAN\SAMPLES>java fred.Example ( also note the fully-qualified package name and classname is what is passed to the java command ) HTH Owen. -Original Message- From: Galon, Mary-Jay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 24, 2001 2:15 PM To: Tomcat (E-mail); Struts-User@Jakarta. Apache. Org (E-mail) Subject: Thread errorWHY? Im sending to both groups for maximized feedback. I am executing a compiled Xalan sample and getting an error. Does anyone know why I could be getting "thread" issues. -- REVISED CLASSPATH (i re-installed jdk to root drive instead of under Program Files): d:\jdk1.3;d:\jdk1.3\bin;d:\jsdkee1.3;d:\ant\lib\ant.jar;D:\Progra~1\junit3.6 ;d:\xalan\xalan.jar;d:\xalan\xerces.jar COMMAND CODE MSG: D:\XALAN\SAMPLES\SIMPLE~1>javac SimpleTransform.java D:\XALAN\SAMPLES\SIMPLE~1>java SimpleTransform Exception in thread "main" java.lang.NoClassDefFoundError: SimpleTransform D:\XALAN\SAMPLES\SIMPLE~1>
RE: Testing Xalan prior to STRUTS build
Chris Brown was correct. You need to understand how the Classpath works. Instead of CLASSPATH: d:\Program Files\jdk1.3;d:\Program Files\jsdkee1.3;d:\ant\lib;D:\Program Files\junit3.6;d:\xalan;d:\xalan\samples 1) Locate the xalan.jar and ensure that it is in your classpath: You will have to do this for all jar files from which you wish to have classes loaded. 2) You do not need to include d:\Program Files\jdk1.3 in your classpath. It does nothing for you, unless you have compiled classes of your own there. As of jdk1.2.2 the java classloader automatically loads the essential java classes. Likewise, d:\Program Files\jsdkee1.3 will not give you any benefit . . .there are no class files located there! 3) I do not like to have spaces in my classpath so you might consider moving your java-related files to a simpler and consistent directory - maybe d:\java your classpath would then look something like this: CLASSPATH=d:\java\jsdkee1.3\lib\j2ee.jar;d:\java\ant\lib\ant.jar;d:\java\ant \lib\jaxp.jar;d:\java\ant\lib\parser.jar;d:\java\junit3.6\junit.jar;d:\java\ xalan\xalan.jar NB: you must include the bin directory of your java installation in your PATH environment variable eg: PATH=d:\java\jdk1.3\bin HTH owen. -Original Message- From: Galon, Mary-Jay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 24, 2001 12:38 PM To: '[EMAIL PROTECTED]' Subject: RE: Testing Xalan prior to STRUTS build HELP!! Does anyone have a suggestion! -Original Message- From: Galon, Mary-Jay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 24, 2001 12:22 PM To: Struts-User@Jakarta. Apache. Org (E-mail) Subject: Testing Xalan prior to STRUTS build I am getting this problem when testing to make sure Xalan works by using the SimpleTranform sample. I've checked the classpath already. Whatelse can I check. CLASSPATH: d:\Program Files\jdk1.3;d:\Program Files\jsdkee1.3;d:\ant\lib;D:\Program Files\junit3.6;d:\xalan;d:\xalan\samples COMMAND ERROR MSG: D:\XALAN\SAMPLES\SIMPLE~1>javac SimpleTransform.java SimpleTransform.java:58: cannot resolve symbol symbol : class SAXException location: package sax import org.xml.sax.SAXException; ^ SimpleTransform.java:59: cannot resolve symbol symbol : class XSLTProcessorFactory location: package xslt import org.apache.xalan.xslt.XSLTProcessorFactory; ^ SimpleTransform.java:60: cannot resolve symbol symbol : class XSLTInputSource location: package xslt import org.apache.xalan.xslt.XSLTInputSource; ^ SimpleTransform.java:61: cannot resolve symbol symbol : class XSLTResultTarget location: package xslt import org.apache.xalan.xslt.XSLTResultTarget; ^ SimpleTransform.java:62: cannot resolve symbol symbol : class XSLTProcessor location: package xslt import org.apache.xalan.xslt.XSLTProcessor; ^ SimpleTransform.java:68: SimpleTransform clashes with package of same name public class SimpleTransform ^ SimpleTransform.java:73: cannot resolve symbol symbol : class SAXException location: package sax org.xml.sax.SAXException ^ SimpleTransform.java:77: cannot resolve symbol symbol : class XSLTProcessor location: class SimpleTransform XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); ^ SimpleTransform.java:77: cannot resolve symbol symbol : variable XSLTProcessorFactory location: class SimpleTransform XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); ^ SimpleTransform.java:81: cannot resolve symbol symbol : class XSLTInputSource location: class SimpleTransform processor.process(new XSLTInputSource("birds.xml"), ^ SimpleTransform.java:82: cannot resolve symbol symbol : class XSLTInputSource location: class SimpleTransform new XSLTInputSource("birds.xsl"), ^ SimpleTransform.java:83: cannot resolve symbol symbol : class XSLTResultTarget location: class SimpleTransform new XSLTResultTarget("birds.out")); ^ 12 errors D:\XALAN\SAMPLES\SIMPLE~1>