Glassfish warnings : Avertissement: Multiple [2] JMX MBeanServer instances exist - ejb

I use NetBeansIDE 7.0.1 with Glassfish 3.1 and for a project with EJB and JPA for the presentation and the MySQL database.
all works fine but whenever I get the following warnings:
Avertissement: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor#11bfacc].
Avertissement: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor#11bfacc] from index [0]
Avertissement: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer#24d165] from index [1]
What Glassfish configuration can solve this problem?
Thank you for your help.

Related

artifactory don't start with an illegal repo name

I have an illegal repository name, which starts with a number.
It's an old repo, created with API request (in Artifactory 6.5.1 version)
Artifactory accepts illegal name with API requests but if you restart artifactory, it's down
So my problem is the same like here:
https://www.jfrog.com/jira/browse/RTFACT-16669
Except the solution doesn't work for me.
Because my instance/server is new, so i have not this file $ARTIFACTORY_HOME/etc/artifactory.config.latest.xml with the local repository.
I have repositories on AWS S3 and a AWS RDS database
And my new AWS EC2 instance have to get repos on S3
My question is:
Can i start artifactory ignoring the bad repo ?
Or
Can i delete the repo without starting artifactory ? (without API request or GUI)
The logs are here:
2019-05-13 14:37:11,581 [art-init] [ERROR] (o.a.c.CentralConfigServiceImpl:744) - Could not load configuration due to: Failed to read object from stream
java.lang.RuntimeException: Failed to read object from stream
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:131)
at org.artifactory.jaxb.JaxbHelper.readConfig(JaxbHelper.java:66)
at org.artifactory.descriptor.reader.CentralConfigReader.readAndConvert(CentralConfigReader.java:76)
etc ...
Caused by: javax.xml.bind.UnmarshalException: null
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
at org.artifactory.jaxb.JaxbHelper.read(JaxbHelper.java:129)
... 56 common frames omitted
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '0ta' is not a valid value for 'NCName'.
etc ...
[art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:96) - Application could not be initialized: null
java.lang.reflect.InvocationTargetException: null
etc ...
Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
etc ...
[http-nio-8081-exec-2] [ERROR] (o.a.w.s.ArtifactoryFilter:194) - Artifactory failed to initialize: Context is null
Thanks
Cyril
The Artifactory config descriptor is stored in the Artifactory DB schema under a table named configs.
In order to overcome this, you can do the following:
Extract the artifactory.config.xml config from the configs table
Store the extracted configuration as a file in: $ARTIFACTORY_HOME/etc/artifactory.config.import.xml
Edit the artifactory.config.import.xml file and manually fix/delete the '0ta' repository reference from the configuration file
After modifying the descriptor, restart the Artifactory service.
Note, if you already have artifacts assigned to the illegal repo name, you will not be able to see them after modifying the repository name, however, since it is a new installation, I'm not sure that that this is relevant for you.

404 after upgrading Artifactory Pro

My current version of Artifactory Pro 6.5.2. I can upgrade incrementally from 6.5.2 to 6.5.9 to 6.0.0. If I try to upgrade beyond 6.0.0, I receive a 404 error when attempting to access Artifactory.
HTTP Status 404 – Not Found
Type Status Report
Message /artifactory/webapp/
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/8.5.32
I see the following errors in /var/opt/jfrog/artifactory/logs/catalina/catalina.out
Failed to ensure db table 'master_key_status' exists
Error creating bean with name 'accessJdbcHelperImpl': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Could not initialize database: Not supported
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/access]]
The database I'm using is MySQL
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
Has any encountered a similar issue when upgrading Artficatory Pro?
Thanks
Just marking down the answer.
The issue was with the JDBC driver version of the Maria DB.
One more update done by you was adding the timezone value.

How to deploy EJB and War modules at same time in NetBeans 8.2 and GlassFish 4.1.1

I have a problem to deploy EJB and WAR modules at the same time in NetBeans 8.2 on GlassFish 4.1.1. The following message is shown:
[[ Exception Occurred :Error occurred during deployment: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [ejb.NewMessage/em] in the scope of the module called [TestEJB-ejb]. Please verify your application.. Please see server.log for more details.]]
When I checked server.log file of GlassFish server, I faced with the following erreor message:
[2018-07-28T12:59:45.406+0430] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=427 _ThreadName=admin-listener(7)] [timeMillis: 1532766585406] [levelValue: 1000] [[
Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [ejb.NewEntityFacade/em] in the scope of the module called [TestEJB-ejb]. Please verify your application.]]
Is there any solution for that?
Thanks for your help.
If you did not start to create your app or if you did not choose your programming framework, you can switch to Java Spring with less headache!
Read the first paragraph of the following link:
https://en.wikipedia.org/wiki/Spring_Framework

how to connect to an MsAccess (accdb) in icCube?

In icCube 6.1 I want to connect to a MsAccess file stored locally on the icCube server. When I try to connect I get the error message:
Failed to establish the connection due to the error: JDBC driver class
'sun.jdbc.odbc.JdbcOdbcDriver' not found in the classpath
This is what I provide in the connection:
Name : Clients
Visibility :
Driver Type : Access (JDK JDBC/ODBC Bridge)
Server Name : localhost
Port Number :
DB Name : C:\data\Clients.accdb
User :
Password :
When I Google on this error I get the message (dated from 2015) that:
in JDK 8, jdbc odbc bridge is no longer used and thus removed from the
JDK.
Help.
As you mentioned you cannot use anymore the JDBC ODBC bridge from JRE 8.
As an alternative you can use a MS Access JDBC driver. For example: UCanAccess. To install this driver in icCube unzip the file and copy the following files into the /lib directory of the icCube install directory:
ucanaccess-4.0.2.jar
jackcess-2.1.6.jar
hsqldb.jar
Then in the builder data source, select a generic JDBC driver and configure the Server Name and DB Name as following:
> Server Name : net.ucanaccess.jdbc.UcanaccessDriver
> DB Name : jdbc:ucanaccess://c:/your-file.accdb
Hope that helps.
[edit] Depending on how icCube is started you might need to update the CLASSPATH with the three new JARs. To avoid CLASSPATH edition, you can use the following in the icCube.sh for example to start icCube using all the JARs in the /lib directory:
> $JAVA $JAVA_OPTS -cp "$ICCUBE/lib/*" crazydev.iccube.server.IcCubeServer

Configure Message Driven Bean using ejb-jar.xml

I am trying to configure Message Driven Bean using ejb-jar. I am using EJB 3.1, Netbeans 7.3 and Glassfish 3.1.2, but I am getting exception:
Exception while deploying the app: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 29; Deployment descriptor file META-INF/ejb-jar.xml in archive [classes]. Element type "messaging-type" must be declared.. Please see server.log for more details.
Where do I make mistake?
You say that you are using Glassfish 3.1.2, but you validate your ejb-jar-xml file with ejb-jar_2_0.dtd. Instead you must use XSD validation for Glassfish 3.1.2. Here is the xsd:
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd

Resources