Re: Netbeans maven project with invalid POM/classpath problem
You might want to blow away the file from your local maven repo and re-download it. Possible that you were firewalled away from your repo at some point? 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 -? 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; modelVersion4.0.0/modelVersion groupIdcom.oracle/groupId artifactIdcepdemodatagen/artifactId version1.0-SNAPSHOT/version packagingjar/packaging dependencies dependency groupIdorg.eclipse.persistence/groupId artifactIdjavax.persistence/artifactId version2.1.0/version typejar/type /dependency dependency groupIdcepdemo/groupId artifactIdcepdemopersistence/artifactId version1.1-SNAPSHOT/version typejar/type /dependency dependency groupIdcom.oracle/groupId artifactIdcepdemopersistence/artifactId version1.0-SNAPSHOT/version typejar/type /dependency /dependencies properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding maven.compiler.source1.7/maven.compiler.source maven.compiler.target1.7/maven.compiler.target /properties /project - Note: cepdemopersistence-1.1-SNAPSHOT dependency is not used in any code - don't know
Re: Netbeans maven project with invalid POM/classpath problem
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 -? 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; modelVersion4.0.0/modelVersion groupIdcom.oracle/groupId artifactIdcepdemodatagen/artifactId version1.0-SNAPSHOT/version packagingjar/packaging dependencies dependency groupIdorg.eclipse.persistence/groupId artifactIdjavax.persistence/artifactId version2.1.0/version typejar/type /dependency dependency groupIdcepdemo/groupId artifactIdcepdemopersistence/artifactId version1.1-SNAPSHOT/version typejar/type /dependency dependency groupIdcom.oracle/groupId artifactIdcepdemopersistence/artifactId version1.0-SNAPSHOT/version typejar/type /dependency /dependencies properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding maven.compiler.source1.7/maven.compiler.source maven.compiler.target1.7/maven.compiler.target /properties /project - Note: cepdemopersistence-1.1-SNAPSHOT dependency is
Re: Netbeans maven project with invalid POM/classpath problem
On 1 May 2014 06:48, Mark mark@gmail.com wrote: 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) Have you opened that file in a text editor? It looks like malformed xml to me. How did you install the ojdbc jars? These need to be manually installed since they require you to agree to the OTN License Agreement.