Compiling NTEventlog.cpp
I tried compiling the NTEventLog.cpp to retrieve the NTEventLog.dll. When I compiled the NTEventlog.cpp from the respective path, it shows the following error. C:\VLakshmi\JCI\EQUIPM~1\LOGGIN~1.13\src\java\org\apache\log4j\nt>bcc32 nteventl og.cpp Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland nteventlog.cpp: Error E2209 nteventlog.cpp 19: Unable to open include file 'org_apache_log4j_Pri ority.h' Error E2209 nteventlog.cpp 20: Unable to open include file 'org_apache_log4j_nt_ NTEventLogAppender.h' Error E2147 nteventlog.cpp 24: 'JNIEnv' cannot start a parameter declaration Error E2451 nteventlog.cpp 26: Undefined symbol 'jclass' in function JNU_ThrowBy Name(int *,const char *,const char *) Error E2379 nteventlog.cpp 26: Statement missing ; in function JNU_ThrowByName(i nt *,const char *,const char *) Error E2451 nteventlog.cpp 28: Undefined symbol 'classForName' in function JNU_T hrowByName(int *,const char *,const char *) Error E2377 nteventlog.cpp 28: If statement missing ) in function JNU_ThrowByNam e(int *,const char *,const char *) Warning W8057 nteventlog.cpp 34: Parameter 'env' is never used in function JNU_T hrowByName(int *,const char *,const char *) Warning W8057 nteventlog.cpp 34: Parameter 'name' is never used in function JNU_ ThrowByName(int *,const char *,const char *) Warning W8057 nteventlog.cpp 34: Parameter 'msg' is never used in function JNU_T hrowByName(int *,const char *,const char *) Error E2147 nteventlog.cpp 37: 'JNIEnv' cannot start a parameter declaration Error E2303 nteventlog.cpp 37: Type name expected *** 9 errors in Compile *** Kindly let me know as to how I am supposed to proceed with. With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compiling NTEventlog.cpp
Dear Curt, I used the 1.2.8 version of log4j and retrieved the NTEventLogAppender.dll. This has solved the problem. Thanks a lot for your suggestion. --- Curt Arnold <[EMAIL PROTECTED]> wrote: > > On Jun 26, 2006, at 12:58 PM, venkatlakshmi wrote: > > > I tried compiling the NTEventLog.cpp to retrieve > the > > NTEventLog.dll. When I compiled the NTEventlog.cpp > > from the respective path, it shows the following > > error. > > > > > > .. > > > Kindly let me know as to how I am supposed to > proceed > > with. > > > > > > With regards, > > > > Venkatlakshmi > > > > The build.xml in the SVN for both the log4j 1.2 and > 1.3 branches will > build NTEventLogAppender.dll using MinGW's gcc (see > bug 37866, http:// > issues.apache.org/bugzilla/show_bug.cgi?id=37866). > Unless you have a > specific need to use Borland C++, I would recommend > using the Ant > build. The specific cause of your compilation > issues is that the > code requires header files generated by javah to be > on the include path. > > To build NTEventLogAppender.dll: > > 1. Download MinGW-3.1.0-1.exe from > http://mingw.sourceforge.net/ > download.shtml > > 2. Run downloaded file to install MinGW > > 3. Check out log4j source from Subversion > > svn co > http:://svn.apache.org/repos/asf/logging/trunk/log4j/trunk > log4j > > or > > svn co > http:://svn.apache.org/repos/asf/logging/log4j/branches/v1_2- > > branch log4j > > 4. Copy build.properties.sample to build.properties > > cd log4j > copy build.properties.sample build.properties > > 5. Place MinGW on the path > > path c:\mingw\bin;%PATH% > > 6. Build NTEventLogAppender > > ant build.nt > > This step will require that you build log4j.jar > first which may > require downloading some supporting jars and > modifying > build.properties. However, if you are already set > up to build log4j, > then you should know your way around these issues. > > If you really want to use Borland C++, then you can > look at the > build.nt target in build.xml for the step by step. > You'd want to use > the Borland Resource Compiler (brc or brc32 if I > remember correctly) > or Microsoft Resource Compiler (rc) instead of > windres to compile > EventLogCategories.rc and NTEventLogAppender.rc and > Borland C++ > (bcc32) instead of gcc to compile nteventlog.cpp. > > If you don't care about building the DLL, you can > extract it from any > older log4j (say 1.2.8) from > http://archive.apache.org/dist. > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to set category, Event and User in Windows Event Viewer using NTEventLog
Dear all, I used NTEventLog from jakarta-log4j-1.2.8 to create error logs in the Event Viewer of Windows 2000. But when I insert a new record in the Event Viewer, I am not able to explicitly set the Category, Event and User Columns of the Event viewer. Infact I am able to set the rest of the columns like source and description and there are few columns like Computer, Date and Time which gets populated automatically. Kindly let me know as to how I can explicitly set the Category, Event and User columns Thanks in advance. With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: How to set category, Event and User in Windows Event Viewer using NTEventLog
Hi everyone, Could you please help me to resolve this issue? Note: forwarded message attached. With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/--- Begin Message --- Dear all, I used NTEventLog from jakarta-log4j-1.2.8 to create error logs in the Event Viewer of Windows 2000. But when I insert a new record in the Event Viewer, I am not able to explicitly set the Category, Event and User Columns of the Event viewer. Infact I am able to set the rest of the columns like source and description and there are few columns like Computer, Date and Time which gets populated automatically. Kindly let me know as to how I can explicitly set the Category, Event and User columns Thanks in advance. With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFound Error for org/apache/log4j/Layout
Hi all, I am using jakarta-log4j-1.2.8 in my java program to log errors. When I compile the program it runs fine. But when I execute it, it throws the following error C:\VLakshmi\JCI\Equipment Interface\Code\WEB-INF\classes>java JCI.XMLInterface Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layo ut at JCI.XMLInterface.(XMLInterface.java:20) It says that the class "Layout" is not found. But i have included the log4j-1.2.8.jar in \lib. Kindly help me to resolve this issue. With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoClassDefFound Error for org/apache/log4j/Layout
Yes, I have included it in the classpath also. Still it gives me the error. --- Bender Heri <[EMAIL PROTECTED]> wrote: > It's not enough to just put it in the lib dir, you > must include it in your classpath. > Heri > > > -Original Message- > > From: venkatlakshmi > [mailto:[EMAIL PROTECTED] > > Sent: Thursday, June 29, 2006 1:55 PM > > To: log4j-user@logging.apache.org > > Subject: NoClassDefFound Error for > org/apache/log4j/Layout > > > > > > Hi all, > > > > I am using jakarta-log4j-1.2.8 in my java program > to > > log errors. When I compile the program it runs > fine. > > But when I execute it, it throws the following > error > > > > C:\VLakshmi\JCI\Equipment > > Interface\Code\WEB-INF\classes>java > JCI.XMLInterface > > Exception in thread "main" > > java.lang.NoClassDefFoundError: > org/apache/log4j/Layo > > ut > >at > JCI.XMLInterface.(XMLInterface.java:20) > > > > It says that the class "Layout" is not found. But > i > > have included the log4j-1.2.8.jar in \lib. Kindly > help > > me to resolve this issue. > > > > > > > > With regards, > > > > Venkatlakshmi > > > > > > > > > > > __ > > Yahoo! India Answers: Share what you know. Learn > something new > > http://in.answers.yahoo.com/ > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoClassDefFound Error for org/apache/log4j/Layout
Hi, I found the solution to the problem. While configuring the classpath, I specified the directory where the jar file is available and I did not specify the exact jar file in the directory. Thats where the problem was. Now after including the name of the jar file in the directory, it works fine. Thanks a lot for all your efforts --- Jacob Kjome <[EMAIL PROTECTED]> wrote: > What does line 20 do? Does it configure Log4j? > What JDK are you using? What, > exactly, does your classpath look like? > > Jake > > Quoting venkatlakshmi <[EMAIL PROTECTED]>: > > > Yes, I have included it in the classpath also. > > > > Still it gives me the error. > > > > --- Bender Heri <[EMAIL PROTECTED]> wrote: > > > > > It's not enough to just put it in the lib dir, > you > > > must include it in your classpath. > > > Heri > > > > > > > -Original Message- > > > > From: venkatlakshmi > > > [mailto:[EMAIL PROTECTED] > > > > Sent: Thursday, June 29, 2006 1:55 PM > > > > To: log4j-user@logging.apache.org > > > > Subject: NoClassDefFound Error for > > > org/apache/log4j/Layout > > > > > > > > > > > > Hi all, > > > > > > > > I am using jakarta-log4j-1.2.8 in my java > program > > > to > > > > log errors. When I compile the program it runs > > > fine. > > > > But when I execute it, it throws the following > > > error > > > > > > > > C:\VLakshmi\JCI\Equipment > > > > Interface\Code\WEB-INF\classes>java > > > JCI.XMLInterface > > > > Exception in thread "main" > > > > java.lang.NoClassDefFoundError: > > > org/apache/log4j/Layo > > > > ut > > > >at > > > JCI.XMLInterface.(XMLInterface.java:20) > > > > > > > > It says that the class "Layout" is not found. > But > > > i > > > > have included the log4j-1.2.8.jar in \lib. > Kindly > > > help > > > > me to resolve this issue. > > > > > > > > > > > > > > With regards, > > > > Venkatlakshmi > > > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > With regards, Venkatlakshmi __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]