J2ee 1.4 deploytool
i'm creating an ejb jar. it contains one container managed persistence entity bean. at the last step the deploytool displays empty deployment descriptor. please help me.
Post Code. Use [ code ] [ /code ] tags. if youre really cool, catch Exception e and post e.PrintStackTrace().
Similar Messages
-
Major bugs in J2EE 1.4 Deploytool
I posted a topic earlier on some error I received when trying to deploy a .war in the latest J2EE App. server. Since then I've found alot of other bugs that occur when using the deploytool. These range from minor issues to bugs where files get corrupted.
As of now, the deploytool is virtual unusable and I would really like a standalone tool for deploying my applications. Are these bugs known by Sun and is there a patch/updated version in progress?
Since I really need to use J2EE 1.4 I'm kinda stuck with this application server, so switching to JBoss or something else is not an alternative.The file corruption bug is usually experienced when using deploytool on machines with non-English locales and is a known bug. The workaround is to set the locale for your machine to en-US. If you are experiencing other problems, please report it here: http://java.sun.com/webapps/bugreport/
-
J2EE server error,deploytool error
Dear All,
I had downloaded the J2EESDK1.3 and jakarta-ant1.4.1 and the J2SESDK1.3.0_02 from their respective websites.I set the value of the required environment variables i.e the J2EE_HOME, JAVA_HOME and the ANT_HOME to their respective location in my 'C' drive.But I find that when I try to start the J2EE server, the error "Out of environment space" appears in the MSDOS screen.The same error is also visible when I type the following command - "deploytool" at the DOS prompt. Would be grateful if you could please guide me as to what the problem might be and what is the solution to it.Thanks all.
Ramesh RangarajanHi Amol,
Here is the content of my J2EE.bat file:
@echo off
rem
rem Set JAVA_HOME and J2EE_HOME before running this script.
rem
rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
rem
rem set J2EE_HOME to the path where you have installed this package (EJB server).
rem
if not "%J2EE_HOME%" == "" goto CONT0
echo ERROR: Set J2EE_HOME before running this script.
goto END
:CONT0
if EXIST "%J2EE_HOME%\bin\setenv.bat" goto CONT1
echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
goto END
:CONT1
call %J2EE_HOME%\bin\setenv.bat
if not "%JAVA_HOME%" == "" goto CONT2
echo ERROR: Set JAVA_HOME before running this script.
goto END
:CONT2
if EXIST "%JAVA_HOME%\bin\java.exe" goto CONT3
echo ERROR: Set JAVA_HOME to the path of a valid jdk.
goto END
:CONT3
rem @echo on
%JAVACMD% %LISTEN_OPTIONS% -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc.dbpath=%JMS_DB_PATH% -Djms.properties=%J2EE_HOME%\config\jms_service.properties -Djava.security.policy==%J2EE_HOME%\lib\security\server.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %*
:END
Ramesh Rangarajan -
Error when compiling the J2ee tutorial source files on win2k professional
Hi,
Could you help me?
I'm trying to complete the j2ee tutorial.
I have downloaded the example code, J2EE Sdk, J2SE and Ant from the web site (these files� name are: j2ee-1_3-doc-tutorial-draft3.zip, j2sdkee-1_3_01-win.exe, j2sdk-1_3_1_01-win.exe, jakarta-ant-1.3-bin.zip) and installed the �j2sdkee-1_3_01-win.exe, j2sdk-1_3_1_01-win.exe� and unzipped �j2ee-1_3-doc-tutorial-draft3.zip, jakarta-ant-1.3-bin.zip� to their default subdirectory.( jdk1.3.1_01,
j2sdkee1.3,jakarta-ant-1.3)
According to instructions, I have set the Environment Variables as the below:
ANT_HOME=c:\jakarta-ant-1.3
CLASSPATH=c:\sybtools\ASEP\Monclass.zip;c:\sybtools\ASEP\3pclass.zip;c:\program files\microsoft sql server 2000 jdbc\lib\mssqlserver.jar;c:\program files\microsoft sql server 2000 jdbc\lib\msbase.jar;c:\program files\microsoft sql server 2000 jdbc\lib\msutil.jar;c:\orcle\ora81\jdbc\lib\classes12.zip; c:\orcle\ora81\jdbc\lib\nls_charset12.zip;c:\program files\oracle\jdevelop 3.2.3\jdbc\lib\oracle8.1.7\classes12.zip;c:\j2sdkee1.3\lib\j2ee.jar;c:\jdk1.3.1_01\lib\tools.jar;c:\jdk1.3.1_01\lib\classes.zip;c:\jakarta-ant-1.3\lib\ant.jar
HOMEPATH=\
J2EE_HOME=c:\j2sdkee1.3
JAVA_HOME=c:\jdk1.3.1_01
OS=Windows_NT
Os2LibPath=C:\WINNT\system32\os2\dll;
Path=C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\Oracle\jre\1.1.7\bin;C:\PROGRA~1\REFLEC~1;C:\Program Files\Reflection;C:\WINNT\SYSTEM32;C:\WINNT;C:\WINNT\SYSTEM32\WBEM;C:\DMI\WIN32\BIN;C:\Program Files\Symantec\pcAnywhere\;C:\MSSQL7\BINN;C:\Sybase\DLL;C:\Sybase\BIN;C:\sybtools\WIN32;C:\sybtools\ASEP;c:\oracle\ora81\jdbc\lib;c:\j2sdkee1.3\bin;c:\jdk1.3.1_01\bin;c:\jakarta-ant-1.3\bin
SystemRoot=C:\WINNT
windir=C:\WINNT
�
After finishing the above actions, I have started the j2ee server and deploytools successfully. But when I executed the following command( ANT CONVERTER ) under the appointed subdirectory, the error occurred.
The information is
�Exception in thread �main� java.lang.NoClassDefFoundError: files\Microsoft �.
Looking forward to the answer!
Arthur Ward
2001-12-21by the way, after checking the ant_home\bin\ant.bat(see bellow)
-------end quote----
@echo off
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart
@setlocal
rem %~dp0 is name of current script under NT
set DEFAULT_ANT_HOME=%~dp0
rem : operator works similar to make : operator
set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%
if %ANT_HOME%a==a set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=
rem On NT/2K grab all arguments at once
set ANT_CMD_LINE_ARGS=%*
goto doneStart
:win9xStart
rem Slurp the command line arguments. This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=
:setupArgs
if %1a==a goto doneStart
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
rem find ANT_HOME
if not "%ANT_HOME%"=="" goto checkJava
rem check for ant in Program Files on system drive
if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
set ANT_HOME=%SystemDrive%\Program Files\ant
goto checkJava
:checkSystemDrive
rem check for ant in root directory of system drive
if not exist "%SystemDrive%\ant" goto noAntHome
set ANT_HOME=%SystemDrive%\ant
goto checkJava
:noAntHome
echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
goto end
:checkJava
set _JAVACMD=%JAVACMD%
set LOCALCLASSPATH=%CLASSPATH%
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
if "%JAVA_HOME%" == "" goto noJavaHome
if "%_JAVACMD%" == "" set JAVACMD=%JAVAHOME%\bin\java
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\tools.jar"
if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\classes.zip"
goto checkJikes
:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java
echo.
echo Warning: JAVA_HOME environment variable is not set.
echo If build fails because sun.* classes could not be found
echo you will need to set the JAVA_HOME environment variable
echo to the installation directory of java.
echo.
:checkJikes
if not "%JIKESPATH%" == "" goto runAntWithJikes
:runAnt
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS%
org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
goto end
:runAntWithJikes
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" -Djikes.class.path=%JIKESPATH%
%ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
:end
set LOCALCLASSPATH=
set _JAVACMD=
set ANT_CMD_LINE_ARGS=
if not "%OS%"=="Windows_NT" goto mainEnd
:winNTend
@endlocal
-------end quote----
i found something is wrong with the sentence in ":runAnt".
--------quote-----
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS%
org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
--------end quote-----
No value was set for %ANT_OPTS% and %ANT_CMD_LINE_ARGS% -
Run client execution problem when running Sun J2EE tutorial example
Hi,
I'm trying to run the Sun J2EE tutorial example, CartApp.
When come to run the client application I got the following error:
The command:
E:\Dev\src\J2EE_J2EE_tutorial\examples\ears>runclient -client CarApp.ear -name CartClient -textauth
The error:
Application threw an exception:java.io.IOException: CarApp.ear does not exist
The deployment complete without error.
I tried to the the APPCPATH to :
set APPCPATH=E:\Dev\src\J2EE_J2EE_tutorial\examples\ears\CartAppClient.jar
set APPCPATH=CartAppClient.jar
On both set, it gave the same error above.
Did someone known the problem I have ?
Thnakshi ,
I think u have given other disply name to your J2EE client ,
Anyway check disply name of J2EE client through deploytool.
u have to use that display name to access the j2ee client .
suppose ur j2ee client displyname is testclient, u can use:
runclient -client ConverterApp.ear -name testclient
hope this will help u,
babu. -
Error while running a EJB client
Hi All,
I am trying to execute a Hello World Prgram using EJB's. I have Deployed a Stateless Session bean in J2EE 1.3 deploytool.I am also able to compile my Client, but when i a executing the Client i am getting this error.
=========================
java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception is: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDeleg ate.java:137) at javax.rmi.CORBA.Util.mapSystemException(Util.java:65) at headfirst._Advice_Stub.getAdvice(Unknown Source) at AdviceClient.go(AdviceClient.java:21) at AdviceClient.main(AdviceClient.java:11) Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java :39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorI mpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:296) at java.lang.Class.newInstance(Class.java:249) at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemException(ReplyMessage _1_2.java:93) at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl. java:108) at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:132) at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457) at headfirst._Advice_Stub.getAdvice(Unknown Source) ... 2 more ===============================
I have undeployed and redeployed couple of time but i am still getting the same problem. I am using J2EE 1.3 deploytool for deploying the EJB.
Can anyone please help me in figuring out the problem.
Thanks in Advance.
~Ravi.You are having network-related errors to the client.
Let me see your Remote interface -
Java.rmi.RemoteException: newServlets not found
I am developing a java servlet using J2EE 1.4 RI.
I have developed a new application called newServlets.ear. This application has a web component named Servlet1. When I click on Tools, Deploy I get the following error:
stop newServlets
running...
java.rmi.ServerException: RemoteException occured in server thread; nested exception is:
java.rmi.RemoteException: newServlets not found; nested exception is
javax.management.InstanceNotFoundException: newServlets not found at
com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:61)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at
org.omg.stub.com.sun.enterprise.tools.deployment.backend.JarInstaller_Stub.stop(Unknown Source)
The J2EE RI Verifier produces no failed tests or warnings.
I have no idea what is causing this. Each time this happens, the Command Prompt window that is running J2ee server displays the message:
Stop recieved
I have tried stopping and restarting both the j2ee server and deploytool, but this has not fixed the problem.
In my servlet, I would like to take information that has been entered into an HTML text field and add it to a MS Access database. I have the following code in my servlet to load the driver:
final String pathConnection="jdbc:odbc:"+dataBase;
con = null;
String driverName="sun.jdbc.odbc.JdbcOdbcDriver";
try{
try{
Class.forName(driverName);
System.out.println("OK");
catch (ClassNotFoundException e)
System.out.println(" ERROR : driver not found");
e.printStackTrace();
}//end inner try/catch
System.out.println("Drivers (DriverManager.getDrivers()) :");
con = DriverManager.getConnection(pathConnection, "", "");
}//end outer try block
catch (Exception e)
e.printStackTrace();
}//end outer catch
The following code is being used to enter the data into the database:
try {
stmt = con.prepareStatement(
"INSERT INTO User (emailAddress, passWord) VALUES (?, ?)");
stmt.setString(1, emAddress);
stmt.setString(2, passWord);
stmt.executeUpdate();
catch (SQLException e) {
System.err.println(e);
e.printStackTrace();
finally {
con.close();
Is it possible that something in the code above is causing the problem??
Please help!!
I am running J2EE 1.4 RI and J2SDK1.4.1_01 on Windows XP Professional.java.rmi.ServerException: RemoteException occured in
server thread; nested exception is:
java.rmi.RemoteException: newServlets not found;
nested exception is
javax.management.InstanceNotFoundException:
newServlets not found at
I'm having a similar problem trying to deploy an EJB on the j2ee 1.4 ri. It appears to be some sort of JMX problem. I suspect it has something to do with having a wrong value somewhere in the sun-j2ee-ri.xml descriptor, but I haven't figured it out yet. If you have, can you let me know what you did to fix it?
Thanks,
Steve -
Stand-alone client - lookup problem
I have a stand-alone Java client application (ContactClient) that I want to use to access an EJB called Contact. I am using J2EE, deploying with deploytool. The EJB has a JNDI name of "MyContact", and the Client reference is "ejb/TheContact". The relevant code in the app is:
try
java.util.Properties props = new java.util.Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtxFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:1050");
Context initial = new InitialContext(props);
Object objref = initial.lookup("ejb/TheContact");
ContactHome home =
(ContactHome)PortableRemoteObject.narrow(objref,
ContactHome.class);
contact = home.create();
catch (Exception ex)
System.err.println("Exception: " + ex.getMessage());
ex.printStackTrace();
The following exception is thrown by initial.lookup("ejb/TheContact");
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
I have tried changing the name to "TheContact", and to "java:comp/env/TheContact" with no success. If I change it to the JNDI name "MyContact", the lookup works, but the following call, PortableRemoteObject.narrow(), throws a java.lang.ClassCastException.
What am I doing wrong?
JohnHi, Thanks for your fast reply, but it still doesn't work.
With your Code I get a classCastException in this line:
"SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");"
Here is the code from the whole thing, as it works with the appclient script:
SessionHome: //RemoteHomeInterface
package ejb;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface SessionHome extends EJBHome {
Session create() throws RemoteException, CreateException;
Session //Session RemoteInterface
package ejb;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface Session extends EJBObject {
public String getString() throws RemoteException;
SessionBeanInstance //The SessionBean
package ejb;
import javax.ejb.SessionBean;
import javax.ejb.CreateException;
import javax.ejb.SessionContext;
public class SessionBeanInstance implements SessionBean{
public SessionContext context;
public String getString(){ return "works"; }
public SessionBeanInstance() { }
public void ejbCreate() throws CreateException { System.out.println("Bean created"); }
public void ejbActivate() { }
public void ejbPassivate() { }
public void ejbRemove() { }
public void setSessionContext(SessionContext ctx) { context = ctx; }
clientMain //The client class
package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.rmi.PortableRemoteObject;
import ejb.*;
import java.util.Hashtable;
public class clientMain {
private SessionHome home;
private Session mySession;
private Context ctx;
private Object objref;
public clientMain() {
try{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL, "iiop://127.0.0.1:3700");
try{
Context ctx = new InitialContext(env);
SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");
Session remote = (Session)home.create();
String test = remote.getString();
System.out.println(test);
catch(Exception e){ e.printStackTrace(); }
catch (Exception ex) {
System.err.println("Caught an exception.");
ex.printStackTrace();
The error occurs only if is start with the "java -jar" script. Here is the error:
lang.ClassCastException: com.sun.corba.se.impl.corba.CORBAObjectImpl
at client.clientMain.<init>(clientMain.java:27)
at client.Client.main(Client.java:10)
I don't know what to do, to get it work... -
Error Msg - "You must add the Class files for this enterprise bean"
Hi,
I am creating creating new enterprise bean using j2sdkee1.2. I am able to create .ear file in desired folder, but can not create .jar. Please help. Getting above error message.
remote, home interface files and file having business logic (EJB) is compiled and kept at desired location.
j2ee server started, Deploytool is started.
Then I can successfully create new application (.ear file)
Then I go for creating new enterprise bean. I get same application name in Drop down list named "Enterprise Bean will go in".
Then I can add home, remote and ejb class file to create jar ("Add" under "Contents" ).
When I say ok after adding these 3 files, I am getting error - "You must add the Class files for this enterprise bean".
In the deploytool console, getting error - "java.io.FileNotFoundException: C:\2sdkee1.2\mahesh\ConverterEJB.class (The system cannot find the path specified) "
Can you please help me where to configure the path?
Can u please help?
Please send your answer to - [email protected]
Cheers!the path really begins with '2', without a 'j', ie not c:\j2sdkee1.2\...?
"java.io.FileNotFoundException:
C:\2sdkee1.2\mahesh\ConverterEJB.class (The system
cannot find the path specified) " -
Unable to use j2ee -stop or the deploytool
I am a J2EE newbie. I have recently installed j2sdkee1.3.1 on Windows XP. The J2SDK version I am using is j2sdk1.4.0_01.
I can start the J2EE server successfully and view http://localhost:8000/index.html.
However, I am unable to stop the server using j2ee -stop. When I try to start deploytool, it hangs.
Any suggestionsI am havgin the same problem. When I try to stop I get error as:
Shutting down the J2EE server.
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sun.enterprise.util.Utility.lookupObject(Utility.java:108)
at com.sun.enterprise.server.J2EEServer.clientShutdown(J2EEServer.java:996)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:936)
could you please help...
thanks -
I cannot start j2ee, deploytool, or any of the other applications
I have downloaded j2ee1.3, and I am working on windows 98. I have set the following environment variables as shown below, within the userconfig.bat file:
SET JAVA_HOME=C:\jdk1.3.1_01
SET JAVA2EE_HOME=C:\j2sdkee1.3
SET ANT_HOME=C:\j2sdkee1.3\jakarta-ant-1.3
(I am confident these environment variables are set properly since they do point to where the software has been saved).
I have tried to launch the deploy tool by typing in
deploytool at the dos prompt(I have my prompt set to C:\My Documents\newStuff\Mihir\Java>)
Doing this, I get the following output:
Syntax error
Syntax error
Syntax error
The deployment tool version is 1.3
Options
-ui Runs the tool with a UI (default mode)
-help Display this help message
-deploy <ear file> <server name> [<client jar>]
C:\My Documents\newStuff\Mihir\Java>
I get the same results when trying to run J2ee, the only difference is that the options menu is different.
Problem: I don't think deploytool and j2ee are working on my computer. Whenever I try to start any of the .bat applications in the j2ee/bin directory, I am immediately taken back to the DOS prompt. Why is this happening?? What is the problem??
I don't know if this makes a difference.. but when ever I click on any of the .bat files in j2ee/bin, A dos window opens up and gives me the following output:
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Syntax error
Syntax error
Syntax error
Out of environment space
Out of environment space
Out of environment space
Please tell me what the problem is???Ah! I have the same problem with the syntax error. I traced it to 3 statements in setenv.bat:
==================
set JAAS_OPTIONS=-Djava.security.auth.policy=%J2EE_HOME%\lib\security\jaas.policy
set SSL_OPTIONS=-Djavax.net.ssl.trustStore=%J2EE_HOME%\lib\security\cacerts.jks
set LISTEN_OPTIONS=-Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060
===================
the problem being the env variables are assigned strings that contain '='. Anybody know how to circumvent this? I have tried single/double quotes, escaping with backslash, with no effect.
Thanks,
Laks. -
Struts framework & J2EE deploytool problem
When creating a new application in the J2EE deploytool with the example WAR file "struts-example.war" from the struts framework i can view this at "http://localhost:8000/example/" with no problem. However, when creating my own WAR file of the build struts framework example i get after deployment and calling "http://localhost:8000/example/" the following:
"javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE"
The WAR and EAR configs look exactly alike in the J2EE deploytool.
What bugging me is i can not find the problem.
Please inform
ThanbksThank you very much for the response.
As you mentioned I put the "ApplicationResources.properties" file in the classes directory, this gives me the same error.
However, i am using struts 1.1 if it matters and in web.xml the following is defined:
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
and in struts-config.xml :
<message-resources
parameter="org.apache.struts.webapp.example.ApplicationResources"/>
This is the directory where the "ApplicationResources.properties" also excists.
As mentioned the example war coming with the framework works fine, so i assume it is not related to any envioronment vars.
It is probably clear that i am new to all this. My objective is to determine whether my exising framework with a servlet session controlling usecase can be integrated with the strutsframework.
I thank you for your time
regards, Erwin -
Hello Guys
I just started learning J2EE this week 23rd Spet 2004. I have gone throught the tutorial on installing J2EE 1.4 running J2sdk 1.4.2_04. I have managed to run and execute the Hello program apened parameter name typed in. I have also learn to start and stop cloudspace. Now I am trying to run the dukes bank application. I have used asant to build the files and have created a build folder. I want to deploy the EJB, JAR, WAR into an EAR using deploytool provided with the J2EE 1.4 I am not very quit clear with the tutorial provided with the installation guide. Could anyone please help me to showing me how to package these files and create EAR.
Is it necessary to learn how to write build.xml? If so could someone point me out to a resource that talks about the tags and their jobs in the application.The only help in deploytool will help you to understand the tabs within the gui.
I would suggest that you utilize the provided-ears within the J2EE tutorial which have been fully configured and review their settings in deploytool. Just open one of the modules with deploytool and review the settings.
the tutorial utilizes ant for ease of use, but you could certainly just use deploytool to create your component -
Can I use J2EE deploytool with other vendors
This might be a stupid question for J2EE veterans but I was wandering whether I can use Sun�s J2EE deploytool with other J2EE servers like WebLogic for example.
Concretely I would like to set in deploytool different then default classes for topic connection factory and topic � is it possible?
Januszdeploying an EJB means generating code, where the AppServer steps into when the Bean is created, for example to do security checks,pooling, resource management, ...
This is always AppServer specific.
Ina -
Authorized Users for J2EE's Deploytool and HttpSession queries!!
Hi guys,
i need some information about HttpSession, and J2EE's deploytool. First, i know how to use deploytool from the J2EE tutorial and it a good one but my assignment requireds more than that. I would like to know how to allow only authorized user to use an jsp(very impt jsp, that means).
Secondly, my servlet had set some attributes on a HttpSession so to forward to a jsp so I requires some session tracking. But when the user click on the 'Back' button on the I.E. The information remains there. I tried to set attribute on a HttpRequest but my jsp fails to get the information. This problem really pull me back. :-(
I really appreciate if there is any links or more advanced J2EE tutorials so i can visit them and solved my problems. Examples are welcome toooo. Thanks guys!!try http://jakarta.apache.org/struts for some
sophisticated examples.
and for setting an attribute on a request. This only
works when transferring from one servlet to another
without sending anything to the browser. Requests are
stateless, so if you set an attribute, the next time
it will not be there, since it is not saved. If you
want to save user information you can:
- create a hidden field on a form and put the
information there
- set the information you want to save in a cookie
- set the information you want to save in the session
object.
Maybe you are looking for
-
How to extract data from a large table!
Hi all, I am working on a survey application using JSP, where users login to the application and fill out survey form. Responses of users are stored in a database table as a numeric value ranging from 1-10. Now I want to create some standard reports
-
Log4J-Error + Unexpected Database-Connector-Error
Hello! I am trying to integrate a Report into an existing Java Eclipse-Project usind Crystal Reports for Eclipse. To do this I am modifying the example program which comes together with the installation. I am trying to pass the data to the report dir
-
Late 2012 Mac Mini Display Capabilities
Can the new 2012 Mac Mini drive both an Apple Thunderbolt Display and a LED Cinema Display via daisy chaining?
-
IWeb hangs (spinning beachball) when I try to paste HTML code from DW-why?
Can anyone tell me why this might be happening? When I try and paste HTML code from Dreamweaver using Web Widgets. Then the only solution is to Force Quit which means I lose any other work I've already done in iWeb. Anyone else had this problem? Is t
-
Getting the name of the page that throws an exception from an error page
How can I get the name of the page that throws an error exception from an error page?. Thanks.