[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB] ANYBODY?

2005-07-12 Thread wciesiel

Does ANYONE use remote connection to service generated with AndroMDA 
3.1-RC1-SNAPSHOT?



I've made an experiment - made clear appliaction, added one service and two 
Entities and still - TransactionManager is not being created if called from 
remote application... ANY solution/advice? I am stuck with my work for 3rd day 
:-(
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2443#2443
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread [EMAIL PROTECTED]

I'm trying to resolve it (haven't had much time today), but hopefully will 
resolve it soon.  In the meantime, comment out the dataSource namespace 
property (from the spring namespace) and use the local datasource properties 
by defining the following in the spring namespace as well:





nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; property 
name=username$#123;dataSource.user#125;/property

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; property 
name=password$#123;dataSource.password#125;/property

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; property 
name=driver$#123;dataSource.driver.class#125;/property

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; property 
name=connectionUrl$#123;dataSource.url#125;/property



This will cause the local transaction manager to be used (which is the 
HibernateTransactionManager) instead of the JtaTransactionManager ...this 
should work fine for connecting remotelylet me know if you can't get this 
to work.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2445#2445
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread wciesiel

I'm not very much proficient in JBoss internals but one thing came across while 
I was trying to fix this problem:



exceptions thrown in JBoss by spring are mentioning UserTransaction not being 
bound - while in JBoss configuration files (and JMX-console) I find only 
CLIENTUserTransaction  - isnt' it the root of the problem?
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2446#2446
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread [EMAIL PROTECTED]

Take a look at these javadocs, as of 1.2 the user JNDI transaction manager is 
resolved automatically: 
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/transaction/jta/JtaTransactionManager.html



And as you've seen, its resolving it fine when spring is initialized from a call

within the ear...its just when its initialized from a remote call that it seems 
to not find the JNDI transaction object.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2447#2447
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread wciesiel

Thanx for temporary work-around - it (using localTransactionManager) is working.



I understand that you've managed to replicate this problem - it isn't just some 
misconfiguration on my part?
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2448#2448
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread [EMAIL PROTECTED]


Quote:
 it isn't just some misconfiguration on my part?
(end of quote)




Nope, same thing happens to me as well when I try to connect remotely.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2449#2449
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread [EMAIL PROTECTED]

Ok I found a solution (), seems you need to set the userTransaction to null on 
the JtaTransactionManager in order for the regular transaction manager to be 
used (don't know why spring isn't smart enough to auto-detect this), I added 
the ability to set this in the spring cartridge (next continous build will have 
it), so once you get this fix, add these two properties to your spring 
namespace (and uncomment the dataSource property so you have the 
JtaTransactions again):



property name=userTransactionNamenull/property

property name=transactionManagerNamejava#58;/TransactionManager/property



I tested it, and it works for me...let me know if it works ok for you as well.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2452#2452
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread wciesiel

OK, it's working. Issue closed - thanks for the assistance on this.
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2468#2468
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-12 Thread [EMAIL PROTECTED]

Great..no problem...glad its finally working.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2471#2471
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread [EMAIL PROTECTED]

Have you tried with Jboss 4.0.1sp1?  I seem to get the same exception as you 
when using 4.0.3RC1, however 4.0.1sp1 I'm able to connect fine using remote 
EJBs.
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2388#2388
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread wciesiel

I'll try using other JBoss versions, thx for suggestion. But it's not fixing 
the problem but working around it... Do you have any ideas what might be the 
root cause?



And second question: do you know of any step-by-step guide or example how to 
use spring-based connectors to remote EJBs? Should I use spring bean 
definitions (in .xml files) generated in the core subsystem (they are imho 
overly complex for the needs of connecting client to the business layer) or 
create my own, simplified  versions?
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2394#2394
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread [EMAIL PROTECTED]


Quote:
I'll try using other JBoss versions, thx for suggestion. But it's not fixing 
the problem but working around it... Do you have any ideas what might be the 
root cause? 
(end of quote)




Well actually I think jboss 4.0.1sp1 is much better at logging the source of 
the errors, so my guess is, if you try that out, you'll see what the root error 
is.




Quote:
And second question: do you know of any step-by-step guide or example how to 
use spring-based connectors to remote EJBs? Should I use spring bean 
definitions (in .xml files) generated in the core subsystem (they are imho 
overly complex for the needs of connecting client to the business layer) or 
create my own, simplified versions?
(end of quote)




Sorry I don't know of a guide, let me know if you find one.  You should be able 
to use the ServiceLocator from the core, but just replace the 
beanRefFactory.xml's contents with this for your client (I haven't tried this 
but I would think it should work...this assumes you're using the latest 
dependencies).



?xml version=1.0 encoding=UTF-8?



!DOCTYPE beans

nbsp; nbsp; PUBLIC -//SPRING//DTD BEAN//EN

nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp;http#58;//www.springframework.org/dtd/spring-beans.dtd



beans



nbsp; nbsp; bean id=beanRefFactoryEjb

nbsp; nbsp; nbsp; nbsp; 
nbsp;class=org.springframework.context.support.ClassPathXmlApplicationContext

nbsp; nbsp; nbsp; nbsp; constructor-arg

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;list

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
valueapplicationContext-remoteEjb.xml/value

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;/list

nbsp; nbsp; nbsp; nbsp; /constructor-arg

nbsp; nbsp; /bean

nbsp; nbsp; 

/beans
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2396#2396
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread wciesiel

I've switched to JBoss 4.0.1sp1 and indeed it is more verbose. It seems that 
there's some problem with TransactionManager initialization if service is 
called by remote application



2005-07-12 00#58;12#58;03,470 ERROR 
#91;org.jboss.ejb.plugins.LogInterceptor#93; EJBException in method#58; 
public abstract java.lang.String 
com.massolit.service.ejb.MassolitCatalogService.getSomeText#40;#41; throws 
java.rmi.RemoteException, causedBy#58;

org.springframework.beans.factory.access.BootstrapException#58; Unable to 
initialize group definition. Group resource name 
#91;classpath*#58;beanRefFactory.xml#93;, factory key 
#91;beanRefFactory#93;; nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'beanRefFactory' defined in URL 
#91;jar#58;file#58;/D#58;/Programs/jboss-4.0.1sp1/server/default/tmp/deploy/tmp13726massolit-app-0.1.ear-contents/massolit-core-0.1.jar!/beanRefFactory.xml#93;#58;
 Instantiation of bean failed; nested exception is 
org.springframework.beans.FatalBeanException#58; Could not instantiate class 
#91;org.springframework.context.support.ClassPathXmlApplicationContext#93;; 
constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'serviceTransactionInterceptor' defined in class path resource 
#91;applicationContext.xml#93;#58; Can't resolve reference
  to bean 'transactionManager' while setting property 'transactionManager'; 
nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'transactionManager' defined in class path resource 
#91;applicationContext-dataSource.xml#93;#58; Initialization of bean failed; 
nested exception is 
org.springframework.transaction.TransactionSystemException#58; JTA 
UserTransaction is not available at JNDI location 
#91;java#58;comp/UserTransaction#93;; nested exception is 
javax.naming.NameNotFoundException#58; UserTransaction not bound

org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'beanRefFactory' defined in URL 
#91;jar#58;file#58;/D#58;/Programs/jboss-4.0.1sp1/server/default/tmp/deploy/tmp13726massolit-app-0.1.ear-contents/massolit-core-0.1.jar!/beanRefFactory.xml#93;#58;
 Instantiation of bean failed; nested exception is 
org.springframework.beans.FatalBeanException#58; Could not instantiate class 
#91;org.springframework.context.support.ClassPathXmlApplicationContext#93;; 
constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'serviceTransactionInterceptor' defined in class path resource 
#91;applicationContext.xml#93;#58; Can't resolve reference to bean 
'transactionManager' while setting property 'transactionManager'; nested 
exception is org.springframework.beans.factory.BeanCreationException#58; Error 
creating bean with name 'transactionManager' defined in class pat
 h resource #91;applicationContext-dataSource.xml#93;#58; Initialization of 
bean failed; nested exception is 
org.springframework.transaction.TransactionSystemException#58; JTA 
UserTransaction is not available at JNDI location 
#91;java#58;comp/UserTransaction#93;; nested exception is 
javax.naming.NameNotFoundException#58; UserTransaction not bound

org.springframework.beans.FatalBeanException#58; Could not instantiate class 
#91;org.springframework.context.support.ClassPathXmlApplicationContext#93;; 
constructor threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'serviceTransactionInterceptor' defined in class path resource 
#91;applicationContext.xml#93;#58; Can't resolve reference to bean 
'transactionManager' while setting property 'transactionManager'; nested 
exception is org.springframework.beans.factory.BeanCreationException#58; Error 
creating bean with name 'transactionManager' defined in class path resource 
#91;applicationContext-dataSource.xml#93;#58; Initialization of bean failed; 
nested exception is 
org.springframework.transaction.TransactionSystemException#58; JTA 
UserTransaction is not available at JNDI location 
#91;java#58;comp/UserTransaction#93;; nested exception is 
javax.naming.NameNotFoundException#58; UserTransacti
 on not bound

org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'serviceTransactionInterceptor' defined in class path resource 
#91;applicationContext.xml#93;#58; Can't resolve reference to bean 
'transactionManager' while setting property 'transactionManager'; nested 
exception is org.springframework.beans.factory.BeanCreationException#58; Error 
creating bean with name 'transactionManager' defined in class path resource 
#91;applicationContext-dataSource.xml#93;#58; Initialization of bean failed; 
nested exception is 
org.springframework.transaction.TransactionSystemException#58; JTA 

[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread [EMAIL PROTECTED]

I'm not really sure why they would be occuring...recently I applied a patch 
from Jens Vagts (another user) to use the JtaTransactionManager from spring as 
the default instead of the HibernateTransactionManager, and I know that's whats 
causing it, but I'm not sure why it wouldn't find the UserTransaction when a 
remote client tries to connect, I sent him an email to ask him how he's using 
it (because he's using remote communication as well with EJBs on his project), 
will let you know what I find out.  You could also post something to spring 
forum (http://forum.springframework.org), maybe someone could let you out there?
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2406#2406
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-11 Thread wciesiel

Something is wrong with transactionManager initialization when bean is 
initialized by remote appliaction... If I redeploy application, call some 
webapp on the same server which is accessing service (therefore initializating 
bean) - everything is working... Webapp is connecting and so is remote 
application. But if the FIRST call is made by remote app (I've used your advice 
and now I'm using generated ServiceLocator also in remote app) something fails 
in a such way that both remote and local web apps are unable to connect (web 
app is returning such exceptions:)

javax.servlet.ServletException#58; UserTransaction not bound

org.apache.struts.action.RequestProcessor.processException#40;RequestProcessor.java#58;516#41;

org.apache.struts.action.RequestProcessor.processActionPerform#40;RequestProcessor.java#58;423#41;

org.apache.struts.action.RequestProcessor.process#40;RequestProcessor.java#58;226#41;

org.apache.struts.action.ActionServlet.process#40;ActionServlet.java#58;1164#41;

org.apache.struts.action.ActionServlet.doGet#40;ActionServlet.java#58;397#41;

javax.servlet.http.HttpServlet.service#40;HttpServlet.java#58;697#41;

javax.servlet.http.HttpServlet.service#40;HttpServlet.java#58;810#41;

org.apache.struts.action.RequestProcessor.doForward#40;RequestProcessor.java#58;1056#41;

org.apache.struts.tiles.TilesRequestProcessor.doForward#40;TilesRequestProcessor.java#58;261#41;

org.apache.struts.action.RequestProcessor.processForwardConfig#40;RequestProcessor.java#58;388#41;

org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig#40;TilesRequestProcessor.java#58;316#41;

org.apache.struts.action.RequestProcessor.process#40;RequestProcessor.java#58;231#41;

org.apache.struts.action.ActionServlet.process#40;ActionServlet.java#58;1164#41;

org.apache.struts.action.ActionServlet.doGet#40;ActionServlet.java#58;397#41;

javax.servlet.http.HttpServlet.service#40;HttpServlet.java#58;697#41;

javax.servlet.http.HttpServlet.service#40;HttpServlet.java#58;810#41;

org.displaytag.filter.ResponseOverrideFilter.doFilter#40;ResponseOverrideFilter.java#58;125#41;

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter#40;ReplyHeaderFilter.java#58;75#41;



root cause 



javax.naming.NameNotFoundException#58; UserTransaction not bound

org.jnp.server.NamingServer.getBinding#40;NamingServer.java#58;491#41;

org.jnp.server.NamingServer.getBinding#40;NamingServer.java#58;499#41;

org.jnp.server.NamingServer.getObject#40;NamingServer.java#58;505#41;

org.jnp.server.NamingServer.lookup#40;NamingServer.java#58;278#41;

org.jnp.interfaces.NamingContext.lookup#40;NamingContext.java#58;544#41;

org.jnp.interfaces.NamingContext.lookup#40;NamingContext.java#58;658#41;

org.jnp.interfaces.NamingContext.lookup#40;NamingContext.java#58;520#41;

javax.naming.InitialContext.lookup#40;InitialContext.java#58;351#41;

org.springframework.jndi.JndiTemplate$1.doInContext#40;JndiTemplate.java#58;123#41;

org.springframework.jndi.JndiTemplate.execute#40;JndiTemplate.java#58;85#41;

org.springframework.jndi.JndiTemplate.lookup#40;JndiTemplate.java#58;121#41;

org.springframework.jndi.JndiTemplate.lookup#40;JndiTemplate.java#58;146#41;

org.springframework.transaction.jta.JtaTransactionManager.lookupUserTransaction#40;JtaTransactionManager.java#58;459#41;

org.springframework.transaction.jta.JtaTransactionManager.afterPropertiesSet#40;JtaTransactionManager.java#58;372#41;

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods#40;AbstractAutowireCapableBeanFactory.java#58;962#41;

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean#40;AbstractAutowireCapableBeanFactory.java#58;354#41;

org.springframework.beans.factory.support.AbstractBeanFactory.getBean#40;AbstractBeanFactory.java#58;223#41;

 while exception thrown by serviceLocator in remoteapp looks like this:

Exception in thread main 
org.springframework.remoting.RemoteAccessException#58; Cannot access remote 
service #91;massolit/ejb/com.massolit.service.MassolitCatalogService#93;; 
nested exception is java.rmi.ServerException#58; RemoteException occurred in 
server thread; nested exception is#58; 

nbsp; nbsp;java.rmi.ServerException#58; EJBException#58;; nested exception 
is#58; 

nbsp; nbsp;javax.ejb.EJBException#58; null; CausedByException is#58;

nbsp; nbsp;Unable to initialize group definition. Group resource name 
#91;classpath*#58;beanRefFactory.xml#93;, factory key 
#91;beanRefFactory#93;; nested exception is 
org.springframework.beans.factory.BeanCreationException#58; Error creating 
bean with name 'beanRefFactory' defined in URL 
#91;jar#58;file#58;/D#58;/Programs/jboss-4.0.1sp1/server/default/tmp/deploy/tmp34727massolit-app-0.1.ear-contents/massolit-core-0.1.jar!/beanRefFactory.xml#93;#58;
 Instantiation of bean failed; nested exception is 
org.springframework.beans.FatalBeanException#58; Could not instantiate class 

[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB] Something strange is going on while instanitalizing EJB

2005-07-10 Thread wciesiel

Hi there,



Some strange things are happening to my project...



1. Spring seems to ignore viewType tagged value of Service class - I had to 
change ejbViewType property



2. I have 2 types of clients - web-app (deployed within the same EAR as ejb) 
and standalone Swing-based application. And here comes bad voodoo: 



If my session bean (being session facade for some hibernate/spring persistance 
layer) is being called for the first time by web appliacation based on the same 
JBoss - everything works ok. Web app (made with bpm4struts) is connecting to 
the service and so is standalone appliaction.



BUT if first connection is being made by standalone remote appliacation (and 
therfore EJB is initialized) - I get exception from ejb's create() method 
invoked by ServiceLocator written by me:



2005-07-11 02#58;18#58;03,964 INFOnbsp; 
#91;org.springframework.orm.hibernate.LocalSessionFactoryBean#93; Closing 
Hibernate SessionFactory

2005-07-11 02#58;18#58;03,964 INFOnbsp; 
#91;net.sf.hibernate.impl.SessionFactoryImpl#93; closing

2005-07-11 02#58;18#58;03,964 INFOnbsp; 
#91;org.springframework.beans.factory.support.DefaultListableBeanFactory#93; 
Destroying singletons in factory 
#123;org.springframework.beans.factory.support.DefaultListableBeanFactory 
defining beans #91;beanRefFactory,beanRefFactoryEjb#93;; root of BeanFactory 
hierarchy#125;

2005-07-11 02#58;18#58;03,964 ERROR 
#91;org.jboss.ejb.plugins.LogInterceptor#93; EJBException in method#58; 
public abstract com.massolit.service.ejb.MassolitCatalogService 
com.massolit.service.ejb.MassolitCatalogServiceHome.create#40;#41; throws 
javax.ejb.CreateException,java.rmi.RemoteException#58;

javax.ejb.EJBException#58; Could not instantiate bean

nbsp; nbsp;at 
org.jboss.ejb.plugins.AbstractInstancePool.get#40;AbstractInstancePool.java#58;180#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome#40;StatelessSessionInstanceInterceptor.java#58;78#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome#40;AbstractInterceptor.java#58;90#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome#40;CallValidationInterceptor.java#58;41#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext#40;AbstractTxInterceptor.java#58;109#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions#40;TxInterceptorCMT.java#58;335#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome#40;TxInterceptorCMT.java#58;146#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome#40;SecurityInterceptor.java#58;116#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome#40;LogInterceptor.java#58;121#41;

nbsp; nbsp;at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome#40;ProxyFactoryFinderInterceptor.java#58;93#41;

nbsp; nbsp;at 
org.jboss.ejb.SessionContainer.internalInvokeHome#40;SessionContainer.java#58;613#41;

nbsp; nbsp;at org.jboss.ejb.Container.invoke#40;Container.java#58;894#41;

nbsp; nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0#40;Native 
Method#41;

nbsp; nbsp;at 
sun.reflect.NativeMethodAccessorImpl.invoke#40;NativeMethodAccessorImpl.java#58;39#41;

nbsp; nbsp;at 
sun.reflect.DelegatingMethodAccessorImpl.invoke#40;DelegatingMethodAccessorImpl.java#58;25#41;

nbsp; nbsp;at java.lang.reflect.Method.invoke#40;Method.java#58;585#41;

nbsp; nbsp;at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke#40;ReflectedDispatcher.java#58;141#41;

nbsp; nbsp;at 
org.jboss.mx.server.Invocation.dispatch#40;Invocation.java#58;80#41;

nbsp; nbsp;at 
org.jboss.mx.server.Invocation.invoke#40;Invocation.java#58;72#41;

nbsp; nbsp;at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke#40;AbstractMBeanInvoker.java#58;249#41;

nbsp; nbsp;at 
org.jboss.mx.server.MBeanServerImpl.invoke#40;MBeanServerImpl.java#58;644#41;

nbsp; nbsp;at 
org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke#40;JRMPInvoker.java#58;805#41;

nbsp; nbsp;at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke#40;JRMPInvoker.java#58;406#41;

nbsp; nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0#40;Native 
Method#41;

nbsp; nbsp;at 
sun.reflect.NativeMethodAccessorImpl.invoke#40;NativeMethodAccessorImpl.java#58;39#41;

nbsp; nbsp;at 
sun.reflect.DelegatingMethodAccessorImpl.invoke#40;DelegatingMethodAccessorImpl.java#58;25#41;

nbsp; nbsp;at java.lang.reflect.Method.invoke#40;Method.java#58;585#41;

nbsp; nbsp;at 
sun.rmi.server.UnicastServerRef.dispatch#40;UnicastServerRef.java#58;294#41;

nbsp; nbsp;at 
sun.rmi.transport.Transport$1.run#40;Transport.java#58;153#41;

nbsp; nbsp;at java.security.AccessController.doPrivileged#40;Native 
Method#41;

nbsp; nbsp;at 
sun.rmi.transport.Transport.serviceCall#40;Transport.java#58;149#41;

nbsp; nbsp;at 
sun.rmi.transport.tcp.TCPTransport.handleMessages#40;TCPTransport.java#58;460#41;

nbsp; nbsp;at 

[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-10 Thread [EMAIL PROTECTED]


Quote:
1. Spring seems to ignore viewType tagged value of Service class - I had to 
change ejbViewType property 
(end of quote)




It's always been ejbViewType...not sure how viewType would have ever worked.




Quote:
2. I have 2 types of clients - web-app (deployed within the same EAR as ejb) 
and standalone Swing-based application. And here comes bad voodoo: 
(end of quote)




Hmm not sure about that one, I'd have to investigate locally to see whats going 
on (since it doesn't give to much information).  What version of jboss are you 
using?
--
Chad Brandon - [EMAIL PROTECTED]

http://www.andromda.org
_
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2338#2338
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user


[Andromda-user] [Spring cartridge] [Something strange is going on while instanitalizing EJB]

2005-07-10 Thread wciesiel

JBoss 4.0.2. RemoteServiceLocator used by standalone web-app looks like this:





package com.massolit;



import javax.naming.Context;

import javax.naming.NamingException;

import javax.naming.InitialContext;

import java.util.Hashtable;

import org.apache.log4j.*;

import com.massolit.service.ejb.*;









/**

nbsp;* Locates and provides all available application services.

nbsp;*/

public class RemoteServiceLocator #123;



nbsp; /**

nbsp; nbsp;* The shared instance of this ServiceLocator.

nbsp; nbsp;*/

nbsp; private static RemoteServiceLocator instance;

nbsp; private static Logger logger = 
Logger.getLogger#40;RemoteServiceLocator#41;;



nbsp; protected RemoteServiceLocator#40;#41; #123;

nbsp; nbsp; // shouldn't be instantiated

nbsp; #125;



nbsp; /**

nbsp; nbsp;* Gets the shared instance of this Class

nbsp; nbsp;*

nbsp; nbsp;* @return the shared service locator instance.

nbsp; nbsp;*/

nbsp; public static final RemoteServiceLocator instance#40;#41; #123;

nbsp; nbsp; if #40;instance == null#41; #123;

nbsp; nbsp; nbsp; instance = new RemoteServiceLocator#40;#41;;

nbsp; nbsp; #125;

nbsp; nbsp; return instance;

nbsp; #125;



nbsp; private static InitialContext getInitialContext#40;#41; throws 
NamingException #123;

nbsp; nbsp; Hashtable environment = new Hashtable#40;#41;;





nbsp; nbsp; environment.put#40;Context.INITIAL_CONTEXT_FACTORY,

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
org.jnp.interfaces.NamingContextFactory#41;;

nbsp; nbsp; environment.put#40;Context.URL_PKG_PREFIXES,

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
org.jboss.naming#58;org.jnp.interfaces#41;;

nbsp; nbsp; environment.put#40;Context.PROVIDER_URL, jnp#58;// + hostname 
+ #58;1099#41;;

nbsp; nbsp; logger.debug#40;initial context set with 
hostname#58;+hostname+#58;1099#41;;







nbsp; nbsp; InitialContext toRet = new InitialContext#40;environment#41;;



nbsp; nbsp; return toRet;

nbsp; #125;





nbsp; private static Object lookupHome#40;java.util.Hashtable environment,

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;String jndiName, Class 
narrowTo#41; throws

nbsp; nbsp; nbsp; javax.naming.NamingException #123;

nbsp; nbsp; logger.debug#40;getting initial context...#41;;

nbsp; nbsp; javax.naming.InitialContext initialContext = 
getInitialContext#40;#41;;

nbsp; nbsp; logger.debug#40;looking up +jndiName+ JNDI name...#41;;



nbsp; nbsp; try #123;

nbsp; nbsp; nbsp; Object object = initialContext.lookup#40;jndiName#41;;

nbsp; nbsp; nbsp; // only narrow if necessary

nbsp; nbsp; nbsp; logger.debug#40;checking if should narrow...#41;;

nbsp; nbsp; nbsp; if 
#40;narrowTo.isInstance#40;java.rmi.Remote.class#41;#41; #123;

nbsp; nbsp; nbsp; nbsp; logger.debug#40;narrowing...#41;;

nbsp; nbsp; nbsp; nbsp; object = 
javax.rmi.PortableRemoteObject.narrow#40;object, narrowTo#41;;

nbsp; nbsp; nbsp; #125; else logger.debug#40;don't need to narrow.#41;;

nbsp; nbsp; nbsp; logger.debug#40;Home interface found successfully#41;;

nbsp; nbsp; nbsp; return object;

nbsp; nbsp; #125; finally #123;

nbsp; nbsp; nbsp; initialContext.close#40;#41;;

nbsp; nbsp; #125;



nbsp; #125;



nbsp; private static com.massolit.service.ejb.MassolitCatalogServiceHome

nbsp; nbsp; nbsp; massolitCatalogServiceHome = null;



nbsp; private static String hostname;

nbsp; /**

nbsp; nbsp;* Gets an instance of 
codecom.massolit.service.MassolitCatalogService/code

nbsp; nbsp;*/

nbsp; public final com.massolit.service.ejb.MassolitCatalogService

nbsp; nbsp; nbsp; getMassolitCatalogService#40;String toConnect#41; #123;

nbsp; nbsp; this.hostname = toConnect;

nbsp; nbsp; logger.debug#40;Getting home interface from host 
+toConnect#41;;

nbsp; nbsp; try #123;



nbsp; nbsp; nbsp; if #40;massolitCatalogServiceHome == null#41; #123;

nbsp; nbsp; nbsp; nbsp; massolitCatalogServiceHome = 
#40;com.massolit.service.ejb.

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
MassolitCatalogServiceHome#41; lookupHome#40;null,

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
com.massolit.service.ejb.MassolitCatalogServiceHome.JNDI_NAME,

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;com.massolit.service.ejb.

nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; 
nbsp;MassolitCatalogServiceHome.class#41;;

nbsp; nbsp; nbsp; #125;

nbsp; nbsp; nbsp; logger.debug#40;Creating service...#41;;nbsp; nbsp; 
nbsp; 

nbsp; nbsp; nbsp; MassolitCatalogService toRet = 
massolitCatalogServiceHome.create#40;#41;;





nbsp; nbsp; nbsp; logger.info#40;Service successfully initialized.#41;;

nbsp; nbsp; nbsp; return toRet;



nbsp; nbsp; #125; catch #40;Exception ex#41; #123;

nbsp; nbsp; nbsp; throw new javax.ejb.EJBException#40;ex#41;;

nbsp; nbsp; #125;



nbsp; #125;



#125;