Including .jar
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > Including .jar




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Including .jar  
Erik Hamrin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 12:11 PM

Hi.

Me and a friend are working on a conversion of the apache ds, turning it =
in to a dumb proxy. We=B4ve build the project and it runs fine when =
started from the standard uberJarMain.java-file. However, we need to =
embed the class Service into our project. When we are trying to =
instanciate a member of this class anywhere except in the uberJarMain, =
it throws illegalClassChangeException. We have no idea as to why this =
happends, the exception claims that there are empty beans in the =
server.xml file, but the file run in uberJarMain.

We tried rebuildning our project with maven, but since we have imported =
some .Jars that are not in the dependencies it won=B4t build. How do we =
put our own .jars into the repository?=20

The stacktrace (huge and hardly readable) below:


org.springframework.beans.factory.BeanDefinitionStoreException: Error =
registering bean with name 'configuration'
defined in URL [file:/iMUXTester/server.xml]: Could not parse inner bean
definition; nested exception is =
org.springframework.beans.factory.BeanDefinitionStoreException: Error =
registering
bean with name '' defined in URL [file:/iMUXTester/server.xml]: Could =
not parse
inner bean definition; nested exception is =
org.springframework.beans.factory.BeanDefinitionStoreException: Error
registering bean with name '' defined in URL =
[file:/home/iMUXTester/server.xml]:
Unexpected failure during bean definition parsing; nested exception is =
java.lang.IncompatibleClassChangeError

org.springframework.beans.factory.BeanDefinitionStoreException: Error =
registering bean with name '' defined in URL
[file:/iMUXTester/server.xml]: Could not parse inner bean definition; =
nested
exception is =
org.springframework.beans.factory.BeanDefinitionStoreException: Error =
registering bean with name ''
defined in URL [file:/iMUXTester/server.xml]: Unexpected failure during 
=
bean
definition parsing; nested exception is =
java.lang.IncompatibleClassChangeError

org.springframework.beans.factory.BeanDefinitionStoreException: Error =
registering bean with name '' defined in URL
[file:/iMUXTester/server.xml]: Unexpected failure during bean definition
parsing; nested exception is java.lang.IncompatibleClassChangeError
java.lang.IncompatibleClassChangeError
at =
org.apache.directory.server.core.authn.AuthenticationService.<clinit>(Aut=
henticationService.java:62)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at =
org.springframework.util.ClassUtils.forName(ClassUtils.java:109)
at
org.springframework.beans.factory.support.BeanDefinitionReaderUtils.creat=
 eBeanDefinition(BeanDefinitionReaderUtil
s.java:65)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 eBeanDefinitionElement(DefaultXmlBeanDef
initionParser.java:466)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 eBeanDefinitionElement(DefaultXmlBeanDef
initionParser.java:432)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertySubElement(DefaultXmlBeanDefini
tionParser.java:795)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertyValue(DefaultXmlBeanDefinitionP
arser.java:784)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertyElement(DefaultXmlBeanDefinitio
nParser.java:722)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertyElements(DefaultXmlBeanDefiniti
onParser.java:621)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 eBeanDefinitionElement(DefaultXmlBeanDef
initionParser.java:464)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 eBeanDefinitionElement(DefaultXmlBeanDef
initionParser.java:432)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertySubElement(DefaultXmlBeanDefini
tionParser.java:795)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 eListElement(DefaultXmlBeanDefinitionPar
ser.java:883)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertySubElement(DefaultXmlBeanDefini
tionParser.java:859)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertyValue(DefaultXmlBeanDefinitionP
arser.java:784)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.pars=
 ePropertyElement(DefaultXmlBeanDefinitio
nParser.java:722)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBea=
 nDefinitions(AbstractXmlApplicationConte
xt.java:81)
at
org.springframework.context.support.AbstractRefreshableApplicationContext=
. refreshBeanFactory(AbstractRefreshableAp
plicationContext.java:89)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Ab=
stractApplicationContext.java:262)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init=
>(FileSystemXmlApplicationContext.java:89)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init=
>(FileSystemXmlApplicationContext.java:74)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init=
>(FileSystemXmlApplicationContext.java:65)
at org.apache.directory.server.Service.init(Service.java:78)
at iMUXTesterProxy.TestMain.main(TestMain.java:16)

The email is a bit of a mess I=B4m afraid. What is needed are clues to =
why it says that there are empty beans in the XML file when it runs in =
one application but not the other. Some lines have been omitted from the =
stacktrace, all being a oart of DefaultXmlBeanDefinitionParser.

Any ideas, anyone?






[ Post a follow-up to this message ]



    Re: Including .jar  
Emmanuel Lecharny


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 12:11 PM

Hi,

I suspect that there is a problem in your configuration file, or that you
have changed an existing class.

Could you copy/paste the server.xml file you are using ? (do *not* attach
it, because the mailer will discard attachements). It would also be
interesting to know which kind of modification you have done.

What the stack trace exposes is that when classLoading the configuration
elements, a class is using an innerclass expecting some specific method or
member which has been change.

Maven has a special magic (is this called black magic?) to inject new jars
in your local repo :

>
> Hi.
>
> Me and a friend are working on a conversion of the apache ds, turning it
> in to a dumb proxy. We´ve build the project and it runs fine when started
> from the standard uberJarMain.java-file. However, we need to embed the
> class Service into our project. When we are trying to instanciate a member
> of this class anywhere except in the uberJarMain, it throws
> illegalClassChangeException. We have no idea as to why this happends, the
> exception claims that there are empty beans in the server.xml file, but
> the file run in uberJarMain.
>
> We tried rebuildning our project with maven, but since we have imported
> some .Jars that are not in the dependencies it won´t build. How do we put
> our own .jars into the repository?
>
> The stacktrace (huge and hardly readable) below:
>
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name 'configuration'
> defined in URL [file:/iMUXTester/server.xml]: Could not parse inner be
an
> definition; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering
> bean with name '' defined in URL [file:/iMUXTester/server.xml]: Could 
not
> parse
> inner bean definition; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name '' defined in URL
> [file:/home/iMUXTester/server.xml]:
> Unexpected failure during bean definition parsing; nested exception is
> java.lang.IncompatibleClassChangeError
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name '' defined in URL
> [file:/iMUXTester/server.xml]: Could not parse inner bean definition;
> nested
> exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name ''
> defined in URL [file:/iMUXTester/server.xml]: Unexpected failure durin
g
> bean
> definition parsing; nested exception is
> java.lang.IncompatibleClassChangeError
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name '' defined in URL
> [file:/iMUXTester/server.xml]: Unexpected failure during bean definiti
on
> parsing; nested exception is java.lang.IncompatibleClassChangeError
> java.lang.IncompatibleClassChangeError
>         at org.apache.directory.server.core.authn.AuthenticationService
> .<clinit>(AuthenticationService.java:62)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.springframework.util.ClassUtils.forName(ClassUtils.java
> :109)
>         at
>
> org.springframework.beans.factory.support.BeanDefinitionReaderUtils.create
BeanDefinition
> (BeanDefinitionReaderUtils.java:65)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
BeanDefinitionElement
> (DefaultXmlBeanDefinitionParser.java:466)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
BeanDefinitionElement
> (DefaultXmlBeanDefinitionParser.java:432)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertySubElement
> (DefaultXmlBeanDefinitionParser.java:795)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertyValue
> (DefaultXmlBeanDefinitionParser.java:784)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertyElement
> (DefaultXmlBeanDefinitionParser.java:722)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertyElements
> (DefaultXmlBeanDefinitionParser.java:621)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
BeanDefinitionElement
> (DefaultXmlBeanDefinitionParser.java:464)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
BeanDefinitionElement
> (DefaultXmlBeanDefinitionParser.java:432)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertySubElement
> (DefaultXmlBeanDefinitionParser.java:795)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
ListElement
> (DefaultXmlBeanDefinitionParser.java:883)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertySubElement
> (DefaultXmlBeanDefinitionParser.java:859)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertyValue
> (DefaultXmlBeanDefinitionParser.java:784)
>         at
>
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parse
PropertyElement
> (DefaultXmlBeanDefinitionParser.java:722)
>         at
>
> org.springframework.context.support.AbstractXmlApplicationContext.loadBean
Definitions
> (AbstractXmlApplicationContext.java:81)
>         at
>
> org.springframework.context.support.AbstractRefreshableApplicationContext.
.refreshBeanFactory
> (AbstractRefreshableApplicationContext.java:89)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:262)
>         at
> org.springframework.context.support.FileSystemXmlApplicationContext
> .<init>(FileSystemXmlApplicationContext.java:89)
>         at
> org.springframework.context.support.FileSystemXmlApplicationContext
> .<init>(FileSystemXmlApplicationContext.java:74)
>         at
> org.springframework.context.support.FileSystemXmlApplicationContext
> .<init>(FileSystemXmlApplicationContext.java:65)
>         at org.apache.directory.server.Service.init(Service.java:78)
>         at iMUXTesterProxy.TestMain.main(TestMain.java:16)
>
> The email is a bit of a mess I´m afraid. What is needed are clues to why
> it says that there are empty beans in the XML file when it runs in one
> application but not the other. Some lines have been omitted from the
> stacktrace, all being a oart of DefaultXmlBeanDefinitionParser.
>
> Any ideas, anyone?
>



-- 
Cordialement,
Emmanuel Lécharny
[url]www.iktek.com" target="_blank">http://maven.apache.org/plugins/mav...l]www.iktek.com






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:40 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register