2012-10-03 73 views
0

我在我的roo中配置了Oracle 10g作爲數據庫。這適用於實體命令,但是當我嘗試使用數據庫逆向工程時,我得到的例外情況如下。任何人都可以請用這個指導我。數據庫反向工程異常javax/management/InstanceAlreadyExistsException Spring Roo

roo> database reverse engineer --schema Exception in thread "Spring Roo JLine Sh 
    ell" java.lang.NoClassDefFoundError: javax/management/InstanceAlreadyExistsExcep 
    tion 
    at java.lang.Class.getDeclaredConstructors0(Native Method) 
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) 
    at java.lang.Class.getConstructor0(Class.java:2699) 
    at java.lang.Class.newInstance0(Class.java:326) 
    at java.lang.Class.newInstance(Class.java:308) 
    at org.springframework.roo.addon.jdbc.polling.internal.CommonJdbcDriverP 
    rovider.loadDriver(CommonJdbcDriverProvider.java:55) 
    at org.springframework.roo.addon.jdbc.polling.internal.PollingJdbcDriver 
    Manager.loadDriver(PollingJdbcDriverManager.java:54) 
    at org.springframework.roo.addon.dbre.jdbc.ConnectionProviderImpl.getCon 
    nection(ConnectionProviderImpl.java:65) 
    at org.springframework.roo.addon.dbre.jdbc.ConnectionProviderImpl.getCon 
    nection(ConnectionProviderImpl.java:46) 
    at org.springframework.roo.addon.dbre.model.DbreModelServiceImpl.getConn 
    ection(DbreModelServiceImpl.java:74) 
    at org.springframework.roo.addon.dbre.model.DbreModelServiceImpl.support 
    sSchema(DbreModelServiceImpl.java:240) 
    at org.springframework.roo.addon.dbre.converter.SchemaConverter.getAllPo 
    ssibleValues(SchemaConverter.java:42) 
    at org.springframework.roo.shell.SimpleParser.completeAdvanced(SimplePar 
    ser.java:537) 
    at org.springframework.roo.shell.jline.JLineCompletorAdapter.complete(JL 
    ineCompletorAdapter.java:35) 
    at jline.ConsoleReader.complete(ConsoleReader.java:936) 
    at jline.ConsoleReader.readLine(ConsoleReader.java:603) 
    at jline.ConsoleReader.readLine(ConsoleReader.java:457) 
    at jline.ConsoleReader.readLine(ConsoleReader.java:283) 
    at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell. 
    java:413) 
    at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:53 
    9) 
    at java.lang.Thread.run(Thread.java:619) 
    Caused by: java.lang.ClassNotFoundException: javax.management.InstanceAlreadyExi 
    stsException not found by [76] 
    at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation 
    (ModuleImpl.java:812) 
    at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72) 
    at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod 
    uleImpl.java:1807) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251) 
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) 
     ... 21 more 

我都需要積極

[ 77] [Active  ] [ 1] Java Resource API (1.5.0) 
[ 78] [Active  ] [ 1] Java Transaction API (1.1.0) 
[ 79] [Active  ] [ 1] Oracle JDBC Driver (10.2.0.2) 

回答

0

好發現問題OSGI模塊,原來我有OSGI驅動安裝Oracle,這是導致一些衝突的兩個單獨的實例。

刪除其中一個驅動程序後,其工作完美無缺。