2 Replies Latest reply on Jan 9, 2013 8:32 AM by maxur

    Drools/Guvnor and MySQL - error 400 and 500

    maxur Newbie

      Hi,

       

      I have following issue while opening localhost:8080/drools-guvnor/. Page is shown, but after 1-2 seconds I get errors:

       

      400 Sorry, a techincal error occured. Please contact a system administrator

      500 The call failed on the server; see server log for details

       

      [IMG]http://i50.tinypic.com/309opxd.jpg[/IMG]

       

      The issue occured when I switched repository to mySQL. I generated repository.xml (Administration -> Repository Configuration) with this:

       

      Driver: com.mysql.jdbc.Driver

      URL: jdbc:mysql://localhost:3306/guvnorRep

      User: <created user and table in DB>...

      Password: -||-

       

      I deleted repository folder and restared everything a few times. I'm working on a jBPM 5.4, but I have same problem on version 5.3. I connected jBPM with mySQL so driver and database is OK.

       

      In Administration -> Event Log I get this:

       

      Service method 'public abstract java.lang.String[] org.drools.guvnor.client.rpc.RepositoryService.listStates() throws com.google.gwt.user.client.rpc.SerializationException' threw an unexpected exception: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.drools.guvnor.server.repository.RepositoryStartupService.create() on  org.drools.guvnor.server.repository.ProductionRepositoryStartupService@1cd6432 WELD-000049 Unable to invoke [method] @PostConstruct public org.drools.guvnor.server.repository.RepositoryStartupService.create() on  org.drools.guvnor.server.repository.ProductionRepositoryStartupService@1cd6432

       

      There are many topics and questions with similar problem but there is still no answer. Is there anything more to change in configuration files so that drools/mysql combination will work?

        • 1. Re: Drools/Guvnor and MySQL - error 400 and 500
          maxur Newbie

          In addition:

           

          In JBoss log there is this error:

           

          ERROR [org.apache.jackrabbit.core.fs.db.DatabaseFileSystem] (http-localhost-127.0.0.1-8080-3) failed to initialize file system: javax.jcr.RepositoryException: Could not load JDBC driver class com.mysql.jdbc.Driver.

           

          Driver is properly loaded for jBPM, why isn't here?

          • 2. Re: Drools/Guvnor and MySQL - error 400 and 500
            maxur Newbie

            After almost 4 days with this problem I found the solution:

             

            1. Stop JBoss (ant stop.jboss)

            2. Open drools-guvnor.war in ...\jbpm-installer\jboss-as-7.1.1.Final\standalone\deployments with 7zip

            3. Open WEB-INF\lib

            4. Drag and drop mySql connection driver into it and accept changes

            5. Delete repository folder from ...\jbpm-repository\

            5. Start JBOSS (ant start.jboss)

            6. After few tries (while(notOpened) F5;) http://localhost:8080/drools-guvnor will open (without 400 and 500 errors)

             

            In my jboss log there are still some errors:

             

            ERROR [org.reflections.Reflections] (MSC service thread 1-5) could not create Vfs.Dir from url. ignoring the exception and continuing: org.reflections.ReflectionsException: could not create Dir using org.jboss.errai.bus.server.service.metadata.VFSUrlType from url vfs:/D:/jbpm/content/jbpm-gwt-console.war/WEB-INF/classes/

             

            ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) HHH000319: Could not get database metadata: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'sequences' in information_schema

             

            ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) HHH000299: Could not complete schema update: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'sequences' in information_schema

             

            Although the 400/500 error is solved I'm still tring to figure out other exceptions so any help would be very useful.