Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0-TEST build cannot start -Could not initialize class org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package #119

Closed
VipulSoniGIS opened this issue Aug 24, 2014 · 5 comments

Comments

@VipulSoniGIS
Copy link

1.4.0-TEST-2014-07-21

24-08-2014 15:29:37 ERROR org.bimserver.BimServer -
java.lang.NoClassDefFoundError: Could not initialize class org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package
at org.bimserver.emf.MetaDataManager.(MetaDataManager.java:43)
at org.bimserver.BimServer.start(BimServer.java:341)
at org.bimserver.JarBimServer.start(JarBimServer.java:84)
at org.bimserver.JarBimServer.main(JarBimServer.java:53)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"


image

@VipulSoniGIS VipulSoniGIS changed the title latest build cannot start -Could not initialize class org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package 1.4.0-TEST build cannot start -Could not initialize class org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package Aug 24, 2014
@lirmont
Copy link
Contributor

lirmont commented Aug 26, 2014

Reason and Scope

This is an issue where the JAR file created as the result of the "Shared" project is missing files. Two classes are crashing during their static initializations due to this. It does not effect running the project through a local test environment (like you might in Eclipse); it just happens when packaging the project into a JAR or WAR because the build script is missing the directives to copy two specific files.

In-Place Solution

To fix a build suffering from this, you need to copy two files into the bimserver-version-date-shared.jar (zipped archive file; can use the 7-zip application; located in lib directory) that gets unpacked by running the main jar (bimserver-version-date.jar): (1) Shared/generated/org/bimserver/models/geometry/impl/geometry.ecore and (2) Shared/generated/org/bimserver/models/ifc4/impl/ifc4.ecore

Those files respectively belong in: (1) org/bimserver/models/geometry/impl and (2) org/bimserver/models/ifc4/impl

In-Source Solution

To fix the build script (common.build.xml), I believe the following two lines can be added (around line 455) to fix this issue in the Builds project.

<copy file="../../Shared/generated/org/bimserver/models/geometry/impl/geometry.ecore" todir="builds/shared/org/bimserver/models/geometry/impl" />
<copy file="../../Shared/generated/org/bimserver/models/ifc4/impl/ifc4.ecore" todir="builds/shared/org/bimserver/models/ifc4/impl" />

@VipulSoniGIS
Copy link
Author

Thank you lirmont.

Now waiting for the final release of 1.4.

@eric4today
Copy link

Dear lirmont,

I followed your way "in-source solution" and built out the jar and ran it... I got an error from BIMserver Starter:

17-09-2014 23:27:13 INFO org.bimserver.BimServer - Starting BIMserver
17-09-2014 23:27:13 INFO org.bimserver.BimServer - Using "D:\opensourceBIM__executable\home" as homedir
17-09-2014 23:27:27 INFO org.bimserver.BimServer - Version: 1.4.0 - Wed Sep 17 00:00:00 CST 2014
17-09-2014 23:27:29 INFO nl.tue.buildingsmart.emf.BuildingSmartLibraryIfc2x3tc1SchemaPlugin - IFC-Schema successfully loaded from D:\opensourceBIM__executable\home\tmp\IFC2X3_TC1.exp
17-09-2014 23:27:30 INFO nl.tue.buildingsmart.emf.BuildingSmartLibraryIfc4SchemaPlugin - IFC-Schema successfully loaded from D:\opensourceBIM__executable\home\tmp\IFC4.exp
17-09-2014 23:27:33 INFO org.ifcopenshell.IfcOpenShellEnginePlugin - Using exe/32/win/IfcGeomServer.exe
17-09-2014 23:27:33 INFO org.bimserver.templating.TemplateEngine - Using "D:\opensourceBIM__executable\bimserver-1.4.0-2014-09-17\home\templates" as template dir
17-09-2014 23:27:33 INFO org.bimserver.database.berkeley.BerkeleyKeyValueStore - No database directory found, creating "D:\opensourceBIM__executable\home\database"
17-09-2014 23:27:33 INFO org.bimserver.database.berkeley.BerkeleyKeyValueStore - Successfully created database dir "D:\opensourceBIM__executable\home\database"
17-09-2014 23:27:39 INFO org.bimserver.database.migrations.Schema - Upgrading database to version 0
17-09-2014 23:27:39 INFO org.bimserver.database.migrations.NewClassChange - Creating table: store_Project
......
17-09-2014 23:27:41 INFO org.bimserver.database.migrations.NewClassChange - Creating table: ifc2x3tc1_IfcTrimmingSelect
17-09-2014 23:27:41 INFO org.bimserver.database.migrations.NewClassChange - Creating table: ifc2x3tc1_IfcUnit
17-09-2014 23:27:41 INFO org.bimserver.database.migrations.NewClassChange - Creating table: ifc2x3tc1_IfcValue
17-09-2014 23:27:41 INFO org.bimserver.database.migrations.NewClassChange - Creating table: ifc2x3tc1_IfcVectorOrDirection
17-09-2014 23:27:41 INFO org.bimserver.database.migrations.Schema - Upgrading database to version 2
17-09-2014 23:27:42 ERROR org.bimserver.BimServer -
java.lang.IllegalStateException: Transaction 3 detected open cursors while aborting
at com.sleepycat.je.txn.Txn.abortInternal(Txn.java:1200)
at com.sleepycat.je.txn.Txn.abort(Txn.java:1111)
at com.sleepycat.je.txn.Txn.abort(Txn.java:1084)
at com.sleepycat.je.Transaction.abort(Transaction.java:207)
at org.bimserver.database.berkeley.BerkeleyTransaction.rollback(BerkeleyTransaction.java:59)
at org.bimserver.database.berkeley.BerkeleyTransaction.close(BerkeleyTransaction.java:52)
at org.bimserver.database.DatabaseSession.close(DatabaseSession.java:145)
at org.bimserver.database.Database.init(Database.java:195)
at org.bimserver.BimServer.start(BimServer.java:355)
at org.bimserver.JarBimServer.start(JarBimServer.java:84)
at org.bimserver.JarBimServer.main(JarBimServer.java:53)
17-09-2014 23:27:42 INFO org.bimserver.JarBimServer - Server started successfully

Please have a check...

rubendel added a commit that referenced this issue Sep 18, 2014
rubendel added a commit that referenced this issue Sep 18, 2014
Not done yet.
@eric4today
Copy link

Hi, rubendel
Would you update the minorversion in build.xml this time? it is a little bit confusing.
property name="minorversion" value="3"
Eric

@rubendel
Copy link
Member

No I'll update when I make a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants