Help with Error:  PANIC: fatal region error detected; run recovery

Here's what I'm trying to do:
I am trying to us BDBXML in a webapp using tomcat 5.5. I have a class that is responsible for opening and closing the db. This class is accessed by a servlet for some AJAX RCP stuff and it also serves as an access point for a Web Service (Apache Axis). This class looks like this:
public class DG implements Serializable {
private javax.xml.datatype.DatatypeFactory datatypeFactory;
private Environment environment;
private EnvironmentConfig environmentConf;
private XmlContainer xmlContainer = null;
private XmlManager xmlManager = null;
private XmlManagerConfig xmlManagerConfig;
public DG() {
try {
File envHome = new File("C:\\bdbxml\\database");
environmentConf = new EnvironmentConfig();
environmentConf.setAllowCreate(true);
environmentConf.setInitializeCache(true);
environmentConf.setInitializeLocking(true);
environmentConf.setInitializeLogging(true);
environmentConf.setRunRecovery(true);
environmentConf.setTransactional(true);
environmentConf.setLockDetectMode(LockDetectMode.MINWRITE);
     //tried the following with default and 10000
     environmentConf.setMaxLockers(100000);
environmentConf.setMaxLockObjects(100000);
environmentConf.setMaxLocks(100000);
environmentConf.setTxnMaxActive(100000);
environment = new Environment(envHome, environmentConf);
CheckpointConfig cpc = new CheckpointConfig();
cpc.setKBytes(500);
environment.checkpoint(cpc);
xmlManagerConfig = new XmlManagerConfig();
xmlManagerConfig.setAdoptEnvironment(true);
xmlManager = new XmlManager(environment, xmlManagerConfig);
XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
xmlContainerConfig.setIndexNodes(true);
xmlContainerConfig.setTransactional(true);
xmlContainerConfig.setNodeContainer(true);
xmlContainer = xmlManager.openContainer("container.dbxml", xmlContainerConfig);
xmlContainer.sync();
datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
} catch (FileNotFoundException e) {
     e.printStackTrace();
} catch (DatabaseException e) {
     e.printStackTrace();
} catch (DatatypeConfigurationException e) {
     e.printStackTrace();
public void close() {
try {
if (xmlContainer != null) {
xmlContainer.close();
if (xmlManager != null) {
xmlManager.close();
} catch (DatabaseException e) {
e.printStackTrace();
public String getDocument(String docId) {
try {
XmlDocument doc = xmlContainer.getDocument(docId);
String docString = doc.getContentAsString();
doc.delete();
return docString;
} catch (XmlException e) {
e.printStackTrace();
public Result[] search(Search search) {
try {
     //normally I construct the query string using the Search object
StringBuffer q = new StringBuffer("subsequence(collection('container.dbxml')/metadata[contains(./idinfo//title, 'Ecology')], 1,10)");
XmlQueryContext xqc = xmlManager.createQueryContext();
XmlQueryExpression xqe = xmlManager.prepare(q.toString(), xqc);
XmlResults xr = xqe.execute(xqc);
int i = 0;
Vector<Result> vec = new Vector<Result>();
while (xr.hasNext()) {
XmlValue xv = xr.next();
XmlDocument xd = xv.asDocument();
Result r = new Result();
r.setMetadata(xd.getContentAsString());
r.setDocumentId(xd.getName());
XmlValue groupVal = new XmlValue(XmlValue.STRING);
xd.getMetaData("", "group", groupVal);
r.setGroup(groupVal.asString());
XmlValue ownerVal = new XmlValue(XmlValue.STRING);
xd.getMetaData("", "owner", ownerVal);
r.setOwner(ownerVal.asString());
XmlValue createdVal = new XmlValue(XmlValue.DATE_TIME);
xd.getMetaData("", "created", createdVal);
r.setCreated(createdVal.asString());
XmlValue updatedVal = new XmlValue(XmlValue.DATE_TIME);
xd.getMetaData("", "updated", updatedVal);
r.setModified(updatedVal.asString());
r.setPosition(search.getStartPosition() + i);
updatedVal.delete();
createdVal.delete();
ownerVal.delete();
groupVal.delete();
xd.delete();
xv.delete();
vec.add(r);
i++;
xr.delete();
xqe.delete();
xqc.delete();
return vec.toArray(new Result[vec.size()]);
} catch (XmlException e) {
e.printStackTrace();
// PLUS SOME OTHER METHODS, BUT USING ONLY THESE TO TEST
The Servlet looks like this:
public class DGServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
private DG dg;
private final XPathFactory xpf = XPathFactory.newInstance();
private final XPath xp = xpf.newXPath();
private final SimpleDateFormat df = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy");
public DGServlet() {
super();
@Override
public void destroy() {
try {
dg.close();
} catch (Exception e) {
log(e.getMessage());
e.printStackTrace();
super.destroy();
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String action = request.getParameter("action");
if (action != null && !action.equals("")) {
if (action.equals("search")) {
response.setContentType("text/xml");
Result[] result = null;
try {
result = dg.search(constructSearch(request));
} catch (Exception e1) {
log(e1.getMessage());
e1.printStackTrace();
if (result==null || result.length==0) {
response.getWriter().print("0");
return;
StringBuffer sb = new StringBuffer("<results>");
for (int i = 0; result != null && i < result.length; i++) {
try {
sb.append("<result"
+ " title='"
+ xp.evaluate("/metadata/idinfo//title", new InputSource(new StringReader(result[i]
.getMetadata()))));
sb.append("' northbc='"
+ xp.evaluate("//northbc", new InputSource(new StringReader(result.getMetadata())))
+ "' southbc='"
+ xp.evaluate("//southbc", new InputSource(new StringReader(result[i].getMetadata())))
+ "' eastbc='"
+ xp.evaluate("//eastbc", new InputSource(new StringReader(result[i].getMetadata())))
+ "' westbc='"
+ xp.evaluate("//westbc", new InputSource(new StringReader(result[i].getMetadata())))
+ "' docid='" + result[i].getDocumentId() + "' group='" + result[i].getGroup()
+ "' owner='" + result[i].getOwner() + "' position='" + result[i].getPosition()
+ "' modified='" + result[i].getModified() + "' created='" + result[i].getCreated()
+ "'>");
NodeList nodes = (NodeList) xp.evaluate("//digform", new InputSource(new StringReader(result[i]
.getMetadata())), XPathConstants.NODESET);
for (int j = 0; j < nodes.getLength(); j++) {
sb.append("<resource download='"
+ StringEscapeUtils.escapeXml(xp.evaluate("//networkr", new InputSource(
new StringReader(XMLUtil.printDOMTree(nodes.item(j)))))));
sb.append("' format='"
+ StringEscapeUtils.escapeXml(xp.evaluate("//formname", new InputSource(
new StringReader(XMLUtil.printDOMTree(nodes.item(j)))))));
sb.append("'></resource>");
sb.append("</result>");
} catch (XPathExpressionException e) {
e.printStackTrace();
log(e.getMessage());
} catch (TransformerConfigurationException e) {
e.printStackTrace();
log(e.getMessage());
} catch (TransformerFactoryConfigurationError e) {
e.printStackTrace();
log(e.getMessage());
} catch (TransformerException e) {
e.printStackTrace();
log(e.getMessage());
sb.append("</results>");
response.getWriter().print(sb.toString());
else if (action.equals("details")) {
response.setContentType("text/html");
String str = "";
try {
str = dg.getDocument(request.getParameter("docId"));
response.getWriter().print(
setTranslatePage(str, new java.net.URL(
"http://localhost:8080/datastream/stylesheets/fgdc/fgdc_classic.xsl")));
} catch (Exception e) {
e.printStackTrace();
log(e.getMessage());
public void init() throws ServletException {
super.init();
dg = new DG();
It seems to work fine for a while, but then I get errors like the following:
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
com.sleepycat.dbxml.XmlException: Error: DB_RUNRECOVERY: Fatal error, run database recovery, errcode = DATABASE_ERROR
at com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_prepare__SWIG_0(Native Method)
at com.sleepycat.dbxml.XmlManager.prepare(XmlManager.java:586)
at edu.washington.cev.datastream.api.DG.search(DG.java:935)
at edu.washington.cev.datastream.servlets.DGServlet.doGet(DGServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
I've set this up on a Window XP machine using tomcat 5.5 and java 5 as well as a Redhat Linux machine with tomcat 5.5 and java 5. I'm using the Web Service point for other servers to access the database. Everything starts up and runs for a little while, but I can't seem to pin down what causes the errors. I've run recovery multiple times as well as started new databases. Any help is appreciated.

There's a bug in your use of DB XML somewhere. Are you committing or aborting every transaction that you start, and calling delete() explicitly on all the DB XML objects that you use?
Those errors mean your database has become corrupted somehow.
John

Similar Messages

  • How can I localize the alert "error: PANIC: fatal region error detected..."

    My application may corrupt and the operations therefore may fail and post the alert "error: PANIC: fatal region error detected; run recovery ...", and this alert is directly printed in the main process's window.
    My question is how can I do to localize this alert in my thread which just deals with the Berkeley DB database?
    Thanks

    Hi,
    You can configure an error callback function. See the run-time error configuration section of the Reference Guide here:
    http://www.oracle.com/technology/documentation/berkeley-db/db/ref/debug/runtime.html
    It sounds like DB_ENV->set_errcall is what you want:
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_errcall.html
    Regards,
    Alex Gorrod, Oracle

  • Problem sqlite+berkeley PANIC: fatal region error detected.

    Excuse for my English and if this wrong place to explain the problem
    I'm checking to replace Berkeley DB and SQLite for testing the stability against involuntary interruptions of program I have encountered the following error:
    Berkeley DB trust in knowing his rnedimiento and stability with Subversion, but I doubt the API bridge SQLITE
    I'm testing the Berkeley DB database using the API Berkeley DB SQLITE and I did a small test program:;
    /* Open database. */
    sqlite3 *db;
    sqlite3_open("data/basedatos.db", &db);
    sqlite3_exec(db,"CREATE TABLE [test] ([key] INTEGER, [dat] varchar(64), PRIMARY KEY ([key]))",NULL,0,NULL);
    err_code = SQLITE_BUSY;
    while (err_code != SQLITE_OK ) {
         sqlite3_exec( db, "delete from test", NULL, 0, NULL );
         err_code = sqlite3_errcode( db );
    sqlite3_exec( db, "BEGIN", NULL, 0, NULL );+
    for( int i=0; i<_numCartones; i++ ) {
         char buf[1024];
         sprintf_s( buf, sizeof(buf), "insert into test( key, dat) values ( %d, 'test%d' )", i, i );
         sqlite3_exec( db, buf, NULL, 0, NULL );
    sqlite3_exec( db, "COMMIT", NULL, 0, NULL );
    sqlite3_close(db);I launched the program and insert about 150000 records in 17 seconds. Perfect!
    I created a file basedatos.db and basedatos.db-journal subdirectory with files: log.0000000016, __db.001, __db.002, __db.003, __db.004, __db.005, __db.006 and __db.register.
    Open it and prove the usefulness dbsql
    c: dbsql basedatos.db
    select count(*) from test;
    150000          ← Ok.
    Without closing the program again dbsql run the test program and this will get stuck in the call:
    sqlite3_exec( db, "delete from test", NULL, 0, NULL );I close dbsql and automatically releases the "delete from" and the test program again inserted 150,000 records
    While this by inserting 150,000 records run it again
    c: dbsql basedatos.db
    select count(*) from test; [WAIT]
    and select count (*) remains locked until you finish the test program, normal thing locks.Once you finish the select TEST responds to 150,000
    150000          ← Ok.Without closing the program again dbsql run the test program and this will get stuck in the call:
    sqlite3_exec( db, "delete from test", NULL, 0, NULL );I close dbsql and automatically releases the "delete from" and the test program again inserted 150,000 records
    while inserting test rerun:
    c: dbsql basedatos.db
    select count(*) from test;
    Error: database disk image is malformed
    and in my test program : PANIC: fatal region error detected; run recovery.
    Reviewing the files are only: badatos.db, log.0000000031, log.0000000032, log.0000000033, log.0000000034, log.0000000035, log.0000000036, __db.register.
    and __db*.* files?

    Had accidentally opened the program dbsql.exe while doing speed tests data insertion.
    While in a shell to make a select count (*) and I realized that was blocked waiting for the COMMIT release, normal thing in a process BEGIN / COMMIT.
    In one test was corrupt database which reduced the test software and simplify the test to repeat the problem.
    Today I repeated the test and the situation has changed
    1) Run test (all OK, inserted in 18 seconds 150000 entries)
    2) DBSQL run and I make a select count (*) (All Ok)
    3) DBSQL unsealed test run and stay lock on DELETE FROM
    4) DELETE FROM I close DBSQL and not released as yesterday.Repeat several times and I have the same behavior
    Move in the test code from "delete from..." begin and commit
    sqlite3_exec( db, "BEGIN", NULL, 0, NULL );
    err_code = sqlite3_errcode( db );
    err_code = SQLITE_BUSY;
    while (err_code != SQLITE_OK ) {
    sqlite3_exec( db, "delete from test", NULL, 0, NULL );
    err_code = sqlite3_errcode( db );
    for( int i=0; i<_numCartones; i++ ) {Repeat tests
    1)Test run, everything ok in 25 seconds. While inserting test this, I run realizao dbsql and a select count (*) and remains lock until test ends. Everything ok, 150000 records
    2)Dbsql unsealed test run it again and stay lock on delete until you close the program dbsql.
    3)I close dbsql and releasing the lock of seconds to delete the test the error "PANIC ..." like yesterdayRepeat several times and the behavior is the same, except that no desparencen db files.
    If I can not run dbsql test run multiple times without problems.
    Could be the problem dbsql and simultaneous access to the database?
    I'm going to migrate an application in production since SQLITE to Berkeley DB for testing.
    I have confidence in the performance of Berkeley DB and I know the proper functioning it does with subversion, but the subversion server on a server is protected with uninterrupted power.
    If I avoid using dbsql while the test software that I have that theoretical security operation will be correct when using Berkeley DB SQLITE layer and especially with unexpected off the machine?
    Thanks again for your help

  • PANIC: fatal region error detected

    i encoutered this error for stress testing.
    in the project, we used the transaction and cursor. when the application is runing for a long time, i will receive the err about "PANIC: fatal region error detected". i change the max numbers of transaction, the same error also occurs. when this error occurs, the application can't create any transaction and open any cursor.
    somebody can solve this problem? any suggestion appreciated.
    thanks

    This error should only occur after some message is sent to the error stream (configured with DB_ENV->set_errfile). Can you please post that output?
    What operation causes the error (is it during open, or on some read/write)?
    Have you tried looking at the output from running "db_stat -e" to see whether some resource is being exhausted?
    Are multiple processes (including the Berkeley DB utilities) accessing the environment when the error occurs? Is it possible that any of those processes are using a different version of Berkeley DB than your application?
    Regards,
    Michael Cahill, Oracle Berkeley DB.

  • Db_verify: PANIC: fatal region error detected; run recovery

    We have an application that is using bdb. On one of the instances it frequently hits a panic condition. db_verify reports the following:
    # db_verify -o file.db
    db_verify: PANIC: fatal region error detected; run recovery
    db_verify -VSleepycat Software: Berkeley DB 4.3.29: (June 16, 2006)
    Quitting the application and removing the __db.001 file will allow a clean restart. How do I debug where this problem might be coming from?
    thanks,
    kevin

    Hi Kevin,
    user11964780 wrote:
    # db_verify -o file.db
    db_verify: PANIC: fatal region error detected; run recoveryThis is a generic error message that means the region files are corrupted. This is most often a problem in the application.
    user11964780 wrote:
    How do I debug where this problem might be coming from?Reference Guide - Chapter 24: [ Debugging Applications|http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/debug.html]
    Bogdan Coman

  • PANIC: fatal region error detected; run recovery  - How Can I resolve it?

    PANIC: fatal region error detected; run recovery
    Error loading files into container null.dbxml
    Message: DB_RUNRECOVERY: Fatal error, run database recovery
    com.sleepycat.db.RunRecoveryException: DB_RUNRECOVERY: Fatal error, run database recovery: DB_RUNRECOVERY: Fatal error, run database recovery
         at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method)
         at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:240)
         at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:714)
         at com.sleepycat.db.Environment.<init>(Environment.java:30)
         at dbxml.gettingStarted.CopyOfexampleLoadContainer.createEnv(CopyOfexampleLoadContainer.java:144)
         at dbxml.gettingStarted.CopyOfexampleLoadContainer.loadXmlFiles(CopyOfexampleLoadContainer.java:157)
         at dbxml.gettingStarted.CopyOfexampleLoadContainer.main(CopyOfexampleLoadContainer.java:78)
         at dbxml.gettingStarted.Imagem.actionPerformed(Imagem.java:174)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    You will need to know about recovery. I suggest you read up on it in the Berkeley DB reference guide:
    http://www.oracle.com/technology/documentation/berkeley-db/xml/ref/transapp/put.html
    http://www.oracle.com/technology/documentation/berkeley-db/xml/ref/transapp/recovery.html
    John

  • Berkeley db fatal region error detected run recovery

    Hi,
    I have initiated d Berkeley DB object.
    Then, I am using multithreading to put data into the DB.
    Here is how I open the one data handler.
    ret = dbp->open(dbp, /* Pointer to the database */
    NULL, /* Txn pointer */
    db_file_name, /* File name */
    db_logical_name , /* Logical db name (unneeded) */
    DB_BTREE, /* Database type (using btree) */
    DB_CREATE, /* Open flags */
    0644); /* File mode. Using defaults */
    each threads would put data into the same handler when it needs to.
    I am getting "berkeley db fatal region error detected run recovery".
    What is the problem? Does it have anything to do with the way the handler is created or whether multiple threads can put data into the DB?
    jb

    Hi jb,
    user8712854 wrote:
    I am getting "berkeley db fatal region error detected run recovery".This is a generic Berkeley DB panic message that means something went wrong. When do you get this error? Did you enable the verbose error messages? Are there any other warning/error messages reported? By just posting the way you open the database doesn't help much at all. I reviewed the other questions you asked on the forum, and it seems that you are not following the advices and consult the documentation, but you prefer to open new threads. I advice you to first work on configuring Berkeley DB for your needs and read the following pages in order to understand which Berkeley DB Product best suits your application and how it should be configured for a multithreaded application:
    [The Berkeley DB products|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/intro/products.html]
    [Concurrent Data Store introduction|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/cam/intro.html]
    [Multithreaded applications|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/program/mt.html]
    [Berkeley DB handles|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/program/scope.html]
    On the other hand, if the code that's calling the Berkeley DB APIs is not too big and is not private, you can post it here so we can review it for you and let you know what's wrong with it.
    The procedures you should follow in order to fix a "run recovery" error are described here:
    [Recovery procedures|http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/recovery.html]
    Thanks,
    Bogdan Coman

  • Fatal region error detected; run  Recovery

    I try include 2600 documents 1,06 GB and I have the message (Fatal region error detected; run Recovery ). I executed db_recover.exe to try resolve the problem without sucess. I did this test in 3 differents computers and I had the same problem. I am use a free version , I am studyng berkeley db xml and need test performance with a big collection of document xml. Why am I have problem if berkeley db xml is able to support terabyte in size.

    This message indicates that you are probably setting your Berkeley DB cache size too large. MapViewOfFile is the Windows API used to map the cache file. It will fail if Windows cannot find enough contiguous VM for the mapping.
    Regards,
    George
    I have about 30 documents ~10MB and I get this all
    the time.
    MapViewOfFile: Not enough storage is available to
    process this command.
    PANIC: Not enough space
    com.sleepycat.db.RunRecoveryException:
    DB_RUNRECOVERY: Fatal error, run database recovery:
    DB_RUNRECOVERY: Fatal error, run database recovery
    at
    t
    com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native
    Method)
    at
    t
    com.sleepycat.db.internal.DbEnv.open(DbEnv.java:262)
    at
    t
    com.sleepycat.db.EnvironmentConfig.openEnvironment(Env
    ironmentConfig.java:908)
    at
    t
    com.sleepycat.db.Environment.<init>(Environment.java:3
    0
    This is under WinXP with BDXML 2.3.10.

  • Solaris 10 Gives Error (ld: fatal: relocation error: R_386_32) w/ gcc-4.2.3

    I am attempting to run a build of a system known as nauticus under Solaris 10 but I am getting the following error:
    ld: fatal: relocation error: R_386_32: file .rel.debug_info: section: /home/dmclaug/trees/gcctree/trunk/build-solaris-4.2.3/src-nauticus/bin/solaris/libsmftypes.o: offset: 0x23e3d6: relocation requires reference symbol
    collect2: ld returned 1 exit status
    This system has been successfully built using gcc-3.2.3 under Solaris 10, but the error above is generated now that we have installed gcc-4.2.3. Does anyone have any idea what might be causing the problem here? Are there additional flags or switches that are required?
    Some additional background on my system:
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    Sun Streaming Server Development Package for Solaris Update 4.
    PackageVersion=2.0
    cat /etc/release
    Solaris 10 8/07 s10x_u4wos_12b X86
    Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 16 August 2007
    isainfo -x
    amd64: sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu
    i386: sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu
    isalist
    amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

    The bootstrap compiler is GCC 3.4.3.
    I tried Sun's assembler (/usr/ccs/bin/as) too and got another error (below)
    I also tried bootstrapping with Sun's Studio 12 compiler but that too failed.
    *$ pkginfo -x SUNWbinutils SMCbinut*
    SMCbinut binutils
    (x86) 2.17
    SUNWbinutils binutils - GNU binutils
    (i386) 11.10.0,REV=2005.01.08.01.09
    *$ whence gcc*
    /usr/sfw/bin/gcc
    *$ gcc -v*
    Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
    Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure prefix=/usr/sfw with-as=/usr/sfw/bin/gas with-gnu-as with-ld=/usr/ccs/bin/ld without-gnu-ld enable-languages=c,c++ --enable-shared
    Thread model: posix
    gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
    The error this time is:
    /big1/usr.local.src/gcc-4.3.1/s10i/./gcc/xgcc -B/big1/usr.local.src/gcc-4.3.1/s10i/./gcc/ -B/usr/local/i386-pc-solaris2.10/bin/ -B/usr/local/i386-pc-solaris2.10/lib/ -isystem /usr/local/i386-pc-solaris2.10/include -isystem /usr/local/i386-pc-solaris2.10/sys-include -g -fkeep-inline-functions -m64 -O2 -O2 -g -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I../../../../gcc-4.3.1/libgcc -I../../../../gcc-4.3.1/libgcc/. -I../../../../gcc-4.3.1/libgcc/../gcc -I../../../../gcc-4.3.1/libgcc/../include -DHAVE_CC_TLS -o gcov.o -MT gcov.o -MD -MP -MF gcov.dep -DLgcov -c ../../../../gcc-4.3.1/libgcc/../gcc/libgcov.c
    Assembler: libgcov.c
    "/var/tmp//ccYcw90K.s", line 1936 : Syntax error
    Near line: " repz cmpsb"

  • "Error 0001: Fatal Internal Error" in System Generator

    Hi, I get the following error when I try to import data using the model explorer in Simulink. --------------------------------- Version Log ----------------------------------
    Version                                 Path
    System Generator 10.1.1134              C:/Xilinx/10.1/DSP_Tools/common/bin/../../sysgen
    AccelDSP 10.1.1134                      C:/Xilinx/10.1/DSP_Tools/common/bin/../../AccelDSP
    Matlab 7.5.0.342 (R2007b)               C:/Program Files/MATLAB/R2007b
    ISE 10.1.i                              c:/Xilinx/10.1/ISE
    Summary of Errors:
    Error 0001: Fatal Internal Error
         Block: 'xlfsm_controller_simulation_test/Gateway In1'
    --------------------------------------------------------------------------------Error 0001:Reported by:
      'xlfsm_controller_simulation_test/Gateway In1'Details:
    An internal error occurred in the Xilinx Blockset Library.Please report this error to Xilinx (http://support.xilinx.com),
    in as much detail as possible. You may also find immediate help
    in the Answers Database and other online resources at http://support.xilinx.com.Since it is possible that this internal error resulted from an
    unhandled usage error in your design, we advise you to carefully
    check the usage of the block reporting the internal error. If
    errors persist, we recommend that you restart MATLAB.
    -------------------------------------------------------------------------------- When I used the "From Workspace" block in Simulink to import data, the model executed without any errors.  I don't know what am I doing wrong.  I am new to System Generator.  Could someone please give me some help??? Thanks in Advance

    check this discussion
    http://forums.xilinx.com/t5/DSP-Tools/System-Generator-Fatal-Internal-Error-Help-SOLVED/m-p/150010
    http://forums.xilinx.com/t5/DSP-Tools/an-internal-error-occurred-in-the-xilinx-blockset-library/m-p/383207#M7366

  • Please help with SSL POST: Servlet returns Error 500

    I am struggling for many days to get a Java program to log in to an SSL page. The program is supposed to track ADSL usage statistics from https://secure.telkomsa.net/titracker/, but I never seem to get around Server returned Error 500.
    Could anyone please help me understand what I am doing wrong by looking at the method I used. (It seems on the server side it is a jsp servlet that handles authentication).
    Any help is deeply appreciated!
    I copy-paste the method directly from NetBeans:
    CODE>
    void connectHTTPS(String url){
    try {
    URL page = new URL(url); // login page necessary to get a jsp session cookie
    //------------ SET UP SSL - is it right?
    System.setProperty("java.protocol.handler.pkgs",
    "com.sun.net.ssl.internal.www.protocol");
    try {
    //if we have the JSSE provider available,
    //and it has not already been
    //set, add it as a new provide to the Security class.
    final Class clsFactory = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
    if( (null != clsFactory) && (null == Security.getProvider("SunJSSE")) )
    Security.addProvider((Provider)clsFactory.newInstance());
    } catch( ClassNotFoundException cfe ) {
    throw new Exception("Unable to load the JSSE SSL stream handler." +
    "Check classpath." + cfe.toString());
    URLConnection urlc = page.openConnection();
    urlc.setDoInput(true);
    *Get the session id cookie set by the TelkomInternet java server
    String cookie = urlc.getHeaderField("Set-Cookie");
    //textpane.setText(totextpane);
    textpane.setText(cookie);
    //---------------- form an auth request and post it with the cookie
    String postdata =URLEncoder.encode("ID_Field","UTF-8")+"="+URLEncoder.encode("myusrname","UTF-8")+"&"+URLEncoder.encode("PW_Field","UTF-8")+"="+URLEncoder.encode("mypwd","UTF-8")+"&"+URLEncoder.encode("confirm","UTF-8")+"="+URLEncoder.encode("false","UTF-8");
    // set the servlet that handles authentication as target
    URL page2 = new URL("https://secure.telkomsa.net/titracker/servlet/LoginServlet");
    // cast to httpConn to enable setRequestMethod()
    HttpURLConnection urlc2 = (HttpURLConnection)page2.openConnection();
    // formulate request with POST data urlc2.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    urlc2.setRequestMethod("POST"); // experimental
    urlc2.setRequestProperty("Content-Length",""+postdata.length());
    urlc2.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)");
    urlc2.setRequestProperty("Accept-Language","en-us");
    urlc2.setUseCaches(false);
    urlc2.setDoOutput(true);
    urlc2.setDoInput(true);
    urlc2.setFollowRedirects(true); // ??
    //send cookies
    urlc2.setRequestProperty("Set-Cookie", cookie); // or "Cookie" - doesn't work either
    //write other data
    PrintWriter out = new PrintWriter(urlc2.getOutputStream());
    out.print(postdata); // username and password here
    out.flush();
    out.close();
    //---------------- get the authenticated page with real ADSL statistics
    BufferedReader br = new BufferedReader(new InputStreamReader(urlc2.getInputStream()));
    String totextpane = "";
    String buffer = "";
    while (buffer != null) {
    try {
    totextpane = totextpane + "\n" + buffer;
    buffer = br.readLine();
    } catch (IOException ioe) {
    ioe.printStackTrace();
    break;
    textpane.setText(totextpane);
    } catch (Exception ex) {
    System.err.println(ex.getMessage());
    ---- END CODE---
    Thank you very much for any attempt at helping with this problem!

    I am struggling for many days to get a Java program to log in to an SSL page. The program is supposed to track ADSL usage statistics from https://secure.telkomsa.net/titracker/, but I never seem to get around Server returned Error 500.
    Could anyone please help me understand what I am doing wrong by looking at the method I used. (It seems on the server side it is a jsp servlet that handles authentication).
    Any help is deeply appreciated!
    I copy-paste the method directly from NetBeans:
    CODE>
    void connectHTTPS(String url){
    try {
    URL page = new URL(url); // login page necessary to get a jsp session cookie
    //------------ SET UP SSL - is it right?
    System.setProperty("java.protocol.handler.pkgs",
    "com.sun.net.ssl.internal.www.protocol");
    try {
    //if we have the JSSE provider available,
    //and it has not already been
    //set, add it as a new provide to the Security class.
    final Class clsFactory = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
    if( (null != clsFactory) && (null == Security.getProvider("SunJSSE")) )
    Security.addProvider((Provider)clsFactory.newInstance());
    } catch( ClassNotFoundException cfe ) {
    throw new Exception("Unable to load the JSSE SSL stream handler." +
    "Check classpath." + cfe.toString());
    URLConnection urlc = page.openConnection();
    urlc.setDoInput(true);
    *Get the session id cookie set by the TelkomInternet java server
    String cookie = urlc.getHeaderField("Set-Cookie");
    //textpane.setText(totextpane);
    textpane.setText(cookie);
    //---------------- form an auth request and post it with the cookie
    String postdata =URLEncoder.encode("ID_Field","UTF-8")+"="+URLEncoder.encode("myusrname","UTF-8")+"&"+URLEncoder.encode("PW_Field","UTF-8")+"="+URLEncoder.encode("mypwd","UTF-8")+"&"+URLEncoder.encode("confirm","UTF-8")+"="+URLEncoder.encode("false","UTF-8");
    // set the servlet that handles authentication as target
    URL page2 = new URL("https://secure.telkomsa.net/titracker/servlet/LoginServlet");
    // cast to httpConn to enable setRequestMethod()
    HttpURLConnection urlc2 = (HttpURLConnection)page2.openConnection();
    // formulate request with POST data urlc2.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    urlc2.setRequestMethod("POST"); // experimental
    urlc2.setRequestProperty("Content-Length",""+postdata.length());
    urlc2.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)");
    urlc2.setRequestProperty("Accept-Language","en-us");
    urlc2.setUseCaches(false);
    urlc2.setDoOutput(true);
    urlc2.setDoInput(true);
    urlc2.setFollowRedirects(true); // ??
    //send cookies
    urlc2.setRequestProperty("Set-Cookie", cookie); // or "Cookie" - doesn't work either
    //write other data
    PrintWriter out = new PrintWriter(urlc2.getOutputStream());
    out.print(postdata); // username and password here
    out.flush();
    out.close();
    //---------------- get the authenticated page with real ADSL statistics
    BufferedReader br = new BufferedReader(new InputStreamReader(urlc2.getInputStream()));
    String totextpane = "";
    String buffer = "";
    while (buffer != null) {
    try {
    totextpane = totextpane + "\n" + buffer;
    buffer = br.readLine();
    } catch (IOException ioe) {
    ioe.printStackTrace();
    break;
    textpane.setText(totextpane);
    } catch (Exception ex) {
    System.err.println(ex.getMessage());
    ---- END CODE---
    Thank you very much for any attempt at helping with this problem!

  • Please help with Windows 7 x64 System error: Critical Kernel-power Event 41

    I'm recieving this error while moving my laptop or working with it? Can someone help me to read memory dumps and to understand what causes this error please?
    Where i can fount theese dump files? Can someone read them and is it possible to understand what is happening?
    I have made full check of my memory and there are No errors I've also checked HDD with regenerator there are no errors too. but this not means that they can not be the problem. There is doubt about one of my HDD because when laptop is blocking there is bad
    noise from HDD.
    PS: There is another issue which is strange two of times when this happens the whole MBR was destroyed and the system refuses to boot ... only reboots. And i made bootrec /fixboot /fixmbr and this solve the problem ... I don't know is this connected with
    system error, but i'm trying to give more details.
    Thanks a lot.
    Here are i'm posting my error details: 
    System
    Provider
    [ Name]
    Microsoft-Windows-Kernel-Power
    [ Guid]
    {331C3B3A-2005-44C2-AC5E-77220C37D6B4}
    EventID
    41
    Version
    2
    Level
    1
    Task
    63
    Opcode
    0
    Keywords
    0x8000000000000002
    TimeCreated
    [ SystemTime]
    2011-06-25T20:38:38.328017300Z
    EventRecordID
    7571
    Correlation
    Execution
    [ ProcessID]
    4
    [ ThreadID]
    8
    Channel
    System
    Computer
    Rumen-PC
    Security
    [ UserID]
    S-1-5-18
    EventData
    BugcheckCode
    0
    BugcheckParameter1
    0x0
    BugcheckParameter2
    0x0
    BugcheckParameter3
    0x0
    BugcheckParameter4
    0x0
    SleepInProgress
    true
    PowerButtonTimestamp
    129535076822776383

    Before every critical Errors in event log i found information about Kernel Power I'm pasting it here: 
    System
    Provider
    [ Name]
    Microsoft-Windows-Kernel-Power
    [ Guid]
    {331C3B3A-2005-44C2-AC5E-77220C37D6B4}
    EventID
    89
    Version
    0
    Level
    4
    Task
    86
    Opcode
    0
    Keywords
    0x8000000000000020
    TimeCreated
    [ SystemTime]
    2011-06-27T16:07:21.023625500Z
    EventRecordID
    9262
    Correlation
    Execution
    [ ProcessID]
    4
    [ ThreadID]
    44
    Channel
    System
    Computer
    Rumen-PC
    Security
    [ UserID]
    S-1-5-18
    EventData
    ThermalZoneDeviceInstanceLength
    21
    ThermalZoneDeviceInstance
    ACPI\ThermalZone\TZS1
    AffinityCount
    1
    _PSV
    0
    _TC1
    0
    _TC2
    0
    _TSP
    0
    _AC0
    0
    _AC1
    0
    _AC2
    0
    _AC3
    0
    _AC4
    0
    _AC5
    0
    _AC6
    0
    _AC7
    0
    _AC8
    0
    _AC9
    0
    _CRT
    361
    _HOT
    0
    _PSL
    0000000000000000
    System
    Provider
    [ Name]
    Microsoft-Windows-Kernel-Power
    [ Guid]
    {331C3B3A-2005-44C2-AC5E-77220C37D6B4}
    EventID
    89
    Version
    0
    Level
    4
    Task
    86
    Opcode
    0
    Keywords
    0x8000000000000020
    TimeCreated
    [ SystemTime]
    2011-06-27T16:07:21.039225600Z
    EventRecordID
    9263
    Correlation
    Execution
    [ ProcessID]
    4
    [ ThreadID]
    44
    Channel
    System
    Computer
    Rumen-PC
    Security
    [ UserID]
    S-1-5-18
    EventData
    ThermalZoneDeviceInstanceLength
    21
    ThermalZoneDeviceInstance
    ACPI\ThermalZone\TZS0
    AffinityCount
    1
    _PSV
    359
    _TC1
    0
    _TC2
    50
    _TSP
    0
    _AC0
    0
    _AC1
    0
    _AC2
    0
    _AC3
    0
    _AC4
    0
    _AC5
    0
    _AC6
    0
    _AC7
    0
    _AC8
    0
    _AC9
    0
    _CRT
    361
    _HOT
    0
    _PSL
    0000000000000000
    These two informations are before every critical error.

  • Can anyone help with an out of memory error on CS2?

    Hello,
    I have been battling with an out of memory error on a dell laptop running 2gb of ram. I have had no prior issues with this laptop running CS2 until last week when I started getting the out of memory errors. I have seen several articles about this occuring on later versions of illustrator. Just prior to this issue appearing I had to delete and rebuild the main user profile on the computer due to it consistently logging into a temporary account.
    Once the new profile was established and all user documents and profile settings were transferred back into it, this problem started showing up. The error occurs when clicking on files listed as Illustrator files, and when opening the illustrator suite. Once I click on the out of memory error it still continues to load illustrator. The files are located on a server and not on the remote computer. I have tried to copy the files to the local hard drive with the same result when I try to open them. I also tried to change the extension to .pdf and got no further. I tried to open a file and recreate the work and all I got was the black outline of the fonts. none of the other artwork appeared. once rebuilt, when trying to save, It gives the out of memory error and does not save the file.
    Illustrator was installed on another dell laptop, same model, etc and works fine. no problem accessing network files. I just attempted to use Illustrator from the admin profile on the machine in question and it works fine and lightening fast. Just not from the new rebuilt profile. I have tried to uninstall and reinstall the software. it has not helped. could there be stray configuration settings that we transfered over to the new profile that should not have been?
    Any insights will be helpful.
    Thank You,
    Brad Yeutter

    Here are some steps that could help you:
    http://kb2.adobe.com/cps/320/320782.html
    http://kb2.adobe.com/cps/401/kb401053.html
    I hope this helps!

  • Help with Pro*C/C++ precompiler error

    Hello.
    I have a little experience working with Pro*C/C++ and now I am trying to learn more by my own.
    I think this is an easy question. I am trying to precompile the Thread_example1.pc code from Pro*C/C++ Precompiler Programmer's Guide, Release 9.2 (I am trying it in a windows machine because I have pthreads for windows installed, so that I have commented the DCE_THREADS references).
    The thing is I am not able to precompile the code (I have tried several precompiler options).
    Now I am getting the error (I am sorry it is in Spanish):
    Error semßntico en la lÝnea 126, columna 32, archivo d:\Ejercicios_ProC\MultithreadExample\Thread_example1.pc:
    EXEC SQL CONTEXT ALLOCATE :ctx;
    ...............................1
    PCC-S-02322, se ha encontrado un identificador no definido
    The thing is that it is defined (outside a EXEC SQL DECLARE section but the precompiler CODE is set to default that does not need to be inside).
    If I declare it inside a EXEC SQL DECLARE section I get:
    Error semßntico en la lÝnea 105, columna 18, archivo d:\Ejercicios_ProC\MultithreadExample\Thread_example1.pc:
    sql_context ctx[THREADS];
    .................1
    PCC-S-02322, se ha encontrado un identificador no definido
    I have also tried writing EXEC SQL CONTEXT USE :ctx[THREADS]; just before the declare section but I get the same error than before.
    Can someone help me?

    Hmm, try the updated one (mltthrd1.pc). I've tried it (and a converted-to-pthread version on Linux). Both work fine. What version of Pro*C are you using?
    NAME
      MltThrd1
    FUNCTION
    NOTES
      32-bit Pro*C/C++ Multithreaded sample program from Pro*C/C++ User's Guide.
    Requirements
      The program requires a table ACCOUNTS to be in the schema
      SCOTT/TIGER. The description of ACCOUNTS is.
    SQL> desc accounts
    Name                  Null?   Type
    ACCOUNT                       NUMBER(10)
    BALANCE                       NUMBER(12,2)
    For proper execution, the table should be filled with the
    accounts 10001 to 10008.
         shsu: run MltThrd1.sql first.
    OWNER
    DATE
    MODIFIED
      rahmed     10/10/96 - ported for WIN32 port.
    #include <windows.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sqlca.h>
    #define CONNINFO "SCOTT/TIGER"
    #define THREADS 3
    EXEC SQL BEGIN DECLARE SECTION;
         struct parameters
              sql_context * ctx;
              int thread_id;
         typedef struct parameters parameters;
         struct record_log
              char action;
              unsigned int from_account;
              unsigned int to_account;
              double amount;
         typedef struct record_log record_log;
    EXEC SQL END DECLARE SECTION;
    /* Function prototypes   */
    void err_report(struct sqlca);
    void do_transaction(parameters *);
    void get_transaction(record_log**);
    void logon(sql_context,char *);
    void logoff(sql_context);
    record_log records[]= { { 'M', 10001, 10002, 12.50 },
                   { 'M', 10001, 10003, 25.00 },
                   { 'M', 10001, 10003, 123.00 },
                   { 'M', 10001, 10003, 125.00 },
                   { 'M', 10002, 10006, 12.23 },
                   { 'M', 10007, 10008, 225.23 },
                   { 'M', 10002, 10008, 0.70 },
                   { 'M', 10001, 10003, 11.30 },
                   { 'M', 10003, 10002, 47.50 },
                   { 'M', 10002, 10006, 125.00 },
                   { 'M', 10007, 10008, 225.00 },
                   { 'M', 10002, 10008, 0.70 },
                   { 'M', 10001, 10003, 11.00 },
                   { 'M', 10003, 10002, 47.50 },
                   { 'M', 10002, 10006, 125.00 },
                   { 'M', 10007, 10008, 225.00 },
                   { 'M', 10002, 10008, 0.70 },
                   { 'M', 10001, 10003, 11.00 },
                   { 'M', 10003, 10002, 47.50 },
                   { 'M', 10008, 10001, 1034.54}};
    static unsigned int trx_nr=0;
    HANDLE hMutex;
    void main()
         EXEC SQL BEGIN DECLARE SECTION;
              sql_context ctx[THREADS];
         EXEC SQL END DECLARE SECTION;  
         HANDLE thread[THREADS];
         parameters params[THREADS];
         int j;
         DWORD ThreadId ;
         /* Initialize a process in which to spawn threads. */
         EXEC SQL ENABLE THREADS;
         EXEC SQL WHENEVER SQLERROR DO err_report(sqlca);
         /* Create THREADS sessions by connecting THREADS times, each
         connection in a separate runtime context. */
         for(i=0; i<THREADS; i++){
              printf("Start Session %d....\n",i);
              EXEC SQL CONTEXT ALLOCATE :ctx[j];
              logon(ctx[j],CONNINFO);
         /* Create mutex for transaction retrieval.
            Created an unnamed/unowned mutex. */
         hMutex=CreateMutex(NULL,FALSE,NULL);
         if (!hMutex){
              printf("Can't initialize mutex\n");
              exit(1);
         /* Spawn threads. */
         for(i=0; i<THREADS; i++){
              params[j].ctx=ctx[j];
              params[j].thread_id=i;
              printf("Thread %d... ",i);
              thread[j]=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)do_transaction,
                                     &params[j],0,&ThreadId);
              if (!thread[j])
                   printf("Cant create thread %d\n",i);
              else
                   printf("Created\n");
         /* Logoff sessions. */
         for(i=0;i<THREADS;i++){
              printf("Waiting for Thread %d to stop....",i); /* waiting for thread to end */
              if(WaitForSingleObject(
                             thread[j],                       /* handle of thread  */
                             INFINITE) != WAIT_OBJECT_0)      /* time-out interval */
                   printf("Error waiting for thread % to terminate\n", i);
              else
                   printf("Thread %d stopped\n",i);
              printf("Stop Session %d....\n",i);
              logoff(ctx[j]);
              EXEC SQL CONTEXT FREE :ctx[j];
    } /* end main() */
    * Function: do_transaction()
    * Description: This function executes one transaction out of
    *                          the records array. The records array is managed
    *                          by get_transaction().
    void do_transaction(parameters *params)
    struct sqlca sqlca;
    EXEC SQL BEGIN DECLARE SECTION;
         record_log *trx;
    EXEC SQL END DECLARE SECTION;
    sql_context ctx;
    ctx = params->ctx;
         /* Done all transactions ? */
         while (trx_nr < (sizeof(records)/sizeof(record_log))){
              get_transaction(&trx);
              EXEC SQL WHENEVER SQLERROR DO err_report(sqlca);
              /* Use the specified SQL context to perform the executable SQL
              statements that follow. */
              EXEC SQL CONTEXT USE :ctx;
              printf("Thread %d executing transaction # %d\n",params->thread_id,trx_nr);
              switch(trx->action){
                   case 'M':       EXEC SQL UPDATE ACCOUNTS
                                  SET BALANCE=BALANCE+:trx->amount
                                  WHERE ACCOUNT=:trx->to_account;
                                  EXEC SQL UPDATE ACCOUNTS
                                  SET BALANCE=BALANCE-:trx->amount
                                  WHERE ACCOUNT=:trx->from_account;
                                  break;
                   default:
                                  break;
              EXEC SQL COMMIT;
    * Function: err_report()
    * Description: This routine prints the most recent error.
    void err_report(struct sqlca sqlca)
         if (sqlca.sqlcode < 0)
              printf("\n%.*s\n\n",sqlca.sqlerrm.sqlerrml,sqlca.sqlerrm.sqlerrmc);
         exit(1);
    * Function: logon()
    * Description: This routine logs on to Oracle.
    void logon(sql_context ctx,char *conninfo){
         EXEC SQL BEGIN DECLARE SECTION;
              char connstr[20];
         EXEC SQL END DECLARE SECTION;
         EXEC SQL CONTEXT USE :ctx;
         strcpy(&connstr[0],(char*)conninfo);
         EXEC SQL CONNECT :connstr;
    * Function: logoff()
    * Description: This routine logs off from Oracle.
    void logoff(sql_context ctx)
         EXEC SQL CONTEXT USE :ctx;
         EXEC SQL COMMIT WORK RELEASE;
    * Function: get_transaction()
    * Description: This functions manages the records array.
    void get_transaction(record_log** temp)
    DWORD dwWaitResult;
         /* Request ownership of mutex. */
         dwWaitResult=WaitForSingleObject(
                             hMutex,      /* handle of mutex   */
                             INFINITE);       /* time-out interval */
         switch (dwWaitResult) {
        /* The thread got mutex ownership. */
        case WAIT_OBJECT_0:
                        *temp = &records[trx_nr];
                        trx_nr++;
                        /* Release ownership of the mutex object. */
         if (! ReleaseMutex(hMutex))
                             printf("Not able to release mutex\n");
         break;
        /* Cannot get mutex ownership due to time-out. */
        case WAIT_TIMEOUT:
                             printf("Cannot get mutex ownership due to time-out\n");
        /* Got ownership of the abandoned mutex object. */
        case WAIT_ABANDONED:
                             printf("Got ownership of the abandoned mutex object\n");
    }

  • Error c000021a : {fatal system error} while booting laptop M30 series

    I get the following error when starting my laptop.
    "Stop: c00021a {fatal system error} The windows logon process system process terminated unexpectedly with a status of 0x00000080 (0x00000000 0x00000000)
    The system has been shut down"
    I have recovery CD provided to at the time of purchase. I have some data which I need to recover. If anyone knows resolution to this problem , please let me know the procedure.
    Thanking you in advance.
    -YG

    Hi,
    I tried the link said above but didnt help. I was still getting the same error.
    What I tried is loading a OS of different vesion (in my case XP Professional). This loaded succesfully and I could recover some of my data. For some data, I am getting access rights error.
    I am finding out if there is any way I can fully recover my data.
    Thanks for your help,

Maybe you are looking for

  • VI time measured through the profile performanc​e

    Hi all, My app works not so fast as usual and I decided to measure time with the profile performance tool. But times in a report are much less then the real times. What is the matter?

  • All of a sudden can't print to my printer

    I'm running Acrobat 7.0.9 on a MacPro with OS 10.4.11. Everything has been working fine and then, today, I scanned a 13 page document as one document using Epson Scanner and saved it as a PDF out of my printer choices. I opened the pdf file. Everythi

  • How can I color a black and white imported jpeg?

    I am new to Illustrator, and have been watching MANY videos, but just cannot seem to figure out how to color the B&W photo I imported into Illustrator CC. Do I need to do something in Photoshop first? Am I missing a step? I was able to trace the imag

  • Why cannot uninstall AIR

    I was testing my air app, I install and uninstall AIR several times in XP sp3. After that I cannot uninstall or install AIR any more. When I click the 'Remove' button in "Add or Remove Programs" window, a Error message show: All the air applications

  • File Commander install reinstall update error

    I had file commander on pb, and had a My World red * telling me an update to 1.2 was available. Tapped update and got a failure to load popup message immediately. Was able to update dBase app with no problem, as well as pb info app. Tried to update f