recovery from unclean Guvnor shutdown..
by Tharakesh Siddalingaiah
Hi folks,
The unix host that our Guvnor instance ran on was shutdown without first
shutting down Guvnor.
When I restarted Guvnor after the host came back up, I got the message: "This
looks like a brand new repository. Would you like to install a sample
repository?"
Has anyone else experienced this problem?
Any pointers on how to recovery would be greatly appreciated.
I do have an xml export of the repository that I can use if all else fails.
But I would prefer to recover the existing database so that I can retain the
history and the latest changes.
Thank you for your assistance.
-tk
-------------------------
Guvnor version: 5.0.0.SNAPSHOT 25673M
JBoss: Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA
date=200807181417)
JDK: Java version: 1.6.0_20,Sun Microsystems Inc.
OS: SunOS <hostname> 5.10 Generic_142900-12 sun4v sparc SUNW,T5240
We are using SQL Server as the repository (see repository.xml below)
When I check the database I see the following tables and row counts:
VERSION_BINVAL 0
VERSION_NODE 13836
VERSION_PROP 66436
VERSION_REFS 3324
Repository.xml content:
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit
1.4//EN"
"
http://jackrabbit.apache.org/dtd/repository-1.4.dtd">
<!-- Example Repository Configuration File -->
<Repository>
<!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
-->
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
<!--
security configuration
-->
<Security appName="Jackrabbit">
<!--
access manager:
class: FQN of class implementing the AccessManager interface
-->
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
<!-- <param name="config" value="${rep.home}/access.xml"/> -->
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<!-- anonymous user name ('anonymous' is the default value) -->
<!-- <param name="anonymousId" value="anonymous"/> -->
<!--
default user name to be used instead of the anonymous user
when no login credentials are provided (unset by default)
-->
<!-- <param name="defaultUserId" value="superuser"/> -->
</LoginModule>
</Security>
<!--
location of workspaces root directory and name of default workspace
-->
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
<!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
<Workspace name="${wsp.name}">
<!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<!--
persistence manager of the workspace:
class: FQN of class implementing the PersistenceManager interface
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
<param name="driver"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<param name="user" value="<dbuser>"/>
<param name="password" value="<dbpassword>"/>
<param name="schema" value="mssql"/>
<param name="url"
value="jdbc:sqlserver://<sqlserver_host>:<sqlserver_port>"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
</PersistenceManager>
<!--
Search index and the file system it uses.
class: FQN of class implementing the QueryHandler interface
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
<param name="textFilterClasses"
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
<param name="extractorPoolSize" value="2"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
</Workspace>
<!--
Configures the versioning
-->
<Versioning rootPath="${rep.home}/version">
<!--
Configures the filesystem to use for versioning for the respective
persistence manager
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>
<!--
Configures the persistence manager to be used for persisting
version state.
Please note that the current versioning implementation is based on
a 'normal' persistence manager, but this could change in future
implementations.
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:$
{rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
<param name="driver"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<param name="user" value="<dbuser>"/>
<param name="password" value="<dbpassword>"/>
<param name="schema" value="mssql"/>
<param name="url"
value="jdbc:sqlserver://<sqlserver_host>:<sqlserver_port>"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
</Versioning>
<!--
Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions)
-->
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${rep.home}/repository/index"/>
<param name="textFilterClasses"
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
<param name="extractorPoolSize" value="2"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
</Repository>
Tharakesh Siddalingaiah
Solution Architect Tel: +1 (410) 895 5275
GTO GIS Core Banking - PWM IT Mob: +1 (410) 905 2169
US tharakesh.siddalingaiah(a)db.com
Deutsche Bank AG
---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
15 years, 6 months
Problem creating package - validateUniqueRuleNames(PackageBuilder.java:830)
by Saleem Lakhani
Following is my code:
KnowledgeBuilderConfiguration kbc =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
kbc.setProperty("drools.dialect.java.compiler", "JANINO");
KnowledgeBuilder builder = null;
builder = KnowledgeBuilderFactory.newKnowledgeBuilder(kbc);
Reader drlSource = new
InputStreamReader(RVEngine.class.getResourceAsStream(ruleset.getDrlSourc
e())); //ruleset.getDrlSource() = com/cit/myDrl.dslr
Reader dslSource = new
InputStreamReader(RVEngine.class.getResourceAsStream(ruleset.getDslSourc
e()));
builder.add(ResourceFactory.newReaderResource(dslSource),
ResourceType.DSL);
builder.add(ResourceFactory.newReaderResource(drlSource),
ResourceType.DSLR);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(builder.getKnowledgePackages());
no matter what I type in my dslr (drl) file I get the following
exception on the highlighted line; ANY IDEA????
I have 1 rule or No rule it still throws the same exception. Does it
have to do with any jar files?
Caused by: java.lang.NullPointerException
at
org.drools.compiler.PackageBuilder.validateUniqueRuleNames(PackageBuilde
r.java:830)
at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:555)
at
org.drools.compiler.PackageBuilder.addPackageFromDslr(PackageBuilder.jav
a:355)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.j
ava:461)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
va:28)
saleem
15 years, 6 months
'Long' and 'double' value comparing problem in drools 5.1.0
by Miles Wen
hi there,
I have a simple fact class:
public class Msg {
private Long lo = 5l;
private double dbl = 5.5;
public Long getLo() {
return lo;
}
public void setLo(Long lo) {
this.lo = lo;
}
public double getDbl() {
return dbl;
}
public void setDbl(double dbl) {
this.dbl = dbl;
}
}
and a simple drl program:
package com.sample
import com.sample.Msg;
rule "Hello World"
when
m:Msg(lo >= dbl)
then
System.out.println( "hello world" );
System.out.println(m.getLo());
System.out.println(m.getDbl());
end
I simply compare the Long value, which is 5, to the double value ,which is
5.5, with operator '>=', and the output is:
hello world
5
5.5
but it can't be ,cause 5 is less than 5.5.
then I modified the drl program a bit:
m:Msg(lo == dbl)
It successfully prints out the message as well.It seems that drools treated
the double value '5.5' as '5' in comparing...
Is this a bug or something?What could I do to correct it?
thanks.
15 years, 6 months
Drools Clustering & High Availability
by Carlos Santiago Moreno
Hi there! My team and I were thinking on implementing Drools Flow on a
project, running it on a Tomcat Apache server, but we have to investigate
some little details of this tools before taking any desition. The thing is,
that we have been searching, on a lots of forums, mailing lists, and blog
posts, but no one ever gives a direct answer to two particular questions.
The first one is, if Flow is compatible with clustering. Till now, we
understand that is not a problem if we use JBoss AS, but, as I said before,
we are planning to use Tomcat, so we don't know for sure if it will work.
The other question unanswered yet is, what can you tell us about the High
Availability. We need to know if it possible to set HA features on this
tool.
Everything you could tell us will be for help.
Carlos S. Moreno
15 years, 6 months
Drools Clustering & High Availability
by Carlos Santiago Moreno
Hi there! My team and I were thinking on implementing Drools Flow on a
project, running it on a Tomcat Apache server, but we have to investigate
some little details of this tools before taking any desition. The thing is,
that we have been searching, on a lots of forums, mailing lists, and blog
posts, but no one ever gives a direct answer to two particular questions.
The first one is, if Flow is compatible with clustering. Till now, we
understand that is not a problem if we use JBoss AS, but, as I said before,
we are planning to use Tomcat, so we don't know for sure if it will work.
The other question unanswered yet is, what can you tell us about the High
Availability. We need to know if it possible to set HA features on this
tool.
Everything you could tell us will be for help.
Carlos S. Moreno
15 years, 6 months
Problems with repeated execution of rules
by Dmitri Pissarenko
Hello!
I have following rules file:
import java.util.List;
global List outErrorCodes;
global Boolean condition1;
global Boolean condition2;
global Boolean condition3;
rule "01"
when
eval( condition3 == false);
then
outErrorCodes.add("ERROR_CODE1");
System.out.println("01");
end
rule "02"
when
eval((condition1 == true) && (condition2 == true));
then
outErrorCodes.add("ERROR_CODE2");
System.out.println("02");
end
When I evaluate this file repeatedly, it is evaluated correctly only
the first time.
I don't understand why it happens, because I always create a new
knowledge base for every execution (I don't re-use sessions).
Here is the code:
final KnowledgeBase knowledgeBase2 = createKnowledgeBase(getRuleFileNames());
final StatefulKnowledgeSession session2 =
knowledgeBase2.newStatefulKnowledgeSession();
...
Then, I set condition1, condition2 and condition3 with calls like this:
session2.setGlobal(curName, curValue);
curValue is Boolean.TRUE or Boolean.FALSE.
Then, I insert the value of the output variable:
session2.setGlobal("outErrorCodes",
new LinkedList<String>());
Then, I invoke these methods:
session2.fireAllRules();
...
session2.dispose();
After fireAllRules, outErrorCodes is always empty (apart from the
first run), even in cases, where rule "01" should apply.
What am I doing wrong?
Thanks in advance
Dmitri
15 years, 6 months
java.lang.RuntimeException: Unexpected global
by Saleem Lakhani
Hi,
What is the actual reason for this error? Why cant drools give some
better explaination of this problem when the exception is thrown.
Here is the snippet of my code:
workingMemory.setGlobal("validationErrorHierarchy",
validationErrorHierarchy); //workingMemory is StatefulKnowledgeSession
I am using the following variable in dslr:
global com.model.ValidationErrorHierarchy validationErrorHierarchy;
thanks
saleem
15 years, 6 months
Caused by: java.lang.NullPointerException at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
by odelyaholiday
Hi!
I am working already for 3 days, trying to configure bitronix with spring
and drools.
I defined
1. persistence unit:
<persistence-unit name="org.drools.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/DS1</jta-data-source>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.current_session_context_class" value="jta" />
<property name="hibernate.connection.driver_class"
value="oracle.jdbc.xa.client.OracleXADataSource" />
<property name="hibernate.jndi.class"
value="bitronix.tm.jndi.BitronixInitialContextFactory"/>
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
2. in my application context:
<!-- Bitronix Transaction Manager embedded configuration -->
<bean id="oracleDataSource"
class="bitronix.tm.resource.jdbc.PoolingDataSource"
init-method="init" destroy-method="close">
<property name="className"
value="oracle.jdbc.xa.client.OracleXADataSource" />
<property name="uniqueName" value="jdbc/DS1" />
<property name="maxPoolSize" value="5" />
<property name="allowLocalTransactions" value="true" />
<property name="testQuery" value="SELECT 1 FROM DUAL" />
<property name="driverProperties">
<props>
<prop key="user">myuser</prop>
<prop key="password">myuser</prop>
<prop key="URL">myurl</prop>
</props>
</property>
</bean>
<bean id="btmConfig" factory-method="getConfiguration"
class="bitronix.tm.TransactionManagerServices">
<property name="serverId" value="spring-btm" />
</bean>
<bean id="BitronixTransactionManager"
factory-method="getTransactionManager"
class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig"
destroy-method="shutdown" />
<bean id="JtaTransactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="BitronixTransactionManager" />
<property name="userTransaction" ref="BitronixTransactionManager" />
</bean>
<!-- end of Bitronix Transaction Manager embedded configuration -->
3. and in the code:
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
env.set(EnvironmentName.TRANSACTION_MANAGER,
TransactionManagerServices.getTransactionManager());
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null,
env);
However in the last code I get:
Caused by: java.lang.IllegalStateException:
java.lang.reflect.InvocationTargetException
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:130)
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:54)
at
org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:109)
at
com.mycompany.util.BookWorkflowUtilities.createSession(BookWorkflowUtilities.java:83)
at com.mycompany.util.BookWorkflowService.init(BookWorkflowService.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
... 29 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:116)
... 40 more
Caused by: java.lang.RuntimeException: Could not commit session or rollback
at
org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:133)
... 45 more
Caused by: java.lang.RuntimeException: Unable to rollback transaction
at
org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:184)
at
org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:131)
... 45 more
Caused by: java.lang.NullPointerException
at
org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Caused-by-java-lang-N...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Requesting your help for a Survey on data privacy while using web services
by vishal dwivedi
Dear Drools Flow Users,
We are researchers at Carnegie Mellon University who are conducting a survey
of users who compose web services in their workflows to build applications.
One of the goals of this survey is to better understand the privacy concerns
of web service users (or lack thereof), and how well users are able to
resolve these concerns. Even if you have no data privacy and security
problems while using web services, we would still appreciate your feedback
because that would give us a better perspective of the problem scenario.
Please take time to fill the following questionnaire:
https://www.surveymonkey.com/s/YQP39DG<https://www.surveymonkey.com/s/Y9FM836>
The survey consists of maximum 17 questions and can be completed in about 10
minutes. There are no correct or incorrect responses. This survey is
approved by CMU Institutional Review Board (IRB), and would follow the
appropriate safety protocols set by the IRB (Protocol Number: HS11-091). All
responses would be treated confidentially and will not be traceable to
individual respondents.
Thank you in advance for your assistance and time !!
Best Regards,
Vishal Dwivedi and Kunn Niu
Carnegie Mellon University,
Pittsburgh, USA.
Email: vdwivedi(a)cs.cmu.edu & kunn(a)andrew.cmu.edu
15 years, 6 months