tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sL07 <lu...@asteriski.com>
Subject Re: EJB classpath problem in eclipse3.5
Date Tue, 08 Sep 2009 22:48:27 GMT


Quintin Beukes-2 wrote:
> 
> Can you please send your InitialContext configuration in the JUnit
> test case, as well as the output you receive when running the test
> case. With this I mean the Stdout+Stderr, not the filtered output IDEs
> usually provide. If I'm not mistaken, you will find this in Eclipse's
> "Console" view.
> 
> 

hey thanks for response. i really appreciate your help.

i have attached both the initial context and the full trace from eclipse
console below.

<initial context>


Properties p = new Properties();
	
			p.put(Context.INITIAL_CONTEXT_FACTORY, 
	          "org.apache.openejb.client.LocalInitialContextFactory");
			
			//classpath issuw for @localclient
			p.put("openejb.tempclassloader.skip", "annotations");
			
			
			p.put("log4j.category.org.hibernate.SQL", "debug");
			p.put("log4j.category.org.hibernate", "debug");
			p.put("log4j.category.OpenEJB.options", "debug");
			p.put("log4j.category.openjpa", "debug");
			p.put("log4j.category.com.asteriski", "debug");
			
	   	   	    
		    p.put("itpDS", "new://Resource?type=DataSource");
	        p.put("itpDS.JdbcDriver", "org.hsqldb.jdbcDriver");
	        p.put("itpDS.JdbcUrl", "jdbc:hsqldb:mem:itpflowdb");

	        p.put("itpNoTxDS", "new://Resource?type=DataSource");
	        p.put("itpNoTxDS.JdbcDriver", "org.hsqldb.jdbcDriver");
	        p.put("itpNoTxDS.JdbcUrl", "jdbc:hsqldb:mem:itpflowdb");
	        p.put("itpNoTxDS.JtaManaged", "false");
	        
	        
		    ctx = new InitialContext( p );
		    
		 // Here's the fun part
	        ctx.bind("inject", this);

</initial context>

i noticed that the EJB directory is referenced in the java.library.path
(C:\src\seamitp\classes\hot;C:\src\seamitp\classes\main;) is this a problem?

It doesnt find the EJBModule in the
C:\src\seamitp\classes\hot;C:\src\seamitp\classes\main, despite setting the
ejb-jar.xml to <ejb-jar/>

< console trace>
DEBUG - Using default 'openejb.nobanner=true'
Apache OpenEJB 3.1.1    build: 20090530-06:18
http://openejb.apache.org/
INFO - openejb.home = C:\src\seamitp\test
INFO - openejb.base = C:\src\seamitp\test
DEBUG - Using default
'openejb.assembler=org.apache.openejb.assembler.classic.Assembler'
DEBUG - Using default 'openejb.jndiname.failoncollision=true'
DEBUG - Using default
'openejb.configurator=org.apache.openejb.config.ConfigurationFactory'
DEBUG - Using default 'openejb.validation.skip=false'
DEBUG - Using default 'openejb.deploymentId.format={ejbName}'
DEBUG - Using default 'openejb.debuggable-vm-hackery=false'
DEBUG - Using default 'openejb.webservices.enabled=true'
DEBUG - Using default 'openejb.vendor.config=geronimo, glassfish, jboss,
weblogic'  Possible values are: geronimo, glassfish, jboss, weblogic
DEBUG - Using default 'openejb.provider.default=org.apache.openejb.embedded'
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=itpDS, type=Resource, provider-id=Default JDBC
Database)
INFO - Configuring Service(id=itpNoTxDS, type=Resource, provider-id=Default
JDBC Database)
DEBUG - Using default 'openejb.deployments.classpath=true'
DEBUG - Using default 'openejb.deployments.classpath.include='
DEBUG - Using default 'openejb.deployments.classpath.exclude=.*'
DEBUG - Using default
'openejb.deployments.classpath.require.descriptor=false'
DEBUG - Using default
'openejb.deployments.classpath.filter.descriptors=false'
DEBUG - Using default 'openejb.deployments.classpath.filter.systemapps=true'
INFO - Found EjbModule in classpath: C:\src\seamitp\test\bin
INFO - Found ClientModule in classpath:
C:\java\openejb-3.1.1\lib\xml-resolver-1.2.jar
INFO - Found ClientModule in classpath: C:\java\javassist\javassist.jar
DEBUG - Using default 'openejb.deployments.classpath.ear=true'
INFO - Beginning load: C:\src\seamitp\test\bin
INFO - Beginning load: C:\java\openejb-3.1.1\lib\xml-resolver-1.2.jar
INFO - Beginning load: C:\java\javassist\javassist.jar
INFO - Configuring enterprise application: classpath.ear
WARN - No application-client.xml found assuming annotations present:
classpath.ear, module: xml-resolver-1.2.jar
WARN - No application-client.xml found assuming annotations present:
classpath.ear, module: javassist.jar
INFO - Configuring PersistenceUnit(name=seamitp,
provider=org.hibernate.ejb.HibernatePersistence)
DEBUG - Using default 'openejb.descriptors.output=false'
DEBUG - Using default 'openejb.descriptors.output=false'
DEBUG - Using default 'openejb.validation.output.level=medium'.  Possible
values are: terse, medium, verbose
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
INFO - PersistenceUnit(name=seamitp,
provider=org.hibernate.ejb.HibernatePersistence)
INFO - Hibernate Annotations 3.4.0.GA
INFO - Hibernate 3.3.1.GA
INFO - hibernate.properties not found
INFO - Bytecode provider name : javassist
INFO - using JDK 1.4 java.sql.Timestamp handling
INFO - Hibernate Commons Annotations 3.1.0.GA
INFO - Hibernate EntityManager 3.4.0.GA
DEBUG - Processing PersistenceUnitInfo [
	name: seamitp
	persistence provider classname: org.hibernate.ejb.HibernatePersistence
	classloader: java.net.URLClassLoader@adae91
	Temporary classloader: org.apache.openejb.core.TempClassLoader@fdfc58
	excludeUnlistedClasses: false
	JTA datasource:
org.apache.openejb.resource.jdbc.BasicManagedDataSource@c22a3b
	Non JTA datasource:
org.apache.openejb.resource.jdbc.BasicDataSource@1629e71
	Transaction type: JTA
	PU root URL: file:/C:/src/seamitp/test/bin/
	Jar files URLs []
	Managed classes names []
	Mapping files names []
	Properties [
		hibernate.transaction.manager_lookup_class:
org.apache.openejb.hibernate.TransactionManagerLookup
		hibernate.dialect: org.hibernate.dialect.HSQLDialect
		hibernate.show_sql: true
		hibernate.hbm2ddl.auto: create-drop]
DEBUG - Detect class: true; detect hbm: true
DEBUG - Detect class: true; detect hbm: true
DEBUG - Searching mapped entities in jar/par: file:/C:/src/seamitp/test/bin/
DEBUG - Filtering: com.asteriski.itpflow.business.ReferenceBusinessTest
DEBUG - Filtering: com.asteriski.itpflow.EJB3TestCase
DEBUG - Filtering: com.asteriski.itpflow.ITPItemBuilder
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
INFO - Hibernate Validator not found: ignoring
DEBUG - No JNDI name configured for binding Ejb3Configuration
DEBUG - Validator not present in classpath, ignoring event listener
registration
DEBUG - Search not present in classpath, ignoring event listener
registration.
INFO - Unable to find org.hibernate.search.event.FullTextIndexEventListener
on the classpath. Hibernate Search is not enabled.
DEBUG - Preparing to build session factory with filters : {}
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
INFO - Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
INFO - Using provided datasource
INFO - RDBMS: HSQL Database Engine, version: 1.8.0
INFO - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
INFO - Using dialect: org.hibernate.dialect.HSQLDialect
INFO - Transaction strategy:
org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
INFO - instantiating TransactionManagerLookup:
org.apache.openejb.hibernate.TransactionManagerLookup
INFO - instantiated TransactionManagerLookup
INFO - Automatic flush during beforeCompletion(): disabled
INFO - Automatic session close at end of transaction: disabled
INFO - JDBC batch size: 15
INFO - JDBC batch updates for versioned data: disabled
INFO - Scrollable result sets: enabled
DEBUG - Wrap result sets: disabled
INFO - JDBC3 getGeneratedKeys(): disabled
INFO - Connection release mode: auto
INFO - Default batch fetch size: 1
INFO - Generate SQL with comments: disabled
INFO - Order SQL updates by primary key: disabled
INFO - Order SQL inserts for batching: disabled
INFO - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO - Using ASTQueryTranslatorFactory
INFO - Query language substitutions: {}
INFO - JPA-QL strict compliance: enabled
INFO - Second-level cache: enabled
INFO - Query cache: disabled
INFO - Cache region factory :
org.hibernate.cache.impl.NoCachingRegionFactory
INFO - Optimize cache for minimal puts: disabled
INFO - Structured second-level cache entries: disabled
INFO - Echoing all SQL to stdout
INFO - Statistics: disabled
INFO - Deleted entity synthetic identifier rollback: disabled
INFO - Default entity-mode: pojo
INFO - Named query checking : enabled
INFO - building session factory
DEBUG - Session factory constructed with filter configurations : {}
DEBUG - instantiating session factory with properties: {java.vendor=Sun
Microsystems Inc., sun.java.launcher=SUN_STANDARD,
sun.management.compiler=HotSpot Client Compiler,
org.apache.openejb.core.security.JaccProvider=org.apache.openejb.core.security.jacc.BasicJaccProvider,
hibernate.ejb.discard_pc_on_close=false,
hibernate.transaction.flush_before_completion=false, os.name=Windows Vista,
sun.boot.class.path=C:\Program
Files\Java\jdk1.6.0_06\jre\lib\endorsed\jaxb-impl.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\resources.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\rt.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\sunrsasign.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\jsse.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\jce.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\lib\charsets.jar;C:\Program
Files\Java\jdk1.6.0_06\jre\classes,
javax.security.jacc.PolicyConfigurationFactory.provider=org.apache.openejb.core.security.JaccProvider$Factory,
sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc.,
java.runtime.version=1.6.0_06-b02, hibernate.connection.autocommit=true,
user.name=lucio, derby.storage.fileSyncTransactionLog=true,
hibernate.connection.release_mode=auto, user.language=en,
derby.system.home=C:\src\seamitp\test, sun.boot.library.path=C:\Program
Files\Java\jdk1.6.0_06\jre\bin, openjpa.Log=log4j, java.version=1.6.0_06,
user.timezone=Australia/Brisbane, sun.arch.data.model=32,
java.endorsed.dirs=C:\Program Files\Java\jdk1.6.0_06\jre\lib\endorsed,
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386
i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, file.separator=\,
java.specification.name=Java Platform API Specification,
java.class.version=50.0, user.country=AU, java.home=C:\Program
Files\Java\jdk1.6.0_06\jre, java.vm.info=mixed mode, os.version=6.0,
hibernate.transaction.factory_class=org.hibernate.ejb.transaction.JoinableCMTTransactionFactory,
hibernate.query.jpaql_strict_compliance=true, path.separator=;,
java.vm.version=10.0-b22, user.variant=,
java.awt.printerjob=sun.awt.windows.WPrinterJob,
sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit,
java.naming.factory.url.pkgs=org.apache.openejb.core.ivm.naming,
user.home=C:\Users\lucio, openejb.version=3.1.1,
java.specification.vendor=Sun Microsystems Inc.,
hibernate.hbm2ddl.auto=create-drop, java.library.path=C:\Program
Files\Java\jdk1.6.0_06\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common
Files\Roxio Shared\10.0\DLLShared\;c:\cygwin\bin;C:\Program
Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server
5.1\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program
Files\Subversion\bin, java.vendor.url=http://java.sun.com/,
java.vm.vendor=Sun Microsystems Inc.,
hibernate.dialect=org.hibernate.dialect.HSQLDialect,
java.runtime.name=Java(TM) SE Runtime Environment,
java.class.path=C:\src\seamitp\test\bin;C:\java\openejb-3.1.1\lib\activeio-core-3.0.0-incubator.jar;C:\java\openejb-3.1.1\lib\activemq-core-4.1.1.jar;C:\java\openejb-3.1.1\lib\activemq-ra-4.1.1.jar;C:\java\openejb-3.1.1\lib\backport-util-concurrent-2.1.jar;C:\java\openejb-3.1.1\lib\bcprov-jdk15-140.jar;C:\java\openejb-3.1.1\lib\commons-cli-1.1.jar;C:\java\openejb-3.1.1\lib\commons-collections-3.2.jar;C:\java\openejb-3.1.1\lib\commons-dbcp-all-1.3-r699049.jar;C:\java\openejb-3.1.1\lib\commons-lang-2.1.jar;C:\java\openejb-3.1.1\lib\commons-logging-1.1.jar;C:\java\openejb-3.1.1\lib\commons-pool-1.3.jar;C:\java\openejb-3.1.1\lib\cxf-bundle-2.0.9.jar;C:\java\openejb-3.1.1\lib\ejb31-api-experimental-3.1.1.jar;C:\java\openejb-3.1.1\lib\geronimo-connector-2.1.jar;C:\java\openejb-3.1.1\lib\geronimo-javamail_1.4_mail-1.2.jar;C:\java\openejb-3.1.1\lib\geronimo-transaction-2.1.jar;C:\java\openejb-3.1.1\lib\howl-1.0.1-1.jar;C:\java\openejb-3.1.1\lib\hsqldb-1.8.0.7.jar;C:\java\openejb-3.1.1\lib\javaee-api-5.0-2.jar;C:\java\openejb-3.1.1\lib\jaxb-impl-2.0.5.jar;C:\java\openejb-3.1.1\lib\log4j-1.2.12.jar;C:\java\openejb-3.1.1\lib\neethi-2.0.4.jar;C:\java\openejb-3.1.1\lib\openejb-api-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-client-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-core-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-cxf-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-ejbd-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-hsql-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-http-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-javaagent-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-jee-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-loader-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-multicast-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-server-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-telnet-3.1.1.jar;C:\java\openejb-3.1.1\lib\openejb-webservices-3.1.1.jar;C:\java\openejb-3.1.1\lib\openjpa-1.2.0.jar;C:\java\openejb-3.1.1\lib\opensaml-1.1.jar;C:\java\openejb-3.1.1\lib\quartz-1.5.2.jar;C:\java\openejb-3.1.1\lib\saaj-impl-1.3.jar;C:\java\openejb-3.1.1\lib\serp-1.13.1.jar;C:\java\openejb-3.1.1\lib\stax-api-1.0.1.jar;C:\java\openejb-3.1.1\lib\swizzle-stream-1.0.1.jar;C:\java\openejb-3.1.1\lib\wsdl4j-1.6.1.jar;C:\java\openejb-3.1.1\lib\wss4j-1.5.4.jar;C:\java\openejb-3.1.1\lib\wstx-asl-3.2.0.jar;C:\java\openejb-3.1.1\lib\xbean-asm-shaded-3.6-r779512.jar;C:\java\openejb-3.1.1\lib\xbean-finder-shaded-3.6-r779512.jar;C:\java\openejb-3.1.1\lib\xbean-naming-3.5.jar;C:\java\openejb-3.1.1\lib\xbean-reflect-3.6-r779512.jar;C:\java\openejb-3.1.1\lib\xml-resolver-1.2.jar;C:\java\openejb-3.1.1\lib\XmlSchema-1.4.2.jar;C:\java\openejb-3.1.1\lib\xmlsec-1.4.0.jar;C:\downloads\junit\junit4.7\junit4.7\junit-4.7.jar;C:\src\seamitp\lib\hibernate-annotations.jar;C:\src\seamitp\lib\hibernate-commons-annotations.jar;C:\src\seamitp\lib\hibernate-core.jar;C:\src\seamitp\lib\hibernate-entitymanager.jar;C:\java\javassist\javassist.jar;C:\java\slf4j\sl4j-1.5.2\slf4j-api-1.5.2.jar;C:\java\slf4j\sl4j-1.5.2\slf4j-log4j12-1.5.2.jar;C:\src\seamitp\lib\dom4j.jar;C:\src\seamitp\lib\activation.jar;C:\src\seamitp\lib\antlr.jar;C:\src\seamitp\lib\antlr-runtime.jar;C:\src\seamitp\classes\hot;C:\src\seamitp\classes\main;/C:/eclipse3.5/eclipse/configuration/org.eclipse.osgi/bundles/310/1/.cp/;/C:/eclipse3.5/eclipse/configuration/org.eclipse.osgi/bundles/308/1/.cp/;/C:/eclipse3.5/eclipse/configuration/org.eclipse.osgi/bundles/309/1/.cp/,
hibernate.bytecode.use_reflection_optimizer=false,
java.vm.specification.name=Java Virtual Machine Specification,
java.vm.specification.version=1.0, sun.cpu.endian=little,
sun.os.patch.level=Service Pack 1,
hibernate.connection.provider_class=org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider,
java.io.tmpdir=C:\Users\lucio\AppData\Local\Temp\,
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86,
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment,
java.ext.dirs=C:\Program
Files\Java\jdk1.6.0_06\jre\lib\ext;C:\Windows\Sun\Java\lib\ext,
user.dir=C:\src\seamitp\test, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM,
java.security.auth.login.config=jar:file:/C:/java/openejb-3.1.1/lib/openejb-core-3.1.1.jar!/login.config,
file.encoding=Cp1252, hibernate.use_identifier_rollback=false,
noBanner=true,
hibernate.transaction.manager_lookup_class=org.apache.openejb.hibernate.TransactionManagerLookup,
java.specification.version=1.6, hibernate.show_sql=true}
DEBUG - initializing class SessionFactoryObjectFactory
DEBUG - registered: f2c9904b239bc7dc01239bc7dce40000 (unnamed)
INFO - Not binding factory to JNDI, no JNDI name configured
DEBUG - instantiated session factory
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
INFO - Running hbm2ddl schema export
DEBUG - import file not found: /import.sql
INFO - exporting generated schema to database
INFO - schema export complete
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
DEBUG - processing fk mappings (*ToOne and JoinedSubclass)
DEBUG - processing extends queue
DEBUG - processing collection mappings
DEBUG - processing native query and ResultSetMapping mappings
DEBUG - processing association property references
DEBUG - processing foreign key constraints
DEBUG - obtaining JTA TransactionManager
DEBUG - Checking 0 named HQL queries
DEBUG - Checking 0 named SQL queries
DEBUG - Using default
'openejb.jndiname.strategy.class=org.apache.openejb.assembler.classic.JndiBuilder$TemplatedStrategy'
DEBUG - Using default
'openejb.jndiname.format={deploymentId}{interfaceType.annotationName}'
INFO - Deployed Application(path=classpath.ear)
DEBUG - opened session at timestamp: 12524490499
DEBUG - Looking for a JTA transaction to join
DEBUG - successfully registered Synchronization

< console trace>

-- 
View this message in context: http://www.nabble.com/EJB-classpath-problem-in-eclipse3.5-tp25343341p25355519.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message