- This topic has 25 replies, 3 voices, and was last updated 11 years, 11 months ago by support-tony.
-
AuthorPosts
-
volodiaLMemberHello!
I began to use myeclipse and I have unreal problems.
Why does MyEclipse show all my classes in error is there is no error.
Why does not MyEclipse recognise class from the same package.
It tells me to import this class and when I click to import it does nothing.I just restarted MyEclipse again and I have the same problems. The whole package is in red! Why is that?
I want to do maven-clean. It works well once and throws exception another time which can’t be because I have not modified the code and I don’t have the exception if I do clean
via command-line
I started my domain via command-line and myeclipse even does not see that this domain
has started.
I want to package my project, I choose option ‘Run as – maven build’ and it gives errors which are nonsenses. These errors are –[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Uservotedanswer_.java:[11,7] error: duplicate class: com.javahelp.model.Uservotedanswer_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\User_.java:[17,7] error: duplicate class: com.javahelp.model.User_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Topic_.java:[15,7] error: duplicate class: com.javahelp.model.Topic_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Answer_.java:[14,7] error: duplicate class: com.javahelp.model.Answer_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Expertforum_.java:[11,7] error: duplicate class: com.javahelp.model.Expertforum_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Uservotedtopic_.java:[11,7] error: duplicate class: com.javahelp.model.Uservotedtopic_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Countries_.java:[11,7] error: duplicate class: com.javahelp.model.Countries_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Regions_.java:[10,7] error: duplicate class: com.javahelp.model.Regions_ [ERROR] \MyEclipse\workspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Forum_.java:[12,7] error: duplicate class: com.javahelp.model.Forum_ [INFO] 9 errors
Actually all these duplicated classes are generated by myeclipse and they are not duplicated in my project definitely
I have my project in workspace.Thank you!
support-pradeepMembervolodiaL,
Sorry that you are seeing this issue.
Can you please answer some more queries to help us investigate further :
1) Can you please share the Installation Details from MyEclipse > Installation Summary > Installation Details ?
2) Can you please create a new workspace and then create a sample project and check whether you can replicate the issue ?
3) If you can still see the issue in the new workspace, Can you please attach the sample project which exhibits the same issue ?
volodiaLMemberHello!
Thank you for replies!
1. I just reinstalled the whole MyEclipse.
2. I configured my preferences once more !
3. I pasted manually maven project into workspace
4. I opened myeclipse in this workspace
5. I did not have problems with errors and some other ridiculous things!
6. I packaged my project for the first time and it gave exception about DTD of glassfish-web.xml
7. Unfortunately after I cleaned project and clicked to package it again via the same package-configuration It gave me ridiculous error[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project JavaHelp: Compilation failure: Compilation failure: [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Expertforum_.java:[11,7] error: duplicate class: com.javahelp.model.Expertforum_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Uservotedtopic_.java:[11,7] error: duplicate class: com.javahelp.model.Uservotedtopic_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Uservotedanswer_.java:[11,7] error: duplicate class: com.javahelp.model.Uservotedanswer_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Answer_.java:[14,7] error: duplicate class: com.javahelp.model.Answer_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\User_.java:[17,7] error: duplicate class: com.javahelp.model.User_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Forum_.java:[12,7] error: duplicate class: com.javahelp.model.Forum_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Regions_.java:[10,7] error: duplicate class: com.javahelp.model.Regions_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Countries_.java:[11,7] error: duplicate class: com.javahelp.model.Countries_ [ERROR] \meworkspace\JavaHelp\target\generated-sources\annotations\com\javahelp\model\Topic_.java:[15,7] error: duplicate class: com.javahelp.model.Topic_ [ERROR] -> [Help 1]
Attachments:
You must be logged in to view attached files.
volodiaLMemberI found on the Internet:
Sounds like the metamodel generation is enabled. Go to the project properties->JPA, at the bottom of the page there is a Canonical metamodel source folder selection. Change the selected source folder to <None>. This should stop the regeneration of those classes.
How do I remove metamodel generation on maven package?
Thanl you!
volodiaLMemberI have done this:
I removed manually all metamodels classes from my project and packaged this project again
via myeclipse.
And t was packaged successfully! And generated metamodel classes are on place where they should beUnfortunately MyEclipse complaints like this:
Multiple markers at this line - The import com.javahelp.model cannot be resolved - The import com.javahelp.model.Topic_ cannot be resolved
import com.javahelp.model.Topic_ is really removed but package com.javahelp.model is still present.
volodiaLMemberHello!
My problem is that IDE generates metamodel classes for me at development time!
When I trigger maven goal ‘package’, Maven again tries to generate the same metamodel classes but in folder ‘generated-sources. This gives my errors !!!
And this is not issue of IDE because when I do ‘mvn package’ from command line it gives the same error’How to stop it?
volodiaLMemberI am sorry!
It is impossible to edit my post so I give new and new one!
It is not the problem that IDE generates metamodel classes at development time!
IT IS the problem that goal ‘package’ generates the same metamodel classes which gives the errors!!
How to tell maven not to generate metamodel classes again ?[/u]
volodiaLMemberFinally I resolved my two issues !
So the first one was to stop maven goal ‘package’ to generate metamodel classes which are
already generated by IDE
The good workaround is here:
http://gal-levinsky.blogspot.com/2012/02/jpa-20-metamodel-generation-using.htmlNext IDE did not recognize public ID of dtd file to validate glassfish-web.xml
The error was :Unable to locate the DTD to validate your deployment descriptor file …
The solution is here:
http://myhowto.org/software-development/29-validating-xml-documents-in-eclipse-using-dtd/So this has gone and myeclipse jpa capabilities are good although I did not have these problems with NetBeans and it also generated metamodel itself.
Now I can clean and package and deploy my project successfully on glassfish only using MyEclipse !
The problem is :
After successful deployment I don’t see my project in domain1 where it should be that is in domain1/applications folder. It is only in domain1/autodeploy folder where myeclipse puts it. I can’t access the project from browser !
Why is not autodeployed project copied into domain1/applications directory so that it is available in browser ?
volodiaLMemberUnfortunately the success was not long!
At next deployment of my project it gave me this error
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: This pool is not registered with the runtime environment : JavaHelpPool Error Code: 0 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(Entity ManagerFactoryDelegate.java:188) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272) at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211) at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120) at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224) at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:353) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:575) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:461) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:220) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.sql.SQLException: This pool is not registered with the runtime environment : JavaHelpPool at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1552) at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:564) at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.getConnection(ConnectorResourceAdminServiceImpl.java:283) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:132) ... 31 more Caused by: javax.resource.ResourceException: This pool is not registered with the runtime environment : JavaHelpPool at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:669) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1545) ... 34 more Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: This pool is not bound in JNDI : JavaHelpPool at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1087) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:628) ... 35 more Caused by: javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/JavaHelpPool' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: pools] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455) at javax.naming.InitialContext.lookup(InitialContext.java:411) at javax.naming.InitialContext.lookup(InitialContext.java:411) at com.sun.appserv.connectors.internal.api.ResourceNamingService.lookup(ResourceNamingService.java:221) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:870) at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.obtainManagedConnectionFactory(ConnectorConnectionPoolAdminServiceImpl.java:1003) ... 36 more Caused by: javax.naming.NameNotFoundException: pools at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:310) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:218) at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219) at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:77) at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:119) at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:505) ... 42 more
Don’t you know what this error wants?
support-pradeepMembervolodiaL,
It looks like there is some issue in database connections.
Please take a look at this threads:
http://www.coderanch.com/t/164092/java-EJB-SCBCD/certification/SQLExcpetion
http://www.coderanch.com/t/600412/EJB-JEE/java/Caused-javax-naming-NameNotFoundException-pools
http://glassfish.10926.n7.nabble.com/EJB3-creation-of-database-tables-issue-td27525.htmlI suggest you please post on Glassfish / Development forums for better support.
volodiaLMemberHello!
At last I managed to deploy my webapp successfully via command-line but not from MyEclipse.
I found on the Internet about exploded auto-deploymentDue to Windows file locking limitations, if you deploy an exploded EAR directory that contains archived modules (JAR files), the JAR files are locked during the deployment and you will not be able to remove them. Therefore, if an application you plan to auto-deploy is exploded, all of the modules it contains must also be exploded.
Prbably this is reason why I can see in myeclipse log that my webapp is successfully deployed but it is not copied into applications/domain1 folder where it should be to access from browser.
Don’t you know what to do here?
volodiaLMemberThe first question is in previous post.
The second is :
How to replace all occurences of word ‘class’ on xhtml page in myeclipse so that I don’t have to change each separately.
Thank you!
volodiaLMemberThe third question is
How to quickly move to needed class within project. Something like popup window that
requires to enter class name.
How to get this?
volodiaLMemberII have forth question.
How to tell myeclipse to format my java classes so that it takes new line a little further, myeclipse breaks lines too early and I want it to format java code with wider lines.
And the same thing is about ‘Console’ It gives each line of server.log as two lines in Console
of MyEclipse. Don’t you know how to change this?
volodiaLMemberDon’t reply the second question.
I know how to do thatAnother question is :
Why can’t I navigate from xhtml page to backing bean via clicking on name of bean in EL expression?Thank you!
-
AuthorPosts