geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Invalid ObjectName Issue
Date Tue, 17 Jan 2006 01:04:16 GMT
Oops, I missed the bigger problem.  If you specify "name" most of the  
object name is generated for you in a jsr-77-like format.  In this  
case you need to specify only a simple string without any object name  
separators (including at least :,=).
name="SimpleGBean"

  If you want to specify the entire object name yourself, you need to  
use
gbeanName="foo:x=y,true=false,white=black,name=SimpleGBean" etc etc.

Hope this helps,
david jencks

On Jan 16, 2006, at 10:55 AM, David Jencks wrote:

> I think that gbean names cannot have spaces in them, so calling  
> your gbean SimpleGBean rather than Simple GBean should work.
>
> thanks
> david jencks
>
> On Jan 16, 2006, at 9:50 AM, Nelson A. Perez wrote:
>
>>
>> Hi All,
>>
>>  I get the following error while trying to deploy my
>> sample application: (Apache Geronimo is running on
>> another console)
>>
>> "Error: Unable to distribute mygbean.xml: Invalid
>> ObjectName:
>>
>> geronimo.example1.name=Simple GBean
>>
>> Invalid value; geronimo.example1:name=Simple GBean"
>>
>>
>> The configuration plan that I am using looks as
>> follows:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <configuration
>>
>> xmlns="http://geronimo.apache.org/xml/ns/deployment"
>>     configId="example1/MyGBean"
>>>
>>
>> 	<dependency>		
>>         <groupId>samples</groupId>
>>     	<artifactId>mygbean</artifactId>
>>     	<version>1.0</version>  	    	
>> 	</dependency>
>>
>>     <gbean name="geronimo.example1:name=Simple GBean"
>> class="example1.MyGBean" />
>>
>> </configuration>
>>
>>
>> and the GBean is just: ( sample taken from Wiki:
>> http://wiki.apache.org/geronimo/GBeans)
>>
>>
>> package example1;
>>
>> import org.apache.geronimo.gbean.GBeanInfo;
>> import org.apache.geronimo.gbean.GBeanInfoBuilder;
>>
>> public class MyGBean {
>>
>>     public static final GBeanInfo GBEAN_INFO;
>>
>>     static {
>>         GBeanInfoBuilder infoBuilder = new
>> GBeanInfoBuilder("MyGBean", MyGBean.class);
>>         GBEAN_INFO = infoBuilder.getBeanInfo();
>>     }
>>
>>     public static GBeanInfo getGBeanInfo() {
>>         return GBEAN_INFO;
>>     }
>> }
>>
>>
>> My build file is:
>>
>> <project name="geronimo-mygbean-sample"
>> default="build">
>>
>> 		<property name="geronimo.home" value=".."/>
>> 		
>> 		<path id="geronimo.classpath">
>> 			<fileset dir="${geronimo.home}/repository">
>> 				<include name="**/*.jar"/>
>> 			</fileset>
>> 		</path>
>> 		
>> 		<target  name="init">
>> 				<mkdir dir="build"/>
>> 				<mkdir dir="build/classes"/>
>> 		</target>
>> 		
>> 		<target name="build" depends="init">
>> 				<javac srcdir="src" destdir="build/classes"
>> classpath="">
>> 					<classpath refid="geronimo.classpath"/>
>> 				</javac>
>> 				<mkdir
>> dir="${geronimo.home}/repository/samples/jars"/>
>> 				<jar jarfile="mygbean-1.0.jar"
>> 			 			basedir="build/classes"/>
>> 			 			<copy file="mygbean-1.0.jar"
>> tofile="${geronimo.home}/repository/samples/jars/mygbean-1.0.jar"/>
>> 		 			
>> 		</target>
>> 				
>> </project>
>>
>>
>> This is an example as simple as it can get. I am now
>> NOT getting the Missing Dependency Exception thanks to
>> advice from Aaron Mulder on how to specify properly
>> the URI. Yet, this new issue is preventing me from
>> running this simple GBean. Any help on this new issue
>> will be appreciated.
>>
>> Thanks!
>> NP.
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>


Mime
View raw message