CMDBuild Forum

Integration of Bimserver

Hi,

I have been trying out cmdbuild. I have successfully deployed cmdbuild 2.5 on tomcat on windows and loaded postgres with demo data. However when I try try to set up Bimserver I encountered some problems. 

Mainly when I try to view the IFC that I uploaded  onto the bimserver I get a empty frame where the 3d model is suppose to be. On the bimserver i get the following error message:

ERROR [qtp474073770-34]:"oids" [0] must be of type number ({"_i":2034041015,"_t":"IfcRelAggregates"})

at org.bimserver.webservices.impl.ServiceImpl.getDownloadData

I am currently running Bimserver 1.5.92, Bimserver JavaScript API 0.0.136, Bimsurfer 0.0.43, BIMvie.ws 0.0.98, BinarySerializer 0.027, Console 0.0.10, IfcOpenShellPlugin 0.5.25 and ifcPlugins 0.0.33

I can render uploaded IFC on BIMvie.ws fine but when I try to do it in cmdbuild I get error.

 

Any help would be appreciated

Thanks,

Kevin

Hi Kevin,

what is the IFC version of your file? Did you upload it using CMDBuild Administration interface or directly from the Bimserver interface?
 
Regards
CMDBuild Team

I tried both IFC4 and IFC2x3, upload was done through CMDBuild Admin. interface.

some sample IFC file I tried:
http://openifcmodel.cs.auckland.ac.nz/Model/Details/304  (IFC4)
http://openifcmodel.cs.auckland.ac.nz/Model/Details/301  (IFC2x3)
http://openifcmodel.cs.auckland.ac.nz/Model/Details/200 (IFC2x3)
 
error from Bimserver,
17:37:34 INFO  [org.bimserver.ServiceInterface.download]: Reading from cache e186a4c4eddaa99df85e0e5cf3f87261                              (NewDiskCacheManager.java:105) 
17:37:34 ERROR [org.bimserver.ServiceInterface.download]:                                                                                  (LongStreamingDownloadAction.java:152) 
org.bimserver.database.queries.om.QueryException: "oids"[0] must be of type number ({"_i":2034434231,"_t":"IfcRelAggregates"})
at org.bimserver.database.queries.om.JsonQueryObjectModelConverter.parseJsonQuery(JsonQueryObjectModelConverter.java:438)
at org.bimserver.database.queries.om.JsonQueryObjectModelConverter.parseJson(JsonQueryObjectModelConverter.java:184)
at org.bimserver.longaction.LongStreamingDownloadAction.<init>(LongStreamingDownloadAction.java:109)
at org.bimserver.webservices.impl.ServiceImpl.download(ServiceImpl.java:416)
at org.bimserver.generated.ServiceInterfaceReflector1.callMethod(ServiceInterfaceReflector1.java)
at org.bimserver.shared.meta.SMethod.invoke(SMethod.java:213)
at org.bimserver.JsonHandler.processSingleRequest(JsonHandler.java:148)
at org.bimserver.JsonHandler.execute(JsonHandler.java:64)
at org.bimserver.servlets.JsonApiServlet.service(JsonApiServlet.java:70)
 
error from Chrome browser,
[default] Login successful
bim.min.js:1 [default] Getting model data...
bim.min.js:1 preloadModel 11599875: 241.25390625ms
bim.min.js:1 SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.a.onload (bim.min.js:1)
bim.min.js:1 Uncaught TypeError: Cannot read property 'objects' of undefined
    at bim.min.js:1
    at XMLHttpRequest.a.onload (bim.min.js:1)
 
query from browser,
    1. {request: {interface: "org.bimserver.ServiceInterface", method: "download",…},…}
      1. request:{interface: "org.bimserver.ServiceInterface", method: "download",…}
        1. interface:"org.bimserver.ServiceInterface"
        2. method:"download"
        3. parameters:{roids: [11599875], query: "{"oids":[{"_i":2034434231,"_t":"IfcRelAggregates"}]}",…}
          1. query:"{"oids":[{"_i":2034434231,"_t":"IfcRelAggregates"}]}"
          2. roids:[11599875]
          3. serializerOid:262182
          4. sync:false

Hi,

The IFC files were upload through CMDBuild's admin interface. I tried both IFC4 and IFC2x3 file. Some file I tried are:
http://openifcmodel.cs.auckland.ac.nz/Model/Details/301    (IFC2x3)
http://openifcmodel.cs.auckland.ac.nz/Model/Details/304    (IFC4)
http://openifcmodel.cs.auckland.ac.nz/Model/Details/200    (IFC2x3)
 
Error from Bimserver:
08:45:58 ERROR [org.bimserver.ServiceInterface.download]:                                                                                  (LongStreamingDownloadAction.java:152) 
org.bimserver.database.queries.om.QueryException: "oids"[0] must be of type number ({"_i":2034041015,"_t":"IfcRelAggregates"})
at org.bimserver.database.queries.om.JsonQueryObjectModelConverter.parseJsonQuery(JsonQueryObjectModelConverter.java:438)
at org.bimserver.database.queries.om.JsonQueryObjectModelConverter.parseJson(JsonQueryObjectModelConverter.java:184)
at org.bimserver.longaction.LongStreamingDownloadAction.<init>(LongStreamingDownloadAction.java:109)
at org.bimserver.webservices.impl.ServiceImpl.download(ServiceImpl.java:416)
at org.bimserver.generated.ServiceInterfaceReflector1.callMethod(ServiceInterfaceReflector1.java)
at org.bimserver.shared.meta.SMethod.invoke(SMethod.java:213)
at org.bimserver.JsonHandler.processSingleRequest(JsonHandler.java:148)
at org.bimserver.JsonHandler.execute(JsonHandler.java:64)
at org.bimserver.servlets.JsonApiServlet.service(JsonApiServlet.java:70)
at org.bimserver.servlets.RootServlet.service(RootServlet.java:140)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:835)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1685)
 
 
Error from browser:
 
[default] Login successful
bim.min.js:1 [default] Getting model data...
bim.min.js:1 preloadModel 11534339: 359.54296875ms
bim.min.js:1 SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.a.onload (bim.min.js:1)
bim.min.js:1 Uncaught TypeError: Cannot read property 'objects' of undefined
    at bim.min.js:1
    at XMLHttpRequest.a.onload (bim.min.js:1)
 
json request:
  1. {request: {interface: "org.bimserver.ServiceInterface", method: "download",…},…}
    1. request:{interface: "org.bimserver.ServiceInterface", method: "download",…}
      1. interface:"org.bimserver.ServiceInterface"
      2. method:"download"
      3. parameters:{roids: [11534339], query: "{"oids":[{"_i":2034041015,"_t":"IfcRelAggregates"}]}",…}
        1. query:"{"oids":[{"_i":2034041015,"_t":"IfcRelAggregates"}]}"
        2. roids:[11534339]
        3. serializerOid:262182
        4. sync:false
    2. token:"7b88d3efe644ca7fea5f1af56e6df5d8fa0bbe145f51c7a26ddf72a75b1312626040b7e2f49f6534b589e93a5f768430"
 
 

Dear Kevin,

I have tried with the first file you linked and it is working for me,, I can see the building on CMDBuild. However I am using Bimserver 1.5.81.

Could you try with the same version I am using?

 

Regards

CMDBuild Team

Hi, 

 
I tried Bimserver 1.5.81. Unfortunately Bimvie.ws does not render in this version. I suspect the default version for plugins is incorrect.
 
Would it be possible for you to provide plugins' version number ?(ie, BIMServer JavaScript API, Bimsurfer etc.)
 
 

Yes, of course, these are the versions of the installed plugins:

BIMServer JavaScript API 0.0.120
BIMsurfer 0.0.41
BIMvie.ws 0.0.85
BinarySerializers 0.0.26
Console 0.0.10
IfcOpenShellPlugin 0.5.24
IfcPlugins 0.0.30
 
Regards
CMDBuild Team 

Previously Kevin wrote:

Hi, 
 
I tried Bimserver 1.5.81. Unfortunately Bimvie.ws does not render in this version. I suspect the default version for plugins is incorrect.
 
Would it be possible for you to provide plugins' version number ?(ie, BIMServer JavaScript API, Bimsurfer etc.)
 
 
Hi Kevin,
 
Is The problem solved?
I have same problem with you
 
Regards
 
Deni

Hi Deni, 

After I installed the correct version of plugins onto 1.5.81, CMDBuild is able to render correctly.
If you need any further help you can contact me at tzuchieh.cheng@ctci.com.tw
Hello,
 
I was also able to render the IFC models using the plugin versions mentioned.
However I can't get the "import mapping" functionality to work. Is this currently supported in Cmdbuild 2.5 and is there any change to the scripts syntax?
 
Thanks,
Joao 
 
Previously kevin wrote:
Hi Deni, 
After I installed the correct version of plugins onto 1.5.81, CMDBuild is able to render correctly.
If you need any further help you can contact me at tzuchieh.cheng@ctci.com.tw

 

Hello,

what to do you mean precisely when you way that you can't make the import mapping functionality work? Which problems are you facing?

 

Regards

CMDBuild Team

 

 

Hello,
 
I've setup cmdbuild 2.5.0 with the empty database schema from Openmaint. I've successfully uploaded IFC models through cmdbuild admin interface and can see the IFC model in cmdbuild interface (by creating a card in the management interface and linking the BIM model to that card). However I can't import data from the IFC models using the "import mapping" scripts (which I was able to in previous versions of cmdbuild).
I have set Building class as Root and Active in BIM Layers.
 
IFC model used: https://github.com/opensourceBIM/TestFiles/blob/master/TestData/data/AC11-FZK-Haus-IFC.ifc
 
Example script that I used:
 
<bim-conf>
  <entity name="IfcBuilding" label="Building">
    <attributes>
      <attribute type="simple" name="Name" label="Code" />
      <attribute type="simple" name="Name" label="Name" />
    </attributes>
  </entity>
</bim-conf>
 
Error message from cmdbuild.log when I click "import IFC" after selecting the script through the interface. I've also tried inserting the script in the database (like in cmdbuild 2.4.3) and I get the same error:
 
ERROR 2018-03-28 09:57:05 [jsonrpc ] A java.lang.reflect.UndeclaredThrowableException occurred calling method class org.cmdbuild.servlets.json.BIM.importIfc
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy205.getEntitiesByType(Unknown Source)
at org.cmdbuild.bim.service.bimserver.ForwardingBimServerClient.getEntitiesByType(ForwardingBimServerClient.java:60)
at org.cmdbuild.bim.service.bimserver.BimserverService.getEntitiesByType(BimserverService.java:48)
at org.cmdbuild.bim.mapper.xml.BimReader.read(BimReader.java:56)
at org.cmdbuild.bim.mapper.xml.BimReader.readEntities(BimReader.java:41)
at org.cmdbuild.services.bim.DefaultBimFacade.readEntityFromProject(DefaultBimFacade.java:154)
at org.cmdbuild.logic.bim.DefaultSynchronizationLogic.importIfc(DefaultSynchronizationLogic.java:43)
at org.cmdbuild.servlets.json.BIM.importIfc(BIM.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:104)
at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:48)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:52)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.cmdbuild.filters.LocalizationFilter.doFilter(LocalizationFilter.java:127)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.cmdbuild.bim.service.bimserver.SmartBimserverClient$1.invoke(SmartBimserverClient.java:45)
... 60 more
Caused by: org.cmdbuild.bim.service.BimError: java.lang.NoSuchMethodException: org.bimserver.models.ifc2x3tc1.impl.Ifc2x3tc1PackageImpl.get()
at org.cmdbuild.bim.service.bimserver.DefaultBimserverClient.getEntitiesByType(DefaultBimserverClient.java:264)
... 65 more
Caused by: java.lang.NoSuchMethodException: org.bimserver.models.ifc2x3tc1.impl.Ifc2x3tc1PackageImpl.get()
at java.lang.Class.getDeclaredMethod(Class.java:2130)
at org.cmdbuild.bim.service.bimserver.DefaultBimserverClient.getEntitiesByType(DefaultBimserverClient.java:241)
... 65 more
 
 
Previously Tecnoteca wrote:

Hello,

what to do you mean precisely when you way that you can't make the import mapping functionality work? Which problems are you facing?

 

Regards

CMDBuild Team

 

 

 

Hello,

yes, the syntax has slightly changed with the last version, for optimization reasons.

 

Here is an example of how the xml files should look like now.

 

<bim-conf>

<entity ifcType="IfcBuilding" cmClass="Building">

    <attributes>

        <attribute type="simple" ifcName="IfcRoot_Name" cmName="Code" />

        <attribute type="reference" ifcName="IfcBuilding_BuildingAddress">

            <entity><attributes>

                    <attribute type="simple" ifcName="IfcAddress_Description" cmName="Name" />

                    <attribute type="list" ifcName="IfcPostalAddress_AddressLines" cmName="Address" />

                    <attribute type="simple" ifcName="IfcPostalAddress_Town" cmName="City" />

                    <attribute type="simple" ifcName="IfcPostalAddress_PostalCode" cmName="ZIP" />

                    <attribute type="simple" ifcName="IfcPostalAddress_Country" cmName="Country" />

            </attributes></entity>

        </attribute>

    </attributes>

</entity>

</bim-conf>

Thanks, I was able to import some basic information now. Will have a more detailed look later.
 
Previously Tecnoteca wrote:

Hello,

yes, the syntax has slightly changed with the last version, for optimization reasons.

 

Here is an example of how the xml files should look like now.

 

<bim-conf>

<entity ifcType="IfcBuilding" cmClass="Building">

    <attributes>

        <attribute type="simple" ifcName="IfcRoot_Name" cmName="Code" />

        <attribute type="reference" ifcName="IfcBuilding_BuildingAddress">

            <entity><attributes>

                    <attribute type="simple" ifcName="IfcAddress_Description" cmName="Name" />

                    <attribute type="list" ifcName="IfcPostalAddress_AddressLines" cmName="Address" />

                    <attribute type="simple" ifcName="IfcPostalAddress_Town" cmName="City" />

                    <attribute type="simple" ifcName="IfcPostalAddress_PostalCode" cmName="ZIP" />

                    <attribute type="simple" ifcName="IfcPostalAddress_Country" cmName="Country" />

            </attributes></entity>

        </attribute>

    </attributes>

</entity>

</bim-conf>

 

Hello, I have a similar problem about BimServer Integration.

I have succeeded installing CMDBuild 3.1.1 in Ubuntu 18.04 via Docker.

When I open the setting and want to try to upload my ifc model, I always got this error messsage:

Bimserver connection failed (bimserver url = h**p://localhost:8890/BIMserver): org.bimserver.shared.reflector.ReflectorException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8890 [localhost/127.0.0.1] failed: Connection refused (Connection refused), caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8890 [localhost/127.0.0.1] failed: Connection refused (Connection refused), caused by: java.net.ConnectException: Connection refused (Connection refused)
org.cmdbuild.bim.BimException: java.lang.IllegalArgumentException: client not connected, caused by: java.lang.IllegalArgumentException: client not connected

(Sorry, I have to omit the link, as it is forbidden to be included)

Could you please help me!

I don’t know what to do. I had tried installing CMDBuild manually which was very painful. Finally I got it working via docker. To be honest, this is my second year of trial to install CMDBuild in my PC. I almost succeeded until I got another problem with BIMServer Integration.

Any assistant will be appreciated.

Many Thanks,
Aishervo

when i deploy bimserver from tomcat I get this error
image

hi, i have the following error when uploading an .ifc file i am using bimserver 1.5.138; openmaint-2.0-3.2.1; postgres 10 and postgis2.4
image
It seems that it is due to bimserver packages that are no longer enabled, because the version is very old, what can I do?
my sitio
image
as it should be
image
please help

I made a request to bimserver to activate the installation plugins of version 1.5.138 and this was the answer

As Ruben said, this is not a BIMserver issue, but triggered by a change of Maven URLs. BIMserver was adapted with these updates a20ba03 and 69b4b4d, which are included in developer release 1.5.182. You (or Tecnoteca for that matter) could create a maintenance branch for 1.5.138 and try to cherry-pick these two commits (if that is easier than upgrading to the latest release). We can not solve this on the BIMserver side. Official maintenance branches do only make sense for major releases. Otherwise we would have to patch every single developer release that someone might have in use.