[JBoss/Spring Integration] - Re: jboss-spring.xml beans location
by loumaus
well .. still not giving it up ..
my jboss-spring.xml looks like the following
| <beans>
| ..
| ..
| <bean id="catalogDao" class="foo.bar.dao.DefaultCatalogDao" />
|
| <bean id="catalogService" class="foo.bar.service.DefaultCatalogService" >
| <property name="catalogDao" ref="catalogDao"/>
| </bean>
| ..
|
|
My stateless session bean covers a private object like
| @Spring(..)
| private CatalogService catalogService
|
This works out fine ...
My simple jar based ( and spring deployer deployed ) target class is properly referenced by my stateless session bean. ( ssb gets injected and uses the reference )
The DefaultCatalogService covers a private object:
| private CatalogDao catalogDao ( setter is available as well )
|
This one should be injected during spring startup ....
but it definately does not ..
Catching an exception reveals that it has not been injected (Nullpointer ).
Again like some messages before I can see in the logs that the bean is properly created:
| (Creating instance of bean 'catalogDao' with merged definition [Root bean: class [foo.bar.dao.Defaul
| tCatalogDao]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nu
| ll; defined in URL [jar:file:/home/tmaus/server/jboss-4.0.5.GA/server/default/tmp/deploy/tmp14056catalog.ear-contents/catalog-spring.spring!/META-INF/jboss-spring.xml]]
| 2007-07-06 16:15:34,897 DEBUG [org.springframework.beans.CachedIntrospectionResults] Not strongly caching class [foo.bar.dao.DefaultCatalogDao] because it is not cache-safe
| )
|
so .. my question on this topic is ..
I can see that the complete spring framework gets properly instantiated, started and it configures everything properly ( it did so as well with the other spring beans which could not be referenced as described in former message )
Due to the fact that the dao does not get properly injected, I assume that the approach is facing a problem somewhere ... but I cannot say where ..
Hope you can help on this ..
greetings from berlin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061334#4061334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061334
18Â years, 9Â months
[EJB 3.0] - Re: Automatic table creation
by georgesberscheid
Hi,
thanks for you reply.
<property name="hibernate.hbm2ddl.auto" value="update" />
All it says in addition to the above is the following:
16:12:18,321 INFO [Ejb3Configuration] found EJB3 Entity bean: eu.mpulse.commons.repository.customers.Account
| 16:12:18,331 INFO [Ejb3Configuration] found EJB3 Entity bean: eu.mpulse.commons.repository.customers.Customer
| 16:12:18,712 INFO [AnnotationBinder] Binding entity from annotated class: eu.mpulse.commons.repository.customers.Account
| 16:12:18,712 INFO [EntityBinder] Bind entity eu.mpulse.commons.repository.customers.Account on table accounts
| 16:12:18,672 INFO [AnnotationBinder] Binding entity from annotated class: eu.mpulse.commons.repository.customers.Customer
| 16:12:18,672 INFO [EntityBinder] Bind entity eu.mpulse.commons.repository.customers.Customer on table customers
| 16:12:21,236 ERROR [SchemaUpdate] Unsuccessful: alter table accounts add index FK809DBBE624CB3F8D (customer_id), add constraint FK809DBBE624CB3F8D foreign key (customer_id) references customers (id)
| 16:12:21,236 ERROR [SchemaUpdate] Duplicate key name 'FK809DBBE624CB3F8D'
but those messages all seem related to the original problem to me.
Thanks,
Georges
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061330#4061330
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061330
18Â years, 9Â months
[JBoss Portal] - Bug in JBoss Portal 2.6 GA version
by ganeshraja
Bug # 3
I am getting exception when i change the Dashboard theme properties: RenderSet to default in Admin->Home->Management Portlet->Dashboards page.
ERROR
| Cause: javax.portlet.PortletException: /WEB-INF/jsf/dashboards.xhtml @35,129 actionListener="#{dashboardmgr.theme.execute}": java.lang.NullPointerException
| Message: /WEB-INF/jsf/dashboards.xhtml @35,129 actionListener="#{dashboardmgr.theme.execute}": java.lang.NullPointerException
| StackTrace:
| javax.portlet.PortletException: /WEB-INF/jsf/dashboards.xhtml @35,129 actionListener="#{dashboardmgr.theme.execute}": java.lang.NullPointerException
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPort
| let.java:253)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061317#4061317
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061317
18Â years, 9Â months
[JCA/JBoss] - Re: Resource adapter deployment problem
by adrianï¼ jboss.org
You've using the 1.0 xml, but spec-version="1.5". Why?
Choose which one you want (probably spec-version="1.0")
the xml is different according to the spec version.
For 1.5, you would need to add "outbound-resourceadapter"
and "connection-definition" elements.
e.g. From one of the jboss rars
| <connector xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
| version="1.5">
|
| <description>JBoss Resource Adapter for JDBC 3 XA drivers</description>
| <display-name>JBoss JDBC XATransaction ResourceAdapter</display-name>
|
| <vendor-name>JBoss, Inc</vendor-name>
| <eis-type>JDBC 3.0 XA Relational Database</eis-type>
| <resourceadapter-version>5.0</resourceadapter-version>
|
| <license>
| <description>
| JBoss, Home of Professional Open Source
| Copyright 2005, JBoss Inc., and individual contributors as indicated
| by the @authors tag. See the copyright.txt in the distribution for a
| full listing of individual contributors.
|
| This is free software; you can redistribute it and/or modify it
| under the terms of the GNU Lesser General Public License as
| published by the Free Software Foundation; either version 2.1 of
| the License, or (at your option) any later version.
|
| This software is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
| Lesser General Public License for more details.
|
| You should have received a copy of the GNU Lesser General Public
| License along with this software; if not, write to the Free
| Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
| 02110-1301 USA, or see the FSF site: http://www.fsf.org.
| </description>
| <license-required>true</license-required>
| </license>
|
| <resourceadapter>
| <resourceadapter-class>org.jboss.resource.deployment.DummyResourceAdapter</resourceadapter-class>
|
| <outbound-resourceadapter>
| <connection-definition>
| <managedconnectionfactory-class>org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory</managedconnectionfactory-class>
| etc.
|
>From the parsing code (where it is failing):
| else if (localName.equals("connection-definition") ||
| (localName.equals("resourceadapter") && cmd.getVersion().equals("1.0")))
| {
| ConnectionDefinitionMetaData cdmd = new ConnectionDefinitionMetaData(cmd);
| cmd.addConnectionDefinition(cdmd);
| return cdmd;
| }
|
cmd.getVersion() is the spec-version in your xml.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061315#4061315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061315
18Â years, 9Â months