Tuesday, December 2, 2008

Затягиваем в Эклипс несобирающийся проект.


Всем привет!

1. Редактируем файл "pom.xml":
    сразу за тегом "<build>" вставляем строки:
-------------------------------------
           <sourceDirectory>src/nosources</sourceDirectory>
    <testSourceDirectory>src/notest</testSourceDirectory>
-------------------------------------

2. Выполняем команду "mvn eclipse:eclipse"
  можно использовать до этого mvn eclipse:clean

3. Редактируем файл ".classpath"
  Сразу после тега " <classpath>" заменяем строки:
-------------------------------------
  <classpathentry kind="src" path="src/main/java"
including="**/*.xml|**/*.xsl|**/*.properties|**/*.ion|**/*.conf|**/*.config"
excluding="**/*.java"/>
  <classpathentry kind="src" path="src/main/resources"
including="**/*.xml|**/*.xsl|**/*.properties|**/login.conf|**/*.ion|**/*.conf|**/*.config"
excluding="**/*.java"/>
  <classpathentry kind="src" path="src/test/java"
output="target/test-classes"
including="**/*.properties|**/*.xml|**/*.txt|**/*.conf|**/*.config"
excluding="**/*.java"/>
  <classpathentry kind="output" path="target/classes"/>
-------------------------------------

на строки:
-------------------------------------
        <classpathentry kind="src" path="src/main/java"/>

        <classpathentry kind="src" path="target/generated"/>

        <classpathentry excluding="**/*.java" including="**/*.xml" kind="src"
path="src/main/resources"/>

        <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-------------------------------------

Потом фиксим уже в Эклипсе чего-там не собирается, при этом проверяем
билд с восстановленным файлом "pom.xml"

С уважением,
Алексей.


Monday, December 1, 2008

SAXParseException: Content is not allowed in prolog.

[org.xml.sax.SAXParseException: Content is not allowed in prolog.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:510)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:215)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:190)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:241)
at org.exoplatform.services.wsrp2.utils.StandardPayload.getUnmarshalledObject(StandardPayload.java:95)
at org.exoplatform.services.wsrp2.utils.StandardClasses.getUnmarshalledObject(StandardClasses.java:71)
at org.exoplatform.services.wsrp2.utils.JAXBEventTransformer.getUnmarshalledObject(JAXBEventTransformer.java:254)
at org.exoplatform.services.wsrp2.utils.JAXBEventTransformer.getEventsUnmarshal(JAXBEventTransformer.java:132)
at org.exoplatform.services.wsrp2.consumer.impl.WSRPConsumerPlugin.processAction(WSRPConsumerPlugin.java:745)


Where not a consistent xml to unmarshal.
Первый параметр должен быть репрезентацией валидного хмл.

JAXBElement
unmarshal(Node node, Class declaredType)

JAXBElement stdElement = unmarshaller.unmarshal(messageElement,classT);

Friday, November 28, 2008

Internet: check and restart.

Как проверить интернет?!



Как перезагрузить интернет?!
D-Link 2500 how-to restart.