826 words

Issue #225 - ObjectDB can't be activated

BugVersion: 1.04Priority: CriticalStatus: FixedReplies: 20
#1
2014-05-22 21:19
Hello,

we are trying to activate objectdb on a virutalized debian 7 server, but do not have any success.

Steps we made to activate the server:

  1. unziped version 2.5.5_05 to /tmp/
  2. cd /tmp/objectdb-2.5.5_05/
  3. java -cp bin/objectdb.jar com.objectdb.Activator
  4. entered activation key at correct position in objectdb.conf
  5. cd bin/
  6. chmod +x server.sh
  7. ./server.sh start
  8. Run a java class with following contents
EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb://localhost:6136/test.odb;user=admin;password=admin");
System.out.println(emf.createEntityManager().createQuery("objectdb activation", boolean.class).getSingleResult());

Result is "false". Also when trying to create more than 10 types a exception occurs.

com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit
at com.objectdb.o.MSG.d(MSG.java:61)
at com.objectdb.o.MST.UC(MST.java:1100)
at com.objectdb.o.WRA.UC(WRA.java:213)
at com.objectdb.o.STC.l(STC.java:326)
at com.objectdb.o.SHN.ad(SHN.java:388)
at com.objectdb.o.SHN.K(SHN.java:133)
at com.objectdb.o.HND.run(HND.java:133)
at java.lang.Thread.run(Thread.java:744)

We tried the activation several times, but it is always the same activation code, so there shouldn't be the problem.

It maybe the issue of a 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 Mac address? And we can't change the MAC address because its a rented virtual server.

skolb
skolb's picture
Joined on 2012-05-04
User Post #21
#2
2014-05-23 09:37

There is an activation attempt by you on hosteurope.de. Is it the one that failed?

The MAC address format seems unusual so it may be related.

We will try to provide a fix as early as we can next week.

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,900
#3
2014-05-23 10:07

Yes, this is the one that failed. 

skolb
skolb's picture
Joined on 2012-05-04
User Post #22
#4
2014-05-30 15:14

Is there an update on this issue?

skolb
skolb's picture
Joined on 2012-05-04
User Post #23
#5
2014-06-02 09:06

Please try build 2.5.5_06, which includes an attempt to fix this issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,919
#6
2014-06-02 12:23

No its not fixed, still the same error.

com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit

Here is what we did:

cd /tmp
wget http://www.objectdb.com/download3/files/release2/2014/objectdb-2.5.5_06.zip
unzip objectdb-2.5.5_06.zip
cd objectdb-2.5.5_06
 
# Activation
java -cp bin/objectdb.jar com.objectdb.Activator
 
# Adding activation key to <database>
nano objectdb.conf
 
# Starting objectdb server
cd bin
chmod +x server.sh
./server.sh start

Then we executed following java code (using a ssh-tunel over port 1234 to local port 6136):

EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb://localhost:1234/database.odb;user=admin;password=admin");
 
// Check activation state
System.out.println(emf.createEntityManager().createQuery("objectdb activation", boolean.class).getSingleResult());
 
// Try to initialize the database with more than 10 persistable types
DatabaseCreator.prepareDatabase(emf, "database");

Which results in the following output:

false
com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit
at com.objectdb.o.MSG.d(MSG.java:61)
at com.objectdb.o.MST.UC(MST.java:1102)
at com.objectdb.o.WRA.UC(WRA.java:213)
at com.objectdb.o.STC.l(STC.java:326)
at com.objectdb.o.SHN.ad(SHN.java:388)
at com.objectdb.o.SHN.K(SHN.java:133)
at com.objectdb.o.HND.run(HND.java:133)
at java.lang.Thread.run(Thread.java:744)
skolb
skolb's picture
Joined on 2012-05-04
User Post #24
#7
2014-06-02 13:14

I cannot see any new activation by you today.

To test the fix please run activation again using the new build.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,921
#8
2014-06-02 13:18

As i wrote in the last reply i did that. Opening the generated url shows the same activation key. Maybe your activation server is broken?

skolb
skolb's picture
Joined on 2012-05-04
User Post #25
#9
2014-06-02 13:22

Maybe it is a cache problem.

Anyway, I see an activation now from a few minutes ago.

The result activation code is: ****-****-****-****-**** (sent by email).

Please try it (with the new build).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,922
#10
2014-06-02 13:39

Even with this key it isn't working (database is not activated) and the website is still returning the other key, not the one you sent us via email.

 

Here is the generated URL for activation, maybe that helps you.

http://www.objectdb.com/activate/c2tvbGI$,b2JqZWN0ZGIxNCE$,Szg5Qy1FS0JULUdSMVktMlI5Sw$$,cm9vdA$$,RXVyb3BlL0Jlcmxpbg$$,TGludXggMy4yLjQxLTA0MnN0YWIwODguNA$$,T3BlbkpESyA2NC1CaXQgU2VydmVyIFZN,MS43LjBfNTUtYjE0,bHZwczg3LTIzMC05My0xODguZGVkaWNhdGVkLmhvc3RldXJvcGUuZGU$,bHZwczg3LTIzMC05,
skolb
skolb's picture
Joined on 2012-05-04
User Post #26
#11
2014-06-02 13:55

Please try build 2.5.5_07 which includes another attempt to fix it.

Since we do not have access to the environment in which it happens we cannot test the fix.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,924
#12
2014-06-02 14:00

The new version generated another key (different from that one in the mail and the one we got previously). But still with that key (and the two other keys) it is not possible to get an activated version of the database.

Would it help if we set up a web-session with access to the server?

skolb
skolb's picture
Joined on 2012-05-04
User Post #27
#13
2014-06-02 16:16

Hopefully we can solve it with no web session.

Please try build 2.5.5_08.

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,926
#14
2014-06-02 20:14

Still no luck with 2.5.5_08 (Website generated same activation code as for 2.5.5_07) and still fails with non activated server.

skolb
skolb's picture
Joined on 2012-05-04
User Post #28
#15
2014-06-03 12:12

Should we set-up a web session so you can take a look on our server?

skolb
skolb's picture
Joined on 2012-05-04
User Post #29
#16
2014-06-03 14:26

Please run the following code on the server and post the output:

import java.math.*;
import java.net.*;
import java.util.*;
 
public class I225 {
 
    public static void main(String[] args) throws Exception {
        Enumeration e = NetworkInterface.getNetworkInterfaces();
        while (e.hasMoreElements())
        {
            NetworkInterface ni = (NetworkInterface)e.nextElement();
            byte[] hardwareAddress = ni.getHardwareAddress();
            if (hardwareAddress != null) {
                String s1 = new String(hardwareAddress, "ISO8859_1");
                String s2 = String.format("%x", new BigInteger(1, hardwareAddress));
                System.out.printf("%d %d %s\n", s1.length(), s2.length(), s2);
            }
        }
   }
}
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,930
#17
2014-06-03 14:45

The original script had no output, so we slightly modified the code, maybe it helps. But as you can see, none of the interfaces has a hardware-address.

import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;
 
public class Test2 {
 
    public static void main(String[] args) throws Exception {
        Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
 
        print(e, 0);
    }
 
    private static void print(Enumeration<NetworkInterface> e, int indent) throws SocketException, UnsupportedEncodingException {
        while (e.hasMoreElements()) {
            System.out.println(indent(indent) + "== NetworkInterface ==");
 
            NetworkInterface ni = e.nextElement();
            byte[] hardwareAddress = ni.getHardwareAddress();
 
            System.out.println(indent(indent) + "displayName = " + ni.getDisplayName());
            System.out.println(indent(indent) + "name = " + ni.getName());
            System.out.println(indent(indent) + "subInterfaces = " + ni.getSubInterfaces().hasMoreElements());
 
            if (hardwareAddress != null) {
                String s1 = new String(hardwareAddress, "ISO8859_1");
                String s2 = String.format("%x", new BigInteger(1, hardwareAddress));
                System.out.printf(indent(indent) + "hardwareAddress = %d %d %s\n", s1.length(), s2.length(), s2);
            } else {
                System.out.println(indent(indent) + "hardwareAddress = null");
            }
 
            print(ni.getSubInterfaces(), indent + 1);
        }
    }
 
    private static String indent(int indent) {
        String str = "";
        for (int i = 0; i < indent; i++) {
            str += "\t";
        }
        return str;
    }
}

 

Output:

== NetworkInterface ==
displayName = venet0
name = venet0
subInterfaces = true
hardwareAddress = null
        == NetworkInterface ==
        displayName = venet0:0
        name = venet0:0
        subInterfaces = false
        hardwareAddress = null
== NetworkInterface ==
displayName = lo
name = lo
subInterfaces = false
hardwareAddress = null
skolb
skolb's picture
Joined on 2012-05-04
User Post #30
#18
2014-06-03 15:01

This new information may help. Please try build 2.5.5_09.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,931
#19
2014-06-03 15:10

Yes, now its working. Thanks!

skolb
skolb's picture
Joined on 2012-05-04
User Post #31
#20
2014-06-03 15:14

Good. Thank you for your help with this issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,933
#21
2014-06-03 17:34

Build 2.5.5_09 may cause older activations to stop working in some cases.

Build 2.5.5_10 should work with both old and new activations.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,936

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel