Project

General

Profile

Bug #2163

Server fails to start when missing DMO index

Added by Hynek Cihlar almost 11 years ago. Updated almost 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

Related issues

Related to Database - Bug #2164: Server fails to start a Progress app when persistence disabled Closed 08/21/2013

History

#1 Updated by Hynek Cihlar almost 11 years ago

  • Start date deleted (08/17/2013)

#2 Updated by Hynek Cihlar almost 11 years ago

When starting P2J server with converted code without data model (and no DMO index on the classpath) and server persistence is turned on (directory.xml:persistence/active == TRUE) server terminates abnormally with the following exception entries in server.log.

com.goldencode.p2j.cfg.ConfigurationException:  Initialization failure
        at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:1415)
        at com.goldencode.p2j.main.StandardServer.bootstrap(StandardServer.java:667)
        at com.goldencode.p2j.main.ServerDriver.start(ServerDriver.java:365)
        at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:423)
        at com.goldencode.p2j.main.ServerDriver.process(ServerDriver.java:140)
        at com.goldencode.p2j.main.ServerDriver.main(ServerDriver.java:648)
Caused by: java.lang.IllegalStateException: Error loading DMO class index
        at com.goldencode.p2j.persist.DMOIndex.getMap(DMOIndex.java:692)
        at com.goldencode.p2j.persist.DMOIndex.classes(DMOIndex.java:345)
        at com.goldencode.p2j.persist.DatabaseManager.registerDatabase(DatabaseManager.java:1953)
        at com.goldencode.p2j.persist.DatabaseManager.initialize(DatabaseManager.java:1152)
        at com.goldencode.p2j.persist.Persistence.initialize(Persistence.java:1064)
        at com.goldencode.p2j.main.StandardServer$5.initialize(StandardServer.java:835)
        at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:1411)
        ... 5 more
Caused by: com.goldencode.p2j.MissingDataException: DMO index cannot be loaded from location 'com/goldencode/testcases/dmo/dmo_index.xml'
        at com.goldencode.p2j.persist.DMOIndex.parseXML(DMOIndex.java:1099)
        at com.goldencode.p2j.persist.DMOIndex.getMap(DMOIndex.java:688)
        ... 11 more

Because it is a valid use case to be able to run Progress code without database access (indeed not very common for the real-world applications), the expected behavior here is that the server starts up normally and the DB-less converted applications can be run normally.

#3 Updated by Eric Faulhaber almost 11 years ago

  • Project changed from Liberty to Database

#4 Updated by Eric Faulhaber almost 11 years ago

Hynek Cihlar wrote:

When starting P2J server with converted code without data model (and no DMO index on the classpath) and server persistence is turned off (directory.xml:persistence/active == TRUE) server terminates abnormally with the following exception entries in server.log.

Setting active to TRUE in the directory means that persistence should be enabled, which will try to load the dmo_index.xml file. It should be set to FALSE for non-database apps (e.g., many test cases).

Even if that is the case, we may still need to fix this anyway, since I guess it is possible to have an application which only uses dynamically created temp-tables and no permanent databases. In such a case, no dmo_index.xml file would be generated by conversion, IIRC, but we would still have to enable persistence in the directory. I'm not sure how common such a case would be, but I could imagine a special-purpose app with this scenario.

#5 Updated by Hynek Cihlar almost 11 years ago

Fixed the typo in my description above: off -> on.

#6 Updated by Eric Faulhaber almost 11 years ago

OK, now I get it. I don't normally run non-database test cases (at least not without a data model present from some earlier test case conversion), so it wasn't obvious to me that this was a typo.

The issue is that we are finding a location of the dmo_index.xml file in the directory configuration, but then that file can't be loaded from the classpath. This means the configuration is invalid. We either have to be tolerant of that, perhaps by catching the IllegalStateException thrown by DMOIndex at an appropriate place up the stack, or by not trying to load the file at all.

Either way, once we get into the mode of initializing persistence, there are probably assumptions further up the call stack that the information in DMOIndex is available. So, either fix may lead to additional problems.

I think this one is more effort than it's worth to fix right now, but we will need to deal with it if we come across an app like I described in my last post.

Also available in: Atom PDF