[JBoss Seam] - Re: Can't get seam generate-entities to work.
by kingcu
Ok, it looks like lower/upper case does matter for seam-gen. I used "WAS" as the schema name, which matches exactly what I see in Oracle Enterprise Manager, however, I got the following exceptions. Any idea?
| Buildfile: C:\jboss-seam-1.2.1.GA\seam-gen\build.xml
|
| validate-workspace:
|
| validate-project:
|
| generate-entities:
| [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
| [hibernate] 1. task: hbm2java (Generates a set of .java files)
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.cfg.Environment <clinit>
| [hibernate] INFO: Hibernate 3.2.0.cr5
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.cfg.Environment <clinit>
| [hibernate] INFO: hibernate.properties not found
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.cfg.Environment buildBytecodeProvider
| [hibernate] INFO: Bytecode provider name : cglib
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.cfg.Environment <clinit>
| [hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.cfg.reveng.OverrideRepository addFile
| [hibernate] INFO: Override file: C:\workspace\seam-gen-projects\seam-gen-was\resources\seam-gen.reveng.xml
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.connection.DriverManagerConnectionProvider configure
| [hibernate] INFO: Using Hibernate built-in connection pool (not for production use!)
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.connection.DriverManagerConnectionProvider configure
| [hibernate] INFO: Hibernate connection pool size: 20
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.connection.DriverManagerConnectionProvider configure
| [hibernate] INFO: autocommit mode: false
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.connection.DriverManagerConnectionProvider configure
| [hibernate] INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:wt
| [hibernate] Mar 29, 2007 9:48:07 AM org.hibernate.connection.DriverManagerConnectionProvider configure
| [hibernate] INFO: connection properties: {user=was, password=****}
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
| [hibernate] With the Partitioning, OLAP and Data Mining options
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.dialect.Dialect <init>
| [hibernate] INFO: Using dialect: org.hibernate.dialect.OracleDialect
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
| [hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
| [hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Automatic flush during beforeCompletion(): disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Automatic session close at end of transaction: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: JDBC batch size: 15
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: JDBC batch updates for versioned data: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Scrollable result sets: enabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: JDBC3 getGeneratedKeys(): disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Connection release mode: auto
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Default schema: WAS
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Default batch fetch size: 1
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Generate SQL with comments: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Order SQL updates by primary key: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
| [hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
| [hibernate] INFO: Using ASTQueryTranslatorFactory
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Query language substitutions: {}
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: JPA-QL strict compliance: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Second-level cache: enabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Query cache: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory createCacheProvider
| [hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Optimize cache for minimal puts: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Structured second-level cache entries: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Statistics: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.SettingsFactory buildSettings
| [hibernate] INFO: Default entity-mode: pojo
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.reveng.JDBCReader processIndices
| [hibernate] WARNING: Exception while trying to get indexinfo on BIN$8J936SbLQsGfoSwymQr4HA==$0=Exception while getting index info for WAS.BIN$8J936SbLQsGfoSwymQr4HA==$0
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.cfg.reveng.JDBCReader processIndices
| [hibernate] WARNING: Exception while trying to get indexinfo on BIN$BlVHaFjNTbSN2ewoWXdmNg==$0=Exception while getting index info for WAS.BIN$BlVHaFjNTbSN2ewoWXdmNg==$0
| [hibernate] Mar 29, 2007 9:48:08 AM org.hibernate.connection.DriverManagerConnectionProvider close
| [hibernate] INFO: cleaning up connection pool: jdbc:oracle:thin:@localhost:1521:wt
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032791#4032791
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032791
19Â years
[JBoss Seam] - entityManager.persist(Object) not working?
by smeaggie
Hello all, I have a small question I don't know if the Seam forum is the right place to post, but I use a seam managed entity manager and it's behaviour puzzles me... A very simplified sitation sketch:
data class:
| @Entity()
| @Name("data")
| public class Data implements Serializable {
| // field declarations here (plus getters and setters)
| }
|
Bean code:
| @Name("importService")
| @Scope(ScopeType.CONVERSATION)
| public class ImportService implements Serializable {
| @In()
| private EntityManager entityManager;
|
| public void parse(Document d) {
| Data data = new Data();
| // Document d is an XML file, wich is parsed, all values are set in
| // the data object
|
| this.entityManager.persist(data);
| // I hoped the data would be saved by now...
| }
| }
|
Also I have this in components.xml:
| <core:managed-persistence-context name="entityManager"
| auto-create="true"
| persistence-unit-jndi-name="java:/MyEntityManagerFactory"/>
|
And persistence.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- Persistence deployment descriptor for dev profile -->
| <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
| http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
| <persistence-unit name="MyDBUnit">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/MyDatasource</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/MyEntityManagerFactory"/>
| </properties>
| </persistence-unit>
| </persistence>
|
On deploy time, the database table Data is created perfectly, I get all the SQL statements on my console log. No problem. If I manually insert data, I can query for the data using this.entityManager.createQuery("from Data data"); even INSIDE the parse method of the bean, again I see the SQL statement in my console log. But on the entityManager.persist(data) call, there's no SQL statement executed. I surrounded the call with a try { ... } catch (Exception e) { ... } block but there are NO exceptions thrown. Just no data is saved :(
Can someone help me with this please? I really don't understand why data is not saved...!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032784#4032784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032784
19Â years
[JBoss jBPM] - Re: Assign a generic sub-process task in the parent process?
by avbentem
"kukeltje" wrote : Additional info reagarding the assignment in swimlanes
Thanks!
But so far no luck setting the swimlane to start with; no matter where I try to get my event handler invoked, the injected TaskInstance is always null when invoked from a parent process.
For example:
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="survey">
| :
| <task-node name="survey">
| <task name="survey">
| <!-- The same results for task-start or task-assign -->
| <event type="task-create">
| <action name=".." expression="#{taskAssigner.setSwimlane}" />
| </event>
| </task>
| :
| </task-node>
| </process-definition>
And likewise when setting the event handler on the task-node:
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="survey">
| :
| <task-node name="survey">
| <event type="node-enter">
| <action name=".." expression="#{taskAssigner.setSwimlane}" />
| </event>
| <task name="survey">
| :
| </task>
| :
| </task-node>
| </process-definition>
When starting the sub-process directly (so, not from within some process-state in a parent process) then I do get a TaskInstance injected though...
Like I said: to be continued... I hope!
Arjan.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032781#4032781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032781
19Â years
[JBossCache] - Re: CacheAPI
by manik.surtaniï¼ jboss.com
Remember that these tests are not how user code would typically interact with the library.
Beyond that, I agree that eople would start referring to tests and copy stuff. A lot of the test cases were carried forward from the 1.x series where certain methods such as locks, etc. were available in TreeCache and these were used to test outcomes of operations. The quickest way to port the tests was to use a cast. In future this will go away, using proper mock objects or interceptors where possible, to inspect internals.
The purpose of the SPIs are to provide an insight into the cache internals. Internals that are not needed for normal usage. These are available to people extending the cache or writing plugins, such as eviction policies, cache loaders and interceptors.
If you are looking at changing the way locks work (upgrading if necessary) I'd recommend extending the PessimisticLockInterceptor.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032770#4032770
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032770
19Â years