db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sergan_m <serga...@yahoo.com>
Subject Problem: deployment on JBOSS with external Derby DB.
Date Wed, 27 May 2009 09:04:45 GMT

Hello everyone, i'm new here....

I try to deploy a big RAP Project(110 jars) on JBOSS 4.2.3 Server with using
of external Derby DB as data-source. When I deploy my Project("finca27.war")
95 from 110 jar where deployed and where set as ACTIVE, but another 15 only
as RESOLVED, because the Connection with derby faild :( 

   I have create the "derby-ds.xml" with user and password in Deploy Folder
of the Jboss.
Anywhere I have read that Derby needs "PERSISTENCE.XML". I have created it
also, but I don't know where to put it in my Project with, which I create my
"finca27.war". I have put it on the WEB-INF Folder, but EclipseLink didn't
see it... :(  WHERE TO PUT THIS "PERSISTENCE.XML" for deployment???

PLEASE HELP!!! I have a battle with deployment on JBOSS for a long time
With your help, I hope I'll win this battle ;)

Thank you!!! 

Here is my "DERBY-DS.XML":
<?xml version="1.0" encoding="UTF-8"?>

<!-- The Derby embedded database JCA connection factory config
$Id: derby-ds.xml,v 1.1.4.1 2004/11/03 13:28:39 loubyansky Exp $ -->

<datasources>
   <local-tx-datasource>

      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
      <!-- Datasources are not available outside the virtual machine -->
      <jndi-name>DerbyDS</jndi-name>

      <!-- for in-process persistent db, saved when jboss stops. The
      org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db
shutdown -->
      <connection-url>jdbc:derby://localhost:23950/FINCAEVT</connection-url>

      <!-- The driver class -->
      <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>

      <!-- The login and password -->
      <user-name>webadmin</user-name>
      <password>webadmin</password>

      <!-- The minimum connections in a pool/sub-pool. Pools are lazily
constructed on first use -->
      <min-pool-size>5</min-pool-size>

      <!-- The maximum connections in a pool/sub-pool -->
      <max-pool-size>20</max-pool-size>

      <!-- The time before an unused connection is destroyed -->
      <idle-timeout-minutes>5</idle-timeout-minutes>

      <!-- Whether to check all statements are closed when the connection is
returned to the pool,
           this is a debugging feature that should be turned off in
production -->
      <track-statements></track-statements>

      <!-- This mbean can be used when using in process persistent derby -->
      <depends>jboss:service=Derby</depends>
   </local-tx-datasource> 
   
   <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby">
     <attribute name="Database">FINCAEVT</attribute>
   </mbean>   
</datasources>

Here is my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
  <persistence-unit name="FINCAEVT">

<jta-data-source>java:DerbyDS</jta-data-source> 
<properties> 
        <property name="eclipselink.jdbc.url"
value="jdbc:derby://localhost:23950/FINCAEVT;create=true" />
        <property name="eclipselink.jdbc.driver"
value="org.apache.derby.jdbc.ClientDriver" />
        <property name="eclipselink.jdbc.user" value="webadmin" />
        <property name="eclipselink.jdbc.password" value="webadmin" />
        <property name="eclipselink.ddl-generation"
value="drop-and-create-tables" />
        <property name="eclipselink.ddl-generation.output-mode"
value="database" />
        <property name="eclipselink.logging.level" value="SEVERE"/>
        <property name="eclipselink.session-name"
value="finca.dblayer.events.session" />
</properties>

  </persistence-unit>
</persistence>

Here are my logs, which I see when I deploy the Project:
10:22:44,556 INFO  [Server] Starting JBoss (MX MicroKernel)...
10:22:44,556 INFO  [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build:
SVNTag=JBoss_4_2_3_GA date=200807181417)
10:22:44,556 INFO  [Server] Home Dir:
C:\Mazurean\JAVA\Install\jboss-4.2.3.GA
10:22:44,556 INFO  [Server] Home URL:
file:/C:/Mazurean/JAVA/Install/jboss-4.2.3.GA/
10:22:44,572 INFO  [Server] Patch URL: null
10:22:44,572 INFO  [Server] Server Name: default
10:22:44,572 INFO  [Server] Server Home Dir:
C:\Mazurean\JAVA\Install\jboss-4.2.3.GA\server\default
10:22:44,572 INFO  [Server] Server Home URL:
file:/C:/Mazurean/JAVA/Install/jboss-4.2.3.GA/server/default/
10:22:44,572 INFO  [Server] Server Log Dir:
C:\Mazurean\JAVA\Install\jboss-4.2.3.GA\server\default\log
10:22:44,572 INFO  [Server] Server Temp Dir:
C:\Mazurean\JAVA\Install\jboss-4.2.3.GA\server\default\tmp
10:22:44,572 INFO  [Server] Root Deployment Filename: jboss-service.xml
10:22:44,838 INFO  [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
10:22:44,838 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM
11.3-b02,Sun Microsystems Inc.
10:22:44,838 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
10:22:45,119 INFO  [Server] Core system initialized
10:22:47,025 INFO  [WebService] Using RMI server codebase:
http://localhost:8083/
10:22:47,025 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL:
resource:jboss-log4j.xml
10:22:47,385 INFO  [TransactionManagerService] JBossTS Transaction Service
(JTA version) - JBoss Inc.
10:22:47,385 INFO  [TransactionManagerService] Setting up property manager
MBean and JMX layer
10:22:47,619 INFO  [TransactionManagerService] Starting recovery manager
10:22:47,697 INFO  [TransactionManagerService] Recovery manager started
10:22:47,697 INFO  [TransactionManagerService] Binding TransactionManager
JNDI Reference
10:22:49,807 INFO  [EJB3Deployer] Starting java:comp multiplexer
10:22:51,838 INFO  [NativeServerConfig] JBoss Web Services - Native
10:22:51,838 INFO  [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA
(build=200803312044)
10:22:52,573 INFO  [Embedded] Catalina naming disabled
10:22:52,713 INFO  [AprLifecycleListener] The Apache Tomcat Native library
which allows optimal performance in production environments was not found on
the java.library.path: C:\Program
Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;native
10:22:52,760 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on
http-localhost%2F127.0.0.1-8080
10:22:52,760 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on
ajp-localhost%2F127.0.0.1-8009
10:22:52,760 INFO  [Catalina] Initialization processed in 185 ms
10:22:52,760 INFO  [StandardService] Starting service jboss.web
10:22:52,760 INFO  [StandardEngine] Starting Servlet Engine:
JBossWeb/2.0.1.GA
10:22:52,807 INFO  [Catalina] Server startup in 41 ms
10:22:52,901 INFO  [TomcatDeployer] deploy, ctxPath=/,
warUrl=.../deploy/jboss-web.deployer/ROOT.war/
10:22:53,589 INFO  [TomcatDeployer] deploy, ctxPath=/invoker,
warUrl=.../deploy/http-invoker.sar/invoker.war/
10:22:53,682 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws,
warUrl=.../deploy/jbossws.sar/jbossws-context.war/
10:22:53,792 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil,
warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
10:22:54,385 INFO  [TomcatDeployer] deploy, ctxPath=/web-console,
warUrl=.../deploy/management/console-mgr.sar/web-console.war/
10:22:54,776 INFO  [MailService] Mail Service bound to java:/Mail
10:22:54,948 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
10:22:54,979 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
10:22:55,011 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
10:22:55,042 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
10:22:55,104 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jms/jms-ra.rar
10:22:55,136 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/mail-ra.rar
10:22:55,182 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/quartz-ra.rar
10:22:55,198 INFO  [QuartzResourceAdapter] start quartz!!!
10:22:55,245 INFO  [SimpleThreadPool] Job execution threads will use class
loader of thread: main
10:22:55,276 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
10:22:55,276 INFO  [RAMJobStore] RAMJobStore initialized.
10:22:55,276 INFO  [StdSchedulerFactory] Quartz scheduler
'DefaultQuartzScheduler' initialized from default resource file in Quartz
package: 'quartz.properties'
10:22:55,276 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
10:22:55,276 INFO  [QuartzScheduler] Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED started.
10:22:55,432 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=DerbyDS' to JNDI name
'java:DerbyDS'
10:22:55,542 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name
'java:JmsXA'
10:23:05,730 INFO  [TomcatDeployer] deploy, ctxPath=/finca33,
warUrl=.../tmp/deploy/tmp7371735388924788007finca33-exp.war/
10:23:06,559 INFO  [STDOUT] 
osgi> 
10:23:08,262 INFO  [STDOUT] Persistence bundle starting...
10:23:08,262 INFO  [STDOUT] Persistence bundle started.
10:23:08,371 INFO  [STDOUT] ProviderTracker: New service detected...
10:23:08,371 INFO  [STDOUT] ProviderTracker: Added service
org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi
10:23:09,871 INFO  [STDOUT] [EL Info]: 2009.05.27
10:23:09.871--ServerSession(24533683)--EclipseLink, version: Eclipse
Persistence Services - 1.0.2 (Build 20081024)
10:23:09,871 INFO  [STDOUT] Exception caught: Exception [EclipseLink-4021]
(Eclipse Persistence Services - 1.0.2 (Build 20081024)):
org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Unable to acquire a connection from driver [null],
user [null] and URL [null].  Verify that you have set the expected driver
class and URL.  Check your login, persistence.xml or sessions.xml resource. 
The jdbc.driver property should be set to a class that is compatible with
your database platform
10:23:09,871 ERROR [STDERR] Local Exception Stack: 
Exception [EclipseLink-4021] (Eclipse Persistence Services - 1.0.2 (Build
20081024)): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Unable to acquire a connection from driver [null],
user [null] and URL [null].  Verify that you have set the expected driver
class and URL.  Check your login, persistence.xml or sessions.xml resource. 
The jdbc.driver property should be set to a class that is compatible with
your database platform
	at
org.eclipse.persistence.exceptions.DatabaseException.unableToAcquireConnectionFromDriverException(DatabaseException.java:365)
	at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:90)
	at
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:164)
	at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:570)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:209)
	at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:246)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:69)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:118)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:112)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:100)
	at
de.cenit.eb.sm.finca.functional.dblayer.events.internal.JpaUtils.createEntityManager(Unknown
Source)
	at
de.cenit.eb.sm.finca.functional.dblayer.events.internal.JpaUtils.create(Unknown
Source)
	at
de.cenit.eb.sm.finca.functional.dblayer.events.internal.DefaultEventFromDatabaseService.activate(Unknown
Source)
	at
de.cenit.eb.sm.finca.functional.dblayer.events.internal.OsgiEventFromDatabaseService.activate(Unknown
Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.eclipse.equinox.ds.instance.InvokeMethod.invokeMethod(InvokeMethod.java:144)
	at
org.eclipse.equinox.ds.instance.InvokeMethod.activateComponent(InvokeMethod.java:60)
	at
org.eclipse.equinox.ds.instance.BuildDispose.activate(BuildDispose.java:672)
	at
org.eclipse.equinox.ds.instance.BuildDispose.buildComponentConfigInstance(BuildDispose.java:122)
	at
org.eclipse.equinox.ds.instance.InstanceProcess.registerComponentConfigurations(InstanceProcess.java:145)
	at org.eclipse.equinox.ds.resolver.Resolver.dispatchWork(Resolver.java:701)
	at
org.eclipse.equinox.ds.workqueue.WorkQueue$Queued.dispatch(WorkQueue.java:57)
	at org.eclipse.equinox.ds.workqueue.WorkQueue.run(WorkQueue.java:108)
10:23:09,903 ERROR [STDERR] 27.05.2009 10:23:09
org.eclipse.equinox.log.LogEntry
INFO: ServiceEvent REGISTERED
10:23:09,918 ERROR [STDERR] 27.05.2009 10:23:09
org.eclipse.equinox.log.LogEntry
INFO: ServiceEvent REGISTERED

-- 
View this message in context: http://www.nabble.com/Problem%3A-deployment-on-JBOSS-with-external-Derby-DB.-tp23738730p23738730.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message