1 Reply Latest reply on Oct 28, 2014 11:28 AM by plankton93

    JBoss OpenCV Unresolved compilation

    plankton93

      Problem Presentation

      My task is to create a Dynamic Web Project that is scanning Documents, which are coming from a Server, going through my Programm and splitting pictures from text. I need OpenCV Library for that. My code is runnning good in eclipse and it works fine. Now i needed to load the library not in eclipse but in jboss as global modules so that the server always know which libraries need to be loaded. I did all that as this link described:

      OpenCV as JBoss-as global module

      The answer of StreakyCobra, which says that the opencv.jar needs to be modified for the library load(Add a Loader.class to the jar). I did modified the opencv.jar, uploaded it, so that i can load the new jar with gradle and is works fine, so that my classes dont error.

      Im starting the jboss configured server and he is publishing my code and now im getting an error before he even goes through my code.

      Error

      11:57:00,817 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-24) MSC00001: Failed to start service jboss.deployment.unit."OpenCv.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."OpenCv.war".INSTALL: Failed to process phase INSTALL of deployment "OpenCv.war" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_67] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_67] at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_67]

      Caused by: java.lang.Error: Unresolved compilation problem: Loader cannot be resolved

      at com.eucon.OpenCv.OpenCvService.<init>(OpenCvService.java:15) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_67] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.7.0_67] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.7.0_67] at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.7.0_67] at java.lang.Class.newInstance(Unknown Source) [rt.jar:1.7.0_67] at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170) at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96) at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113) at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66) at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:81) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final] ... 5 more

      11:57:00,839 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "OpenCv.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"OpenCv.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"OpenCv.war\".INSTALL: Failed to process phase INSTALL of deployment \"OpenCv.war\""}} 11:57:00,848 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015877: Stopped deployment OpenCv.war in 9ms 11:57:00,849 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.deployment.unit."OpenCv.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."OpenCv.war".INSTALL: Failed to process phase INSTALL of deployment "OpenCv.war"

      11:57:00,852 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"OpenCv.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"OpenCv.war\".INSTALL: Failed to process phase INSTALL of deployment \"OpenCv.war\""}}}}

      Question

      Does anybody knows, why this is a Problem? Is there a validation Problem? Eclipse dont show errors while putting a new class to opencv.jar and exports it without problems. So why does jboss say that there is a compilation problem? My Loader class i putted into the opencv.jar cannopt be resolved.

      Someone have some pointers or solutions?