5 Replies Latest reply on May 29, 2007 11:37 AM by Jakub Wozniakowski

    JBPM configuration: no ObjectInfo class specified for elemen

    Jakub Wozniakowski Newbie

      Hello,

      I am using jbpm configuration file for configuring my object factory. Currently I am working with repository configuration and need to define bean with following constructor:

      javax.jcr.SimpleCredentials(java.lang.String userID, char[] password);

      The second argument is array of chars, according to docs bean's declaration should look like this:

      <bean name="credentials" class="javax.jcr.SimpleCredentials">
       <constructor>
       <parameter class="java.lang.String">
       <string>username</string>
       </parameter>
       <parameter class="char[]">
       <array class="char[]" elementClass="char">
       <value>p</value>
       <value>a</value>
       <value>s</value>
       <value>s</value>
       <value>w</value>
       <value>o</value>
       <value>r</value>
       <value>d</value>
       </array>
       </parameter>
       </constructor>
      </bean>


      When deploying project I get exception:

      Caused by: org.jbpm.JbpmException: no ObjectInfo class specified for element 'array'



      Stack:

      12:32:07,553 ERROR [[/Bpm]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'jbpm.cfg.xml'
       at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:284)
       at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:256)
       at org.jboss.seam.core.Jbpm.initJbpmConfiguration(Jbpm.java:93)
       at org.jboss.seam.core.Jbpm.getJbpmConfiguration(Jbpm.java:84)
       at org.jboss.seam.core.Jbpm.installProcessDefinitions(Jbpm.java:220)
       at org.jboss.seam.core.Jbpm.startup(Jbpm.java:66)
       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:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
       at org.jboss.seam.Component.callComponentMethod(Component.java:1802)
       at org.jboss.seam.Component.callCreateMethod(Component.java:1725)
       at org.jboss.seam.Component.newInstance(Component.java:1714)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:165)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:137)
       at org.jboss.seam.init.Initialization.init(Initialization.java:479)
       at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
       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:585)
       at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
       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:585)
       at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy38.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy39.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.12:32:07,558 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
      loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: org.jbpm.JbpmException: couldn't parse 'bean' into a 'org.jbpm.configuration.BeanInfo': <?xml version="1.0" encoding="UTF-8"?><bean class="javax.jcr.SimpleCredentials" name="credentials">
       <constructor>
       <parameter class="java.lang.String">
       <string>username</string>
       </parameter>
       <parameter class="char[]">
       <array class="char[]" elementClass="char">
       <value>p</value>
       <value>a</value>
       <value>s</value>
       <value>s</value>
       <value>w</value>
       <value>o</value>
       <value>r</value>
       <value>d</value>
       </array>
       </parameter>
       </constructor>
       </bean>
       at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:144)
       at org.jbpm.configuration.ObjectFactoryParser.parseElements(ObjectFactoryParser.java:117)
       at org.jbpm.configuration.ObjectFactoryParser.parseElementsStream(ObjectFactoryParser.java:110)
       at org.jbpm.JbpmConfiguration.parseObjectFactory(JbpmConfiguration.java:303)
       at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:280)
       ... 108 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:494)
       at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:142)
       ... 112 more
      Caused by: org.jbpm.JbpmException: no ObjectInfo class specified for element 'array'
       at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:139)
       at org.jbpm.configuration.ConstructorInfo.<init>(ConstructorInfo.java:89)
       at org.jbpm.configuration.BeanInfo.<init>(BeanInfo.java:49)
       ... 117 more



      I have looked at source files: org.jbpm.configuration.ObjectFactoryParser org.jbpm.JbpmConfiguration - it seems there is no mapping for array element defined:


      public static Map getDefaultMappings() {
       if (defaultMappings==null) {
       defaultMappings = new HashMap();
       addMapping(defaultMappings, "bean", BeanInfo.class);
       addMapping(defaultMappings, "ref", RefInfo.class);
       addMapping(defaultMappings, "list", ListInfo.class);
       addMapping(defaultMappings, "map", MapInfo.class);
       addMapping(defaultMappings, "string", StringInfo.class);
       addMapping(defaultMappings, "int", IntegerInfo.class);
       addMapping(defaultMappings, "integer", IntegerInfo.class);
       addMapping(defaultMappings, "long", LongInfo.class);
       addMapping(defaultMappings, "float", FloatInfo.class);
       addMapping(defaultMappings, "double", DoubleInfo.class);
       addMapping(defaultMappings, "char", CharacterInfo.class);
       addMapping(defaultMappings, "character", CharacterInfo.class);
       addMapping(defaultMappings, "boolean", BooleanInfo.class);
       addMapping(defaultMappings, "true", BooleanInfo.class);
       addMapping(defaultMappings, "false", BooleanInfo.class);
       addMapping(defaultMappings, "null", NullInfo.class);
       addMapping(defaultMappings, "jbpm-context", JbpmContextInfo.class);
       addMapping(defaultMappings, "jbpm-type", JbpmTypeObjectInfo.class);
       }
       return defaultMappings;
       }


      I think this is jbpm bug. Is there another way to define array of chars?

      Using JBoss AS 4.0.5, JBPM 3.1.4.