Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: Premature end of file exception

I found the problem, it is the doctype and xml declaration at the top. If you leave this out, I don't get this exceptin anymore. Is this a bug in SAX or have put something wrong there?

regards,

Wim

2008/10/30 Wim Deblauwe <wim.deblauwe@xxxxxxxxx>
Hi,

I am using LTW and I get this exception:

 [WebappClassLoader@1478a43] warning parse definitions failed -- (SAXParseException) Premature end of file.
[INFO] [talledLocalContainer] Premature end of file.
[INFO] [talledLocalContainer] org.xml.sax.SAXParseException: Premature end of file.
[INFO] [talledLocalContainer]     at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1183)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.definition.DocumentParser.parse(DocumentParser.java:108)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.parseDefinitions(ClassLoaderWeavingAdaptor.java:211)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.DefaultWeavingContext.getDefinitions(DefaultWeavingContext.java:121)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:137)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.initialize(Aj.java:262)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.getWeavingAdaptor(Aj.java:267)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:245)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:86)
[INFO] [talledLocalContainer]     at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:52)
[INFO] [talledLocalContainer]     at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
[INFO] [talledLocalContainer]     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
[INFO] [talledLocalContainer]     at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] [talledLocalContainer]     at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[INFO] [talledLocalContainer]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[INFO] [talledLocalContainer]     at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876)
[INFO] [talledLocalContainer]     at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
[INFO] [talledLocalContainer]     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
[INFO] [talledLocalContainer]     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
[INFO] [talledLocalContainer]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[INFO] [talledLocalContainer]     at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer]     at java.lang.Class.forName(Class.java:247)
[INFO] [talledLocalContainer]     at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1081)
[INFO] [talledLocalContainer]     at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
[INFO] [talledLocalContainer]     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
[INFO] [talledLocalContainer]     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
[INFO] [talledLocalContainer]     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:704)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:381)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4119)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
[INFO] [talledLocalContainer]     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardService.start(StandardService.java:448)
[INFO] [talledLocalContainer]     at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [talledLocalContainer]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[INFO] [talledLocalContainer]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO] [talledLocalContainer]     at java.lang.reflect.Method.invoke(Method.java:597)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
[INFO] [talledLocalContainer]     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

Any idea what might cause this? I am using version 1.6.1 of aspectj.

I have put an aop.xml myself in my maven project under src/main/resources/META-INF containing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE aspectj PUBLIC
        "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">

<aspectj>

    <weaver options="-verbose -showWeaveInfo">
        <include within="com.mycomp.domain.message.event.hibernate.*"/>
    </weaver>
    <aspects>
        <aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
        <aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
    </aspects>
   
</aspectj>

But I don't get any verbose info or weaving info. This exception is all I see.

regards,

Wim



Back to the top