Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2859

spring3 cause autowire exception

XMLWordPrintable

    • Compatibility/Configuration
    • Workaround Exists
    • Hide

      The workaround is setting autowire false.
      <object class="org.jbpm.pvm.internal.repository.RepositoryCacheImpl"/>

      Show
      The workaround is setting autowire false. <object class="org.jbpm.pvm.internal.repository.RepositoryCacheImpl"/>
    • Hide

      use spring3 with jBPM4

      Show
      use spring3 with jBPM4

      The spring3 includes some beans with type java.util.Map. When the autowire of ObjectDescriptor is true, The ObjectDescriptor will try to find related bean by field type. When a component have fields with type java.util.Map. The ObjectDescriptor will get these beans from spring3 and set them as field value.

      For example, RepositoryCacheImpl have two Map fields: deployments and deploymentClassLoaders. And RepositoryCacheBinding use autowire to configure it. So when we use jBPM with spring3. The deployments field in RepositoryCacheImpl will be auto set value like this:

      {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=D:\apps\jdk1.5.0_15\jre\bin, java.vm.version=1.5.0_15-b04, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator =;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, sun.java.launcher=SUN_STANDARD, user.country=CN, sun.os.patch.level=Service Pack 3, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\svn\jbpm4s ample, java.runtime.version=1.5.0_15-b04, basedir=D:\svn\jbpm4sample, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironm ent, java.endorsed.dirs=D:\apps\jdk1.5.0_15\jre\lib\endorsed, os.arch=x86, surefire.real.class.path=C:\DOCUME~1\ADMINI~1 \LOCALS~1\Temp\surefirebooter30085.jar, java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\, line.separator= , java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=GBK, java.libr ary.path=D:\apps\jdk1.5.0_15\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;d:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1. 1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Cod ecs;C:\Program Files\Subversion\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\M icrosoft SQL Server\90\Tools\binn\;D:\apps\jdk1.5.0_15\bin;D:\apps\apache-ant-1.7.1\bin;D:\apps\apache-maven-2.2.1\bin;d :\Program Files\Google\google_appengine;C:\Program Files\StormII\Codec;C:\Program Files\StormII;D:\apps\AdobeAIRSDK\bin; D:\apps\flex_sdk_3\bin;;, surefire.test.class.path=D:\svn\jbpm4sample\target\test-classes;D:\svn\jbpm4sample\target\clas ses;D:\.m2\repository\org\jbpm\jbpm4\jbpm-jpdl\4.3\jbpm-jpdl-4.3.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-pvm\4.3\jbpm- pvm-4.3.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-api\4.3\jbpm-api-4.3.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-log\4.3 \jbpm-log-4.3.jar;D:\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-test-base\ 4.3\jbpm-test-base-4.3.jar;D:\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar;D:\.m2\repository\org\hibernate\hibernate -core\3.3.1.GA\hibernate-core-3.3.1.GA.jar;D:\.m2\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar;D:\.m2\repository\commons -collections\commons-collections\3.1\commons-collections-3.1.jar;D:\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\ .m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;D:\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar;D:\. m2\repository\org\slf4j\slf4j-api\1.5.2\slf4j-api-1.5.2.jar;D:\.m2\repository\org\slf4j\slf4j-jdk14\1.5.2\slf4j-jdk14-1. 5.2.jar;D:\.m2\repository\com\mockrunner\mockrunner\0.4.1\mockrunner-0.4.1.jar;D:\.m2\repository\org\mockejb\mockejb\0.6 -beta2\mockejb-0.6-beta2.jar;D:\.m2\repository\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar;D:\.m2\repository\juel\juel \2.1.0\juel-2.1.0.jar;D:\.m2\repository\juel\juel-impl\2.1.0\juel-impl-2.1.0.jar;D:\.m2\repository\juel\juel-engine\2.1. 0\juel-engine-2.1.0.jar;D:\.m2\repository\org\beanshell\bsh\2.0b5\bsh-2.0b5.jar;D:\.m2\repository\org\hibernate\hibernat e-entitymanager\3.4.0.GA\hibernate-entitymanager-3.4.0.GA.jar;D:\.m2\repository\org\hibernate\ejb3-persistence\1.0.2.GA\ ejb3-persistence-1.0.2.GA.jar;D:\.m2\repository\org\hibernate\hibernate-commons-annotations\3.1.0.GA\hibernate-commons-a nnotations-3.1.0.GA.jar;D:\.m2\repository\org\hibernate\hibernate-annotations\3.4.0.GA\hibernate-annotations-3.4.0.GA.ja r;D:\.m2\repository\javassist\javassist\3.4.GA\javassist-3.4.GA.jar;D:\.m2\repository\org\livetribe\livetribe-jsr223\2.0 .5\livetribe-jsr223-2.0.5.jar;D:\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar;D:\.m2\repository\javax\activation\ activation\1.1\activation-1.1.jar;D:\.m2\repository\org\hsqldb\hsqldb\1.8.0.10\hsqldb-1.8.0.10.jar;D:\.m2\repository\org \springframework\spring-orm\3.0.2.RELEASE\spring-orm-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-bean s\3.0.2.RELEASE\spring-beans-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-core\3.0.2.RELEASE\spring-co re-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-asm\3.0.2.RELEASE\spring-asm-3.0.2.RELEASE.jar;D:\.m2\ repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\.m2\repository\org\springframework\spring- jdbc\3.0.2.RELEASE\spring-jdbc-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-tx\3.0.2.RELEASE\spring-tx -3.0.2.RELEASE.jar;D:\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\.m2\repository\org\springframewo rk\spring-aop\3.0.2.RELEASE\spring-aop-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-context\3.0.2.RELE ASE\spring-context-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-expression\3.0.2.RELEASE\spring-expres sion-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-test\3.0.2.RELEASE\spring-test-3.0.2.RELEASE.jar;, j ava.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Administrator, user.timezone=Asia/Shanghai, java.awt.print erjob=sun.awt.windows.WPrinterJob, file.encoding=GBK, java.specification.version=1.5, java.class.path=D:\svn\jbpm4sample \target\test-classes;D:\svn\jbpm4sample\target\classes;D:\.m2\repository\org\jbpm\jbpm4\jbpm-jpdl\4.3\jbpm-jpdl-4.3.jar; D:\.m2\repository\org\jbpm\jbpm4\jbpm-pvm\4.3\jbpm-pvm-4.3.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-api\4.3\jbpm-api-4. 3.jar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-log\4.3\jbpm-log-4.3.jar;D:\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.j ar;D:\.m2\repository\org\jbpm\jbpm4\jbpm-test-base\4.3\jbpm-test-base-4.3.jar;D:\.m2\repository\junit\junit\4.8.1\junit- 4.8.1.jar;D:\.m2\repository\org\hibernate\hibernate-core\3.3.1.GA\hibernate-core-3.3.1.GA.jar;D:\.m2\repository\antlr\an tlr\2.7.6\antlr-2.7.6.jar;D:\.m2\repository\commons-collections\commons-collections\3.1\commons-collections-3.1.jar;D:\. m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;D:\.m2\re pository\javax\transaction\jta\1.1\jta-1.1.jar;D:\.m2\repository\org\slf4j\slf4j-api\1.5.2\slf4j-api-1.5.2.jar;D:\.m2\re pository\org\slf4j\slf4j-jdk14\1.5.2\slf4j-jdk14-1.5.2.jar;D:\.m2\repository\com\mockrunner\mockrunner\0.4.1\mockrunner- 0.4.1.jar;D:\.m2\repository\org\mockejb\mockejb\0.6-beta2\mockejb-0.6-beta2.jar;D:\.m2\repository\cglib\cglib-nodep\2.1_ 3\cglib-nodep-2.1_3.jar;D:\.m2\repository\juel\juel\2.1.0\juel-2.1.0.jar;D:\.m2\repository\juel\juel-impl\2.1.0\juel-imp l-2.1.0.jar;D:\.m2\repository\juel\juel-engine\2.1.0\juel-engine-2.1.0.jar;D:\.m2\repository\org\beanshell\bsh\2.0b5\bsh -2.0b5.jar;D:\.m2\repository\org\hibernate\hibernate-entitymanager\3.4.0.GA\hibernate-entitymanager-3.4.0.GA.jar;D:\.m2\ repository\org\hibernate\ejb3-persistence\1.0.2.GA\ejb3-persistence-1.0.2.GA.jar;D:\.m2\repository\org\hibernate\hiberna te-commons-annotations\3.1.0.GA\hibernate-commons-annotations-3.1.0.GA.jar;D:\.m2\repository\org\hibernate\hibernate-ann otations\3.4.0.GA\hibernate-annotations-3.4.0.GA.jar;D:\.m2\repository\javassist\javassist\3.4.GA\javassist-3.4.GA.jar;D :\.m2\repository\org\livetribe\livetribe-jsr223\2.0.5\livetribe-jsr223-2.0.5.jar;D:\.m2\repository\javax\mail\mail\1.4.1 \mail-1.4.1.jar;D:\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;D:\.m2\repository\org\hsqldb\hsqldb \1.8.0.10\hsqldb-1.8.0.10.jar;D:\.m2\repository\org\springframework\spring-orm\3.0.2.RELEASE\spring-orm-3.0.2.RELEASE.ja r;D:\.m2\repository\org\springframework\spring-beans\3.0.2.RELEASE\spring-beans-3.0.2.RELEASE.jar;D:\.m2\repository\org\ springframework\spring-core\3.0.2.RELEASE\spring-core-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-asm \3.0.2.RELEASE\spring-asm-3.0.2.RELEASE.jar;D:\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1. 1.jar;D:\.m2\repository\org\springframework\spring-jdbc\3.0.2.RELEASE\spring-jdbc-3.0.2.RELEASE.jar;D:\.m2\repository\or g\springframework\spring-tx\3.0.2.RELEASE\spring-tx-3.0.2.RELEASE.jar;D:\.m2\repository\aopalliance\aopalliance\1.0\aopa lliance-1.0.jar;D:\.m2\repository\org\springframework\spring-aop\3.0.2.RELEASE\spring-aop-3.0.2.RELEASE.jar;D:\.m2\repos itory\org\springframework\spring-context\3.0.2.RELEASE\spring-context-3.0.2.RELEASE.jar;D:\.m2\repository\org\springfram ework\spring-expression\3.0.2.RELEASE\spring-expression-3.0.2.RELEASE.jar;D:\.m2\repository\org\springframework\spring-t est\3.0.2.RELEASE\spring-test-3.0.2.RELEASE.jar;, user.name=Administrator, java.vm.specification.version=1.0, java.home= D:\apps\jdk1.5.0_15\jre, sun.arch.data.model=32, user.language=zh, java.specification.vendor=Sun Microsystems Inc., awt. toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, sharing, java.version=1.5.0_15, java.ext.dirs=D:\apps\jdk1.5. 0_15\jre\lib\ext, sun.boot.class.path=D:\apps\jdk1.5.0_15\jre\lib\rt.jar;D:\apps\jdk1.5.0_15\jre\lib\i18n.jar;D:\apps\jd k1.5.0_15\jre\lib\sunrsasign.jar;D:\apps\jdk1.5.0_15\jre\lib\jsse.jar;D:\apps\jdk1.5.0_15\jre\lib\jce.jar;D:\apps\jdk1.5 .0_15\jre\lib\charsets.jar;D:\apps\jdk1.5.0_15\jre\classes, java.vendor=Sun Microsystems Inc., localRepository=D:/.m2/re pository, file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=Unico deLittle, sun.cpu.endian=little, sun.desktop=windows, org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk 14Logger, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}

      And it will cause java.lang.NumberFormatException: For input string: "sun.io.unicode.encoding".

      We could change ObjectDescriptor to ignore autowire java.util.Map. Or we could change the SpringContext, when jBPM4 want to get java.util.Map, it should return null.

              rebody HuiSheng Xu (Inactive)
              rebody HuiSheng Xu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: