[jboss-user] [Beginner's Corner] - javax.naming.NoInitialContextException: Cannot instantiate class

Noelia Delgado do-not-reply at jboss.com
Tue Aug 24 08:44:39 EDT 2010


Noelia Delgado [http://community.jboss.org/people/Zoeley] replied to the discussion

"javax.naming.NoInitialContextException: Cannot instantiate class"

To view the discussion, visit: http://community.jboss.org/message/558745#558745

--------------------------------------------------------------
Hi, how  I can include jbossall-client.jar in my pom? I have tried:

<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<type>pom</type>
<version>5.1.0.GA</version>
</dependency>

but it doesn't work

My app's pom.xml is:
<
project xmlns=+"http://maven.apache.org/POM/4.0.0" xmlns:xsi=+"http://www.w3.org/2001/XMLSchema-instance"+
xsi:schemaLocation=+"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>unsj</groupId>
<artifactId>hre-ui</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>AppClient</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>unsj</groupId>
<artifactId>hre_ejb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>ejb</type>
</dependency>

<dependency>
<groupId>unsj</groupId>
<artifactId>utiles</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

</dependencies>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>principal.Escritorio</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.freehep</groupId>
<artifactId>freehep-jarjar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jarjar</goal>
</goals>
</execution>
</executions>
<!--El siguiente trozo debemos ponerlo si queremos que se metan dentro
del jar TODOS los jar de los que dependemos de forma no explicita
en el pom.xml
-->

<configuration>
<addTransitiveDependencies>false</addTransitiveDependencies>
</configuration>
</plugin>

</plugins>
<finalName>AppClient</finalName>
</build>
<pluginRepositories>
<pluginRepository>
<id>freehep-maven</id>
<name>Maven FreeHEP</name>
<url>http://java.freehep.org/maven2</url>
</pluginRepository>


</
project>



































































+
+++


Thanks

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/558745#558745]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100824/89c2b746/attachment-0001.html 


More information about the jboss-user mailing list