不能从Eclipse Luna启动(控制)JBoss 4.2

时间:2015-03-17 15:54:27

标签: eclipse batch-file jboss

我有这个(请求)设置: Windows 7 64位,JBoss 4.2,Eclipse Luna。 JBossAS工具(RedHat的3.0.3.Beta1-v20150220-1545-B124)通过Install New Extension添加。

我可以开始没有问题JBoss externaly - 在它的BAT文件目录中。 但是我无法通过Eclipse启动它 - 它停留在某些状态"介于状态" [启动,同步],所以我无法启动它,停止它,重新启动它,发布,清理甚至连接JRebel,但那是另一个故事。它最终说它已经开始,但它不是。

让我感到困惑的是,exxternally它开始运行正常并且工作正常。同样在其他工作站上,它可以从Eclipse启动/控制而没有任何问题。

我的问题是我该怎么办?

我完全对此错误感到困惑"无法注册驱动程序:COM.ibm.db2.jdbc.app.DB2Driver; - 嵌套throwable:"因为它在外部启动时工作正常,所以我猜配置正常

类似的问题都没有帮助我: Cannot start JBoss from Eclipse

我也检查了这一点,但我没有设置与其中一个回复中显示的设置相同: Starting JBoss from Eclipse

也检查了这个: Tomcat can be started using startup.bat but not from eclipse

并且: JBoss fails to start from Eclipse

在我的案例中,来自eclipse的控制台输出是:

16:25:24,597 INFO  [Server] Starting JBoss (MX MicroKernel)...
16:25:24,597 INFO  [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
16:25:24,598 INFO  [Server] Home Dir: C:\bin\jboss
16:25:24,598 INFO  [Server] Home URL: file:/C:/bin/jboss/
16:25:24,598 INFO  [Server] Patch URL: null
16:25:24,598 INFO  [Server] Server Name: psg
16:25:24,598 INFO  [Server] Server Home Dir: C:\bin\jboss\server\psg
16:25:24,598 INFO  [Server] Server Home URL: file:/C:/bin/jboss/server/psg/
16:25:24,599 INFO  [Server] Server Log Dir: C:\bin\jboss\server\psg\log
16:25:24,599 INFO  [Server] Server Temp Dir: C:\bin\jboss\server\psg\tmp
16:25:24,599 INFO  [Server] Root Deployment Filename: jboss-service.xml
16:25:24,777 INFO  [ServerInfo] Java version: 1.6.0_29,Sun Microsystems Inc.
16:25:24,777 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 20.4-b02,Sun Microsystems Inc.
16:25:24,777 INFO  [ServerInfo] OS-System: Windows 7 6.1,x86
16:25:25,033 INFO  [Server] Core system initialized
16:25:26,387 INFO  [WebService] Using RMI server codebase: http://localhost:8086/
16:25:26,389 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
log4j:WARN Continuable parsing error 302 and column 11
log4j:WARN The content of element type "root" must match "(param*,(priority|level)?,appender-ref*)".
16:25:26,595 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
16:25:26,595 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
16:25:26,679 INFO  [TransactionManagerService] Starting recovery manager
16:25:26,749 INFO  [TransactionManagerService] Recovery manager started
16:25:26,749 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
16:25:27,942 INFO  [EJB3Deployer] Starting java:comp multiplexer
16:25:28,198 INFO  [STDOUT] no object for null
16:25:28,199 INFO  [STDOUT] no object for null
16:25:28,207 INFO  [STDOUT] no object for null
16:25:28,215 INFO  [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
16:25:28,218 INFO  [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
16:25:29,056 INFO  [NativeServerConfig] JBoss Web Services - Native
16:25:29,056 INFO  [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
16:25:29,364 INFO  [SnmpAgentService] SNMP agent going active
16:25:29,429 INFO  [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used

16:25:30,670 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver))
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
....... ommited ....
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:508)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:287)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:170)
    ... 124 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver
    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:272)
    ... 125 more
16:25:30,672 WARN  [ServiceController] Problem starting service jboss.cache:service=TomcatClusteringCache
org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)))
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
    at org.jboss.cache.loader.JDBCCacheLoader$ManagedConnectionFactory.getConnection(JDBCCacheLoader.java:1601)
    at org.jboss.cache.loader.JDBCCacheLoader.start(JDBCCacheLoader.java:753)
    at org.jboss.cache.loader.AsyncCacheLoader.start(AsyncCacheLoader.java:305)
    at org.jboss.cache.loader.CacheLoaderManager.startCacheLoader(CacheLoaderManager.java:353)
    at org.jboss.cache.TreeCache.startService(TreeCache.java:1535)
....... ommited ....
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:508)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver))
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
    ... 116 more
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:287)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:170)
    ... 124 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver
    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:272)
    ... 125 more
16:25:31,039 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
16:25:31,130 INFO  [A] Bound to JNDI name: queue/A
16:25:31,131 INFO  [B] Bound to JNDI name: queue/B
16:25:31,132 INFO  [C] Bound to JNDI name: queue/C
16:25:31,132 INFO  [D] Bound to JNDI name: queue/D
16:25:31,133 INFO  [ex] Bound to JNDI name: queue/ex
16:25:31,143 INFO  [testTopic] Bound to JNDI name: topic/testTopic
16:25:31,143 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
16:25:31,144 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
16:25:31,146 INFO  [testQueue] Bound to JNDI name: queue/testQueue
16:25:31,155 INFO  [UILServerILService] JBossMQ UIL service available at : localhost/127.0.0.1:8093
16:25:31,172 INFO  [DLQ] Bound to JNDI name: queue/DLQ
16:25:31,208 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
16:25:31,213 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- Packages waiting for a deployer ---
org.jboss.deployment.DeploymentInfo@8aafac5d { url=file:/C:/bin/jboss/server/psg/deploy/jboss-web.deployer/ROOT.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/jboss-web.deployer/ROOT.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051328
  mbeans:

org.jboss.deployment.DeploymentInfo@5cf4ae87 { url=file:/C:/bin/jboss/server/psg/deploy/httpha-invoker.sar/invoker.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/httpha-invoker.sar/invoker.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051202
  mbeans:

org.jboss.deployment.DeploymentInfo@e8e6151b { url=file:/C:/bin/jboss/server/psg/deploy/jbossws.sar/jbossws-context.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/jbossws.sar/jbossws-context.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051349
  mbeans:

org.jboss.deployment.DeploymentInfo@8aea0a50 { url=file:/C:/bin/jboss/server/psg/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051387
  mbeans:

org.jboss.deployment.DeploymentInfo@435b5b3f { url=file:/C:/bin/jboss/server/psg/deploy/juddi-service.sar/juddi.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/juddi-service.sar/juddi.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051448
  mbeans:

org.jboss.deployment.DeploymentInfo@68b7867b { url=file:/C:/bin/jboss/server/psg/deploy/management/console-mgr.sar/web-console.war/ }
  deployer: null
  status: Starting
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/management/console-mgr.sar/web-console.war/
  altDD: null
  lastDeployed: 1426605929863
  lastModified: 1426584051642
  mbeans:

org.jboss.deployment.DeploymentInfo@f99a4b2b { url=file:/C:/bin/jboss/server/psg/deploy/jmx-console.war/ }
  deployer: null
  status: null
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/jmx-console.war/
  altDD: null
  lastDeployed: 1426605931210
  lastModified: 1426584051413
  mbeans:

org.jboss.deployment.DeploymentInfo@fa9f8de6 { url=file:/C:/bin/jboss/server/psg/deploy/mc_dev1_4170.war/ }
  deployer: null
  status: null
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/mc_dev1_4170.war/
  altDD: null
  lastDeployed: 1426605931211
  lastModified: 1426588326490
  mbeans:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@f99a4b2b { url=file:/C:/bin/jboss/server/psg/deploy/jmx-console.war/ }
  deployer: null
  status: null
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/jmx-console.war/
  altDD: null
  lastDeployed: 1426605931210
  lastModified: 1426584051413
  mbeans:

org.jboss.deployment.DeploymentInfo@fa9f8de6 { url=file:/C:/bin/jboss/server/psg/deploy/mc_dev1_4170.war/ }
  deployer: null
  status: null
  state: INIT_WAITING_DEPLOYER
  watch: file:/C:/bin/jboss/server/psg/deploy/mc_dev1_4170.war/
  altDD: null
  lastDeployed: 1426605931211
  lastModified: 1426588326490
  mbeans:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.cache:service=TomcatClusteringCache
  State: FAILED
  Reason: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)))
  I Depend On:
    jboss:service=Naming
    jboss:service=TransactionManager
    jboss.aop:service=AspectDeployer
    jboss.jca:service=DataSourceBinding,name=DB2DS
  Depends On Me:
    jboss.web:service=WebServer

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.cache:service=TomcatClusteringCache
  State: FAILED
  Reason: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: COM.ibm.db2.jdbc.app.DB2Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: COM.ibm.db2.jdbc.app.DB2Driver)))
  I Depend On:
    jboss:service=Naming
    jboss:service=TransactionManager
    jboss.aop:service=AspectDeployer
    jboss.jca:service=DataSourceBinding,name=DB2DS
  Depends On Me:
    jboss.web:service=WebServer


16:25:31,237 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 6s:637ms

1 个答案:

答案 0 :(得分:0)

这就是我最终解决这个问题的方法。 Eclipse Luna,JBoss,4.20GA,Windows 7 Pro 64。

  1. 我下载并安装了ibm_data_server_client_win64_V97。这创建了目录C:\ Program Files \ IBM \ SQLLIB \ java,其中有几个文件,这些文件必须使用这些文件: db2java.zip (不确定这个), db2jcc .jar (这是必须的), db2jcc_license_cu.jar (有人说这不是必要的,有些人说这是必须的)。我可以(可能)直接下载那些库,从IBM的DB2 JDBC驱动程序版本和下载"直接下载,但是由于其他原因我需要这个客户端,而且无论如何它似乎库是相同的。
  2. 然后在Eclipse中我将这些jar和zip添加到我的项目中:Project - >属性 - > Java构建路径 - >库标签 - >添加外部jar:然后我导航到" C:\ Program Files \ IBM \ SQLLIB \ java \"并选择所有这些。
  3. 之后,我清理并重建了项目,从Eclipse启动了JBoss,就是这样。它甚至给了(在某种程度上)热部署的可能性。