Log4j:ERROR setFile(null,true) call failed.
Hello
I have Log4j.properties
log4j.rootCategory = DEBUG, file ,ImportFileAppender , console
log4j.appender.stdout.threshold = ERROR
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p [%t] %c - %m%n
log4j.appender.file.threshold = DEBUG
log4j.appender.file.File = ${qtl.log.location}
log4j.appender.file.MaxFileSize = 10MB
log4j.appender.file.MaxBackupIndex = 10
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern =%-5p|%-80m|%d%n
log4j.appender.ImportFileAppender.threshold = DEBUG
log4j.appender.ImportFileAppender.File = ${qtl.log.import}
log4j.appender.ImportFileAppender = org.apache.log4j.RollingFileAppender
log4j.appender.ImportFileAppender.layout = org.apache.log4j.PatternLayout
log4j.appender.ImportFileAppender.layout.ConversionPattern = %-5p|%-80m|%d%n
and i am giving ${qtl.log.location} through java file like this
private static String LOG_4J_PROPERTY_FILE = "/src/com/impact/qtl12/commons/log4j.properties";
logFileName = "log-" + new SimpleDateFormat("yyyyMMdd-hhmm").format(new Date()) + ".log";
logFilePath = dirString + "\\" + logFileName;;
System.setProperty("qtl.log.location", logFilePath); //replacing ${qtl.log.location} by the logFilePath in log4j.properties String directory = System.getProperty("user.dir");
PropertyConfigurator.configure(directory + LOG_4J_PROPERTY_FILE);
when i run my program i get error of this type
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException:
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:324)
at com.impact.qtl12.imports.UI.CSVFile.QTL.main(QTL.java:964)
log4j:ERROR setFile(null,true) call failed.
Edited by: Mayur Mitkari on Jan 2, 2013 12:53 AM
Edited by: Mayur Mitkari on Jan 2, 2013 12:54 AM
Edited by: Mayur Mitkari on Jan 2, 2013 12:55 AM
Mayur Mitkari wrote:
I checked it out the directory existsReally? You have a directory 'src' in the root of your filesystem?
/src/com/...EDIT: never mind, moving along, I missed a bit of code there... In my own defense, use \ formatting tags to make it slightly more inviting to read it.
Similar Messages
-
I am running Hyper-V in Windows 8.1 on a late 2011 27 inch iMac. Whenever I try to create a virtual machine I get the error below and Windows warns that it will restart in 1 minute. I tried a clean install of Windows, but my PC still crashes ever
time I try to create a VM. I was able to successfully use Hyper-V in prior versions of Windows on this same PC. Any clue as to what is going on? A driver? Windows 8.1? Mac Hardware related?
I see the following two entries in event viewer but have no other clue as to what is happening:
Log Name: Microsoft-Windows-Hyper-V-VMMS-Admin
Source: Microsoft-Windows-Hyper-V-VMMS
Date: 1/10/2014 10:48:46 AM
Event ID: 16000
Task Category: None
Level: Error
Keywords:
User: SYSTEM
Computer: Charles-PC.CHARLESPOOL.local
Description:
The Hyper-V Virtual Machine Management service encountered an unexpected error: The remote procedure call failed. (0x800706BE).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066F867-7CA1-4418-85FD-36E3F9C0600C}" />
<EventID>16000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2014-01-10T15:48:46.770451300Z" />
<EventRecordID>58</EventRecordID>
<Correlation />
<Execution ProcessID="2488" ThreadID="8704" />
<Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
<Computer>Charles-PC.CHARLESPOOL.local</Computer>
<Security UserID="S-1-5-18" />
</System>
<UserData>
<VmlEventLog xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
<ErrorMessage>%%2147944126</ErrorMessage>
<ErrorCode>0x800706BE</ErrorCode>
</VmlEventLog>
</UserData>
</Event>
Log Name: Microsoft-Windows-Hyper-V-VMMS-Admin
Source: Microsoft-Windows-Hyper-V-VMMS
Date: 1/10/2014 10:48:46 AM
Event ID: 16010
Task Category: None
Level: Error
Keywords:
User: SYSTEM
Computer: Charles-PC.CHARLESPOOL.local
Description:
The operation failed.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066f867-7ca1-4418-85fd-36e3f9c0600c}" />
<EventID>16010</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2014-01-10T15:48:46.773497100Z" />
<EventRecordID>59</EventRecordID>
<Correlation />
<Execution ProcessID="2488" ThreadID="8704" />
<Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
<Computer>Charles-PC.CHARLESPOOL.local</Computer>
<Security UserID="S-1-5-18" />
</System>
<ProcessingErrorData>
<ErrorCode>15005</ErrorCode>
<DataItemName>Parameter0</DataItemName>
<EventPayload>
</EventPayload>
</ProcessingErrorData>
</Event>Hi CharlesPool,
I am assuming that the win8.1 is in-place updated from win8 .
Maybe you need to check the state of hypervisorlaunchtype .
If it is off , please run command " bcdedit /set hypervisorlaunchtype auto "
Best Regards
Elton Ji
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
but it does not work.
Plz give the exact soln to solve this error.sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
but it does not work.
Plz give the exact soln to solve this error.
So when you tried starting SQL server service it gave the error right ? or when you click on SQL server services in SQL server configuration manager(SSCM) you get this error. Can you be more clear. As far as I read your question it has something
to do with permission. Close SSCM window and this time right click on SQL server configuration manager and select run as administrator and check if you can see SQL server services
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
Error occasional - faultCode: Channel.Call.Failed
Please help me
In my application occur this error randomly
faultCode: Channel.Call.Failed
faultDetail: 'NetConnection.Call.Failed: HTTP: Failed'
faultString: 'error'
http://www.rarusflats.com.br/Senap1.jpg
http://www.rarusflats.com.br/Senap2.jpg
I see this post and i Add a Blank Application.cfm, in folder
cfc , But not resolved
http://www.coldfusiondeveloper.com.au/go/news/by/jeff-douglas/20080523-flex-3-remoting-err or-channelcallfailed/
http://www.rarusflats.com.br/Senap3.jpg
Exist any solution to resolve this error of “faultCode:
Channel.Call.Failed” ?
And in COldfusion exist any Log to see error for this ?
I already tried that occurs when the error access the Gateway
of Flex
http://www.rarusflats.com.br/flex2gateway/
But when the screen is blank, in the case in operation
correct?Hi,
Can you please try tracing the FaultEvent.fault.rootCause
object and see if there is any error message. Usually exceptions
thrown from the server is available in this rootCause object.
Hope this helps. -
Trex installation error FSL-00001 System call failed. Error 3
I am installing trex on multiple hosts for a Production setup. Trex is version 7.0 patch level 40. All hosts are Windows servers running on "Windows Server 2003 R2 Enterprise x64 Edition, Service Pack 2" Distribution of trex instances are as follows,
Index Server =1
Slave Server =1
Backup Server =1
File Server =1
I started of with installing Trex global filesystem which resulted in following error,
ERROR 2008-10-23 15:19:27
FSL-00001 System call failed. Error 3 (The system cannot find the path specified.
) in execution of system call 'FindFirstVolumeMountPoint' with parameter (
?\Volume{51f489f8-8ef6-11dd-886f-001e0beae60e}\), line (91) in file (synxcfsmit.cpp).
ERROR 2008-10-23 15:19:27
MUT-03025 Caught ESyException in Modulecall: The system cannot find the path specified.
ERROR 2008-10-23 15:19:27
FCO-00011 The step getMounts with step key |NW_TREX_Prepare|ind|ind|ind|ind|0|0|NW_GetSidNoProfiles|ind|ind|ind|ind|1|0|NW_getMounts|ind|ind|ind|ind|0|0|getMounts was executed with status ERROR .
Installation is performed by administrator user and so has full access rights. Has anyone encountered such an error before.
Regards,
SandeepI uninstalled the Python application via the Windows "Add/Remove" programs utility and that seems to have resolved the issue.
TREX has been installed successfully. -
WebDynpro Exception: ADS call failed SOAP Framework error:
Hi,
Can help me with this error:
WebDynpro Exception: ADS call failed SOAP Framework error: SOAP Runtime Exception: CSoapExceptionFault : SOAP fault found in SOAP document /Transaction system failure in method rpData./<ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException xmlns:ns1="http://sap-j2ee-engine/client-runtime-error">Transaction(100.102).
Thank youADS Installation and configuration:
http://help.sap.com/saphelp_nwmobile71/helpdata/en/37/504b8cbc2848a494facfdc09a359b1/frameset.htm
Troubleshooting for ADS configuration:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ec0508-9438-2c10-f393-a41fb255698d?quicklink=index&overridelayout=true
Landscape with ADS:
http://csc-studentweb.lr.edu/swp/Berg/Conferences/SAP_NW2008_and_Admin_2008/BI/Track13/Track13_Session4.pdf
ADS tests
http://help.sap.com/saphelp_nwmobile71/helpdata/en/43/f31e3082221595e10000000a1553f7/content.htm
Hope that helps, Otto -
The Remote Procedure call failed error in Microsoft Direct Access configuration
Hi,
I have setup the Microsoft Base lab using Microsoft TLG, I have generated the IPHTTPS and NLS server certificate using the Microsoft PKI. After that I have installed the Microsoft Direct Access role but at the time of configuring the Remote Access Server
it fails with the remote procedure call failed error.
Could anybody help me to resolve this issue. I have searched a lot but no any solution found. It will be very helpful, if some one can point me where I did mistake.
Thanks,
Arifsql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
but it does not work.
Plz give the exact soln to solve this error.
So when you tried starting SQL server service it gave the error right ? or when you click on SQL server services in SQL server configuration manager(SSCM) you get this error. Can you be more clear. As far as I read your question it has something
to do with permission. Close SSCM window and this time right click on SQL server configuration manager and select run as administrator and check if you can see SQL server services
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
Channel.Call.Failed
Hi All,
We are using Flex 3 and BlazeDS in my project. I am getting following error when user performs some backend calls. After some time we are not getting any error for the same backend call. It is happening very randomly
fault = (mx.rpc::Fault)#243
errorID = 0
faultCode = "Channel.Call.Failed"
faultDetail = "NetConnection.Call.Failed: HTTP: Failed"
faultString = "error"
message = "faultCode:Channel.Call.Failed faultString:'error' faultDetail:'NetConnection.Call.Failed: HTTP: Failed'"
name = "Error"
rootCause = (Object)#244
code = "NetConnection.Call.Failed"
description = "HTTP: Failed"
details = "https://<server>/<context root>/fmb/amfsecure"
level = "error"
Kindly suggest me a solution for this.
Thanks,
Pradeep.After a lots of research, I found following request is send from Flex to Server as:
03-Feb-11 04:27:03 DEBUG Logger Endpoint.AMF : Deserializing AMF/HTTP request
Version: 3
(Message #0 targetURI=null, responseURI=/73)
(Array #0)
[0] = (Typed Object #0 'flex.messaging.messages.CommandMessage')
operation = 12
correlationId = ""
body = (Object #1)
messageId = "1EDDFEEA-C98A-B355-332F-EAD8A753232C"
clientId = null
timeToLive = 0
timestamp = 0
headers = (Object #2)
DSId = "19FCCA68-EB08-EFBE-EEDA-4C8582B5A291"
destination = ""
Flex sends CommandMessage.DISCONNECT_OPERATION request to Server.
I want to know exactly why/when this request is send to server.
Looking forward to a positive response -
SOAP: call failed: java.lang.NullPointerException
Hi,
We are geeting the error in RWB -->
SOAP: call failed: java.lang.NullPointerException
We checked the communication channel and interface and all are working fine.
Can anybody suggest?
Regards,
Akki..................Hi,
use this link to find the answer..
SOAP adapter
Regards,
Amitanshu -
Hi,
I am working on EDI 850 interface in SAP PI. I am using Seeburger adapter for the EDI data conversion. I am able to convert the data successfully and IDOCs are created successfully.
I am facing the problem in creating the 997 (functional acknowledgment) data. Below is the error message received the receiver communication channel:
Message processing failed. Cause: Error in BICMODULE-module:Temporary error: BIC XI Adapter call failed. Reason: InhouseDocReader doSyntaxCheck(): offset[48]: the found segment Functional_Acknowledgment is not in the message description. DESCRIPTION: InhouseDocReader Error: The Segment Functional_Acknowledgment is missing in the message description. Check your file.
In SXMB_MONI i could able to see the Functional acknowledgment xml data under main document. But it is not getting processed successfully to generate the file.
Am i doing any mistake in configuration? Please help me...
Regards,
VasanthaHi Jyoti,
I had a raised a similar case with SAP and came to know that archiving only works if the error raised by the module is so called "Permanent". However, bic doesn't raise permanent error due to which archiving of error files won't be possible. Seeburger haven't came up with a solution yet.
Regards,
Prateek -
Hi
I'm using WAD 7 and when I try to save a webtemplate I get this error:
<i><b>Java-Call Failed: Call XMLVALIDATION abandoned (1). Check BI Portal Conne
Java-Call Failed: Call VALIDATION abandoned (1). Check BI Portal Connecti</b></i>
The webtemplate is saved anyway, but always get this error message.
Can you tell me what should I do?
ThanksIs your BEx Web setup properly? Run report RSPOR_SETUP and check that everything is succesful.
-
See Burger Error in BICMODULE-module:Adapter call failed. Reason: null
Hello All,
Scenario IDOC to File using Seeburger BIC problems in in my receiver adapter when converting from XML to EDI.
Error is:
"Message processing failed. Cause: Error in BICMODULE-module:Adapter call failed. Reason: null"
The Seeburger modules used in my receiver adapter:
1 localejbs/CallBicXIRaBean Local Enterprise Bean BIC_MT
2 localejbs/CallBicXIRaBean Local Enterprise Bean BIC
3 localejbs/Seeburger/FileStore Local Enterprise Bean ARCHIVE_EDI
4 CallSapAdapter Local Enterprise Bean 0
with following module configurations
BIC destDelimiter @http://seeburger.com/xi/bic/destDelimiter
BIC destSourceMsg source
BIC destTargetMsg MainDocument
BIC dynamicConfiguration true
BIC newLine true
BIC useAttribIfSet true
BIC_MT PartnerLookup on
BIC_MT destSourceMsg MainDocument
BIC_MT destTargetMsg MainDocument1
BIC_MT mappingName XML_Generic_ANSI_X12_to_DB_MT_OUT
BIC_MT saveSourceMsg source
Can some one tell me why there is an Error and what additional module configurations it requires .
Thank you,Hi,
If possible go to mapping in BIC designer Tool and execute the same by passing your payload there...
if you encounter any errors then there might be a problem with mapping developed...or can be payload..
Also check the parameter used for destSourceMsg source ...is that the source message which contains the payload ?
HTH
Rajesh -
Dear All,
I am getting a below error while doing ehp6 installation on sybase (high availbility )
can any one help me on this..?
An error occurred while processing option SAP Business Suite 7i 2011 > Enhancement Package 6 for SAP ERP 6.0 > SAP Application Server ABAP > SAP ASE > High-Availability System > Database Instance( Last error reported by the step: System call failed. Error 2 (The system cannot find the file specified. ) in execution of system call 'CreateProcessAsUser' with parameter ( , NULL, Program Files/sapinst_instdir/BS2011/ERP606/AS-ABAP/SYB/HA/DB, &StartupInfo, &ProcessInfo), line (646) in file (d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp), stack trace: d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\ejscontroller.cpp: 181: EJSControllerImpl::executeScript() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\jsextension.hpp: 1059: CallFunctionBase::call() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\osmod\iaxxbprocess.cpp: 423: CIaOsProcess::start_impl() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 238: CSyChildApplicationImpl::start(false) d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 262: CSyChildApplicationImpl::doStart() .). You can no
Regards,
Letz..Hello Mauricio.
Thanks
Two Thinks:
1.- This error appears precisely in the process of creating SAP users including you mention sidadm:
A.- Execute sapinst
B.- Installation option is chosen
SAP NetWeaver CE Production Edition
Installation Options
High-Availability System
Central Service Instance (SCS)
c.- System ID, Next and appear message error
2.- However, the user manually create sidadm, I gave the permissions you indicate, and the error message is the same
Thanks -
I get the following error when trying to connect to my BlazeDS Java server from Flex application. Flex application is on localhost:80, blazeDS on tomcat localhost:8080. Please help!
createUser();faultHandler():(mx.messaging.messages::ErrorMessage)#0
body = (Object)#1
clientId = (null)
correlationId = "9FFDEBE8-EAD0-F3D9-8E9B-E3D7D7F5AE79"
destination = ""
extendedData = (null)
faultCode = "Client.Error.MessageSend"
faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500: url: 'http://77.93.202.150:8080/QuizDS/messagebroker/amf'"
faultString = "Send failed"
headers = (Object)#2
messageId = "98F54E19-7B0D-DCB9-4B86-E3D7D84E484F"
rootCause = (mx.messaging.events::ChannelFaultEvent)#3
bubbles = false
cancelable = false
channel = (mx.messaging.channels::AMFChannel)#4
authenticated = false
channelSets = (Array)#5
connected = false
connectTimeout = -1
enableSmallMessages = true
endpoint = "http://77.93.202.150:8080/QuizDS/messagebroker/amf"
failoverURIs = (Array)#6
id = (null)
mpiEnabled = false
netConnection = (flash.net::NetConnection)#7
client = (mx.messaging.channels::AMFChannel)#4
connected = false
maxPeerConnections = 8
objectEncoding = 3
proxyType = "none"
uri = "http://77.93.202.150:8080/QuizDS/messagebroker/amf"
piggybackingEnabled = false
polling = false
pollingEnabled = true
pollingInterval = 3000
protocol = "http"
reconnecting = false
recordMessageSizes = false
recordMessageTimes = false
requestTimeout = -1
uri = "http://77.93.202.150:8080/QuizDS/messagebroker/amf"
url = "http://77.93.202.150:8080/QuizDS/messagebroker/amf"
useSmallMessages = false
channelId = (null)
connected = false
currentTarget = (mx.messaging.channels::AMFChannel)#4
eventPhase = 2
faultCode = "Channel.Connect.Failed"
faultDetail = "NetConnection.Call.Failed: HTTP: Status 500: url: 'http://77.93.202.150:8080/QuizDS/messagebroker/amf'"
faultString = "error"
reconnecting = false
rejected = false
rootCause = (Object)#8
code = "NetConnection.Call.Failed"
description = "HTTP: Status 500"
details = "http://77.93.202.150:8080/QuizDS/messagebroker/amf"
level = "error"
target = (mx.messaging.channels::AMFChannel)#4
type = "channelFault"
timestamp = 0
timeToLive = 0halodev:
I made a CF/Flex site based on the Flexstore sample app,
using a database instead of XML as the data source; in case you
want to see it:
http://www.timos.com/dg/flex/DilemmaGames.html
At first I had troubles similar to what you describe;
initially, part of the problem was that my hosting company had not
yet upgraded to CF 7.02. One other thing I had to correct: when you
upload to your server, upload the entire ‘bin’ (or
whatever your output folder is) minus the debug SWF.
If it would help with other issues, contact me and I will be
glad to make my project code available to you. Good luck.
Carlos
[email protected] -
Log4j:ERROR Failed to load driver
I want to use log4j to log information,my jdk version is 1.5.0_06,and my oracle version is 9.2.0.1.0,my web.xml and servlet is follows:
web.xml
<servlet>
<display-name>LogServlet</display-name>
<servlet-name>LogServlet</servlet-name>
<servlet-class>
test.a
</servlet-class>
<init-param>
<param-name>log4j-config-file</param-name>
<param-value>
/WEB-INF/log4j.properties
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
/*a.java*/
package test;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.*;
public class a extends HttpServlet{
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ }
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ }
public void init() throws ServletException{
String prefix = getServletContext().getRealPath("/");
String file = getServletConfig().getInitParameter("log4j-config-file");
if (file != null) {
PropertyConfigurator.configure(prefix + file);
/*log4j.properties*/
log4j.rootLogger=DEBUG,DATABASE
log4j.addivity.org.apache=true
log4j.appender.DATABASE.Threshold=INFO
log4j.appender.DATABASE=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.DATABASE.URL=jdbc:oracle:thin:@192.1.1.2:1521:Ora
log4j.appender.DATABASE.driver=oracle.jdbc.driver.OracleDriver
log4j.appender.DATABASE.user=scott
log4j.appender.DATABASE.password=tiger
log4j.appender.DATABASE.sql=INSERT INTO test VALUES('%m')
log4j.appender.DATABASE.layout=org.apache.log4j.PatternLayout
When I start Tomcat,it raise following error:
log4j:ERROR Failed to load driver
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.log4j.jdbc.JDBCAppender.setDriver(JDBCAppender.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:205)
at org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:164)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:129)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:324)
at test.a.init(a.java:20)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
I have put all jar file of the directory C:\oracle\ora92\jdbc\lib,such as classes12.jar,classes12_g.jar,classes12dms.jar,classes12dms_g.jar,nls_charset11.jar,nls_charset12.jar,ocrs12.jar,ojdbc14.jar,ojdbc14_g.jar into the direcory tomcat5\webapps\ROOT\WEB-INF\lib
But Tomcat still raise above error? Why? I am puzzled with it for a long time! Anybody meet with above question? Any idea will be appreciated!Well, classes12.zip is a fairly old driver, especially for JDK 1.5, and even for Oracle 9. So, I would first suggest visiting Oracle's JDBC driver download sie.
If that fails, please post the code you are using to connect to your database (please do not post the real domain or your user name or password). :^)
- Saish
Maybe you are looking for
-
Printable page issue..
Dear All, In one of our requirement i a getting error while "Printing" the page.The requirement is like below: In the first page we are displaying no of items list as per user selection.When user clicks on the item number we will take them to another
-
Arch PPC issue with creating bootstrap partition
On second thought, I'm doing good. Last edited by Kebertx (2012-01-13 22:35:32)
-
OTA of Flash Lite Player doesn't work for HTC Touch Pro 2
When I tried to run a Flash Lite app in HTC Touch Pro 2, it asked for Flash Lite player to run it. I clicked Yes. It returned a message: Adobe Flash Lite is not available for this device. OTA installation didn't work in this case. I then manually ins
-
Runtime increased after stats collection
Hi, Below is my SQL query SELECT wos.*, t.wo_status, t.wo_type FROM cscrpt_transactions t, (SELECT DISTINCT sb.sub_acct_no_sbb, sb.vip_flg_sbb,
-
Does CS5 really support OS X 10.5.7?
I'm trying to install the trial on my 10.5.7 machine with no success. The installer spoofs at around 100% completion, and then I try to launch Ps but it doesn't even show the slpash screen and crashes. Uninstaller doesnt work either, it hangs and cra