[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re:
No it wasn't, just bullshit. This is the SQL-stacktrace: | 2006-07-04 16:33:14,610 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.VipaEntity] Error checking if entity exists | org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=chbbtpfs205/26, BranchQual=, localId=26]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=chbbtpfs205/26, BranchQual=, localId=26]) | at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:84) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:150) | at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587) | at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237) | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225) | at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:618) | at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at org.jboss.invocation.Invocation.performCall(Invocation.java:359) | at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130) | at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105) | at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203) | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189) | at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105) | at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134) | at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76) | at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43) | at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56) | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125) | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350) | at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161) | at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145) | at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132) | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107) | at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514) | at org.jboss.ejb.Container.invoke(Container.java:975) | at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359) | at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133) | at $Proxy61.create(Unknown Source) | at ch.eds.ipmonitor.server.CollectorSessionBean.startElement(CollectorSessionBean.java:235) | at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) | at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) | at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) | at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) | at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) | at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) | at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) | at javax.xml.parsers.SAXParser.parse(Unknown Source) | at ch.eds.ipmonitor.server.CollectorSessionBean.saveMessage(CollectorSessionBean.java:190) | at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at org.jboss.invocation.Invocation.performCall(Invocation.java:359) | at org.jboss.ejb.StatelessSessionContainer$Con
[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re:
I think i have found the problem: The jar file was deployed into the folder JBOSS_HOME\server\default\deploy\myfolder\ . It looks like that there is a bug with the 4.04 release which caused my problem. I just placed the jar file directly into the deploy folder: JBOSS_HOME\server\default\deploy\ and all problems were gone. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955283#3955283 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955283 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence, JBoss/CMP, Hibernate, Database] - "Could not instantiate bean" at startup in jboss-4.0.4.GA
When my Message Driven Bean gets activated during JBoss startup then i get "Could not instantiate bean" when it want to save the parsed data to the DB. The same happens to Session Beans which gets activated through the timerservice in restart time (in this case it's task is to localize old data and to delete it). Both Beans works very well when they get activated normally after JBoss has completely started. With jboss-4.0.3SP1 i don't have those problems. In the case of the MDB following code is processed. The Exception occurt with the find instructions: | /** |* createEntity |* |* @param logItem LogItem |*/ | private void createEntity(LogItem logItem) { | try { | CatComplexHome complexHome = (CatComplexHome) env.getHome(CatComplexHome.JNDI_HOME); | CatCpuHome cpuHome = (CatCpuHome) env.getHome(CatCpuHome.JNDI_HOME); | CatLogHome logHome = (CatLogHome) env.getHome(CatLogHome.JNDI_HOME); | DetailHome detailHome = (DetailHome) env.getHome(DetailHome.JNDI_HOME); | | CatComplex complexEntity; | try { | complexEntity = complexHome.findByPrimaryKey(logItem.getComplex()); | } catch (ObjectNotFoundException ex) { | complexEntity = complexHome.create(logItem.getComplex()); | } | | CatCpu cpuEntity; | try { | cpuEntity = cpuHome.findByPrimaryKey(logItem.getComplex() + logItem.getCpu()); | } catch (ObjectNotFoundException ex) { | cpuEntity = cpuHome.create(logItem.getComplex() + logItem.getCpu(), complexEntity); | } | | try { | CatLog catlog = logHome.findByTimeStamp_CatIndex_System(logItem.getDate(), | logItem.getIndex(), | logItem.getComplex()+logItem.getCpu() ); | catlog.remove(); // delete if it already exists | } catch (FinderException ex) { | // do nothing | } finally { | Detail detail = null; | if (logItem.getPsw()!=null) { | | detail = detailHome.create(logItem.getRegisters().get(0), | logItem.getRegisters().get(1), | logItem.getRegisters().get(2), | logItem.getRegisters().get(3), | logItem.getRegisters().get(4), | logItem.getRegisters().get(5), | logItem.getRegisters().get(6), | logItem.getRegisters().get(7), | logItem.getRegisters().get(8), | logItem.getRegisters().get(9), | logItem.getRegisters().get(10), | logItem.getRegisters().get(11), | logItem.getRegisters().get(12), | logItem.getRegisters().get(13), | logItem.getRegisters().get(14), | logItem.getRegisters().get(15), | logItem.getPsw(), | logItem.getCsect(), | logItem.getDisplacement()); | | } | logHome.create(new UID().toString(), |logItem.getDate(), |logItem.getEventType(), |logItem.getComment(), |logItem.getIndex(), |logItem.getDumpType(), |logItem.getDumpNumber(), |logItem.getDumpSeqNumber(), |logItem.getTapeNumber(), |cpuEntity, |detail); | | env.getLogger().debug("Log created : " + "\n" + |"Date : " + logItem.getDate() + "\n" + |"EventType : " + logItem.getEventType() + "\n" + |"Comment : " + logItem.getComment() + "\n" + |"Index : " + logItem.getIndex() + "\n" + |"DumpType : " + logItem.getDumpType() + "\n" + |"DumpNumber: " + logItem.getDumpNumber() + "\n" + |"DumpSeqNumber : " + logItem.getDumpSeqNumber() + "\n" + |"TapeNumber: " + logItem.getTapeNumber() | ); | } | | } catch (CreateException ex) { | env.getLogger().error("CreateException: ", ex); | } catch (FinderException ex) { | env.getLogger().error("CreateException
[JBoss-user] [Security & JAAS/JBoss] - HTTP Status 403 - when missing role
Log in is working perfect. When I log in with wrong password i am redirected to the page defined in web.xml. But when i am using a user with missing role then i am not redirected to the defined error page, i get the standard Tomcat "HTTP Status 403 - Access to the requested resource has been denied" page. here an extract of the web.xml | | | | restricted | /prot/* | POST | GET | | | administrator | catloguser | | | |FORM | | /login/login.jsf | /login/loginFailed.jsf | | | |administrator | | |catloguser | | What i did wrong? Many thanks for your help. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933133#3933133 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933133 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: Relationship (post-table-create)
i think this is a JBoss bug -> http://jira.jboss.com/jira/browse/JBAS-963 bug was mentioned first Thu Jun 20, 2002 00:00 http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837631#3837631 now we have Nov 1, 2005 other occurence of this bug in the forum: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=55125 http://www.jboss.org/index.html?module=bb&op=viewtopic&t=50407 http://www.jboss.org/index.html?module=bb&op=viewtopic&t=52874 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904619#3904619 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904619 --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: Relationship (post-table-create)
in fact i can even write some garbage in the tag of the relationship definition, jboss doesn't care about. it is ignored and the of the first bean is taken. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904611#3904611 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904611 --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Relationship (post-table-create)
Hi, i have exactly the same problem described here: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837631#3837631 with the difference that i am using JBoss 4.02 the post create in the tag is ignored and replaced with the one defined in the bean itself which result in a SQL error: "Duplicate entry". Listing of my jbosscmp-jdbc.xml: | | http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd";> | | | java:/TPFuserDS | mySQL | true | false | false | false | false | foreign-key | | on-load | 5 | * | | 5 | true | 5 | | | | TPFuser | | INSERT INTO tpfuser (userid, password, firstname, lastname, contact) VALUES ('admin', 'admin', 'admin', 'admin', '[EMAIL PROTECTED]') | | tpfuser | | userID | userid | | | password | password | | | firstname | firstname | | | lastname | lastname | | | contact | contact | | | | Role | | INSERT INTO role (role, comment) VALUES ('admin', 'Administrator') | | role | | role | role | | | comment | comment | | | | | | TPFusers-roles | false | | users_roles | true | false | | INSERT INTO users_roles (Role, TPFuser) VALUES ('admin', 'admin') | | true | | | | | | many thanks for your help View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3904408#3904408 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3904408 --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JNDI/Naming/Network] - Re: java.rmi.ConnectException
forgot to say that when server and client are on different machines but in the same domain it works as well. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875891#3875891 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875891 --- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JNDI/Naming/Network] - java.rmi.ConnectException
Following Failes when Client and Server are different Domains: | public IPmonHistorySupplier( String host, int port ) throws ServiceNotAvailableException { | try { | ServiceLocator serviceLocator = ServiceLocator.getInstance(host, port); | | System.out.println( new Date().toString() + " - getting home" ); | HistorySessionHome historyHome = ( HistorySessionHome )serviceLocator.getRemoteHome("HistorySession", HistorySessionHome.class); | System.out.println( new Date().toString() + " - got home" ); | | System.out.println( new Date().toString() + " - getting session" ); | historySession = historyHome.create(); | System.out.println( new Date().toString() + " - got session" ); | | qcf = serviceLocator.getQueueConnectionFactory("ConnectionFactory"); | abortQueue = serviceLocator.getQueue("queue/IPmonGetHistoryAbortQueue"); | | this.host = host; | this.port = port; |} | /* Translate exceptions into ServiceNotAvailableException */ | catch (CreateException ex) { | System.out.println( new Date().toString() + " - CreateException" ); | ex.printStackTrace(); | throw new ServiceNotAvailableException(ex); | } | catch (RemoteException ex) { | System.out.println( new Date().toString() + " - RemoteException" ); | ex.printStackTrace(); | throw new ServiceNotAvailableException(ex); | } | catch (ServiceLocatorException ex) { | System.out.println( new Date().toString() + " - ServiceLocatorException" ); | ex.printStackTrace(); | throw new ServiceNotAvailableException(ex); | } | catch (Exception ex) { | System.out.println( new Date().toString() + " - Exception" ); | ex.printStackTrace(); | throw new ServiceNotAvailableException(ex); | } | } | the Home lookup works fine but the session request failes after exactly 3 min and 30 seconds. Strange is also that the home lookup needs 21 seconds. Last Friday at 5 o'clock in the evening, when nearly everybody went home and the network had less traffic i was able to get a response from the session request. | Fri Apr 29 13:08:33 CEST 2005 - getting home | Fri Apr 29 13:08:54 CEST 2005 - got home | Fri Apr 29 13:08:54 CEST 2005 - getting session | Fri Apr 29 13:12:24 CEST 2005 - RemoteException | java.rmi.ConnectException: Connection refused to host: 195.160.9.35; nested exception is: | java.net.ConnectException: Connection timed out: connect | at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567) | at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) | at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) | at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101) | at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) | at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118) | at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163) | at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103) | at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) | at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55) | at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169) | at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91) | at $Proxy0.create(Unknown Source) | at ch.eds.ipmonitor.server.client.IPmonHistorySupplier.(IPmonHistorySupplier.java:66) | at ch.eds.ipmonitor.client.history.HistoryFrame.(HistoryFrame.java:177) | at ch.eds.ipmonitor.client.controller.IPmonitorController.run(IPmonitorController.java:597) | at java.lang.Thread.run(Thread.java:534) | Caused by: java.net.ConnectException: Connection timed out: connect | at java.net.PlainSocketImpl.socketConnect(Native Method) | at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) | at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) | at java.net.Socket.connect(Socket.java:452) | at java.net.Socket.connect(Socket.java:402) | at java.net.Socket.(Socket.java:309) | at java.net.Socket.(Socket.java:124) | at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22) | at sun.rmi.transport.proxy.RMIMaster