Hi, probably is something that is not allowed in MS SQL Sever2008.<br>Are you using drools 5.1? the trunk?<br>Greetings.<br><br><div class="gmail_quote">On Wed, Aug 4, 2010 at 2:25 AM, XiaoMiTang <span dir="ltr">&lt;<a href="mailto:dingyongchang@hotmail.com">dingyongchang@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
When use the Human Task,some tables were created in DB automatic,but one SQL<br>
statement  occured error is this:<br>
<br>
create table Notification_EmailNotificationHeader<br>
(<br>
   Notification_id numeric(19,0) not null,<br>
   emailHeaders_id numeric(19,0) not null,<br>
   mapkey varchar(255) null,<br>
   primary key (Notification_id, mapkey),<br>
  unique (emailHeaders_id)<br>
)<br>
<br>
the mapkey is nullable,can not be defined as primary key~<br>
Is this a bug? or something wrong with my development enviroment?<br>
Eclipse + tomcat + MS SQL Server2008<br>
Mina 2.0(hibernate-core-3.3.0.SP1.jar)<br>
<br>
persistence.xml is this:<br>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;<br>
&lt;persistence<br>
    version=&quot;1.0&quot;<br>
    xsi:schemaLocation=<br>
      &quot;<a href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><br>
       <a href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><br>
       <a href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><br>
       <a href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a>&quot;<br>
    xmlns:orm=&quot;<a href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a>&quot;<br>
    xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
    xmlns=&quot;<a href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a>&quot;&gt;<br>
<br>
  &lt;persistence-unit name=&quot;org.drools.task&quot;&gt;<br>
    &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;<br>
    &lt;class&gt;org.drools.task.Attachment&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Content&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.BooleanExpression&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Comment&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Deadline&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Comment&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Deadline&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Delegation&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Escalation&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Group&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.I18NText&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Notification&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.EmailNotification&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.EmailNotificationHeader&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.PeopleAssignments&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Reassignment&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Status&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.Task&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.TaskData&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.SubTasksStrategy&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.OnParentAbortAllSubTasksEndStrategy&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.OnAllSubTasksEndParentEndStrategy&lt;/class&gt;<br>
    &lt;class&gt;org.drools.task.User&lt;/class&gt;<br>
<br>
    &lt;properties&gt;<br>
      &lt;property name=&quot;hibernate.dialect&quot;<br>
value=&quot;org.hibernate.dialect.SQLServerDialect&quot;/&gt;<br>
      &lt;property name=&quot;hibernate.connection.driver_class&quot;<br>
value=&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;/&gt;<br>
      &lt;property name=&quot;hibernate.connection.url&quot;<br>
value=&quot;jdbc:sqlserver://192.168.101.91:1433;DatabaseName=BinTest&quot; /&gt;<br>
      &lt;property name=&quot;hibernate.connection.username&quot; value=&quot;sa&quot;/&gt;<br>
      &lt;property name=&quot;hibernate.connection.password&quot; value=&quot;sa&quot;/&gt;<br>
      &lt;property name=&quot;hibernate.connection.autocommit&quot; value=&quot;false&quot; /&gt;<br>
      &lt;property name=&quot;hibernate.max_fetch_depth&quot; value=&quot;3&quot;/&gt;<br>
      &lt;property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;create&quot; /&gt;<br>
      &lt;property name=&quot;hibernate.show_sql&quot; value=&quot;true&quot; /&gt;<br>
    &lt;/properties&gt;<br>
  &lt;/persistence-unit&gt;<br>
&lt;/persistence&gt;<br>
<br>
Can anyone help?<br>
XiaoMiTang<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-using-Human-Task-tp1021453p1021453.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Is-this-a-bug-when-using-Human-Task-tp1021453p1021453.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
 - Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -<br>