You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "tommy (JIRA)" <ji...@apache.org> on 2007/08/08 03:21:59 UTC

[jira] Created: (AXIS2-3100) How can I integrate Spring , Hibernate with Axis2?

How can I integrate Spring , Hibernate with Axis2?
--------------------------------------------------

                 Key: AXIS2-3100
                 URL: https://issues.apache.org/jira/browse/AXIS2-3100
             Project: Axis 2.0 (Axis2)
          Issue Type: Task
          Components: samples
    Affects Versions: 1.2
         Environment: winxp ,   Axis2
            Reporter: tommy


I have tested my hibernate and spring codes in a single java project, it works.  When I added some Axis2 features to it and deploy it to the Tomcat with Axis2.war.   It gives me the exception that the server couldnot find the dao.weatherForeforecastDAO,  
My structure of .aar is like this,
Package dao:
       Weatherforecast.class
       WeatherforecastDAO.class
       Weatherforecast.hbm.xml
Package init:
     SpringInit.class
Package META-INF:
       MANIFEST.MF
        services.xml
Package service:
        WeatherService.class
under root:
applicationContext.xml
hibernate.cfg.xml

The codes in WeatherService.class is,
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
WeatherforecastDAO weatherforecastDAO = (WeatherforecastDAO) ctx.getBean("weatherforecastDAO");

The problem now is that the deployment can find applicationContext.xml but not weatherforecastDAO in context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3100) How can I integrate Spring , Hibernate with Axis2?

Posted by "tommy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518297 ] 

tommy commented on AXIS2-3100:
------------------------------

Could anyone give a workable sample that demonstrate how Axis2 works with Spring and Hibernate?    I'm new to that kind of application.  Thanks!!!

> How can I integrate Spring , Hibernate with Axis2?
> --------------------------------------------------
>
>                 Key: AXIS2-3100
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3100
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Task
>          Components: samples
>    Affects Versions: 1.2
>         Environment: winxp ,   Axis2
>            Reporter: tommy
>
> I have tested my hibernate and spring codes in a single java project, it works.  When I added some Axis2 features to it and deploy it to the Tomcat with Axis2.war.   It gives me the exception that the server couldnot find the dao.weatherForeforecastDAO,  
> My structure of .aar is like this,
> Package dao:
>        Weatherforecast.class
>        WeatherforecastDAO.class
>        Weatherforecast.hbm.xml
> Package init:
>      SpringInit.class
> Package META-INF:
>        MANIFEST.MF
>         services.xml
> Package service:
>         WeatherService.class
> under root:
> applicationContext.xml
> hibernate.cfg.xml
> The codes in WeatherService.class is,
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
> WeatherforecastDAO weatherforecastDAO = (WeatherforecastDAO) ctx.getBean("weatherforecastDAO");
> The problem now is that the deployment can find applicationContext.xml but not weatherforecastDAO in context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3100) How can I integrate Spring , Hibernate with Axis2?

Posted by "robert lazarski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518305 ] 

robert lazarski commented on AXIS2-3100:
----------------------------------------

The docs explaining how hibernate and spring can work together were update for the release scheduled for this Friday.  In the meantime you can see the raw, unrendered version here: 

http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/documentation/xdocs/%40axis2_version_dir%40/spring.xml?revision=563392&view=markup

> How can I integrate Spring , Hibernate with Axis2?
> --------------------------------------------------
>
>                 Key: AXIS2-3100
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3100
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Task
>          Components: samples
>    Affects Versions: 1.2
>         Environment: winxp ,   Axis2
>            Reporter: tommy
>
> I have tested my hibernate and spring codes in a single java project, it works.  When I added some Axis2 features to it and deploy it to the Tomcat with Axis2.war.   It gives me the exception that the server couldnot find the dao.weatherForeforecastDAO,  
> My structure of .aar is like this,
> Package dao:
>        Weatherforecast.class
>        WeatherforecastDAO.class
>        Weatherforecast.hbm.xml
> Package init:
>      SpringInit.class
> Package META-INF:
>        MANIFEST.MF
>         services.xml
> Package service:
>         WeatherService.class
> under root:
> applicationContext.xml
> hibernate.cfg.xml
> The codes in WeatherService.class is,
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
> WeatherforecastDAO weatherforecastDAO = (WeatherforecastDAO) ctx.getBean("weatherforecastDAO");
> The problem now is that the deployment can find applicationContext.xml but not weatherforecastDAO in context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3100) How can I integrate Spring , Hibernate with Axis2?

Posted by "tommy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tommy updated AXIS2-3100:
-------------------------

    Attachment: Axis_Spring_Hibernate.rar

The problem mentioned above has been fixed ,  but I encounter a new issue now. 
When I create a record to the database, the server gives me the exception as follows,
Exception occurred while trying to invoke service method createForecast
java.lang.NullPointerException
        at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusines
sLogic(RPCInOnlyMessageReceiver.java:72)
        at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(Abstract
InMessageReceiver.java:33)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)

I'm not familiar with RPC mode, but the codes I attached here  works well in a single local project.

Could you help find where the cause is, and how I can fix it .    Many thanks!!!

> How can I integrate Spring , Hibernate with Axis2?
> --------------------------------------------------
>
>                 Key: AXIS2-3100
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3100
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Task
>          Components: samples
>    Affects Versions: 1.2
>         Environment: winxp ,   Axis2
>            Reporter: tommy
>         Attachments: Axis_Spring_Hibernate.rar
>
>
> I have tested my hibernate and spring codes in a single java project, it works.  When I added some Axis2 features to it and deploy it to the Tomcat with Axis2.war.   It gives me the exception that the server couldnot find the dao.weatherForeforecastDAO,  
> My structure of .aar is like this,
> Package dao:
>        Weatherforecast.class
>        WeatherforecastDAO.class
>        Weatherforecast.hbm.xml
> Package init:
>      SpringInit.class
> Package META-INF:
>        MANIFEST.MF
>         services.xml
> Package service:
>         WeatherService.class
> under root:
> applicationContext.xml
> hibernate.cfg.xml
> The codes in WeatherService.class is,
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
> WeatherforecastDAO weatherforecastDAO = (WeatherforecastDAO) ctx.getBean("weatherforecastDAO");
> The problem now is that the deployment can find applicationContext.xml but not weatherforecastDAO in context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org