tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casey Rayman <caseyray...@gmail.com>
Subject Re: JNDI lookup help
Date Fri, 09 Nov 2007 21:01:59 GMT
Unfortunately my Weblogic experience is clearly boxed in at version 7,  
and I wouldn't say that my experience runs real deep there either.   
I've only been tinkering with this application a few months now.

Casey

On Nov 9, 2007, at 2:50 PM, David Blevins wrote:

> Looks like reference-descriptor is an element that was cut out of  
> the schema somewhere along the line.  Do you know if there is a more  
> current element that replaces this one?  We could add the old  
> element to our jaxb tree then move the data over into the right  
> place of the new tree.
>
> I suppose I should pull down the v7 descriptors and generate a  
> sample xml doc with all the elements to see what else might have  
> disappeared between then and the v9 descriptors.
>
> -David
>
> On Nov 8, 2007, at 1:41 PM, Casey Rayman wrote:
>
>> We use Ant here.  I'll download a copy of Maven to see if I can't  
>> get a little more self sufficient with my own builds and perhaps  
>> even contribute.
>>
>> I've been busy this week with production problems, but I gave it a  
>> quick try and this is the error I got so far.  I'll see if I can't  
>> dig into it a bit further this evening.  It's probably something  
>> I'm doing wrong though.
>>
>> [severity=ERROR,message=unexpected element (uri:"http://www.bea.com/ns/weblogic/90

>> ", local:"reference-descriptor"). Expected elements are <{http://www.bea.com/ns/weblogic/90

>> }resource-description>,<{http://www.bea.com/ns/weblogic/90}network- 
>> access-point>,<{http://www.bea.com/ns/weblogic/90}entity- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}enable-call-by- 
>> reference>,<{http://www.bea.com/ns/weblogic/90}create-as-principal- 
>> name>,<{http://www.bea.com/ns/weblogic/90}stateful-session- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}local-jndi-name>,<{http://www.bea.com/ns/weblogic/90

>> }ejb-name>,<{http://www.bea.com/ns/weblogic/90}dispatch-policy>,<{http://www.bea.com/ns/weblogic/90

>> }message-driven-descriptor>,<{http://www.bea.com/ns/weblogic/ 
>> 90}clients-on-same-server>,<{http://www.bea.com/ns/weblogic/90}run- 
>> as-principal-name>,<{http://www.bea.com/ns/weblogic/90}iiop- 
>> security-descriptor>,<{http://www.bea.com/ns/weblogic/90}jndi- 
>> name>,<{http://www.bea.com/ns/weblogic/90}service-reference- 
>> description>,<{http://www.bea.com/ns/weblogic/90}ejb-reference- 
>> description>,<{http://www.bea.com/ns/weblogic/90}remove-as- 
>> principal-name>,<{http://www.bea.com/ns/weblogic/90}passivate-as- 
>> principal-name>,<{http://www.bea.com/ns/weblogic/90}resource-env- 
>> description>,<{http://www.bea.com/ns/weblogic/90}transaction- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}remote-client- 
>> timeout>,<{http://www.bea.com/ns/weblogic/90}stateless-session- 
>> descriptor 
>> >,locator=[node=null,object=null,url=null,line=11,col=29,offset=-1]]
>> javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.bea.com/ns/weblogic/90

>> ", local:"reference-descriptor"). Expected elements are <{http://www.bea.com/ns/weblogic/90

>> }resource-description>,<{http://www.bea.com/ns/weblogic/90}network- 
>> access-point>,<{http://www.bea.com/ns/weblogic/90}entity- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}enable-call-by- 
>> reference>,<{http://www.bea.com/ns/weblogic/90}create-as-principal- 
>> name>,<{http://www.bea.com/ns/weblogic/90}stateful-session- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}local-jndi-name>,<{http://www.bea.com/ns/weblogic/90

>> }ejb-name>,<{http://www.bea.com/ns/weblogic/90}dispatch-policy>,<{http://www.bea.com/ns/weblogic/90

>> }message-driven-descriptor>,<{http://www.bea.com/ns/weblogic/ 
>> 90}clients-on-same-server>,<{http://www.bea.com/ns/weblogic/90}run- 
>> as-principal-name>,<{http://www.bea.com/ns/weblogic/90}iiop- 
>> security-descriptor>,<{http://www.bea.com/ns/weblogic/90}jndi- 
>> name>,<{http://www.bea.com/ns/weblogic/90}service-reference- 
>> description>,<{http://www.bea.com/ns/weblogic/90}ejb-reference- 
>> description>,<{http://www.bea.com/ns/weblogic/90}remove-as- 
>> principal-name>,<{http://www.bea.com/ns/weblogic/90}passivate-as- 
>> principal-name>,<{http://www.bea.com/ns/weblogic/90}resource-env- 
>> description>,<{http://www.bea.com/ns/weblogic/90}transaction- 
>> descriptor>,<{http://www.bea.com/ns/weblogic/90}remote-client- 
>> timeout>,<{http://www.bea.com/ns/weblogic/90}stateless-session- 
>> descriptor>
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller 
>> .UnmarshallingContext.handleEvent(UnmarshallingContext.java:523)
>> 	at  
>> com 
>> .sun 
>> .xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199)
>> 	at  
>> com 
>> .sun 
>> .xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:71)
>> 	at  
>> com 
>> .sun 
>> .xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:65)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller.StructureLoader.childElement(StructureLoader.java:209)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller 
>> .UnmarshallingContext._startElement(UnmarshallingContext.java:366)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller 
>> .UnmarshallingContext.startElement(UnmarshallingContext.java:347)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java: 
>> 101)
>> 	at  
>> org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java: 
>> 527)
>> 	at org.apache.openejb.jee.wls.JaxbWls 
>> $NamespaceFilter.startElement(JaxbWls.java:127)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal 
>> .parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal 
>> .impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal 
>> .impl 
>> .XMLNSDocumentScannerImpl 
>> .scanStartElement(XMLNSDocumentScannerImpl.java:330)
>> 	at  
>> com 
>> .sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
>> $ 
>> FragmentContentDispatcher 
>> .dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal 
>> .impl 
>> .XMLDocumentFragmentScannerImpl 
>> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal.parsers.XML11Configuration.parse(XML11Configuration.java: 
>> 834)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal.parsers.XML11Configuration.parse(XML11Configuration.java: 
>> 764)
>> 	at  
>> com 
>> .sun 
>> .org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java: 
>> 148)
>> 	at  
>> com 
>> .sun 
>> .org 
>> .apache 
>> .xerces 
>> .internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java: 
>> 1242)
>> 	at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:194)
>> 	at  
>> com 
>> .sun 
>> .xml 
>> .bind 
>> .v2 
>> .runtime 
>> .unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:167)
>> 	at  
>> javax 
>> .xml 
>> .bind 
>> .helpers 
>> .AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java: 
>> 120)
>> 	at  
>> javax 
>> .xml 
>> .bind 
>> .helpers 
>> .AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java: 
>> 103)
>> 	at org.apache.openejb.jee.wls.JaxbWls.unmarshal(JaxbWls.java:105)
>> 	at  
>> org 
>> .apache 
>> .openejb.config.WlsConversion.getDescriptor(WlsConversion.java:107)
>> 	at  
>> org 
>> .apache 
>> .openejb.config.WlsConversion.convertModule(WlsConversion.java:122)
>> 	at  
>> org.apache.openejb.config.WlsConversion.deploy(WlsConversion.java:91)
>> 	at org.apache.openejb.config.ConfigurationFactory 
>> $Chain.deploy(ConfigurationFactory.java:137)
>> 	at  
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:353)
>> 	at  
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:307)
>> 	at  
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .getOpenEjbConfiguration(ConfigurationFactory.java:290)
>> 	at  
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>> 244)
>> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
>> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:293)
>> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:272)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at  
>> sun 
>> .reflect 
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> 	at  
>> sun 
>> .reflect 
>> .DelegatingMethodAccessorImpl 
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java:585)
>> 	at  
>> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java: 
>> 36)
>> 	at  
>> org 
>> .apache 
>> .openejb 
>> .client 
>> .LocalInitialContextFactory.init(LocalInitialContextFactory.java:59)
>> 	at  
>> org 
>> .apache 
>> .openejb 
>> .client 
>> .LocalInitialContextFactory 
>> .getInitialContext(LocalInitialContextFactory.java:45)
>> 	at  
>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java: 
>> 667)
>> 	at  
>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java: 
>> 247)
>> 	at javax.naming.InitialContext.init(InitialContext.java:223)
>> 	at javax.naming.InitialContext.<init>(InitialContext.java:175)
>> 	at com.edsoft.util.EJBHomeFactory.<init>(EJBHomeFactory.java:17)
>> 	at com.edsoft.util.EJBHomeFactory.<clinit>(EJBHomeFactory.java:9)
>> 	at  
>> com.edsoft.schoolsys.entity.AuxGenderTest.setUp(AuxGenderTest.java: 
>> 15)
>> 	at junit.framework.TestCase.runBare(TestCase.java:128)
>> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
>> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
>> 	at junit.framework.TestResult.run(TestResult.java:109)
>> 	at junit.framework.TestCase.run(TestCase.java:120)
>> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
>> 	at junit.framework.TestSuite.run(TestSuite.java:225)
>> 	at  
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit 
>> .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>> 	at  
>> org 
>> .eclipse 
>> .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> 	at  
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>> 	at  
>> org 
>> .eclipse 
>> .jdt 
>> .internal 
>> .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>> 	at  
>> org 
>> .eclipse 
>> .jdt 
>> .internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: 
>> 386)
>> 	at  
>> org 
>> .eclipse 
>> .jdt 
>> .internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 
>> 196)
>>
>>
>> Thank you for all your help,
>> Casey
>>
>> On Nov 7, 2007, at 2:33 PM, David Blevins wrote:
>>
>>>
>>> On Nov 7, 2007, at 6:14 AM, Casey Rayman wrote:
>>>
>>>> Forgive my ignorance...  Is there an established place to  
>>>> download binary snapshots or do you mean an output of Maven via  
>>>> checking out a snapshot from the repository?
>>>
>>> Sorry, I assumed you were using maven (it would auto-download  
>>> everything).  I've put up a server binary here for you:
>>>
>>> http://people.apache.org/~dblevins/openejb-592874/
>>>
>>> Out of curiosity, what build/test environment are you using?  I  
>>> know things are nice and easy for maven, but I definitely want to  
>>> make sure we're doing what we can for other setups too -- any  
>>> suggestions on how we could make life easier are very welcome.
>>>
>>>> On another note: There is a download.html and a  
>>>> downloads.html(note the s) on the website.  I confused myself for  
>>>> a few seconds when I mistyped the url.
>>>
>>> Definitely confusing.  We'll get that cleared up.
>>>
>>> Thanks!
>>>
>>> -David
>>>
>>>>
>>>>
>>>> Thanks,
>>>> Casey
>>>>
>>>> On Nov 6, 2007, at 11:21 PM, David Blevins wrote:
>>>>
>>>>>
>>>>>> On Nov 2, 2007, at 12:52 PM, David Blevins wrote:
>>>>>>
>>>>>>> On Nov 2, 2007, at 8:54 AM, Casey Rayman wrote:
>>>>>>>
>>>>>>>> We are using the <local-jndi-name> tags to force a
JNDI name  
>>>>>>>> in our weblogic-ejb-jar.xml file.  Openejb appears to allow
 
>>>>>>>> the same tag in the openejb-jar.xml, but seems to ignore
it  
>>>>>>>> completely.
>>>>>>>
>>>>>>> We don't quite have the same tag in the openejb-jar.xml.   
>>>>>>> You've hit upon one of the only remaining todos, let me see if
 
>>>>>>> i can hack something up for you.  Ideally we should support 

>>>>>>> your weblogic-ejb-jar.xml directly so you don't have to  
>>>>>>> maintain an openejb-jar.xml file.
>>>>>
>>>>> Ok, I've added the support we've been needing for per ejb jndi  
>>>>> names:
>>>>>
>>>>> http://issues.apache.org/jira/browse/OPENEJB-253
>>>>>
>>>>> Note that you can still use a template if you like, i.e. "ejb/ 
>>>>> org.superbiz.Foo" works or you can just "ejb/{interfaceClass}".
>>>>>
>>>>> Then I also hooked up support for pulling the jndi names out of  
>>>>> the weblogic-ejb-jar.xml file also, so you really don't need to  
>>>>> bother with an openejb-jar.xml.  The wls conversion code so far  
>>>>> only supports <jndi-name> and <local-jndi-name>.  It'll take
a  
>>>>> bit to add cmp conversion (we use JPA for our CMP), but by the  
>>>>> looks of the entity you posted, it should work fine as-is  
>>>>> because the field names match the column names which is JPA  
>>>>> default.
>>>>>
>>>>> Back on the subject of JNDI names, do you happen to know the  
>>>>> jndi format WebLogic uses for EJB 3 business interfaces? I poked  
>>>>> around but didn't find anything definitive, got the impression  
>>>>> they were just using interface name.  I'd like to adjust the  
>>>>> default template appropriately to match.
>>>>>
>>>>> New snapshots have been published.  Just switch your dependency  
>>>>> version to 3.0.0-SNAPSHOT, give it a try and let us know if it  
>>>>> works.
>>>>>
>>>>> -David
>>>>>
>>>>
>>>>
>>>
>>
>


Mime
View raw message