The reason I ask is because what maven is saying is the content of the pom
for the Oracle jar in your local repo looks suspiciously like an HTML file.
Like one from a corporate firewall
On Apr 30, 2014 6:32 PM, "Mark" <mark....@gmail.com> wrote:

> Hi ,
>
> I am new to Maven and Glassfish (and pretty new to Java and Netbeans!) and
> am struggling to build a JPA based 'injection' project that I want to run
> as an application client (using Glassfish appclient) to inject rows from an
> Oracle db table into a JMS queue.
>
> Specifically the problem is:
>
> When I build the 'injection' project' I get an invalid pom message but it
> builds.
>
> "The POM for com.oracle:ojdbc6:jar:11.2.0 is invalid, transitive
> dependencies (if any) will not be available, enable debug logging for more
> details"
>
> Running it with appclient however it fails as I get the following error:
>
> "org.eclipse.persistence.DatabaseException. Exception description:
> Configuration error message - Class [oracle.jdbc.Oracle driver] not found."
>
> Browsing the local Maven repository using Netbeans I find the following
>  if I right-click on the ojdbc 11.2.0 jar and select 'View Details'
>
> ------
> org.apache.maven.project.InvalidProjectModelException: 1 problem was
> encountered while building the effective model
> [FATAL] Non-parseable POM C:\Users\mcedward\.m2\
> repository\com\oracle\ojdbc6\11.2.0\ojdbc6-11.2.0.pom: end tag name
> </body> must be the same as start tag <meta> from line 142 (position: TEXT
> seen ...<!-- End of carousel script -->\n</body>... @453:8)  @ line 453,
> column 8  for project  for project
>         at org.apache.maven.project.DefaultMavenProjectBuilder.
> transformError(DefaultMavenProjectBuilder.java:193)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.
> buildFromRepository(DefaultMavenProjectBuilder.java:240)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.
> buildFromRepository(DefaultMavenProjectBuilder.java:251)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.
> buildFromRepository(DefaultMavenProjectBuilder.java:258)
>         at org.netbeans.modules.maven.repository.ui.
> ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:
> 231)
>         at org.netbeans.modules.maven.repository.ui.
> ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:104)
>         at org.netbeans.modules.maven.repository.ui.
> ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:187)
>         at org.openide.util.RequestProcessor$Task.run(
> RequestProcessor.java:1423)
>         at org.openide.util.RequestProcessor$Processor.
> run(RequestProcessor.java:2033)
>
> ------
>
> It says this could be because :
> - I'm offline (but I'm not)
> - The repository content is wrong - no reason to suppose it is
> - The project or dependences cannot be resolved for the given set of
> repositories - no reason to suppose this either - 'Find Usages' seems to
> give the right answer
> - bug in the Maven or Netbeans codebase -mmmm? Hence posting to Netbeans
> and Maven forums
>
>
> I have successfully compiled and run an early version that just loads text
> to JMS so have got appclient to run successfully. I now want to use JPA to
> read the db. I have a separate Maven 'persistence' project that defines the
> persistence entities and have used this successfuly with another
> 'generation' project that generates the database table content in the first
> place.
> When I build the persistence project I get the same 'Invalid POM' message
> but it still works fine when included as a compile-time dependency in the
> 'generation' project.
>
>
> The persistence project has the following POM:
> ---------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>com.oracle</groupId>
>     <artifactId>cepdemodatagen</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>jar</packaging>
>     <dependencies>
>         <dependency>
>             <groupId>org.eclipse.persistence</groupId>
>             <artifactId>javax.persistence</artifactId>
>             <version>2.1.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>cepdemo</groupId>
>             <artifactId>cepdemopersistence</artifactId>
>             <version>1.1-SNAPSHOT</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>com.oracle</groupId>
>             <artifactId>cepdemopersistence</artifactId>
>             <version>1.0-SNAPSHOT</version>
>             <type>jar</type>
>         </dependency>
>     </dependencies>
>     <properties>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>         <maven.compiler.source>1.7</maven.compiler.source>
>         <maven.compiler.target>1.7</maven.compiler.target>
>     </properties>
> </project>
> -----------------------------
> Note: cepdemopersistence-1.1-SNAPSHOT dependency is not used in any code
> - don't know how it got there!
>
> The 'injection' project has the following POM:
>
> ------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>com.oracle.cepdemo</groupId>
>     <artifactId>TradeInjector4</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>app-client</packaging>
>
>     <name>TradeInjector4</name>
>
>     <properties>
>         <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     </properties>
>
>     <dependencies>
>         <dependency>
>             <groupId>com.oracle.cepdemo</groupId>
>             <artifactId>cepdemopersistence</artifactId>
>             <version>1.0</version>
>         </dependency>
>         <dependency>
>             <groupId>com.oracle</groupId>
>             <artifactId>ojdbc6</artifactId>
>             <version>11.2.0</version>
>             <scope>runtime</scope>
>         </dependency>
>         <dependency>
>             <groupId>javax</groupId>
>             <artifactId>javaee-api</artifactId>
>             <version>7.0</version>
>             <scope>provided</scope>
>         </dependency>
>     </dependencies>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>3.1</version>
>                 <configuration>
>                     <source>1.7</source>
>                     <target>1.7</target>
>                     <compilerArguments>
>                         <endorseddirs>${endorsed.dir}</endorseddirs>
>                     </compilerArguments>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-acr-plugin</artifactId>
>                 <version>1.0</version>
>                 <extensions>true</extensions>
>                 <configuration>
>                     <archive>
>                         <manifest>
>
> <mainClass>com.oracle.cepdemo.tradeinjector4.Main</mainClass>
>                         </manifest>
>                     </archive>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-jar-plugin</artifactId>
>                 <version>2.4</version>
>                 <configuration>
>                   <archive>
>                     <manifest>
>                       <addClasspath>true</addClasspath>
>                     </manifest>
>                   </archive>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-dependency-plugin</artifactId>
>                 <version>2.6</version>
>                 <executions>
>                     <execution>
>                         <phase>validate</phase>
>                         <goals>
>                             <goal>copy</goal>
>                         </goals>
>                         <configuration>
>
> <outputDirectory>${endorsed.dir}</outputDirectory>
>                             <silent>true</silent>
>                             <artifactItems>
>                                 <artifactItem>
>                                     <groupId>javax</groupId>
>
> <artifactId>javaee-endorsed-api</artifactId>
>                                     <version>7.0</version>
>                                     <type>jar</type>
>                                 </artifactItem>
>                             </artifactItems>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
>
> </project>
>
> -----------------------------------
>
> The ojdbc jar is also colocated with the injection project jar. It is
> included as a runtime dependency in the persistence project and the
> injection project. I have tried to use the following fragment from the
> above POM to include the driver jar in the Class-path attribute in the
> Manifest file but this doesn't seem to do anything:
>
> <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-jar-plugin</artifactId>
>                     <version>2.4</version>
>                     <configuration>
>                         <archive>
>                             <manifest>
>                                 <addClasspath>true</addClasspath>
>                             </manifest>
>                         </archive>
>                     </configuration>
>                 </plugin>
>
>
> I've set the classpath environment variable to include the driver jar and
> I've tried running appclient with the -classpath option but I cannot seem
> to set the appropriate classpath for appclient no matter what I try. 2
> weeks of misguided hacking in the evenings is enough so  I'm hoping someone
> out there who understands this technology can help (as I clearly don't get
> sufficient understanding from tutorials/blogs/manuals/hacking..)
>
> I am using :
>
> Netbeans 8
> Glassfish 4
> JDK 1.7 (tried with 1.6 too with no difference)
> Oracle 11.2.0.1
> Oracle driver 'ojdbc6.jar', download from OTN
> ...  on a Windows 7 64-bit laptop
>
> Thanks in advance for any help
>
> Kind regards
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to