zip file or JAR manifest missing

#1

I found the message:

Error opening zip file or JAR manifest missing: /E:/projects/ObjectDB/bin/objectdb.jar

Some of projects can read the DB, but others can not read or write the DB.

Exception in thread "main" [ObjectDB 2.2.5] javax.persistence.PersistenceException
Type ItemList is not found (error 301)
at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:620)
at src.run.txt2db.lookup(txt2db.java:82)
at src.run.txt2db.main(txt2db.java:57)
Caused by: com.objectdb.o.TEX: Type ItemList is not found
at com.objectdb.o.MSG.e(MSG.java:107)
at com.objectdb.o.TRS.g(TRS.java:208)
at com.objectdb.o.SYR.n(SYR.java:238)
at com.objectdb.o.SYR.k(SYR.java:171)
at com.objectdb.o.QRC.<init>(QRC.java:144)
at com.objectdb.o.QRM.UR(QRM.java:242)
at com.objectdb.o.MST.UR(MST.java:878)
at com.objectdb.o.WRA.UR(WRA.java:286)
at com.objectdb.o.WSM.UR(WSM.java:113)
at com.objectdb.o.QRR.g(QRR.java:220)
at com.objectdb.o.QRR.b(QRR.java:143)
at com.objectdb.jpa.JpaQuery.getSingleResult(JpaQuery.java:613)
... 2 more
Error opening zip file or JAR manifest missing: /E:/projects/ObjectDB/bin/objectdb.jar
#2

The ObjectDB stack trace indicates an attempt to use a type in a query that doesn't exist in the database. This might happen, for example, if you are trying to use your application with an empty database.

Here are a few possible solution to this problem:

Regarding the "JAR manifest missing" - this is not an error that ObjectDB produces. If you get it while using ObjectDB in an application server, Eclipse plugin, etc. - please provide more details and a test case.

 

ObjectDB Support
#3

The codes is ok in MySQL, but not in ObjectDB. Before update a value, my threads will check the target existence, if yes then accumulate, else insert a new record.

		String sQ2 = "select i from ItemList i where i.taskid=?1 and i.itemname = ?2";
		Query q2 = em.createQuery(sQ2);
		q2.setParameter(1, iTask);
		q2.setParameter(2, sName);
		ItemList item = null;
		try {
			item = (ItemList)q2.getSingleResult();
		} catch (NoResultException e) {
			item = new ItemList();
			item.setTaskid(iTask);
		}

I have to commit a useless object to make the table exists, that is unnecessary in MySQL. I use ObjectDB exactly because persistence unit is not essential.

trans.begin();
   ItemList i = new ItemList();
   i.setItemname("Beginning");
   em.persist(i);
   trans.commit();
#4

Of course it works with MySQL because you have a persistence unit.

You will have to adopt one of the solutions in #2 - set a persistence unit or use an alternative solution.

For example, replace the query with TypedQuery:

TypedQuery<ItemList> q2 = em.createQuery(sQ2, ItemList.class);

 

ObjectDB Support
#5

I found this is a weird thing, the same codes run the different results in my office pc and home pc. I use svn to keep my codes. My ObjectDB path is the same.

But, My home pc will get this message:

Error opening zip file or JAR manifest missing: /E:/projects/ObjectDB/bin/objectdb.jar

#6

Maybe the objectdb.jar in one site is corrupted (e.g. copied by FTP in ASCII mode instead of in binary mode).

ObjectDB Support
#7

Finally, I know why. My home pc use ObjectDB 2.2.5, report the error; my office pc use 2.2.4, report no error.

It seems the last version has something with it.

#8

Try the last build 2.2.7_08.

ObjectDB Support
#9

Error opening zip file or JAR manifest missing: /E:/projects/objectdb/bin/objectdb.jar

with objectdb-2.2.9_03.zip

#10

It is unclear what is the source of this error message. Do you have a full stack trace?

More information is needed in order to locate the cause of this error.

ObjectDB Support
#11

very normal operation.

public class PageTest {
protected static EntityTransaction trans = SingleManager.getTrans();
protected static EntityManager em = SingleManager.getEntityManager();

public void read(){
  int iCnt = 10;
  while (--iCnt>=0){
   trans.begin();
   Page uri = new Page();
   uri.setsUrl(""+iCnt);
   em.persist(uri);
   trans.commit();
   System.out.printf("NO = %d%n",iCnt);
   System.out.printf("id = %d%n%n",uri.getId());
  }
  SingleManager.close();
}
public static void main(String[] args) {
  SingleManager.clearDB("Page");
  SingleManager.clearDB("URI");
  new PageTest().read();
}
}

the version 2.2.8_6 can not pass, saying "use the same prime key" something.

and version 2.2.9_3 passed, but with the message above.

#12

This is not an error message that ObjectDB produces. Could you post the full stack trace?

 

ObjectDB Support
#13

My codes will pass through with version_2.2.9_3. The message, only one line, is always on the bottom. No more stack track!

#14

Maybe this is related to using ObjectDB Enhancer as a Java Agent?

Does it happen only when you use ObjectDB Enhancer as a Java Agent?

 

Please read the first Google result for "Error opening zip file or JAR manifest missing":

http://liteforums.appdynamics.com/discussion/155/solution-to-error-opening-zip-file-or-jar-manifest-missing/p1

Is this a solution for the problem?

ObjectDB Support

Reply