Ir para o conteúdo
RicardoCostaTW

Aplicação Java + Jboss não compila

Mensagens Recomendadas

RicardoCostaTW

Boa Tarde,

Tenho uma aplicação web feita em java que usa jboss como servidor web e stripes como framework web.

O problema é que tenho isto em um pc à uma série de anos, e agora queria montar o projecto em outro computador e não estou a conseguir.

O meu build.xml:

<?xml version="1.0"?>
<project name="SEAE" default="touch-ear-exploded" basedir=".">
<property file="build.properties" />
<property name="project.title" value="SEAE" />
<property name="project.version" value="1.0.9" />
<property name="jboss.configuration" value="default" />
<property name="jboss.client" value="${jboss.home}/client" />
<property name="jboss.lib" value="${jboss.home}/server/${jboss.configuration}/lib" />
<property name="jboss.deploy" value="${jboss.home}/server/${jboss.configuration}/deploy" />
<property name="src.dir" value="${basedir}/src" />
<property name="java.src.dir" value="${basedir}/src/java" />
<property name="test.src.dir" value="${basedir}/src/test" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="web.dir" value="${basedir}/web" />
<property name="conf.dir" value="${basedir}/conf" />
<property name="docs.dir" value="${basedir}/docs" />
<property name="build.dir" value="${basedir}/build" />
<property name="build.tmp.dir" value="${build.dir}/tmp" />
<property name="build.deploy.dir" value="${build.dir}/deploy" />
<property name="build.classes.dir" value="${build.dir}/classes" />
<property name="build.tests.dir" value="${build.dir}/tests" />
<property name="build.testsreport.dir" value="${build.dir}/testsreport" />
<property name="build.cobertura.dir" value="${build.dir}/cobertura" />
<property name="tools.dir" value="${basedir}/tools" />
<property name="cobertura.home" value="${tools.dir}/cobertura-1.8" />
<property name="jboss.ejb3.embedded.home" value="${tools.dir}/jboss-EJB-3.0_Embeddable_ALPHA_9" />
<property name="search.jar.file" value="seae-search.jar" />
<property name="jar.file" value="seae.jar" />
<property name="war.file" value="seae.war" />
<property name="ear.file" value="seae.ear" />
<property name="sar.dir" value="notification-service.sar" />
<property name="libs.excluded"
		 value="testng-5.5-jdk15.jar, cobertura-1.8.jar, javax.servlet.jar, javax.servlet.jsp.jar,
 hibernate-annotations.jar, ejb3-persistence.jar, jboss-annotations-ejb3.jar, jboss-ejb3x.jar,
 jboss-j2ee.jar, jcr-1.0.jar, jbossha.jar, mail.jar, jbossws-client.jar, jackrabbit-text-extractors-1.3.jar,
 pdfbox-0.6.4.jar, jbossws-core.jar" />
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<path id="ejb3.embedded.path">
<fileset dir="${jboss.ejb3.embedded.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<path id="base.path">
<pathelement location="${build.classes.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="cobertura.class.path">
<fileset dir="${cobertura.home}">
<include name="cobertura.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>
<taskdef classpathref="cobertura.class.path" resource="tasks.properties" />
<taskdef name="cobertura-instrument" classpath="${lib.dir}/cobertura-1.8.jar" classname="net.sourceforge.cobertura.ant.InstrumentTask"/>
<taskdef name="cobertura-report" classpath="${lib.dir}/cobertura-1.8.jar" classname="net.sourceforge.cobertura.ant.ReportTask"/>
<taskdef name="testng" classpath="${lib.dir}/testng-5.5-jdk15.jar" classname="org.testng.TestNGAntTask" />
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${docs.dir}/api" />
<delete file="cobertura.ser" />
</target>
<target name="prepare" description="Copy static files to web dir">
<echo>=== DEPLOY WEB DIR ONLY ===</echo>
<copy todir="${jboss.deploy}/${ear.file}/seae.war/">
<fileset dir="${web.dir}">
	 <include name="**/*.jsp"/>
<include name="**/*.html"/>
<include name="**/*.css"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.png" />
<include name="**/*.js"/>
</fileset>
</copy>
</target>
<target name="compile">
<mkdir dir="${build.classes.dir}" />
<javac destdir="${build.classes.dir}"
			 classpathref="base.path"
			 debug="on"
			 deprecation="off"
			 optimize="on"
			 source="1.5"
			 target="1.5">
 <src path="${java.src.dir}" />
</javac>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}">
<include name="**/*.properties" />
<include name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${build.tests.dir}" />
<javac destdir="${build.tests.dir}"
		 classpathref="base.path"
		 debug="on"
		 deprecation="off"
		 optimize="on"
		 source="1.5"
		 target="1.5">
<src path="${test.src.dir}" />
<classpath refid="ejb3.embedded.path" />
</javac>
</target>
<target name="run-tests" depends="compile-tests, war">
<copy todir="${build.tests.dir}">
<fileset dir="${jboss.ejb3.embedded.home}/conf">notifica
		 <include name="*.properties" />
<include name="*.xml" />
<exclude name="log4j.xml" />
</fileset>
</copy>
<copy todir="${build.classes.dir}">
<fileset dir="${test.src.dir}">
<include name="*.sql" />
</fileset>
</copy>
<path id="testng.path">
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.tests.dir}" />
<fileset dir="${build.deploy.dir}">
<include name="${jar.file}" />
</fileset>
<fileset dir="${jboss.ejb3.embedded.home}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<testng outputDir="${build.testsreport.dir}" verbose="2">
<classpath>
<path refid="testng.path" />
<path refid="cobertura.class.path" />
</classpath>
<classfileset dir="${build.tests.dir}" includes="**/*.class" />
</testng>
</target>
<target name="run-one-test" depends="compile-tests, war">
<copy todir="${build.tests.dir}">
<fileset dir="${jboss.ejb3.embedded.home}/conf">
<include name="*.properties" />
<include name="*.xml" />
<exclude name="log4j.xml" />
</fileset>
</copy>
<copy todir="${build.classes.dir}">
<fileset dir="${test.src.dir}">
<include name="*.sql" />
</fileset>
</copy>
<path id="testng.path">
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.tests.dir}" />
<fileset dir="${build.deploy.dir}">
<include name="${jar.file}" />
</fileset>
<fileset dir="${jboss.ejb3.embedded.home}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<testng outputDir="${build.testsreport.dir}" verbose="2">
<classpath>
<path refid="testng.path" />
<path refid="cobertura.class.path" />
</classpath>
<classfileset dir="${build.tests.dir}" includes="**/${test.class}" />
</testng>
</target>
<target name="cobertura-instrument" depends="compile-tests">
<mkdir dir="${build.cobertura.dir}" />
<cobertura-instrument todir="${build.classes.dir}" datafile="cobertura.ser">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
<cobertura-instrument todir="${build.tests.dir}" datafile="cobertura.ser">
<fileset dir="${build.tests.dir}">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
</target>
<target name="cobertura-report" depends="cobertura-instrument, run-tests">
<cobertura-report format="html" destdir="${build.cobertura.dir}" datafile="cobertura.ser">
<fileset dir="${java.src.dir}">
<include name="**/*.java" />
</fileset>
<fileset dir="${test.src.dir}">
<include name="**/*.java" />
</fileset>
</cobertura-report>
</target>
<target name="javadocs">
<javadoc packagenames="com.criticalsoftware.seae.*"
			 sourcepath="${java.src.dir}"
			 defaultexcludes="yes"
			 destdir="${docs.dir}/api"
			 use="true"
			 windowtitle="SEAE API"
			 excludepackagenames="com.criticalsoftware.seae.business.notification.*">
<classpath>
<fileset dir="${lib.dir}">
 <include name="**/*.jar" />
</fileset>
</classpath>
<doctitle>
<![CDATA[<h1>${project.title}</h1>]]></doctitle>
<bottom>
</bottom>
</javadoc>
</target>
<target name="search-jar" depends="compile">
<mkdir dir="${build.deploy.dir}" />
<jar jarfile="${build.deploy.dir}/${search.jar.file}">
<fileset dir="${build.classes.dir}">
<include name="**/business/search/*.class" />
</fileset>
</jar>
</target>
<target name="jar" depends="compile">
<mkdir dir="${build.deploy.dir}" />
<jar jarfile="${build.deploy.dir}/${jar.file}">
<metainf file="${conf.dir}/persistence.xml" />
<fileset dir="${build.classes.dir}">
<include name="**/business/**/*.class" />
<include name="**/entities/**/*.class" />
<include name="**/persistence/**/*.class" />
</fileset>
</jar>
</target>
<target name="war" depends="jar">
<war destfile="${build.deploy.dir}/${war.file}" webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}" excludes="**/web.xml" />
<lib dir="${lib.dir}" excludes="${libs.excluded}" />
<classes dir="${build.classes.dir}"
				 excludes="**/business/**/*.class, **/entities/**/*.class, **/persistence/**/*.class" />
<manifest>
<attribute name="Implementation-Version" value="${project.version}" />
<attribute name="Built-Date" value="${TODAY}" />
</manifest>
</war>
</target>
<target name="deploy-ear-exploded" depends="compile">
<copy todir="${jboss.deploy}/${ear.file}/META-INF">
<fileset dir="${conf.dir}" includes="application.xml" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${sar.dir}/META-INF">
<fileset dir="${conf.dir}/notification-service" includes="jboss-service.xml" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${jar.file}">
<fileset dir="${build.classes.dir}"
				 includes="**/business/**/*.class, **/entities/**/*.class, **/persistence/**/*.class"
				 excludes="**/business/search/*.class" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${jar.file}/META-INF">
<fileset dir="${conf.dir}" includes="persistence.xml" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${war.file}">
<fileset dir="${web.dir}" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${war.file}/WEB-INF/lib">
<fileset dir="${lib.dir}" excludes="${libs.excluded}" />
</copy>
<copy todir="${jboss.deploy}/${ear.file}/${war.file}/WEB-INF/classes">
<fileset dir="${build.classes.dir}"
				 excludes="**/business/**/*.class, **/entities/**/*.class, **/persistence/**/*.class" />
</copy>
</target>
<target name="touch-ear-exploded" depends="deploy-ear-exploded">
<touch file="${jboss.deploy}/${ear.file}/META-INF/application.xml" />
</target>
<target name="undeploy">
<delete dir="${jboss.deploy}/${ear.file}" />
</target>
</project>

Ao compilar dá me o seguinte:

Buildfile: /home/ricardo/Documentos/seae/seAE/SEAE/build.xml
Trying to override old definition of task cobertura-instrument
Trying to override old definition of task cobertura-report
clean:
[delete] Deleting directory /home/ricardo/Documentos/seae/seAE/SEAE/build
compile:
[mkdir] Created dir: /home/ricardo/Documentos/seae/seAE/SEAE/build/classes
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/build.xml:97: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 154 source files to /home/ricardo/Documentos/seae/seAE/SEAE/build/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/business/notification/NotificationClusteredService.java:23: error: cannot access ServiceMBean
[javac] public abstract class NotificationClusteredService extends HAServiceMBeanSupport {
[javac]				 ^
[javac] class file for org.jboss.system.ServiceMBean not found
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/business/notification/NotificationSender.java:35: error: cannot access ServiceMBeanSupport
[javac] public class NotificationSender extends NotificationClusteredService implements NotificationSenderMBean {
[javac]	 ^
[javac] class file for org.jboss.system.ServiceMBeanSupport not found
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/presentation/PaymentLetterPDF.java:19: warning: sym is internal proprietary API and may be removed in a future release
[javac] import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
[javac]													 ^
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/persistence/CopyrightDAOBean.java:18: warning: sym is internal proprietary API and may be removed in a future release
[javac] import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
[javac]													 ^
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/presentation/PaymentLetter70PDF.java:21: warning: sym is internal proprietary API and may be removed in a future release
[javac] import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
[javac]													 ^
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/presentation/action/edition/BookProfileActionBean.java:59: error: package org.jboss.util does not exist
[javac] import org.jboss.util.Base64;
[javac]					 ^
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/presentation/action/search/SearchActionBean.java:32: error: package org.jboss.util does not exist
[javac] import org.jboss.util.Base64;
[javac]					 ^
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/business/notification/NotificationClusteredService.java:65: error: cannot find symbol
[javac]		 super.startService();
[javac]		 ^
[javac] symbol: variable super
[javac] location: class NotificationClusteredService
[javac] /home/ricardo/Documentos/seae/seAE/SEAE/src/java/com/criticalsoftware/seae/business/notification/NotificationClusteredService.java:71: error: cannot find symbol
[javac]		 super.stopService();
[javac]		 ^
[javac] symbol: variable super
[javac] location: class NotificationClusteredService
BUILD FAILED
/home/ricardo/Documentos/seae/seAE/SEAE/build.xml:97: Compile failed; see the compiler error output for details.
Total time: 2 seconds

Já tentei compilar em java 5,6 e 7 e mesmo assim nada.

Algúem sabe do que poderá ser?

Editado por RicardoCostaTW

Partilhar esta mensagem


Ligação para a mensagem
Partilhar noutros sites

Crie uma conta ou ligue-se para comentar

Só membros podem comentar

Criar nova conta

Registe para ter uma conta na nossa comunidade. É fácil!

Registar nova conta

Entra

Já tem conta? Inicie sessão aqui.

Entrar Agora

×

Aviso Sobre Cookies

Ao usar este site você aceita os nossos Termos de Uso e Política de Privacidade. Este site usa cookies para disponibilizar funcionalidades personalizadas. Para mais informações visite esta página.