1 Reply Latest reply on Apr 5, 2006 4:07 AM by Kamil Dworakowski

    EJB3 despite extended PersistenceContext have to merge, afte

    Kamil Dworakowski Newbie

      Hello,

      I have a singleton in which I keep statefull session bean obtained at applications start (ULC Client). This SSB has an Extended type EntityManager so, the entities would not be detached after transaction commit.

      When I try to hand an object to persist (which I erlier got from the same vary SSB) I get an exception that says it is detached entity. Why?

      Anyway, if it is detached I can merge it. So I merge it and persist after it. Ok until flush operation when the exception is thrown. You can see it at the end the following log.

      I am using Jboss 4.0.4.CR2.




      ===============================================================================
      .
      JBoss Bootstrap Environment
      .
      JBOSS_HOME: C:\tools\jboss\jboss-4.0.4.CR2\bin\\..
      .
      JAVA: C:\prog\Java\jdk1.5.0_06\bin\java
      .
      JAVA_OPTS: -Dprogram.name=run.bat -javaagent:pluggable-instrumentor.jar -Xms128m -Xmx512m
      .
      CLASSPATH: C:\prog\Java\jdk1.5.0_06\lib\tools.jar;C:\tools\jboss\jboss-4.0.4.CR2\bin\\run.jar
      .
      ===============================================================================
      .
      20:08:33,187 INFO [Server] Starting JBoss (MX MicroKernel)...
      20:08:33,187 INFO [Server] Release ID: JBoss [Zion] 4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2 date=200603311500)
      20:08:33,203 INFO [Server] Home Dir: C:\tools\jboss\jboss-4.0.4.CR2
      20:08:33,203 INFO [Server] Home URL: file:/C:/tools/jboss/jboss-4.0.4.CR2/
      20:08:33,203 INFO [Server] Patch URL: null
      20:08:33,203 INFO [Server] Server Name: default
      20:08:33,203 INFO [Server] Server Home Dir: C:\tools\jboss\jboss-4.0.4.CR2\server\default
      20:08:33,203 INFO [Server] Server Home URL: file:/C:/tools/jboss/jboss-4.0.4.CR2/server/default/
      20:08:33,203 INFO [Server] Server Log Dir: C:\tools\jboss\jboss-4.0.4.CR2\server\default\log
      20:08:33,203 INFO [Server] Server Temp Dir: C:\tools\jboss\jboss-4.0.4.CR2\server\default\tmp
      20:08:33,203 INFO [Server] Root Deployment Filename: jboss-service.xml
      20:08:33,687 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
      20:08:33,687 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-b05,Sun Microsystems Inc.
      20:08:33,687 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      20:08:34,593 INFO [Server] Core system initialized
      20:08:36,015 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
      20:08:37,796 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://10.148.199.92:3873/]
      20:08:38,328 INFO [AspectDeployer] Deployed AOP: file:/C:/tools/jboss/jboss-4.0.4.CR2/server/default/deploy/ejb3-interceptors-aop.xml
      20:08:38,375 INFO [AspectDeployer] Deployed AOP: file:/C:/tools/jboss/jboss-4.0.4.CR2/server/default/deploy/smart-home-aop.xml
      20:08:40,562 INFO [WebService] Using RMI server codebase: http://besitzer-01:8083/
      20:08:40,953 WARN [EJBTimerServiceImpl] Cannot obtain TransactionManager from JNDI, using TxManager.getInstance(): javax.naming.NameNotFoundException
      : TransactionManager not bound
      20:08:43,593 INFO [MailService] Mail Service bound to java:/Mail
      20:08:44,312 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=clas
      s org.jboss.net.sockets.DefaultSocketFactory
      20:08:44,390 INFO [SubscriptionManager] Bound event dispatcher to java:comp/env/EventDispatcher
      20:08:45,703 INFO [Embedded] Catalina naming disabled
      20:08:45,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
      20:08:45,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
      20:08:46,578 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
      20:08:46,578 INFO [Catalina] Initialization processed in 719 ms
      20:08:46,578 INFO [StandardService] Starting service jboss.web
      20:08:46,609 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.16
      20:08:46,671 INFO [StandardHost] XML validation disabled
      20:08:46,718 INFO [Catalina] Server startup in 140 ms
      20:08:47,015 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
      20:08:48,453 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp11154jbossws.sar-contents/jbossws-exp.war/
      20:08:49,109 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
      20:08:49,265 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
      20:08:52,921 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:D
      efaultDS'
      20:08:53,812 INFO [A] Bound to JNDI name: queue/A
      20:08:53,828 INFO [B] Bound to JNDI name: queue/B
      20:08:53,828 INFO [C] Bound to JNDI name: queue/C
      20:08:53,828 INFO [D] Bound to JNDI name: queue/D
      20:08:53,828 INFO [ex] Bound to JNDI name: queue/ex
      20:08:53,921 INFO [testTopic] Bound to JNDI name: topic/testTopic
      20:08:53,921 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      20:08:53,921 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      20:08:53,937 INFO [testQueue] Bound to JNDI name: queue/testQueue
      20:08:53,984 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
      20:08:54,281 INFO [DLQ] Bound to JNDI name: queue/DLQ
      20:08:54,625 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'jav
      a:JmsXA'
      20:08:56,671 INFO [Ejb3Deployment] EJB3 deployment time took: 1796
      20:08:56,750 INFO [JmxKernelAbstraction] installing MBean: persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0 with dep
      endencies:
      20:08:56,750 INFO [JmxKernelAbstraction] jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
      20:08:57,640 INFO [Environment] Hibernate 3.2 cr1
      20:08:57,703 INFO [Environment] hibernate.properties not found
      20:08:57,718 INFO [Environment] Bytecode provider name : cglib
      20:08:57,843 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      20:08:59,125 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Blind
      20:08:59,140 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Device
      20:08:59,140 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.DeviceMoodSettings
      20:08:59,140 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.DomainObject
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.BlindEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.HouseEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.LightEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.RoomEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.StoreyEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.ThermostatEmbeddable
      20:08:59,156 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.UserEmbeddable
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 @EmbeddableSuperclass: com.siemens.aosd.smarthome.domain.embedded.WindowEmbeddable
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.House
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Light
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Mood
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Room
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Storey
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Thermostat
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.User
      20:08:59,171 INFO [Ejb3Configuration] found EJB3 Entity bean: com.siemens.aosd.smarthome.domain.Window
      20:09:00,812 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.DomainObject
      20:09:01,156 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.DomainObject on table DomainObject
      20:09:01,781 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Device
      20:09:01,781 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Device on table Device
      20:09:02,031 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Blind
      20:09:02,031 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Blind on table Blind
      20:09:02,187 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.DeviceMoodSettings
      20:09:02,203 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.DeviceMoodSettings on table DeviceMoodSettings
      20:09:02,250 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.House
      20:09:02,250 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.House on table House
      20:09:02,578 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Light
      20:09:02,578 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Light on table Light
      20:09:02,578 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Mood
      20:09:02,578 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Mood on table Mood
      20:09:02,593 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Room
      20:09:02,593 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Room on table Room
      20:09:02,640 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Storey
      20:09:02,640 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Storey on table Storey
      20:09:02,640 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Thermostat
      20:09:02,640 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Thermostat on table Thermostat
      20:09:02,640 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.User
      20:09:02,640 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.User on table User
      20:09:02,656 INFO [AnnotationBinder] Binding entity from annotated class: com.siemens.aosd.smarthome.domain.Window
      20:09:02,656 INFO [EntityBinder] Bind entity com.siemens.aosd.smarthome.domain.Window on table Window
      20:09:03,750 INFO [CollectionBinder] Mapping collection: com.siemens.aosd.smarthome.domain.House.storeys -> Storey
      20:09:03,750 INFO [CollectionBinder] Mapping collection: com.siemens.aosd.smarthome.domain.Mood.deviceMoodSettings -> DeviceMoodSettings
      20:09:03,750 INFO [CollectionBinder] Mapping collection: com.siemens.aosd.smarthome.domain.Room.lights -> Light
      20:09:03,750 INFO [CollectionBinder] Mapping collection: com.siemens.aosd.smarthome.domain.Room.windows -> Window
      20:09:03,750 INFO [CollectionBinder] Mapping collection: com.siemens.aosd.smarthome.domain.Storey.rooms -> Room
      20:09:04,296 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      20:09:04,312 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
      20:09:04,328 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
      20:09:04,328 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
      20:09:04,609 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
      20:09:04,671 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
      20:09:04,703 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      20:09:04,734 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      20:09:04,734 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
      20:09:04,734 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
      20:09:04,734 INFO [SettingsFactory] JDBC batch size: 15
      20:09:04,734 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      20:09:04,734 INFO [SettingsFactory] Scrollable result sets: enabled
      20:09:04,734 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
      20:09:04,734 INFO [SettingsFactory] Connection release mode: auto
      20:09:04,750 INFO [SettingsFactory] Default batch fetch size: 1
      20:09:04,750 INFO [SettingsFactory] Generate SQL with comments: disabled
      20:09:04,750 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      20:09:04,750 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      20:09:04,812 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      20:09:04,812 INFO [SettingsFactory] Query language substitutions: {}
      20:09:04,812 INFO [SettingsFactory] Second-level cache: enabled
      20:09:04,812 INFO [SettingsFactory] Query cache: disabled
      20:09:04,812 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
      20:09:04,828 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      20:09:04,828 INFO [SettingsFactory] Structured second-level cache entries: disabled
      20:09:04,906 INFO [SettingsFactory] Statistics: disabled
      20:09:04,906 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      20:09:04,921 INFO [SettingsFactory] Default entity-mode: pojo
      20:09:05,265 INFO [SessionFactoryImpl] building session factory
      20:09:07,578 ERROR [STDERR] [warn] Could not find class org.objectweb.asm.util.TraceClassVisitor that net.sf.cglib.core.DebuggingClassWriter$1 referen
      ces. It may not be in your classpath and you may not be getting field and constructor weaving for this class.
      20:09:09,406 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      20:09:09,968 INFO [SchemaUpdate] Running hbm2ddl schema update
      20:09:09,968 INFO [SchemaUpdate] fetching database metadata
      20:09:09,968 INFO [SchemaUpdate] updating schema
      20:09:10,078 INFO [TableMetadata] table found: PUBLIC.BLIND
      20:09:10,078 INFO [TableMetadata] columns: [opened, id]
      20:09:10,078 INFO [TableMetadata] foreign keys: [fk3d4bf35ba6f9515]
      20:09:10,078 INFO [TableMetadata] indexes: [sys_pk_51, sys_idx_101]
      20:09:10,093 INFO [TableMetadata] table found: PUBLIC.DEVICE
      20:09:10,093 INFO [TableMetadata] columns: [id]
      20:09:10,093 INFO [TableMetadata] foreign keys: [fk79d00a766d3f6ce2]
      20:09:10,093 INFO [TableMetadata] indexes: [sys_idx_103, sys_pk_52]
      20:09:10,093 INFO [TableMetadata] table found: PUBLIC.DEVICEMOODSETTINGS
      20:09:10,093 INFO [TableMetadata] columns: [moodsettingsdevice_id, mood_id, device_id, id]
      20:09:10,093 INFO [TableMetadata] foreign keys: [fk5ffed1d09089fcfe, fk5ffed1d0bbf0339e, fk5ffed1d08ff4a0c4]
      20:09:10,093 INFO [TableMetadata] indexes: [sys_pk_58, sys_idx_105, sys_idx_sys_ct_57_60, sys_idx_63, sys_idx_61, sys_idx_sys_ct_56_59]
      20:09:10,109 INFO [TableMetadata] table found: PUBLIC.DOMAINOBJECT
      20:09:10,109 INFO [TableMetadata] columns: [name, id]
      20:09:10,109 INFO [TableMetadata] foreign keys: []
      20:09:10,109 INFO [TableMetadata] indexes: [sys_pk_65]
      20:09:10,109 INFO [TableMetadata] table found: PUBLIC.HOUSE
      20:09:10,109 INFO [TableMetadata] columns: [id]
      20:09:10,109 INFO [TableMetadata] foreign keys: [fk42ad7006d3f6ce2]
      20:09:10,109 INFO [TableMetadata] indexes: [sys_pk_66, sys_idx_67]
      20:09:10,125 INFO [TableMetadata] table found: PUBLIC.HOUSE_USER
      20:09:10,125 INFO [TableMetadata] columns: [users_id, houses_id]
      20:09:10,125 INFO [TableMetadata] foreign keys: [fked66a1cad04e8883, fked66a1ca36fd3521]
      20:09:10,125 INFO [TableMetadata] indexes: [sys_idx_107, sys_idx_70]
      20:09:10,125 INFO [TableMetadata] table found: PUBLIC.LIGHT
      20:09:10,125 INFO [TableMetadata] columns: [turned_on, room_id, shaded, light_level, id]
      20:09:10,125 INFO [TableMetadata] foreign keys: [fk46044f6ba6f9515, fk46044f6990f827e]
      20:09:10,125 INFO [TableMetadata] indexes: [sys_idx_109, sys_pk_72, sys_idx_73]
      20:09:10,140 INFO [TableMetadata] table found: PUBLIC.MOOD
      20:09:10,140 INFO [TableMetadata] columns: [room_id, id]
      20:09:10,140 INFO [TableMetadata] foreign keys: [fk24af17990f827e, fk24af176d3f6ce2]
      20:09:10,140 INFO [TableMetadata] indexes: [sys_pk_75, sys_idx_111, sys_idx_76]
      20:09:10,140 INFO [TableMetadata] table found: PUBLIC.ROOM
      20:09:10,140 INFO [TableMetadata] columns: [supports_mood, storey_id, thermostat_id, mood, id]
      20:09:10,140 INFO [TableMetadata] foreign keys: [fk26f4fb4700f892, fk26f4fb6d3f6ce2, fk26f4fbe59d75fe, fk26f4fb39c2a05e]
      20:09:10,140 INFO [TableMetadata] indexes: [sys_idx_80, sys_idx_82, sys_pk_78, sys_idx_115, sys_idx_sys_ct_66_79, sys_idx_113]
      20:09:10,156 INFO [TableMetadata] table found: PUBLIC.STOREY
      20:09:10,156 INFO [TableMetadata] columns: [house, id]
      20:09:10,156 INFO [TableMetadata] foreign keys: [fk94390fd89891601c, fk94390fd86d3f6ce2]
      20:09:10,156 INFO [TableMetadata] indexes: [sys_idx_85, sys_idx_87, sys_pk_84]
      20:09:10,156 INFO [TableMetadata] table found: PUBLIC.THERMOSTAT
      20:09:10,156 INFO [TableMetadata] columns: [temperature, id]
      20:09:10,156 INFO [TableMetadata] foreign keys: [fkae95c077ba6f9515]
      20:09:10,156 INFO [TableMetadata] indexes: [sys_idx_90, sys_pk_89]
      20:09:10,156 INFO [TableMetadata] table found: PUBLIC.USER
      20:09:10,156 INFO [TableMetadata] columns: [password, adult, username, id]
      20:09:10,156 INFO [TableMetadata] foreign keys: []
      20:09:10,156 INFO [TableMetadata] indexes: [sys_idx_sys_ct_71_93, sys_pk_92]
      20:09:10,156 INFO [TableMetadata] table found: PUBLIC.WINDOW
      20:09:10,156 INFO [TableMetadata] columns: [opened, blind, state, room_id, id]
      20:09:10,156 INFO [TableMetadata] foreign keys: [fk9a70c810ba6f9515, fk9a70c810990f827e, fk9a70c81097e53086]
      20:09:10,156 INFO [TableMetadata] indexes: [sys_idx_99, sys_idx_95, sys_pk_94, sys_idx_97]
      20:09:10,156 INFO [SchemaUpdate] schema update complete
      20:09:10,187 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.fac
      tory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      20:09:10,640 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=smart-home-backend-ejb3-1.0.1.jar,name=HouseManageableServiceBase,service=E
      JB3 with dependencies:
      20:09:10,640 INFO [JmxKernelAbstraction] persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0
      20:09:11,437 INFO [EJBContainer] STARTED EJB: com.siemens.aosd.smarthome.service.impl.HouseManageableServiceBase ejbName: HouseManageableServiceBase
      20:09:12,078 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=smart-home-backend-ejb3-1.0.1.jar,name=LightManageableServiceBase,service=E
      JB3 with dependencies:
      20:09:12,078 INFO [JmxKernelAbstraction] persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0
      20:09:12,234 INFO [EJBContainer] STARTED EJB: com.siemens.aosd.smarthome.service.impl.LightManageableServiceBase ejbName: LightManageableServiceBase
      20:09:12,468 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=smart-home-backend-ejb3-1.0.1.jar,name=MoodManageableServiceBase,service=EJ
      B3 with dependencies:
      20:09:12,468 INFO [JmxKernelAbstraction] persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0
      20:09:12,531 INFO [EJBContainer] STARTED EJB: com.siemens.aosd.smarthome.service.impl.MoodManageableServiceBase ejbName: MoodManageableServiceBase
      20:09:12,609 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=smart-home-backend-ejb3-1.0.1.jar,name=PersistanceServiceImpl,service=EJB3
      with dependencies:
      20:09:12,609 INFO [JmxKernelAbstraction] persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0
      20:09:12,718 INFO [EJBContainer] STARTED EJB: com.siemens.aosd.smarthome.service.impl.PersistanceServiceImpl ejbName: PersistanceServiceImpl
      20:09:12,796 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=smart-home-backend-ejb3-1.0.1.jar,name=UserManageableServiceBase,service=EJ
      B3 with dependencies:
      20:09:12,796 INFO [JmxKernelAbstraction] persistence.units:jar=smart-home-backend-ejb3-1.0.1.jar,unitName=smarthome-ejb3.0
      20:09:12,921 INFO [EJBContainer] STARTED EJB: com.siemens.aosd.smarthome.service.impl.UserManageableServiceBase ejbName: UserManageableServiceBase
      20:09:12,968 INFO [EJB3Deployer] Deployed: file:/C:/tools/jboss/jboss-4.0.4.CR2/server/default/deploy/smart-home-backend-ejb3-1.0.1.jar
      20:09:13,046 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      20:09:16,515 INFO [TomcatDeployer] deploy, ctxPath=/smart-home, warUrl=.../tmp/deploy/tmp11190smart-home-exp.war/
      20:09:18,437 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2
      20:09:18,437 ERROR [JBossCacheManager] JBossCacheService to Tomcat clustering not found
      java.lang.NoClassDefFoundError: org/jboss/cache/CacheException
      at org.jboss.web.tomcat.tc5.session.JBossCacheManager.init(JBossCacheManager.java:141)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:332)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
      at org.jboss.web.WebModule.startModule(WebModule.java:83)
      at org.jboss.web.WebModule.startService(WebModule.java:61)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy39.start(Unknown Source)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy40.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:280)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      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:464)
      at java.lang.Thread.run(Thread.java:595)
      20:09:18,562 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled. Exception: org.jboss.web.tomcat.tc5.session.ClusteringNotSupporte
      dException: JBossCacheService to Tomcat clustering not found
      20:09:18,718 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
      20:09:19,171 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      20:09:19,203 INFO [JkMain] Jk running ID=0 time=0/141 config=null
      20:09:19,234 INFO [Server] JBoss (MX MicroKernel) [4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2 date=200603311500)] Started in 46s:31ms
      20:09:38,437 INFO [FieldsManager] FieldsManager in use = org.jboss.serial.classmetamodel.UnsafeFieldsManager
      20:09:54,609 INFO [STDOUT] exception threw during persist operation
      20:09:54,609 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: com.si
      emens.aosd.smarthome.domain.Light
      20:09:54,609 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:562)
      20:09:54,609 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:193)
      20:09:54,609 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedEntityManager.persist(ExtendedEntityManager.java:104)
      20:09:54,609 ERROR [STDERR] at com.siemens.aosd.smarthome.service.impl.PersistanceServiceImpl.persist(PersistanceServiceImpl.java:24)
      20:09:54,609 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      20:09:54,609 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      20:09:54,609 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      20:09:54,609 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagation
      Interceptor.java:71)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.ja
      va:54)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      20:09:54,625 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      20:09:54,625 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,625 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      20:09:54,640 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,640 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:308)
      20:09:54,640 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:55)
      20:09:54,640 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      20:09:54,640 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProxy.java:133)
      20:09:54,640 ERROR [STDERR] at $Proxy88.persist(Unknown Source)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.com$siemens$smarthome$component$tree$details$Upda
      teDetailsHandler$saveChangesToDB$aop(UpdateDetailsHandler.java:30)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.access$1(UpdateDetailsHandler.java)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler$saveChangesToDB_4913089557736411118.invokeNext(Up
      dateDetailsHandler$saveChangesToDB_4913089557736411118.java)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.aspects.nojboss.NoJbossAspect.updateDetailsAdvice(NoJbossAspect.java:26)
      20:09:54,640 ERROR [STDERR] at org.jboss.aop.advice.com.siemens.smarthome.aspects.nojboss.NoJbossAspect1.invoke(NoJbossAspect1.java)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler$saveChangesToDB_4913089557736411118.invokeNext(Up
      dateDetailsHandler$saveChangesToDB_4913089557736411118.java)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.saveChangesToDB(UpdateDetailsHandler.java)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.update(UpdateDetailsHandler.java:18)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.AbstractView.save(AbstractView.java:81)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.LightView.applyButtonPressed(LightView.java:62)
      20:09:54,640 ERROR [STDERR] at com.siemens.smarthome.component.tree.details.AbstractView$1.actionPerformed(AbstractView.java:58)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.application.event.ActionEvent.dispatch(ActionEvent.java:3)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.application.ULCProxy.a(ULCProxy.java:250)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.application.ULCProxy.distributeToListeners(ULCProxy.java:66)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.application.ULCAbstractButton.handleEvent(ULCAbstractButton.java:137)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.application.ULCProxy.handleRequest(ULCProxy.java:93)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.server.ULCSession.a(ULCSession.java:11)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.base.server.ULCSession.processRequests(ULCSession.java:134)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.container.servlet.server.SendRequestsCommand.handleRequestContent(SendRequestsCommand.java:16)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.container.servlet.server.ContainerCommand.execute(ContainerCommand.java:18)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.container.servlet.server.ServletContainerAdapterHelper.b(ServletContainerAdapterHelper.java:66)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.container.servlet.server.ServletContainerAdapterHelper.service(ServletContainerAdapterHelper.java:83)
      20:09:54,640 ERROR [STDERR] at com.ulcjava.container.servlet.server.ServletContainerAdapter.service(ServletContainerAdapter.java:4)
      20:09:54,640 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      20:09:54,640 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      20:09:54,640 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      20:09:54,640 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      20:09:54,640 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      20:09:54,640 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      20:09:54,640 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      20:09:54,656 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      20:09:54,656 ERROR [STDERR] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      20:09:54,656 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      20:09:54,656 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      20:09:54,656 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      20:09:54,656 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      20:09:54,656 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      20:09:54,656 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      20:09:54,656 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      20:09:54,656 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      20:09:54,656 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      20:09:54,656 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      20:09:54,656 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      20:09:54,656 ERROR [STDERR] Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: com.siemens.aosd.smarthome.domain.L
      ight
      20:09:54,656 ERROR [STDERR] at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
      20:09:54,656 ERROR [STDERR] at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
      20:09:54,656 ERROR [STDERR] at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:617)
      20:09:54,656 ERROR [STDERR] at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:591)
      20:09:54,656 ERROR [STDERR] at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:595)
      20:09:54,656 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:187)
      20:09:54,656 ERROR [STDERR] ... 74 more
      20:09:54,656 INFO [STDOUT] kuniec
      20:09:54,656 INFO [STDOUT] first need to merge
      20:09:54,671 INFO [STDOUT] merged
      20:09:54,671 INFO [STDOUT] persisted
      20:09:54,781 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      20:09:54,781 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=besitzer-01/15, BranchQual=, l
      ocalId=15]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=besitz
      er-01/15, BranchQual=, localId=15])
      20:09:54,781 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.exception.GenericJDBCException: Cannot open connection
      at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
      at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
      at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
      at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:218)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2227)
      at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2180)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2450)
      at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:91)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:988)
      at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:271)
      at org.jboss.ejb3.entity.ExtendedEntityManager.flush(ExtendedEntityManager.java:124)
      at com.siemens.aosd.smarthome.service.impl.PersistanceServiceImpl.persist(PersistanceServiceImpl.java:43)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:308)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:55)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProxy.java:133)
      at $Proxy88.persist(Unknown Source)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.com$siemens$smarthome$component$tree$details$UpdateDetailsHandler$saveCha
      ngesToDB$aop(UpdateDetailsHandler.java:30)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.access$1(UpdateDetailsHandler.java)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler$saveChangesToDB_4913089557736411118.invokeNext(UpdateDetailsHandler$saveC
      hangesToDB_4913089557736411118.java)
      at com.siemens.smarthome.aspects.nojboss.NoJbossAspect.updateDetailsAdvice(NoJbossAspect.java:26)
      at org.jboss.aop.advice.com.siemens.smarthome.aspects.nojboss.NoJbossAspect1.invoke(NoJbossAspect1.java)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler$saveChangesToDB_4913089557736411118.invokeNext(UpdateDetailsHandler$saveC
      hangesToDB_4913089557736411118.java)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.saveChangesToDB(UpdateDetailsHandler.java)
      at com.siemens.smarthome.component.tree.details.UpdateDetailsHandler.update(UpdateDetailsHandler.java:18)
      at com.siemens.smarthome.component.tree.details.AbstractView.save(AbstractView.java:81)
      at com.siemens.smarthome.component.tree.details.LightView.applyButtonPressed(LightView.java:62)
      at com.siemens.smarthome.component.tree.details.AbstractView$1.actionPerformed(AbstractView.java:58)
      at com.ulcjava.base.application.event.ActionEvent.dispatch(ActionEvent.java:3)
      at com.ulcjava.base.application.ULCProxy.a(ULCProxy.java:250)
      at com.ulcjava.base.application.ULCProxy.distributeToListeners(ULCProxy.java:66)
      at com.ulcjava.base.application.ULCAbstractButton.handleEvent(ULCAbstractButton.java:137)
      at com.ulcjava.base.application.ULCProxy.handleRequest(ULCProxy.java:93)
      at com.ulcjava.base.server.ULCSession.a(ULCSession.java:11)
      at com.ulcjava.base.server.ULCSession.processRequests(ULCSession.java:134)
      at com.ulcjava.container.servlet.server.SendRequestsCommand.handleRequestContent(SendRequestsCommand.java:16)
      at com.ulcjava.container.servlet.server.ContainerCommand.execute(ContainerCommand.java:18)
      at com.ulcjava.container.servlet.server.ServletContainerAdapterHelper.b(ServletContainerAdapterHelper.java:66)
      at com.ulcjava.container.servlet.server.ServletContainerAdapterHelper.service(ServletContainerAdapterHelper.java:83)
      at com.ulcjava.container.servlet.server.ServletContainerAdapter.service(ServletContainerAdapter.java:4)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=besitzer-01/15, BranchQual=
      , localId=15]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=bes
      itzer-01/15, BranchQual=, localId=15])
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
      at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
      at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
      ... 89 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=besitzer-01/15, BranchQual=,
      localId=15]
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:290)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:379)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
      ... 91 more



      Maybe this is a problem:

      20:08:40,953 WARN [EJBTimerServiceImpl] Cannot obtain TransactionManager from JNDI, using TxManager.getInstance(): javax.naming.NameNotFoundException
      : TransactionManager not bound
      ?

        • 1. Re: EJB3 despite extended PersistenceContext have to merge,
          Kamil Dworakowski Newbie

          My problem was that instead of checking if the entity is detached using EntityManager.contains() method I just invoked persist and I merged only in case of exception. This only proves that I don't understand EJB 3.0.

          1. Why the thrown exception corrupted the entity manager?? It was caught in the very same method! Is this expected behaviour?

          2. Why my entities become detached in the first place? I use extended PersistenceContext. They should be managed all the time, shouldn't they?