• No results found

IBM WebSphere Application Server Network Deployment, Version 6 Troubleshooting and support MOST IMPORTANT pdf

N/A
N/A
Protected

Academic year: 2020

Share "IBM WebSphere Application Server Network Deployment, Version 6 Troubleshooting and support MOST IMPORTANT pdf"

Copied!
283
0
0

Loading.... (view fulltext now)

Full text

(1)

Troubleshooting

and

support

(2)

Note

Beforeusingthisinformation,besuretoreadthegeneralinformationunder“Notices”onpage273.

Compilationdate:December8,2004

©CopyrightInternationalBusinessMachinesCorporation2004.Allrightsreserved.

(3)

Contents

Howtosendyour comments . . . vii

Chapter1. Overviewandnewfeaturesfortroubleshooting . . . 1

Overview:Troubleshooting . . . 1

Whatisnew fortroubleshooters . . . 2

Troubleshootingbycomponent . . . 4

Webmoduleor applicationserverdiesorhangs . . . 4

WebContainertroubleshootingtips . . . 6

JSPsourcecodeshownbytheWebserver . . . 6

JSPenginetroubleshootingtips. . . 7

HTTPsessionmanagertroubleshooting tips . . . 8

ProblemscreatingorusingHTTPsessions . . . 9

EnterprisebeanandEJB containertroubleshootingtips . . . 11

Cannotaccessanenterprisebeanfromaservlet,a JSPfile,astand-alone program,oranother client . . . 12

Aclientprogramdoes notwork . . . 15

UniversalDiscovery,Description,andIntegration,WebService,andSOAPcomponent troubleshootingtips . . . 16

Errorsreturnedto aclientsendinga SOAPrequest . . . 16

JDBCanddatasourcetroubleshootingtips . . . 17

DB2troubleshootingtips . . . 19

Cannotaccessadatasource . . . 19

Sybasetroubleshootingtips. . . 35

Errorsinmessaging . . . 38

Errorsconnecting toWebSphereMQandcreatingWebSphereMQqueueconnectionfactory . . . 38

Namingservicescomponenttroubleshootingtips . . . 39

CannotlookupanobjecthostedbyWebSphereApplicationServerfroma servlet,JSPfile,or other client . . . 40

Objectrequestbrokercomponenttroubleshooting tips . . . 43

Messagingcomponenttroubleshootingtips . . . 55

Chapter2. HowdoItroubleshoot? . . . 57

Chapter3. Debuggingapplications . . . 61

DebuggingwiththeApplicationServerToolkit . . . 62

Chapter4.Addingloggingandtracingto yourapplication . . . 63

LoggingandtracingwithJavalogging . . . 63

Loggers . . . 64

Loghandlers . . . 65

Loglevels . . . 66

Logfilters . . . 66

Logformatters . . . 66

Configuringloggingpropertiesusingtheadministrativeconsole . . . 67

Configuringloggingpropertiesforanapplication . . . 71

Samplesecurity . . . 72

Usingloggersinanapplication . . . 72

TheCommonBaseEvent inWebSphereApplicationServer. . . 81

Typesofproblemdeterminationevents . . . 82

Thestructure oftheCommonBaseEvent . . . 82

SampleCommonBaseEventinstance . . . 92

SampleCommonBaseEventtemplate . . . 93

(4)

LoggingCommonBaseEventsinWebSphereApplicationServer. . . 94

ProgrammingwiththeJRasframework . . . 101

UnderstandingtheJRasfacility . . . 101

JRasExtensions . . . 103

JRasMessagesandTraceeventtypes . . . 111

InstrumentinganapplicationwithJRasextensions . . . 113

Chapter5.Diagnosingproblems (usingdiagnosistools) . . . 121

Messagereference . . . 121

CORBAminor codes. . . 122

Workingwithmessagelogs . . . 122

ViewingtheJVMlogs . . . 123

InterpretingtheJVMlogs . . . 123

ConfiguringtheJVMlogs . . . 125

Processlogs. . . 127

Viewingtheservicelog . . . 128

Configuringtheservicelog . . . 129

DetectinghungthreadsinJ2EEapplications . . . 130

Adjustingthehangdetectionpolicyof arunningserver . . . 131

Configuringthehangdetectionpolicy. . . 131

Workingwithtrace . . . 132

Enablingtracingandlogging . . . 132

Managingtheapplicationservertrace service . . . 137

Interpretingtrace output . . . 137

Diagnostictraceservicesettings . . . 138

Logandtracesettings . . . 140

Workingwithtroubleshootingtools. . . 141

GatheringinformationwiththeCollectortool . . . 141

FirstFailureDataCapturetool . . . 144

LogAnalyzer. . . 144

IBMSupportAssistant . . . 154

ObtaininghelpfromIBM . . . 155

Diagnosingandfixingproblems:Resourcesforlearning. . . 155

DebuggingServicedetails. . . 156

Enableservice atserverstartup. . . 157

JVMdebugport . . . 157

JVMdebugarguments . . . 157

Debugclassfilters. . . 157

BSFdebugport . . . 157

BSFlogginglevel . . . 157

Configurationproblemsettings . . . 157

Configurationdocumentvalidation . . . 157

EnableCrossvalidation. . . 157

ConfigurationProblems. . . 157

Scope . . . 157

Message . . . 158

Explanation . . . 158

Useraction . . . 158

TargetObject . . . 158

Severity . . . 158

LocalURI . . . 158

FullURI . . . 158

Validatorclassname . . . 158

Chapter6.LearnaboutWebSphereapplications . . . 159

(5)

Troubleshootingtips forWebapplicationdeployment . . . 159

EJBapplications . . . 160

Accessintentexceptions . . . 160

Frequentlyaskedquestions:Accessintent. . . 161

Importantfileformessage-driven beans. . . 162

Clientapplications. . . 162

Applicationclienttroubleshootingtips. . . 162

Webservices . . . 167

TroubleshootingWebservices . . . 167

TroubleshootingtheWebServicesInvocationFramework . . . 179

UDDIRegistrytroubleshooting . . . 184

Dataaccessresources . . . 187

Connectionandconnection poolstatistics . . . 187

Example:Connectionfactorylookup . . . 188

Databaseexceptionsresultingfromforeignkey conflicts,ordeadlockwhenentitybeansare configuredforoptimisticconcurrencycontrol . . . 191

Example:UsingtheJavaManagementExtensionsAPI tocreateaJDBCdriveranddatasourcefor container-managedpersistence . . . 191

Example:UsingtheJavaManagementExtensionsAPI tocreateaJDBCdriveranddatasourcefor bean-managedpersistence,sessionbeans,orservlets . . . 196

Vendor-specificdatasources minimumrequiredsettings . . . 199

Messagingresources . . . 219

TroubleshootingWebSpheremessaging. . . 219

Mail,URLs,andotherJ2EEresources . . . 222

Enablingdebuggerfor amailsession . . . 222

Security . . . 223

Troubleshootingauthorizationproviders . . . 223

Troubleshootingsecurityconfigurations . . . 226

Naminganddirectory . . . 252

Troubleshootingname spaceproblems . . . 252

ObjectRequestBroker . . . 260

ObjectRequestBrokercommunicationstrace . . . 260

Transactions. . . 263

Troubleshootingtransactions. . . 263

Transactionservice exceptions . . . 263

Exceptionsthrownfortransactionsinvolvingbothsingle-andtwo-phasecommit resources . . . . 264

LearnaboutWebSphereprogrammingextensions . . . 264

ActivitySessions . . . 265

Applicationprofiling . . . 265

Dynamiccache. . . 265

Internationalization . . . 268

Notices . . . 273

(6)
(7)

How

to

send

your

comments

Yourfeedbackisimportant inhelping toprovidethemostaccurate andhighestqualityinformation.

v

TosendcommentsonarticlesintheWebSphereApplicationServerInformationCenter

1. DisplaythearticleinyourWebbrowserandscrollto theendof thearticle.

2. Click ontheFeedbacklinkat thebottomof thearticle,andaseparatewindowcontainingane-mail

formappears.

3. Filloutthee-mailformasinstructed,andclickonSubmitfeedback.

v TosendcommentsonPDFbooks,youcane-mailyourcommentsto:[email protected]or fax

themto 919-254-0206.

(8)
(9)

Chapter

1.

Overview

and

new

features

for

troubleshooting

Thistopicsummarizesthecontentsandorganizationof thetroubleshooting documentation,includinglinks toconceptual overviewsanddescriptionsofnew features.

v

“Overview:Troubleshooting”

v “Whatisnewfor troubleshooters”onpage2 Sectionsinthe troubleshootingdocumentation:

Chapter3,“Debuggingapplications,”onpage61

Thistopicdescribes howtouse Javaloggingfor generatingyourapplicationlogging. Designers anddevelopersofapplicationsthatrunwithor underWebSphereApplicationServer,suchas servlets,JavaServerPages(JSP) files,enterprisebeans,clientapplications,andtheirsupporting classes,mightfindit useful.

Chapter4,“Addingloggingandtracingtoyourapplication,”onpage63

Thistopicdescribes howtouse Javaloggingfor generatingyourapplicationlogging. Designers anddevelopersofapplicationsthatrunwithor underWebSphereApplicationServer,suchas servlets,JavaServerPages(JSP) files,enterprisebeans,clientapplications,andtheirsupporting classes,mightfindit useful.

Chapter5,“Diagnosingproblems(usingdiagnosistools),”on page121

Thistopicdescribes skillsandtoolsfor collecting,displaying,anddiagnosingtroubleshooting data. Itincludesdumps,messages,logging, tracing,anddebugging.

Troubleshootingby task

Thistopicsummarizeshow todetect,confirm,andsolvetheproblem,basedonwhatyouwere tryingto dowhentheproblemoccurred.

TroubleshootingWebSphereapplications

Forvariouscomponentsthatmighthave failed,thistopicsummarizeshow todetect,confirm,and solvetheresultingproblem.Theinstructionsarespecifictovariousapplicationtypes.Forexample, youcanfocusontroubleshooting accessproblemsforanenterprisebean application,or a

problemthatdisplayedassoonasyouenabledsecurity.

Overview:

Troubleshooting

Thistopicprovideslinksto conceptualoverviewsof troubleshootingproblemsinvolvingdeployed applicationsandtheapplicationservingenvironment.

“Whatisnew fortroubleshooters” onpage2

Thistopicprovidesanoverviewofnew andchangedfeaturesintroubleshootingtoolsandsupport.

Chapter5, “Diagnosingproblems(usingdiagnosistools),”on page121

Thistopicprovidesaplaceto startyoursearchfortroubleshootinginformation.

PresentationsfromEducationon Demand v Whereto startwithproblemdetermination v Serviceabilityenhancements

Troubleshootingoverview

Troubleshootingistheprocessof findingandeliminatingthecauseof aproblem.Wheneveryouhave a problemwithyourIBMsoftware,thetroubleshootingprocessbeginsassoon asyouask yourselfwhat happened?Abasictroubleshootingstrategyat ahighlevelinvolves:

(10)

2. Recreatingtheproblem.

3. Eliminatingpossiblecauses.

4. Usingdiagnostictools.

Recordingthesymptomsofthe problem

Dependingonthetypeofproblemyouhave whetherit bewithyourapplication,yourserver,oryourtools, youmightreceive amessagethatindicatessomethingiswrong.Alwaysrecordtheerrormessagethatyou see.As simpleasthissounds,errormessagessometimescontain crypticcodesthatmightmakemore senseasyouinvestigateyourproblemfurther.Youmightalso receivemultipleerrormessagesthatlook similarbuthavesubtledifferences.By recordingthedetailsof eachone,youcanlearn moreaboutwhere yourproblemexists.

Recreatingthe problem

Thinkbacktowhatstepsyouweredoingthatledyoutothis problem.Trythosestepsagaintoseeif you caneasilyrecreatethisproblem. Ifyouhavea consistentlyrepeatabletestcase,you willhave aneasier timedeterminingwhatsolutionsarenecessary.

v Howdidyoufirstnoticetheproblem?

v Did youdoanythingdifferentthatmadeyounoticetheproblem? v

Istheprocessthatiscausingtheproblemanew procedure,or hasitworked successfullybefore? v If thisworkedbeforewhathaschanged?Thechangecan referto anytypeof changemadeto the

system,rangingfromaddingnewhardwareor software,to configurationchangestoexistingsoftware.

v Whatwasthefirstsymptomof theproblemyouwitnessed?Werethereothersymptomsoccurring

aroundthatpointof time?

v Doesthesameproblemoccurelsewhere?Isonly onemachineexperiencingtheproblemoraremultiple

machinesexperiencingthesameproblem?

v Whatmessagesarebeinggeneratedthatcouldindicatewhattheproblemis? Eliminatingpossiblecauses

Narrowthescopeofyourproblembyeliminatingcomponentsthatarenotcausingtheproblem.Byusinga processof elimination,youcan simplifyyour problemandavoidwastingtimeinareasthatarenotculprits. Consulttheinformationinthisproductandotheravailableresourcestohelp youwithyourelimination process.

v Hasanyoneelseexperiencedthisproblem? Seethetopiconsearchingknowledgebases. v Isthereafixyoucandownload? Seethetopicongettingfixes.

v Youcan usetheWebSphereApplication ServerTroubleshootingGuideto workthroughthecauseofa

problem

Usingdiagnostictools

Asa moreadvancedtask,therearevarioustoolsthatyoucanusetoanalyzeanddiagnoseproblemswith yoursystem.Tolearnhow tousethesetoolssee Chapter5,“Diagnosingproblems(usingdiagnosis tools),”onpage121.

What

is

new

for

troubleshooters

(11)

Thebiggest changeintroubleshooting supportandserviceabilityisincreasedabilityto automatically detectandrecoverfromproblems.ManyserviceabilityimprovementsaredescribedintheEducationon Demandpresentation:Serviceabilityenhancements.

Thetroubleshootingsectionhasbeen revampedandexpandedtoinclude extensivesupportinformation, includingtheabilitytosearchlive,Web-basedsupportresourcesbyusingthecustomizedqueryfieldsin the″Websearch″page.

NewtroubleshootingtechnologyontheSupportsite v MustGather:ReadfirstforallWebSphereApplication

Serverproducts

v TroubleshootingGuideforWebSphereApplication Server

Improvedmessagetext,newmessageprefixes Messagesforkeyproductcomponentsusedduring installation,migration,andinitialconfigurationhavebeen improved.Additionalcomponentshavemessagesnow. Messageprefixeshavechanged.Themessagereference providesamappingofVersion5.1.xprefixestoVersion 6.0.xprefixes.

JavaloggingframeworkfromJSR47isexploited InJ2SE1.4,theJavaloggingframeworkwasintroduced viaJSR47.InWebSphereApplicationServer,messages andtraceloggedtobothJRASandJSR47loggingAPIs arepassedintotheJSR47logginginfrastructure.This allowsJSR47HandlersconnectedtotherootJSR47 LoggertoreceiveallWebSphereApplicationServerlog content.JSR47andJRASLoggerlevelscanbecontrolled viatheadminconsoletroubleshootingsection.

WebSphereApplicationServeralsobuildsitslogsfrom theJSR47frameworkbyconnectingitsHandlerstothe rootLogger.

TheJSR47Logginginfrastructureallowsforflexible pluggabilityofcustomHandlersintothelogging infrastructuretoenablecustomlogs.Byappropriate configuration,theHandlerscanreceiveWebSphere ApplicationServer’sloggedevents,andeventsloggedto Loggersinstantiatedbyyourapplications.

See“LoggingandtracingwithJavalogging”onpage63.

JRASisdeprecated TheJRASAPIisdeprecated.Usersaredirectedtouse

(12)

CommonBaseEventsdescribesystemsituations CommonBaseEventsaredatastructuresusedto describesituationsthatoccurinthesystem.Common BaseEventsareusedforvariouspurposes,including representingthingssuchasbusinessevents,configuration events,errorevents,andsoon.TheWebSphere

ApplicationServernowusesCommonBaseEventsasthe internalrepresentationofloggedmessages.

CommonBaseEventsareloggedviaJSR47andassuch canbereceivedandoperatedonfromJSR47Handlers. HandlerswhicharenotprogrammedtotheCommonBase Eventspecificationwillalsobeabletoconsumethese eventsasCommonBaseEventLogRecords.Handlers whichareprogrammedtotheCommonBaseEvent specificationcantakeadvantageoffieldswithinthe CommonBaseEvents.

See“TheCommonBaseEventinWebSphereApplication Server”onpage81.

Threadnamescanbeincludedinlogs ThreadnamehasbeenaddedtotheAdvancedlogformat

andLogAnalyzerformat.Theadvancedlogformatis availableasanoutputformatforthetracelogandsystem outlog.Thethreadnameisnowincludedinthisformatto enableeasiercorrelationwithothertypesofdiagnostic data.Theloganalyzerformatisavailableasanoutput formatforthetracelog.Thethreadnameisnowincluded inthisformattoenableeasiercorrelationwithothertypes ofdiagnosticdata.

Troubleshooting

by

component

Selecta componentfromthelist.

Web

module

or

application

server

dies

or

hangs

Ifanapplicationserverdies(itsprocess spontaneouslycloses),orfreezes(itsWebmodulesstop respondingtonew requests):

v IsolatetheproblembyinstallingWebmodulesondifferentservers,ifpossible.

v ReadtheMonitoringperformancewithTivoliperformanceviewer (formerlyresourceanalyzer)topic.You

canusetheperformanceviewerto determinewhich resourceshave reachedtheirmaximumcapacity, suchasJavaheapmemory (indicatingapossiblememoryleak)anddatabaseconnections.Ifa particularresourceappearsto havereacheditsmaximumcapacity,reviewtheapplicationcode fora possiblecause:

– Ifdatabaseconnectionsareused andneverfreed,ensurethatapplicationcodeperformsaclose()

onanyopenedConnectionobjectwithinafinally{}block.

– Ifthereisa steadyincreaseinservletenginethreadsinuse, reviewapplicationsynchronized code

blocksfor possibledeadlockconditions.

– Ifthereisa steadyincreaseinaJVMheapsize,reviewapplicationcodefor memoryleak

opportunities,suchasstatic(class-level)collections,thatcancauseobjectsto neverget garbage-collected.

v As analternativeto usingtheperformanceviewer todetectmemoryleakproblems,enableverbose

(13)

1. SelectServers>ApplicationServers>server_name>ProcessDefinition>JavaVirtual Machine,andenableVerboseGarbageCollection.

2. Stopandrestarttheapplicationserver.

3. Periodically,oraftertheapplicationserverstops,browsethelogfileforgarbagecollection

statements. Lookforstatements beginningwith″allocationfailure″.Thestringindicatesthataneed for memoryallocationhastriggeredaJVMgarbagecollection(freeingof unusedmemory).

Allocationfailuresthemselvesarenormalandnotnecessarilyindicativeof aproblem.Theallocation failurestatementisfollowedbystatementsshowinghow manybytesareneededandhow manyare allocated.

Ifthere isa steadyincreaseinthetotalamountoffreeandusedmemory (theJVMkeepsallocating morememoryfor itself),oriftheJVMbecomesunabletoallocateasmuchmemoryasitneeds (indicatedbythebytesneededstatement),theremightbea memoryleak.

v If eithertheperformanceviewerorverbosegarbagecollection outputindicatesthattheapplication

serverisrunningoutof memory,oneofthefollowingproblemsmightbepresent:

– Thereisamemoryleak inapplicationcodethatyoumust address.Topinpointthecauseofa

memoryleak,enabletheRunHProffunction intheServers>Application Servers>server_name> ProcessDefinition>JavaVirtualMachinepane oftheproblemapplicationserver:

- In thesameJVMpane, settheHProfArgumentsfieldtoa valuesimilar to

depth=20,file=heapdmp.txt.This valueshows exceptionstacksto amaximumof20levels,and saves theheapdumpoutputtotheinstall_root/bin/heapdmp.txtfile.

- Save thesettings.

- Stopandrestart theapplicationserver.

- Reenactthescenariooraccesstheresourcethatcauses thehang orcrash,ifpossible.Stopthe

applicationserver.Ifthisisnotpossible,waituntilthehangorcrashhappensagainandstopthe applicationserver.

- Examine thefile intowhichtheheapdumpwassaved.For example,examinethe

install_root/bin/heapdmp.txtfile:

v Searchfor thestring,″SITES BEGIN″.This findsthelocationof alist ofJavaobjectsin

memory,whichshows theamountof memoryallocatedtotheobjects.

v ThelistofJavaobjectsoccurseach timetherewasamemoryallocationintheJVM.Thereisa

recordof whattype ofobjectthememoryinstantiatedandanidentifierof atrace stack,listed elsewhereinthedump,thatshowstheJavamethodthatmadetheallocation.

v ThelistofJavaobjectisindescendingorderbynumberof bytesallocated.Dependingonthe

natureof theleak,theproblemclassshouldshowupnearthetopof thelist, butthisisnot alwaysthecase.Look throughoutthelistfor largeamountsof memoryorfrequentinstancesof thesameclassbeinginstantiated.In thelattercase,usetheIDinthetrace stackcolumn to identifyallocationsoccurringrepeatedlyinthesameclassandmethod.

v Examinethesourcecodeindicatedintherelatedtrace stacksforthepossibilityofmemory

leaks.

– Thedefaultmaximumheapsizeof theapplicationserverneedsto beincreased.

v If anapplicationserverspontaneouslydies,look fora Javathread dumpfile.TheJVMcreatesthefile in

theproductdirectorystructure, witha namelikejavacore[number].txt.

v Forceanapplicationtocreateathreaddump (orjavacore).Hereistheprocessfor forcinga thread

dump,whichisdifferentfromtheprocess inearlierreleasesof theproduct:

1. Usingthewsadmincommandprompt,geta handletotheproblemapplicationserver:wsadmin>set jvm[$AdminControlcompleteObjectNametype=JVM,process=server1,*]

2. Generate thethread dump:wsadmin>$AdminControlinvoke $jvmdumpThreads.

3. Look foranoutputfileintheinstallationrootdirectory witha namelikejavacore.date.time.id.txt. v Browsethethreaddump forclues:

– IftheJVMcreatesthethreaddump asit closes(thethread dumpisnotmanuallyforced),there

mightbe″error″or″exceptioninformation″stringsatthebeginningofthefile.Thesestringsindicate thethreadthatcausedtheapplicationserverto die.

– Thethreaddump containsa snapshotof eachthread intheprocess,startinginthesection labeled ″Fullthread dump.″

- Look forthreadswithadescriptionthatcontains″state:R″.Suchthreadsareactiveandrunning

(14)

- Look formultiplethreadsinthesameJavaapplicationcodesourcelocation.Multiplethreadsfrom

thesamelocationmightindicateadeadlockcondition(multiplethreadswaitingona monitor)or an infinite loop,andhelpidentify theapplicationcode withtheproblem.

Ifthesestepsdonotfixyourproblem,searchtosee iftheproblemisknownanddocumented,usingthe methodsidentifiedintheavailable onlinesupport(hintsandtips,technotes,andfixes)topic.Ifyoufind thatyourproblemisnotknown, contactIBMsupporttoreportit.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegathering informationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

Web

Container

troubleshooting

tips

Ifyouarehavingproblemsstartinga Webmodule, oraccessingresourceswithina particularWebmodule:

v ViewtheJVMlogs andprocess logsfor theapplicationserverwhichhoststheproblemWebmodules,

andlook formessagesintheJVMoutputfilewhich indicatethatthewebmodulehasstarted successfully.Youshouldseemessagessimilar tothefollowing:

WebContainer A SRVE0161I: IBM WebSphere Application Server - Web Container. Copyright IBM Corp. 1998-2002

WebContainer A SRVE0169I: Loading Web Module: [module_name] ApplicationMg A WSVR0221I: Application started: [application_name]

HttpTransport A SRVE0171I: Transport http is listening on port [port_number] [server_name] open for e-business in [install_root]/log/[server_name]/SystemOut.log

v For specificproblemsthatcancauseservlets,HTMLfiles,andJavaServerPages (JSP)filesnottobe

served,seeWebresource(JSPfile, servlet,HTMLfile,image)doesnotdisplay.

v UsetheLogAnalyzertoolto browsetheservicelog(activity.log)fileforclues.

v For adetailedtrace oftherun-timebehaviorof theWebcontainer,enabletraceforthecomponent

com.ibm.ws.webcontainer.*.

Ifnoneof thesestepsfixesyourproblem,checkto seeiftheproblemhasbeen identifiedanddocumented bylookingattheavailableonlinesupport(hintsandtips,technotes,andfixes).Ifyoudon’t findyour problemlistedtherecontactIBMsupport.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegathering informationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

JSP

source

code

shown

by

the

Web

server

Problem

Ifyoushare thedocumentrootoftheWebSphereApplicationServerwiththeWebserverdocumentroot, asecurityexposurecanresultastheWebservermightdisplaytheJSP sourcefileasplaintext.

(15)

Suggestedsolution

MovetheWebSphereApplicationServerJSPsourcefileoutside oftheWebserverdocumentroot.Then, whenthisrequestcomesinwiththeunknownhostheader,theplug-inreturnscontroltotheWebserver andtheJSPsourcefileisnotfound inthedocumentroot.Therefore,theWebserverreturnsa 404File Not Founderrorratherthan theJSPsource file.

JSP

engine

troubleshooting

tips

IfyouarehavingdifficultyusingtheJSPengine,trythesesteps:

1. Determinewhetherotherresourcessuchas.html filesorservletsarebeingrequestedanddisplayed

correctly.If theyarenot,theproblemprobably liesat adeeperlevel,suchaswiththeHTTPserver. 2. Ifotherresourcesarebeingdisplayedcorrectly,determinewhether theJSP processorhasstarted

normally:

v BrowsetheJVMlogsof theserverhostingtheJSPfilesyouaretryingto access.Thefollowing

messagesindicatethattheJSPprocessorhas startednormally:

Extension Processor [class com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor] was initialized successfully.

Extension Processor [class com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor] has been associated with patterns [*.jsp *.jspx *.jsw *.jsv ].

IftheJSPprocessorfailstoload, youwillsee amessagesuchas

No Extension Processor found for handling JSPs. JSP Processor not defined. Skipping : jspfilename.

intheroot_dir/logs/server_name/SystemOut.logfile .

v OpentheLoganalyzerontheservice logoftheserverwhichishostingtheJavaServerPages file

youaretryingto accessanduse ittobrowse errorandwarning messages. 3. IftheJSPenginehasstartednormally,theproblemmaybewiththeJSP fileitself.

v TheJSPmayhave invalidJSPsyntax andcouldnotbeprocessedbytheJSPProcessor.Examine

theroot_dir/logs/server_name/SystemOut.logfileofthetargetapplicationforinvalid JSPdirective syntaxmessages. Errorssimilar tothefollowinginabrowserindicatethiskind ofproblem:

Message: /filename.jsp(2,1)JSPG0076E: Missing required attribute page for jsp element jsp:include

Thisexampleindicatesthatline2, column1of thenamedJavaServerPagesfileismissinga mandatoryattributeforthejsp:includeaction.Similarmessagesaredisplayed forothersyntax errors.

v Examinethetargetapplicationserver’sSystemErr.log filesfor problemswithinvalidJavasyntax.

Errors similar to Message: Unable to compile class for JSP in a browser indicate this kind of problem.

TheerrormessageoutputfromtheJavaccompilerwillbefoundintheSystemErr.log .Itmightlook like:

JSPG0091E: An error occurred at line: 2 in the file: /myJsp.jsp JSPG0093E: Generated servlet error: c:\WASROOT\temp\ ...

test.war\_myJsp.java:16: myInt is already defined in com.ibm.ws.jsp20._myJsp int myInt = 122; String myString = "number is 122"; static int myStaticInt=22; int myInt=121;

^ 1 error

CorrecttheerrorintheJSPfileandretrythefile.

Ifnoneof thesestepssolves theproblem, checktoseeif theproblem isidentifiedanddocumentedusing thelinksinDiagnosingandfixingproblems:Resourcesforlearning. Ifyoudonotseeaproblemthat resemblesyours,oriftheinformationprovideddoes notsolveyourproblem,contactIBMsupportfor furtherassistance.

(16)

IBMSupport hasdocumentsthatcansaveyoutimegathering informationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

HTTP

session

manager

troubleshooting

tips

Ifyouarehavingproblemscreating orusingHTTPsessions withyourWebapplicationhostedby WebSphereApplicationServer,herearesomestepsto take:

v

SeeHTTPsessionaren’t gettingcreatedoraregettingdroppedto seeifyourspecificproblemis

discussed.

v

ViewtheJVMlogs fortheapplicationserverwhichhoststheproblemapplication:

– first,look atmessageswrittenwhile eachapplicationisstarting.Theywillbewrittenbetweenthe

followingtwo messages:

Starting application: application

...

Application started: application

– Withinthisblock,lookfor anyerrorsorexceptionscontainingapackagenameof

com.ibm.ws.webcontainer.httpsession.If nonearefound,thisisanindicationthatthesession managerstartedsuccessfully.

– Error″SRVE0054E:Anerroroccurredwhile loadingsessioncontextandWebapplication

indicatesthatSessionManagerdidn’tstartproperlyfor agivenapplication.

– Lookwithin thelogsforanySession Managerrelatedmessages.Thesemessageswillbeinthe

formatSESNxxxxEandSESNxxxxWforerrorsandwarnings,respectively,wherexxxxisanumber identifyingthepreciseerror.Look uptheextendederrordefinitions intheSessionManagermessage table.

v UsetheLogAnalyzertoolto browsetheservicelog(activity.log)fileforclues. v SeeBestpracticesforusingHTTPSessions.

v TodynamicallyviewthenumberofsessionsasaWebapplicationisrunning,enableperformance

monitoringfor HTTPsessions.This willgive youanindicationastowhethersessions areactuallybeing created.

v Tolearnhow toviewthehttpsessioncountersastheapplicationruns,seeMonitoringperformancewith

Tivoli PerformanceViewer (formerlyResourceAnalyzer).

v Alternatively,aspecialservletcanbeinvokedthatdisplaysthecurrentconfigurationandstatistics

relatedtosessiontracking.This servlethasallthecountersthatareinperformancemonitortooland hassomeadditionalcounters.

– Servletname:com.ibm.ws.webcontainer.httpsession.IBMTrackerDebug.

– Itcanbeinvokedfromanywebmodulewhichisenabledto servebyclassname.Forexample,

usingdefault_app,

http://localhost:9080/servlet/com.ibm.ws.webcontainer.httpsession.IBMTrackerDebug.

– Ifyouareviewingthemoduleviatheserve-by-class-namefeature,beawarethatitmaybeviewable

byanyonewhocanviewtheapplication.Youmaywishtomap aspecific,securedURLto theservlet insteadanddisable theserve-servlets-by-classname feature.

v EnabletracingfortheHTTPSessionManagercomponent:

– Usethetrace specificationcom.ibm.ws.webcontainer.httpsession.*=all=enabled.Follow the

instructionsfordumping andbrowsingthetraceoutputtonarrowtheoriginoftheproblem. – Ifyouareusingpersistentsessionsbasedonmemoryreplication, alsoenabletracefor

com.ibm.ws.drs.*.

v If youareusingdatabase-basedpersistentsessions,lookfor problemsrelatedtothedatasource

theSessionManagerreliesontokeep sessionstate information.Fordetails ondiagnosing database relatedproblemsseeErrorsaccessingadatasourceorconnection pool

Errormessage SRVE0079E Servlet host not found after youdefine a port

(17)

2. Definethenewportonhost″*″

TheapplicationservergetsEC3-04130007ABENDs

TopreventanEC3-04130007abendfromoccuringontheapplicationserver,changetheHTTPOutput timeoutvalue.ThecustompropertyConnectionResponseTimeoutspecifies themaximumnumberof secondstheHTTPportforanindividualservercanwaitwhentryingtoreador writedata.For instructions onhow tosetConnectionResponseTimeout,see HTTPtransportcustom properties.

Ifnoneof thesestepsfixesyourproblem,checkto seeiftheproblemhasbeen identifiedanddocumented bylookingattheavailableonlinesupport(hintsandtips,technotes,andfixes).Ifyoudon’t findyour problemlistedtherecontactIBMsupport.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegatheringinformationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

Problems

creating

or

using

HTTP

sessions

Note: ToviewandupdatetheSessionManagersettingsdiscussedhere,usetheadministrativeconsole.

Selecttheapplicationserverthathoststheproblemapplication,thenunderAdditional properties, selectWeb Container,thenSessionmanager.

Whatkindof problemareyouhaving?

v HTTPSessionsarenotgettingcreated,orarelostbetweenrequests.

v HTTPSessionsarenotpersistent(sessiondatalostwhenapplicationserverrestarts,ornotshared

acrosscluster).

v Sessionissharedacrossmultiplebrowsersonsameclientmachine.

v SessionisnotgettinginvalidatedimmediatelyafterspecifiedSessiontimeout interval. v Unwanted sessionsarebeingcreatedbyjsps.

v

Sessiondata intendedforoneclientisseenbyanotherclient

Ifyourproblemisnotdescribedhere,ornoneof thesestepsfixestheproblem:

v ReviewTroubleshootingtheHTTPSession ManagerforgeneralstepsondebuggingSession-manager

relatedproblems.

v ReviewManagingHTTPsessionsforinformationonhowto configuretheSession manager,andbest

practicesfor usingit.

v Check toseeif theproblemhas beenidentifiedanddocumentedbylookingat theavailable online

support(hintsandtips,technotes,andfixes).

v If youdon’tfindyourproblemlistedtherecontact IBMsupport.

HTTPSessionsare notgettingcreated,orare lostbetweenrequests

Bydefault,theSessionManagerusescookiestostorethesessionIDontheclientbetweenrequests. Unlessyou intendto avoidcookie-basedsessiontracking,ensurethatcookiesareflowingbetween WebSphereApplicationServerandthebrowser:

v MakesuretheEnablecookiescheckbox ischeckedundertheSession trackingMechanismproperty. v Makesurecookiesareenabledonthebrowseryouaretestingfromorfromwhichyourusersare

accessingtheapplication.

v Check theCookiedomainspecifiedontheSessionManager (toviewtheorupdatethecookiesettings,

intheSessiontrackingmechanism->enable cookiesproperty,clickModify).

– Forexample,if thecookie domainissetas″.myCom.com″,resourcesshouldbeaccessedusingthat

(18)

– Ifthedomainpropertyisset,makesureitbeginswithadot(.).Certainversionsof Netscapedonot

acceptcookiesifdomainname doesn’tstartwithadot.InternetExplorerhonorsthedomainwithor withouta dot.Forexample,ifthedomainname issetto mycom.com, changeitto .mycom.comso thatbothNetscapeandInternetExplorerhonorthecookie.

v Check theCookiepathspecifiedontheSessionManager.Checkwhether theproblemurlis

hierarchiallybelowtheCookiepath specified.IfnotcorrecttheCookiepath.

v If theCookiemaximum ageproperty isset,ensurethatthe client(browser)machine’s dateandtime is

thesameastheserver’s,includingthetimezone.If theclientandtheservertimedifferenceisoverthe

″Cookiemaximumage″theneveryaccesswouldbeanew session,sincethecookiewill″expire″after theaccess.

v If youhavemultiplewebmoduleswithinanenterpriseapplicationthattrack sessions:

– Ifyouwantto havedifferentsessionsettingsamongwebmodulesinanenterpriseapplication,

ensurethateachweb modulespecifiesadifferentcookiename orpath,or

– IfWebmoduleswithin anenterpriseapplicationusea commoncookiename andpath,ensurethat

theHTTPsessionsettings,suchasCookiemaximumage,arethesameforallWebmodules. Otherwisecookie behaviorwillbeunpredictable,andwilldependuponwhich applicationcreatesthe session.Notethatthis doesnotaffectsessiondata,which ismaintainedseparately byWebmodule.

v Check thecookie flowbetweenbrowserandserver:

1. Onthebrowser,enable″cookieprompt″.Hittheservletandmakesurecookie isbeingprompted.

2. Ontheserver,enableSessionManagertrace.EnabletracingfortheHTTPSessionManager

component,byusingthetracespecification″com.ibm.ws.webcontainer.httpsession.*=all=enabled″. Aftertraceisenabled,excericiseyoursession-usingservletor jsp,thenfollowtheinstructionsfor dumping andbrowsingthetraceoutput.

3. Accessthesessionservletfromthebrowser.

4. Thebrowserwillpromptforthecookie;notethejsessionid.

5. Reload theservlet, notedownthecookie ifanew cookieissent.

6. Check thesessiontraceandlook forthesessionidandtrace therequestbythethread.Verify that

thesessionisstableacrossweb requests:

– Lookfor getIHttpsession(...)whichisstartofsessionrequest.

– Lookfor releaseSesson(..)whichisendofservletrequest. v If youareusingURLrewritinginsteadof cookies:

– Ensurethere arenostaticHTMLpagesonyourapplication’s navigationpath.

– EnsurethatyourservletsandjspfilesareimplementingURLrewritingcorrectly.Fordetailsandan

exampleseeSessiontrackingoptions.

v

If youareusingSSLasyoursessiontracking mechanism:

– Ensurethatyou haveSSLenabledonyourIBMHTTPServeroriPlanetHTTPserver.

– ReviewSessiontracking withSSLinformation.

v If youareinaclustered(multiplenode) environment,ensurethatyouhavesessionpersistence

enabled.

HTTPSessionsare notpersistent

IfyourHTTPsessionsarenotpersistent,thatissessiondataislostwhentheapplicationserverrestartsor isnotsharedacrossthecluster:

v Check theDatasource.

v Check theSessionManager’s PersistenceSettingsproperties:

– Ifyouintendto takeadvantageofSession Persistence,verifythatPersistenceissetto Databaseor Memoryto MemoryReplication.

– IfyouareusingDatabase-basedpersistence:

- Check thejndinameof thedatasourcespecifiedcorrectlyonSessionManager.

- Specify correctuseridandpasswordforaccessingthedatabase.

Notethatthesesettingshave tobecheckedagainst thepropertiesofanexistingDataSource in theadminconsole.TheSessionManager doesnotautomaticallycreateasessiondatabasefor you.

- TheDatasourceshouldbenon-JTA,i.e.nonXAenabled.

(19)

- WithDB2, forrowsizesotherthan4kmakesurespecifiedrowsizematchestheDB2pagesize.

Makesuretablespacename isspecifiedcorrectly.

– Ifyouareusingmemory-basedpersistence, availableina network-deployment(multipleapplication

server)configurationonly: - Review .

- Review theInternalReplicationDomainspropertiesof yourSessionmanager. Sessionis sharedacrossmultiplebrowsersonsameclientmachine

Thisbehaviorisbrowser-dependent.It variesbetweenbrowservendors, andalsomaychangeaccording towhethera browserislaunchedasa newprocessor asa subprocessof anexistingbrowsersession(for examplebyhittingCtl-NonWindows).

TheCookiemaximumagepropertyoftheSessionManageralso affectsthisbehavior,ifcookiesareused asthesession-trackingmechanism.Ifthemaximumageissettosomepositivevalue,allbrowser

instancessharethecookies,whicharepersistedtofileontheclientforthespecifedmaximumagetime.

Sessionis notgettinginvalidatedimmediatelyafter specifiedSessiontimeoutinterval

TheSessionManagerinvalidationprocessthreadruns everyx secondsto invalidateanyinvalid sessions, wherexisdeterminedbasedontheSessiontimeoutintervalspecifiedintheSessionmanagerproperties. Forthedefaultvalueof30minutes,x isaround300seconds.Inthis case,it couldtakeupto5minutes (300seconds)beyondthetimeoutthresholdof30minutesfor aparticularsessionto becomeinvalidated.

Unwantedsessionsare beingcreatedbyjsps

AsrequiredbytheJavaServerPagespecification,jspsbydefaultperformarequest.getSession(true),so thatasessioniscreatedif noneexistsfor theclient.Topreventjspsfromcreatinganew session,setthe sessionscopeto falseinthejspfile usingthepagedirectiveasfollows:

<% @page session="false" %>

Sessiondataintendedforoneclientisseenby anotherclient

Inraresituations,usuallyduetoapplicationerrors,sessiondataintendedfor oneclientmightbeseenby anotherclient.This situationisreferredto assessiondata crossover.WhentheDebugSessionCrossover

custompropertyissettotrue,codeisenabledto detectandloginstancesofsessiondatacrossover. Checksareperformedto verifythatonlythesessionassociatedwiththerequestisaccessedor

referenced.Messages areloggedif anydiscrepanciesaredetected.Thesemessagesprovideastarting pointfor debuggingthisproblem.Thisadditionalcheckingisonlyperformedwhenrunningonthe WebSphere-manageddispatchthread,notonanyuser-createdthreads.

Foradditionalinformationonhowto setthisproperty,seearticle,Webcontainercustomproperties.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegatheringinformationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

Enterprise

bean

and

EJB

container

troubleshooting

tips

IfyouarehavingproblemsstartinganEJB container,or encountererrormessagesorexceptionsthat appearto begenerated onbyanEJBcontainer,followthesestepstoresolvetheproblem:

(20)

– UsetheAdministrativeConsoleto verifythattheapplicationserverwhich hoststhecontaineris

running.

– BrowsetheJVMlogfilesfor theapplicationserverwhichhoststhecontainer.Look forthemessage

server server_nameopen for e-businessin theSystemOut.log . Ifit does not appear,or if you see the messageproblems occurredduring startup, browse the SystemErr.log for details.

– Browsethesystemlogfilesfortheapplicationserverwhichhoststhecontainer. v UsetheLogAnalyzertoolto browsetheservicelogfileformore information. v

EnabletracingfortheEJBContainercomponent,byusingthefollowingtracespecification

EJBContainer=all=enabled.Followtheinstructionsfordumping andbrowsingthetraceoutputtonarrow theoriginoftheproblem.

Ifnoneof thesestepssolves theproblem, checktoseeif theproblemisidentifiedanddocumented using thelinksinDiagnosingandfixingproblems:Resourcesfor learning.Ifyoudonotseeaproblemthat resemblesyours,oriftheinformationprovideddoes notsolveyourproblem,contactIBMsupportfor furtherassistance.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegathering informationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

Cannot

access

an

enterprise

bean

from

a

servlet,

a

JSP

file,

a

stand-alone

program,

or

another

client

Whatkindof errorareyouseeing?

v javax.naming.NameNotFoundException:Namenamenot foundincontextlocalmessagewhen

accessisattempted

v BeanNotReentrantExceptionisthrown

v CSITransactionRolledbackException /TransactionRolledbackExceptionisthrown

v Callfails,StacktracebeginningEJSContainerEBeanmethodthrewexception[exception_name]

found inJVMlogfile.

v

Callfails,ObjectNotFoundExceptionorObjectNotFoundLocalExceptionwhenaccessingstateful

sessionEJBfound inJVMlogfile.

v

AttempttostartCMPEJB modulefailswithjavax.naming.NameNotFoundException: dataSourceName

v Transaction[tranID]hastimedoutafter 120secondserroraccessingEJB. v

v Symptom: CNTR0001W:AStatefulSessionBeancouldnotbepassivated

v Symptom: org.omg.CORBA.BAD_PARAM:Servantisnot oftheexpectedtype.minorcode:

4942F21Ecompleted:Noreturnedtoclientprogramwhenattemptingto executeanEJBmethod

Iftheclientisremoteto theenterprisebean,which means,runningina differentapplicationserveror asa stand-aloneclient,browsetheJVMlogsof theapplicationserverhostingtheenterprisebean aswellas logfilesof theclient.

Ifyoudonotseeaproblemthatresemblesyours,orif theinformationprovided doesnotsolveyour problem,performthesesteps:

1. Iftheproblemappearstobename-servicerelated,whichmeansthatyouseea

NameNotFoundException,or amessageIDbeginningwithNMSV,seethesetopicsformore information:

v “Cannotlook upanobjecthostedbyWebSphereApplicationServerfromaservlet,JSP file,orother

client”onpage40

v “Namingservicescomponenttroubleshootingtips”onpage39

2. Checkto seeiftheproblemisidentifiedanddocumentedusingthelinksinDiagnosingandfixing

(21)

Ifyoustillcannotfixyourproblem,see“ObtaininghelpfromIBM”onpage 155forfurtherassistance.

ObjectNotFoundExceptionorObjectNotFoundLocalExceptionwhen accessingstatefulsessionEJB

Apossiblecauseofthisproblemisthatthestatefulsessionbeantimedoutandwasremovedbythe container.This eventmust beaddressedinthecode,accordingtotheEJB 2.1specification (availableat

http://java.sun.com/products/ejb/docs.html),section 7.6.2,Dealingwithexceptions.

Stacktracebeginning"EJSContainerEBeanmethodthrewexception[exception_name]" foundin JVMlogfile

IftheexceptionnameindicatesanexceptionthrownbyanIBMclassthatbeginswith″com.ibm...″,then searchfortheexceptionnamewithin theinformationcenter,andintheonlinehelpasdescribedbelow.If

″exceptionname″ indicatesanexceptionthrownbyyourapplication,contacttheapplicationdeveloperto determinethecause.

javax.naming.NameNotFoundException:Namenamenot foundin context"local"

Apossiblereasonforthisexceptionisthattheenterprisebean isnotlocal(notrunninginthesameJava virtualmachine[JVM]or applicationserver)totheclientJSP,servlet,Javaapplication,orother enterprise bean,yetthecallisto a″local″interfacemethodof theenterprisebean.If accessworked ina

developmentenvironment butnotwhendeployedtoWebSphereApplicationServer, forexample,itmight bethattheenterprisebeananditsclientwereinthesameJVMindevelopment,butareinseparate processesafterdeployment.

Toresolvethisproblem,contactthedeveloperoftheenterprisebeananddeterminewhethertheclientcall istoamethodinthelocalinterface fortheenterprisebean.Ifso,have theclientcode changedto calla remoteinterface method,orto promotethelocalmethodintotheremoteinterface.

Referencesto enterprisebeanswithlocalinterfacesareboundinaname spacelocalto theserver processwiththeURLschemeof local:.Toobtainadump ofa serverlocal:namespace, usethename spacedumputilitydescribedinthearticle″“Namespacedump utilityforjava:,local:andservername spaces”onpage255.″

BeanNotReentrantExceptionisthrown

Thisproblemcanoccurbecauseclientcode (typicallyaservletor JSPfile)isattemptingto callthesame statefulSessionBeanfromtwodifferentclientthreads.Thissituationoftenresultswhenanapplication storesthereferenceto thestatefulsessionbeaninastaticvariable,usesaglobal(static)JSPvariable to refertothestatefulSessionBeanreference, orstoresthestateful SessionBeanreferenceintheHTTP sessionobject.Theapplicationthenhastheclientbrowserissueanewrequestto theservletorJSPfile beforethepreviousrequesthas completed.

Toresolvethisproblem,ask thedeveloperoftheclientcode toreviewthecode fortheseconditions.

CSITransactionRolledbackException/TransactionRolledbackException isthrown

Anenterprisebeancontainerthrowsthesehigh-levelexceptionstoindicatethatanenterprisebeancall couldnotsuccessfullycomplete.Whenthisexceptionisthrown,browsetheJVMlogsto determinethe underlyingcause.

Somepossiblecausesinclude:

v Theenterprisebeanmightthrowanexceptionthatwasnotdeclaredaspartofitsmethodsignature.

Thecontainerisrequiredto rollbackthetransactioninthiscase.Commoncausesofthis situationare wheretheenterprisebean orcodethatit callsthrowsaNullPointerException,

(22)

JDBCerror.Theresolutionisto investigatetheenterprisebeancodeandresolve theunderlying exception,or toaddtheexceptiontotheproblemmethodsignature.

v Atransactionmightattempttodoadditionalworkafterbeingplacedina ″MarkedRollback″,

″RollingBack″,or″RolledBack″state.Transactionscannotcontinueto doworkaftertheyaresettoone of thesestates.Thissituationoccursbecausethetransactionhastimedoutwhich, oftenoccurs

becauseofa databasedeadlock.Workwiththeapplicationdatabasemanagement toolsor

administrator todeterminewhetherdatabasetransactionscalledbytheenterprisebean aretimingout.

v

Atransaction mightfailoncommitdueto danglingworkfromlocaltransactions.Thelocaltransaction

encounterssome″danglingwork″duringcommit.Whena localtransactionsencountersan″unresolved action″thedefaultactionisto″rollback″.Youcanadjustthisactionto ″commit″inanassemblytool. Opentheenterprisebean.jarfile(or theEARfilecontainingtheenterprisebean)andselectthe

SessionBeans orEntity Beansobjectinthecomponenttreeontheleft.TheUnresolvedActionproperty isontheIBMExtensionstabofthecontainerproperties.

Attempttostart EJBmodulefailswith"javax.naming.NameNotFoundException dataSourceName_CMP"exception

Thisproblemcanoccurbecause:

v WhentheDataSourceresourcewasconfigured,containermanaged persistencewasnotselected.

– Toconfirmthisproblem,intheadministrativeconsole,browsethepropertiesof thedatasourcegiven

intheNameNotFoundException.OntheConfigurationpanel,look fora checkboxlabeledContainer ManagedPersistence.

– Tocorrectthisproblem,selectthecheckboxfor ContainerManagedPersistence.

v If containermanagedpersistenceisselected,itispossiblethattheCMPDataSourcecouldnotbe

boundintothenamespace.

– Lookfor additionalnamingwarningsorerrorsinthestatusbar,andinthehostingapplicationserver

JVMlogs.Checkanyfurthernaming-exceptionproblemsthatyoufindbylookingat thetopic“Cannot lookupanobjecthostedbyWebSphereApplicationServer froma servlet,JSPfile,or otherclient” onpage40.

Transaction[tranID]hastimedoutafter120secondsaccessingan enterprisebean

Thiserrorcanoccurwhenaclientexecutesatransaction ona CMPorBMPenterprisebean.

v

Thedefaulttimeoutvalueforenterprisebeantransactionsis120seconds.Afterthistime, the

transactiontimesoutandtheconnectioncloses.

v If thetransaction legitimatelytakeslongerthanthespecifiedtimeoutperiod,goto ManageApplication Servers>server_name,selecttheTransactionServiceproperties page,andlookat theproperty

Totaltransactionlifetimetimeout.Increasethis valueifnecessaryandsavetheconfiguration.

Symptom:CNTR0001W:AStatefulSessionBeancouldnotbe passivated

ThiserrorcanoccurwhenaConnectionobjectusedinthebeanisnotclosedornulledout.

Toconfirmthisistheproblem, lookfor anexceptionstackintheJVMlogfor theEJBcontainerthathosts theenterprisebean, andlookssimilar to:

[time EDT] <ThreadID> StatefulPassi W CNTR0001W:

A Stateful SessionBean could not be passivated: StatefulBeanO (BeanId(XXX#YYY.jar#ZZZZ, <ThreadID>),

state = PASSIVATING) com.ibm.ejs.container.passivator.StatefulPassivator@<ThreadID> java.io.NotSerializableException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection

at java.io.ObjectOutputStream.outputObject((Compiled Code))

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.outputClassFields((Compiled Code))

at java.io.ObjectOutputStream.defaultWriteObject((Compiled Code)) at java.io.ObjectOutputStream.outputObject((Compiled Code))

(23)

at com.ibm.ejs.container.StatefulBeanO.passivate((Compiled Code)

at com.ibm.ejs.container.activator.StatefulASActivationStrategy.atUnitOfWorkEnd

((Compiled Code))

at com.ibm.ejs.container.activator.Activator.unitOfWorkEnd((Compiled Code)) at com.ibm.ejs.container.ContainerAS.afterCompletion((Compiled Code)

whereXXX,YYY,ZZZistheBean’sname,and<ThreadID>isthethreadIDfor thatrun.

Tocorrectthis problem,theapplicationmustcloseallconnectionsandsetthereferenceto nullforall connections.TypicallythisactivityisdoneintheejbPassivate()methodofthebean. Seetheenterprise beanspecificationmandatingthis requirement,specificallysection7.4intheEJB specificationVersion2.1. Also,notethatthebeanmust havecodeto reacquiretheseconnectionswhenthebean isreactivated. Otherwise,thereareNullPointerExceptionswhentheapplicationtries toreuse theconnections.

Symptom:org.omg.CORBA.BAD_PARAM:Servantis notofthe expectedtype.minorcode: 4942F21Ecompleted:No

Thiserrorcanbereturnedto aclientprogramwhentheprogramattemptsto executeanEJBmethod.

Typicallythisproblemiscausedbya mismatchbetweentheinterfacedefinitionandimplementation ofthe clientandserverinstallations, respectively.

Anotherpossiblecauseiswhenanapplicationserverissetuptouseasingle classloadingscheme.If an applicationisuninstalledwhiletheapplicationserverremainsactive,theclassesoftheuninstalled

applicationarestillloadedintheapplicationserver.If youchangetheapplication,redeploy andreinstallit ontheapplicationserver,thepreviously loadedclassesbecomebacklevel.Thebacklevelclassescause acodeversion mismatchbetweentheclientandtheserver.

Tocorrectthis problem:

1. Changetheapplicationserverclassloadingscheme tomultiple.

2. Stopandrestart theapplicationserverandtrytheoperationagain.

3. Makesuretheclientandservercodeversionarethesame.

A

client

program

does

not

work

Whatkindof problemareyouseeing?

ActiveXclientfailstodisplayASPfiles,orWebSphereApplicationServerresources(JSPfiles, servlet,orHTMLpages),or both

ApossiblecauseofthisproblemisthatbothIIS forservingActiveServerPages (ASP)filesandanHTTP serverthatsupports WebSphereApplicationServer(suchasIBMHTTPServer)aredeployedonthesame host.Thisdeployment leadsto misdirectedHTTPtrafficif bothserversarelisteningonthesameport (suchasthedefaultport80).

Toresolvethisproblem,either:

v

OpentheIISadministrativepanel,andeditthepropertiesof thedefaultWebservertochangetheport

numbertoa valueother than80

v

InstallIIS andtheHTTPserveronseparate servers.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

(24)

Universal

Discovery,

Description,

and

Integration,

Web

Service,

and

SOAP

component

troubleshooting

tips

Ifyouarehavingproblemsdeployingor executingapplicationsthatuseWebSphereApplicationServer WebServices,UniversalDiscovery,Description,andIntegration(UDDI),or SOAP,trythesesteps:

v Reviewthetroubleshootingdocumentation formessagingintheinformationcenter:

– WSIFtroubleshooting tips v

Investigate thefollowing areasforSOAP-related problems:

– ViewtheJVMlogsfor thetargetapplicationserver,andruntheLogAnalyzerontheserver’s service

log.

– ViewtheerrorlogoftheHTTPserverto whichtheSOAPrequestissent.

– Viewtherun-timebehaviorof theSOAPcomponentinmore detail,byenablingtracefor org.apache.soap.*andcom.ibm.*.soap*.

– BrowsetheWebsitehttp://xml.apache.org/soap/ forFAQsandknown SOAPissues.

Ifnoneof thesestepssolves theproblem, checktoseeif theproblemhasbeenidentifiedand

documentedusingthelinksinDiagnosingandfixingproblems:Resourcesfor learning.Ifyoudonotseea problemthatresemblesyours,oriftheinformationprovideddoes notsolveyourproblem,contactIBM supportforfurtherassistance.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegathering informationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

Errors

returned

to

a

client

sending

a

SOAP

request

Whatkindof problemareyouseeing?

v SOAPException: faultCode=SOAP-ENV:Client;msg=Erroropeningsocket; java.net.ConnectException:

Connectionrefused:connect

v javax.security.cert.CertPathBuilderException: Noend-entitycertificatematchingtheselectioncriteria

couldbefound.

Ifnoneof theseerrors matchtheoneyousee:

v

Browsethetargetapplicationserverlogfiles.(installation_directory/server_name/SystemErr.logand

SystemOut.logfor clues.See“ViewingtheJVMlogs” onpage 123formoreinformation.

v Look upanyerrororwarning messagesinthemessagetable.

v See“UniversalDiscovery,Description,andIntegration,WebService,andSOAPcomponent

troubleshooting tips”formoreinformation.

Ifyoudonotseeaproblemthatresemblesyours,orif theinformationprovided doesnotsolveyour problem,see“ObtaininghelpfromIBM”onpage155.

SOAPException:faultCode=SOAP-ENV:Client;msg=Erroropening socket; java.net.ConnectException:Connectionrefused:connect

Themostlikelycauseof thisrefusedconnectionisthatitwassentto thedefaultport,80,andanHTTP serverisnotinstalledorconfigured.

Toverifythis situation,send themessagedirectly totheSOAPport;for example,to

http://hostname:9080. Ifthemessageissentcorrectly,therearetwowaysto resolvetheproblem:

v Continuespecifyingport9080 onSOAPrequests.

v If anHTTPserverisnotinstalled,installoneandtheassociatedplug-incomponent. v If anHTTPserverisinstalled:

(25)

– Iftheproblempersists,viewtheHTTPserveraccessanderrorlogs,aswellasthe

plugin_install_root/logs/web_server_name/http_plugin.logfilefor moreinformation.

javax.security.cert.CertPathBuilderException:Noend-entitycertificatematchingtheselection criteriacouldbefound

Thiserrorusuallyindicatesthatnew orupdatedsecuritykeysareneeded.Thesecuritykeyfilesare:

v

SOAPclient v

SOAPserver v

sslserver.p12

Inaninstalledapplication,thesefilesarelocatedinthe:

install_dir/installedApps/application_name.ear/soapsec.war/key/directory.Afterreplacingthesefiles,you muststopandrestart theapplication.

Toreplacethesefilesina SOAP-enabledapplicationthatisnotyetinstalled:

v Expandtheapplication_name.earfile. v Expandthesoapsec.warfile.

v Replacethesecuritykey filesinthekey/directory.

v Afteryoureplacethesefiles,install theapplicationandrestarttheserver.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegatheringinformationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

JDBC

and

data

source

troubleshooting

tips

Toseewhetheryourspecificproblemhasbeenaddressed,review theCannot accessadata sourcetopic. Ifyoucannotfindyourproblemdescribedthere,investigatetheproblemfurtherbyusingthefollowing instructionsto enabletracingforrelevantWebSphereApplication Servercomponents.

Thistopicincludesthefollowingsections:

v

TracestringsforJDBCdata sources v

JDBCtrace properties

TracestringsforJDBCdatasources

TurnonJDBCtracingbyusingthefollowingtracestrings:

v com.ibm.ws.database.logwriterTracestringfor databasesthatusetheGenericDataStoreHelper.You

canalso usethistracestringforunsupported databases.

v com.ibm.ws.db2.logwriterTracestringforDB2 databases. v com.ibm.ws.oracle.logwriterTracestringfor Oracledatabases.

v com.ibm.ws.cloudscape.logwriterTracestringforCloudscapedatabases. v com.ibm.ws.informix.logwriterTracestringfor Informixdatabases.

v com.ibm.ws.sqlserver.logwriterTracestringfor MicrosoftSQLServerdatabases. v com.ibm.ws.sybase.logwriterTracestringfor Sybasedatabases.

ThetracegroupthatincludesthetracestringsisWAS.database.

JDBCtraceproperties

Usea back-enddatabasethatsupportsJDBCtracing.Settingtracestringsdoes notresultinatraceif the databasedoes notsupportJDBC tracing.ThefollowingdatabasesofferJDBCtracingatthis time:

(26)

v Oracle v SQLServer

Settheleveloftrace desiredforDB2UniversaldatabaseandOracleascustompropertiesonthe datasource.

v DB2Universal JDBCdriverproviderCustompropertiesforDB2are:

traceLevelPossibletraceLevelvaluesare:

- TRACE_NONE =0

- TRACE_CONNECTION_CALLS =1

- TRACE_STATEMENT_CALLS =2

- TRACE_RESULT_SET_CALLS =4

- TRACE_DRIVER_CONFIGURATION =16

- TRACE_CONNECTS =32

- TRACE_DRDA_FLOWS=64

- TRACE_RESULT_SET_META_DATA=128

- TRACE_PARAMETER_META_DATA=256

- TRACE_DIAGNOSTICS =512

- TRACE_SQLJ =1024

- TRACE_ALL=-1

Note: Thistrace levelprovidesrealdatathatsetsto thePreparedStatementor getsfromthe

ResultSetobject.

traceFileUsethispropertyto integratetheDB2tracewiththeWebSphereApplication Servertrace.

Ifyoudonotsetthevalue,tracesareintegrated.Otherwise,DB2tracesaredirectedtothedesired file.Youcandynamically enableor disabletrace.You canrunanapplicationandturnontheDB2 traceif thereisaproblem.Usetheruntimetrace enablementprovidedwiththeApplicationServer byspecifyinga tracestringof com.ibm.ws.db2.logwriter=all=enabled.

v OracleJDBCproviderCustompropertiesfor Oracleare:

oraclelogCategoryMaskControlstheoutputcategory.Thedefaultis47,which is

(OracleLog.USER_OPER1|OracleLog.PROG_ERROR2 |OracleLog.ERROR4|

OracleLog.WARNING8|OracleLog.DEBUG132).

Possiblevaluesare:

- OracleLog.USER_OPER1

- OracleLog.PROG_ERROR2

- OracleLog.ERROR 4

- OracleLog.WARNING8

- OracleLog.FUNCTION16

- OracleLog.DEBUG132

- OracleLog.SQL_STR 128

oraclelogModuleMaskControlswhichmoduleswritedebugoutput.Thedefaultis1,which is

OracleLog.MODULE_DRIVER1.

Possiblevaluesare:

- OracleLog.MODULE_DRIVER 1,

- OracleLog.MODULE_DBACCESS2

oraclelogPrintMaskControlswhichinformationto printwitheach tracemessage.Thedefaultis62,

whichis([OracleLog.FIELD_OBJECTfor9i/OracleLog.FIELD_CONNfor 8i]32|

OracleLog.FIELD_CATEGORY16|OracleLog.FIELD_SUBMOD8 |OracleLog.FIELD_MODULE4|

OracleLog.FIELD_TIME2).

Possiblevaluesare:

- OracleLog.FIELD_TIME2

- OracleLog.FIELD_MODULE4

- OracleLog.FIELD_SUBMOD8

- OracleLog.FIELD_CATEGORY16

- OracleLog.FIELD_OBJECT32

(27)

NotesforOracleJDBCtracing:

1. Oracle9irequirestheuseofclasses12_g.zip todisplaytraces.WithOracle8i,theclasses12_g.zip

isoptional.

2. Youcan dynamicallyenableordisabletrace.You canrunanapplicationandturnontheOracle

traceif thereisaproblem.Usetherun-timetraceenablementprovidedwiththeWebSphere

ApplicationServerproducts,byspecifyinga tracestringof com.ibm.ws.oracle.logwriter=all=enabled.

IfJDBCtracingdoesnotprovideenoughinformationto isolateandfixyourproblem,checkto seeifthe problemhasbeenidentifiedanddocumentedbylooking attheavailableonlinesupport(hintsandtips, technotes,andfixes).Ifyoudonotfind yourproblemlistedthere,contactIBMSupport.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegatheringinformationneededto resolvethisproblem. BeforeopeningaPMR, seetheIBMSupport page.

DB2

troubleshooting

tips

IllegalconversionoccursonanyVARCHARFORBITDATAcolumnin acontainer-managed persistentbean

Whenenterprisebeanswithcontainer-managedpersistent(CMP)typesthathave anyVARCHARFOR BITDATAcolumnsdefinedonaDB2table aredeployedintheDB2universalJDBCtype4driver to persistthedata,anSQLExceptionof illegalconversionisthrownatruntime.Thisexceptiononly occurs whenyouusetheDB2universalJDBC type4driver andwiththedeferPreparespropertybeingsetto true. WhenthedeferPreparespropertyissetto true,theDB2universalJDBCtype 4driverusesthestandard

JDBCdatamapping.

Currently,thegenerated deployedcode doesnotfollowthestandardJDBCspecification mapping.The failureatexecutiontimeisbecauseofaprobleminthetoolthatpreparedtheenterprisebeansfor execution.

Toavoidreceivingthisexception, chooseoneofthefollowingoptions:

v

Set thedeferPreparespropertyto falseinthedatasourceconfiguration. v

DonotusetheDB2universalJDBCtype4 driverifyour tablehasanyVARCHARFORBITDATAor

LONG VARCHARFORBITDATAcolumns.UsetheDB2legacy CLI-basedJDBCdriverto persistthe

data.Referto DB2V8.1readmefor moredetails.

ForcurrentinformationavailablefromIBMSupport onknown problemsandtheirresolution,seetheIBM Supportpage.

IBMSupport hasdocumentsthatcansaveyoutimegatheringinformationneededto resolveproblems. BeforeopeningaPMR, seetheIBMSupport page.

Cannot

access

a

data

source

Whatkindof databaseareyoutryingto access?

v Oracle v DB2 v SQLServer v Cloudscape v Sybase

v Generaldata accessproblems

(28)

1. Browsethelogfilesoftheapplicationserverthatcontainstheapplication,for clues.Bydefaultthese

filesareinstall_root/server_name/SystemErr.logandSystemOut.log.

2. BrowsetheHelperClass propertyofthedatasourceto verifythatit iscorrectandthatit isonthe

WebSphereApplicationServerclasspath.Mysterious errorsorbehaviormightresultfroma missingor misnamedHelperClassname.IfWebSphereApplicationServercannotloadthespecifiedclass, it usesa defaulthelperclassthatmightnotfunctioncorrectlywithyourdatabasemanager.

3. VerifythattheJavaNamingandDirectoryInterface(JNDI)name ofthedatasourcematchesthe

nameused bytheclientattemptingtoaccessit.Iferrormessagesindicatethattheproblemmightbe naming-related,suchasreferringtothenameserverornaming service,or includingerrorIDs beginningwithNMSV, lookat theNamingrelatedproblemsandTroubleshootingthenamingservice componenttopics.

4. Enabletracingfor theresource adapterusingthetracespecification,RRA=all=enabled.Followthe

instructionsfor dumpingandbrowsingthetraceoutput,tonarrowtheoriginof theproblem.

Ifnoneof thesestepsfixesyourproblem,seeif theproblemisidentifiedanddocumented inavailable onlinesupport(hintsandtips, technotes,andfixes).If noneof theonlineresourceslistedinthetopic describesyourproblem,see“Obtaininghelp fromIBM”onpage155.

Generaldataaccessproblems

v An exception″IllegalConnectionUseException″occurs

v WTRN0062E:Anillegalattemptto enlistmultipleonephasecapableresourceshasoccurred. v ConnectionWaitTimeoutException.

v com.ibm.websphere.ce.cm.StaleConnectionException:[IBM][CLIDriver]SQL1013NThedatabasealias

name ordatabasename″NULL″couldnotbefound.SQLSTATE=42705

v java.sql.SQLException:java.lang.UnsatisfiedLinkError:

v ″J2CA0030E:Methodenlistcaughtjava.lang.IllegalStateException″wrappedinerror″WTRN0063E:An

illegalattemptto enlistaonephasecapableresourcewithexistingtwophasecapableresourceshas occurred″ whenattemptingto executeatransaction.

v java.lang.UnsatisfiedLinkError:xaConnect exceptionwhenattemptinga databaseoperation

v ″J2CA0114W:Nocontainer-managedauthenticationaliasfound forconnectionfactoryor datasource

datasource″whenattemptingadatabaseoperation

v An erroristhrownifyouusethews_ant commandto performthedatabasecustomizationfor Structured

QueryLanguageinJavaonHPplatforms

IllegalConnectionUseException

Thiserrorcanoccurbecauseaconnection obtainedfromaWAS40DataSourceisbeingusedonmore thanonethread.ThisusageviolatestheJ2EE1.3programmingmodel,andanexceptiongenerateswhen itisdetectedontheserver.Thisproblemoccursforusersaccessinga datasourcethroughservletsor bean-managedpersistence(BMP)enterprisebeans.

Toconfirmthisproblem,examinethecode forconnection sharing.Codecaninadvertentlycausesharing bynotfollowing theprogramming modelrecommendations,for examplebystoringaconnection inan instancevariableinaservlet,whichcancauseuseof theconnectiononmultiplethreadsat thesametime.

WTRN0062E:Anillegal attempttoenlistmultipleonephasecapableresourceshasoccurred

Thiserrorcanoccurbecause:

v An attemptwasmadeto sharea single-phaseconnection,wheneachgetConnectionmethodhas

differentconnectionproperties;suchastheAccessIntent.Thisattemptcauses anon-shareable connection tobecreated.

v An attemptwasmadeto havemorethan oneunshareable connectionparticipateinaglobaltransaction,

whenthedatasourceisnotanXAresource.

v An attemptwasmadeto havea one-phaseresource participateina globaltransaction whileanXA

(29)

– Withinthescopeof aglobaltransactionyoutrytogetaconnection morethanonceandat leastone

oftheresource-refsyou usespecifiesthattheconnectionisunshareable,andthedatasourceisnot configuredtosupporttwo-phasecommittransactions.It doesnotsupportanXAResource. Ifyoudo notusearesource-ref,youdefaultto unshareableconnections.

– Withinthescopeof aglobaltransactionyoutrytogetaconnection morethanonceandat leastone

oftheresource-refsyou usespecifiesthattheconnectionisshareableandthedatasourceisnot configuredtosupporttwo-phasecommittransactions.Thatis,itdoes notsupportanXAResource.In addition,eventhoughyouspecifythatconnectionsareshareable,eachgetConnectionrequestis madewithdifferentconnectionproperties(suchasIsolationLevelorAccessIntent).Inthis case,the connectionsarenotshareable,andmultipleconnectionsarehandedback.

– Multiplecomponents(servlets,sessionbeans,BMP entitybeans,orCMPentitybeans)areaccessed

withina globaltransaction.Allusethesamedatasource,allspecifyshareableconnectionsontheir resource-refs,andyouexpectthem toallshare thesameconnection.If thepropertiesaredifferent, yougetmultipleconnections.AccessIntentsettingsonCMPbeanschangetheirproperties.Toshare aconnection,theAccessIntentsetting mustbethesame.For moreinformationaboutCMPbeans sharingaconnection withnon-CMPcomponents,seetheDataaccessapplicationprogramming interfacesupportandExample:AccessingdatausingIBMextendedAPIsto shareconnections betweencontainer-managedandbean-managedpersistencebeanstopicsintheDataAccesssection oftheinformationcenter.

Tocorrectthis error:

v Check whatyourclientcode passesinwithitsgetConnectionrequests,to ensurethey areconsistent

witheachother.

v Check theconnection sharingscopefromtheresource binding,usingthe.

– Ifyouarerunninganunshareableconnectionscope,verifythatyourdatasourceisanXAdata

source.

– Ifyouarerunningashareableconnectionscope,verifythatallconnectionproperties,including

AccessIntent,aresharable.

v Check theJDBCprovider implementationclassfromtheManageJDBCresourcepanelofthe

administrative consoleto ensurethatit isa classthatsupportsXA-typetransactions.

ConnectionWaitTimeoutExceptionaccessingadatasourceorresourceadapter

Ifyourapplicationreceivesexceptionslikea com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException orcom.ibm.websphere.ce.j2c.ConnectionWaitTimeoutExceptionwhenattemptingto accessa WebSphere ApplicationServerdatasourceorJCA-compliant resourceadapter,respectively,somepossiblecauses are:

v Themaximumnumberofconnectionsfora givenpool issettoolow.Thedemand forconcurrentuseof

connectionsisgreaterthentheconfiguredmaximumvaluefortheconnectionpool. Oneindicationthat thissituationistheproblemisthatyoureceivetheseexceptionsregularly,butyourCPUutilizationis nothigh.Thisexceptionindicates thatthere aretoofewconnectionsavailableto keepthethreadsinthe serverbusy.

v ConnectionWaitTimeissettoolow.Currentdemandforconnectionsishighenoughsuchthat

sometimes thereisnotanavailableconnectionfor shortperiodsoftime. Ifyourconnection waittimeout valueistoolow,youmighttimeoutshortlybefore auserreturnsaconnectionbacktothepool.

Adjustingtheconnectionwaittime cangiveyousomerelief.Oneindicationof thisproblemisthatyou usecloseto themaximumnumberof connectionsfor anextendedperiodandreceivingthis error regularly.

v Youarenotclosingsomeconnectionsoryouarereturningconnectionsbackto thepoolata veryslow

rate.Thissituationcanhappenwhenusingunshareable connections,whenyouforgettoclosethem, or youclosethemlong afteryouarefinishedusingthem,keeping theconnection fromreturningtothe poolfor reuse.Thepoolsoon becomesemptyandallapplicationsget

(30)

v Youaredrivingmoreload thantheserverorbackendsystemhave resourcesto handle.Inthis case

youmust determinewhich resourcesyouneed moreofandupgradeconfigurationsorhardware to addresstheneed. Oneindicationof thisproblemisthattheapplicationordatabaseserverCPUis nearly100%busy.

Tocorrecttheseproblems,either:

v Modifyanapplicationto usefewerconnections v

Properlyclosetheconnections.

v Change thepool settingsof MaxConnectionsorConnnectionWaitTimeout. v Adjustresourcesandtheir configurations.

com.ibm.websphere.ce.cm.StaleConnectionException:[IBM][CLI Driver]SQL1013NThedatabase aliasnameordatabasename"NULL"couldnotbe found.SQLSTATE=42705

Thiserroroccurswhena datasourceisdefinedbutthedatabaseNameattributeandthecorresponding valuearenotaddedtothecustompropertiespanel.

ToaddthedatabaseNameproperty:

1. ClickResources>ManageJDBCProviderslinkintheadministrativeconsole.

2. SelecttheJDBCproviderthatsupports theproblemdata source.

3. SelectData Sourcesandthenselecttheproblemdatasource.

4. UnderAdditional propertiesclickCustomProperties.

5. SelectthedatabaseNameproperty,oraddoneifit doesnotexist,andentertheactualdatabase

nameasthevalue.

6. ClickApplyorOK, andthenclickSavefromtheactionbar.

7. Accessthedatasourceagain.

java.sql.SQLException:java.lang.UnsatisfiedLinkError:

Thiserrorindicatesthatthedirectory containingthebinarylibrarieswhichsupportadatabasearenot includedintheLIBPATHenvironmentvariable fortheenvironmentinwhichtheWebSphereApplication Serverstarts.

ThepathcontainingtheDBMvendorlibrariesvarybydbm.One wayto findthemisbyscanningfor the missinglibraryspecifiedintheerrormessage.ThenyoucancorrecttheLIBPATHvariableto includethe missingdirectory,eitherinthe.profileoftheaccountfromwhichWebSphereApplication Serveris executed,orbyaddingastatementina .shfilewhichthen executesthestartServerprogram.

"J2CA0030E:Method enlistcaughtjava.lang.IllegalStateException"wrappedinerror"WTRN0063E: Anillegalattempttoenlista onephase capableresourcewithexistingtwophasecapable

resourceshasoccurred"whenattempting toexecuteatransaction.

Thiserrorcanoccurwhenlastparticipantsupport(LPS) ismissingordisabled.LPSallowsaone-phase capableresourceanda two-phasecapableresourceto

References

Related documents

Therefore, the steps to create a new application context on the BIG-IP (described in this deployment guide in detail), are creation of a monitor, pool, profiles, virtual server,

Domestic &amp; General had modeled a new WebSphere Application Server architecture that would support the migration of their web applications from an IBM iSeries platform to a new

As an alternative, you can configure high availability and workload sharing of service integration by using messaging engine policy assistance when you add a server cluster to a

Configuring SSL between Microsoft Active Directory and WebSphere Application Server Network Deployment enables the Maximo Asset Management configuration program to automatically