geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Andrushchak <us...@dekasoft.com.ua>
Subject Re: custom service deployment
Date Thu, 12 Jan 2006 09:40:05 GMT
David Jencks wrote:

>
> On Jan 12, 2006, at 1:25 AM, Alex Andrushchak wrote:
>
>> Thanks David!
>>
>> We've done next step. :-)
>>
>> Now deployer is trying to deploye service. But:
>> D:\local\geronimo-1.0>java -jar bin/deployer.jar deploy 
>> queryphone-service-plan.xml
>> Username: system
>> Password:
>>
>>     Error: Unable to distribute queryphone-service-plan.xml:
>>     java.lang.NullPointerException
>>
>>         null
>>
>> In geronimo.log there is stack trace for it:
>> 11:18:55,031 ERROR [Deployer] Deployment failed due to
>> java.lang.NullPointerException
>>         at java.util.Hashtable.put(Unknown Source)
>>         at 
>> org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory.getComponentName(NameFactory.java:26
>> 3)
>>         at 
>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.addGBeanData(ServiceConfigBui
>> lder.java:329)
>>         at 
>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.addGBeans(ServiceConfigBuilde
>> r.java:311)
>>         at 
>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConfiguration(ServiceCon
>> figBuilder.java:207)
>>         at 
>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConfiguration(ServiceCon
>> figBuilder.java:167)
>>         at 
>> org.apache.geronimo.deployment.service.ServiceConfigBuilder$$FastClassByCGLIB$$9f173be6.i
>> nvoke(<generated>)
>>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>
>> I think it is because i have not name attribute of gbean i my 
>> deployement plan:
>> <configuration
>>     xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
>>     parentId="geronimo/j2ee-system/1.0/car"
>>     configId="com/dekasoft/logicland/service/SpiderService">
>>
>>     <dependency>
>>         <uri>queryphone/queryphone-service/1.0/jar</uri>
>>     </dependency>
>>
>>     <gbean class="com.dekasoft.logicland.service.SpiderService">
>>     </gbean>
>>
>> </configuration>
>>
>> This attribute is not required by xsd schema.
>
>
> I don't think it is possible to enforce a choice between two xml 
> attributes using xml schema.  You have to supply name or gbeanName.

I think this attribute should be marked i requred in schema, that's all.

>> It mean that we have bug in xsd schema or in server.
>
>
> The server should detect this and provide a meaningful error message.  
>  Would you open a jira issue for this?

Actionally i do not know how to do it. Please open it if you wish.

Ok. So my next question is what should i put as name tag attribute?
My current deployment plan is:
<configuration
    xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
    parentId="geronimo/j2ee-system/1.0/car"
    configId="com/dekasoft/logicland/service/SpiderService">

    <dependency>
        <uri>queryphone/queryphone-service/1.0/jar</uri>
    </dependency>

    <gbean name="geronimo.server:name=SpiderService"
        class="com.dekasoft.logicland.service.SpiderService">
    </gbean>

</configuration>

And i have the next result:
D:\local\geronimo-1.0>java -jar bin/deployer.jar deploy 
queryphone-service-plan.xml
Username: system
Password:

    Error: Unable to distribute queryphone-service-plan.xml: Invalid
    ObjectName: geronimo.server:name=SpiderService

        Invalid value: geronimo.server:name=SpiderService

>
> thanks
> david jencks
>
>>
>>
>>
>> David Jencks wrote:
>>
>>> We'll see how many typos I can include this time :-)
>>>
>>> You need to give your jar a version such as 1.0-SNAPSHOT and change 
>>> your uri to 
>>>
>>>> <uri>queryphone/queryphone-service/1.0-SNAPSHOT/jar</uri>
>>>
>>>
>>> You have put the jar in the correct location: the uri is not the 
>>> same as the path to the jar, instead it includes the maven 
>>> "components" groupId, artifactId, version, and type.
>>>
>>> david jencks
>>>
>>>
>>>
>>>
>>> On Jan 12, 2006, at 12:40 AM, Alex Andrushchak wrote:
>>>
>>>> Thanks Kristian!
>>>>
>>>> This time it help to find parent configuration. But i have another 
>>>> error:
>>>> D:\local\geronimo-1.0>java -jar bin/deployer.jar deploy 
>>>> queryphone-service-plan.xml
>>>> Username: system
>>>> Password:
>>>>
>>>>     Error: Unable to distribute queryphone-service-plan.xml:
>>>>     org.apache.geronimo.kernel.repository.MissingDependencyException:
>>>>     uri queryphone/jars/queryphone-service.jar not found in repository
>>>>
>>>>         uri queryphone/jars/queryphone-service.jar not found in 
>>>> repository
>>>>
>>>> I've created jar file with service class and put it to 
>>>> ${geronimo.dir}/repository/queryphone/jars/ directory.
>>>>
>>>> Deployment plan after all changes is:
>>>> <configuration
>>>>     xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"
>>>>     parentId="geronimo/j2ee-system/1.0/car"
>>>>     configId="com/dekasoft/logicland/service/SpiderService">
>>>>
>>>>     <dependency>
>>>>         <uri>queryphone/jars/queryphone-service.jar</uri>
>>>>     </dependency>
>>>>
>>>>     <gbean class="com.dekasoft.logicland.service.SpiderService">
>>>>     </gbean>
>>>>
>>>> </configuration>
>>>>
>>>> Do not understand why it can't find this file.
>>>> Any advice?
>>>> Thanks.
>>>>
>>>>
>>>>
>>>> Kristian Köhler wrote:
>>>>
>>>>>Hi
>>>>>
>>>>>think this is a typo
>>>>>
>>>>>not: geronimo/j2ee-system/1.0/jar
>>>>>try: geronimo/j2ee-system/1.0/car
>>>>>
>>>>>Kristian
>>>>>
>>>>>Alex Andrushchak wrote:
>>>>>  
>>>>>
>>>>>>Unfortunately the same:
>>>>>>
>>>>>>D:\local\geronimo-1.0>java -jar bin/deployer.jar deploy
>>>>>>queryphone-service-plan.xml
>>>>>>Username: system
>>>>>>Password:
>>>>>>
>>>>>>   Error: Unable to distribute queryphone-service-plan.xml: Unable
to
>>>>>>   load first parent of configuration
>>>>>>   com/dekasoft/logicland/service/SpiderService
>>>>>>
>>>>>>       No configuration with id: geronimo/j2ee-system/1.0/jar
>>>>>>
>>>>>>Anyway, thanks for attempt!
>>>>>>
>>>>>>David Jencks wrote:
>>>>>>
>>>>>>    
>>>>>>
>>>>>>>Try setting parentId="geronimo/j2ee-system/1.0/jar"
>>>>>>>
>>>>>>>The uris for parents and dependencies changed format shortly before
1.0.
>>>>>>>
>>>>>>>thanks
>>>>>>>david jencks
>>>>>>>
>>>>>>>On Jan 11, 2006, at 11:43 PM, Alex Andrushchak wrote:
>>>>>>>
>>>>>>>      
>>>>>>>
>>>>>>>>Sorry, I've forget to attach files.
>>>>>>>>
>>>>>>>>Hi!
>>>>>>>>
>>>>>>>>I've created my test service and deployment plan but can't
deploy it
>>>>>>>>into geronimo.
>>>>>>>>There is error message:
>>>>>>>>D:\local\geronimo-1.0>ar bin/deployer.jar deploy queryphone-
service.jar
>>>>>>>>queryphone-service-plan.xml
>>>>>>>>Username: system
>>>>>>>>Password:
>>>>>>>>
>>>>>>>>   Error: Unable to distribute queryphone-service.jar: Unable
to load
>>>>>>>>   first parent of configuration
>>>>>>>>   com/dekasoft/logicland/service/SpiderService
>>>>>>>>
>>>>>>>>       No configuration with id: org/apache/geronimo/System
>>>>>>>>
>>>>>>>>Deployemnt plan and source of service is attached.
>>>>>>>>Is it possible to get intruction how to deploy custom service
to 
>>>>>>>>geronimo.
>>>>>>>>I've read article about Custom quartz service but it use maven
for 
>>>>>>>>build
>>>>>>>>and deployment.
>>>>>>>>It is not clear what is going on under cover.
>>>>>>>>
>>>>>>>>Thanks!
>>>>>>>>
>>>>>>>>Best regards,
>>>>>>>>Alex Andrushchak
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>"http://geronimo.apache.org/xml/ns/deployment-1.0"
>>>>>>>>    parentId="org/apache/geronimo/System"
>>>>>>>>    configId="com/dekasoft/logicland/service/SpiderService">
>>>>>>>>
>>>>>>>>    
>>>>>>>>    
>>>>>>>>
>>>>>>>>/*
>>>>>>>> * $Id: ORBService.java 1396 2005-12-21 17:23:05Z alex $
>>>>>>>> */
>>>>>>>>
>>>>>>>>package com.dekasoft.logicland.service;
>>>>>>>>
>>>>>>>>import org.apache.commons.logging.Log;
>>>>>>>>import org.apache.commons.logging.LogFactory;
>>>>>>>>import org.apache.geronimo.gbean.GBeanInfo;
>>>>>>>>import org.apache.geronimo.gbean.GBeanInfoBuilder;
>>>>>>>>import org.apache.geronimo.gbean.GBeanLifecycle;
>>>>>>>>
>>>>>>>>public class SpiderService
>>>>>>>>    implements GBeanLifecycle
>>>>>>>>{
>>>>>>>>
>>>>>>>>    public static final GBeanInfo GBEAN_INFO;
>>>>>>>>
>>>>>>>>    static {
>>>>>>>>        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder
>>>>>>>>("SpiderService",
>>>>>>>>                SpiderService.class);
>>>>>>>>        GBEAN_INFO = infoFactory.getBeanInfo();
>>>>>>>>    }
>>>>>>>>
>>>>>>>>    public static GBeanInfo getGBeanInfo() {
>>>>>>>>        return GBEAN_INFO;
>>>>>>>>    }
>>>>>>>>
>>>>>>>>    private Log logger = null;
>>>>>>>>
>>>>>>>>    public SpiderService() {
>>>>>>>>        logger = LogFactory.getLog(SpiderService.class);
>>>>>>>>    }
>>>>>>>>
>>>>>>>>    public void doFail() {
>>>>>>>>        logger.info("SpiderService.doFail");
>>>>>>>>    }
>>>>>>>>
>>>>>>>>    public void doStart() throws Exception {
>>>>>>>>        logger.info("SpiderService.doStart");
>>>>>>>>    }
>>>>>>>>
>>>>>>>>    public void doStop() throws Exception {
>>>>>>>>        logger.info("SpiderService.doStop");
>>>>>>>>    }
>>>>>>>>
>>>>>>>>}
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>        
>>>>>>>>
>>>>>>>      
>>>>>>>
>>>>>>    
>>>>>>
>>>>>  
>>>>>
>>>>
>>>
>>
>


Mime
View raw message