Thomas,
Thanks a lot!!
But that links refers to the carol.properties for jetty 6
carol.start.ns=false
carol.start.jndi=false
carol.protocols=jrmp
carol.start.rmi=false
carol.jvm.rmi.local.call=true
carol.jndi.java.naming.factory.url.pkgs=org.mortbay.naming
Can you point me for the same for jetty 7. I tried to google out but I haven’t find anything?
Thanks
Sandeep
From: Thomas Becker [mailto:tbecker@xxxxxxxxxxx]
Sent: 24 February 2012 20:52
To: Sandeep Arora
Subject: Re: [jetty-dev] help : A flat name can only have a single component..help asap
Hi Sandeep,
you didn't mention that you are using JOTM and that explains the problem. Yes, you will need a carol.properties file and in a standard jetty distribution you've to place it in the "resources" directory. As you're using jetty embedded you need to make sure that carol.properties is available in your classpath.
Here you'll find info about what to put into carol.properties, etc.:
http://docs.codehaus.org/display/JETTY/JOTM
Cheers,
Thomas
On 2/26/12 3:23 PM, Sandeep Arora wrote:
Hi Thomas,
Thanks for your quick reply. We have a javacode by which we start the jetty.
Server server = new Server();
XmlConfiguration configuration = new XmlConfiguration(new File("jetty.xml").toURI().toURL());
configuration.configure(server);
new JettyHttpServerProvider().setServer(server);
System.setProperty("com.sun.net.httpserver.HttpServerProvider", "org.eclipse.jetty.jaxws2spi.JettyHttpServerProvider");
server.start();
I have attached the the jetty.xml file too.
Please suggest ASAP!!
Also I have a quick question, do carol.properties file plays any role in jetty 7+ ? If yes, can you please send me the content for the same and where I have to place that file?
Best Regards,
Sandeep Arora | Software Engineer

- Quick, Easy, and Affordable Integration Software
- Business Process Management for Everyone
Office: +91-120-4274025 | Mobile: +91-9711076814
E-mail: sandeep.arora@xxxxxxxxxxx | Link: www.adeptia.com
From: Thomas Becker [mailto:tbecker@xxxxxxxxxxx]
Sent: 24 February 2012 17:53
To: Jetty @ Eclipse developer discussion list
Cc: Sandeep Arora
Subject: Re: [jetty-dev] help : A flat name can only have a single component..help asap
Sandeep, could you please paste your start.ini?
On 2/26/12 1:28 PM, Sandeep Arora wrote:
Hi ,
I am using a third party web application with jetty 7.6 . That third party web
app needs a datasource so I need to configure datasource in context.xml , here
is its content :
<Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Array id="plusConfig" type="java.lang.String">
<Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
<Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
<Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item> <!-- add for
JNDI -->
<Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item> <!-- add
for JNDI -->
<Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
<Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
</Array>
<Set name="contextPath">/frevvo</Set>
<Set name="war"><SystemProperty name="jetty.home"
default="."/>/RichForms</Set>
<Set name="configurationClasses"><Ref id="plusConfig"/></Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
default="."/>/web/WEB-INF/webdefault.xml</Set>
<New id="myds" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg><Ref id="wac"/></Arg>
<Arg>jdbc/frevvoDS</Arg>
<Arg>
<New class="org.enhydra.jdbc.standard.StandardXADataSource">
<Set name="DriverName">org.hsqldb.jdbcDriver</Set>
<Set name="Url">jdbc:hsqldb:file:formsdb</Set>
<Set name="User">sa</Set>
<Set name="Password"></Set>
</New>
</Arg>
</New>
</Configure>
But when i run the server I get the error :
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:761)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:386)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:338)
at
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:291)
at
org.eclipse.jetty.deploy.ContextDeployer.createContext(ContextDeployer.java:456)
at
org.eclipse.jetty.deploy.ContextDeployer.deploy(ContextDeployer.java:349)
at
org.eclipse.jetty.deploy.ContextDeployer.access$000(ContextDeployer.java:77)
at
org.eclipse.jetty.deploy.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:102)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:604)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:535)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:398)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:331)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.deploy.ContextDeployer.doStart(ContextDeployer.java:416)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:58)
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:53)
at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:91)
at org.eclipse.jetty.server.Server.doStart(Server.java:261)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at com.adeptia.indigo.WebRunner.boot(WebRunner.java:263)
at com.adeptia.indigo.WebRunner.main(WebRunner.java:100)
Caused by: javax.naming.InvalidNameException: A flat name can only have a
single component
at javax.naming.NameImpl.addAll(NameImpl.java:621)
at javax.naming.CompoundName.addAll(CompoundName.java:442)
at
org.eclipse.jetty.plus.jndi.NamingEntryUtil.makeNamingEntryName(NamingEntryUtil.java:155)
at org.eclipse.jetty.plus.jndi.NamingEntry.save(NamingEntry.java:184)
at org.eclipse.jetty.plus.jndi.Resource.<init>(Resource.java:33)
... 26 more
I have defined the resource in web.xml too
<resource-ref>
<description>frevvo DB Data Source</description>
<res-ref-name>jdbc/frevvoDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Can you tell me where I am doing wrong step and let me know if I have missed
any step.
Reproducible: Always
Steps to Reproduce:
1.Configure datasource in context.xml
2.Start the server.
I tried to contact jetty guys , they told me Try to not specify the scope by
removing the reference to wac:
Change:
<Arg><Ref id="wac"/></Arg>
To:
<Arg></Arg>
I tried this but this haven’t resolved the problem. I am getting the same error. Please help ASAP!!!!
Thanks
Sandeep
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev
--
thomas becker
tbecker@xxxxxxxxxxx
http://webtide.com / http://intalio.com
(the folks behind jetty and cometd)
--
thomas becker
tbecker@xxxxxxxxxxx
http://webtide.com / http://intalio.com
(the folks behind jetty and cometd)