说是在vm里加个参数-Dsun.lang.ClassLoader.allowArraySyntax=true可以解决问题,可是试了不起作用。
请问这个参数加到哪里?
Buildfile: D:\workspace\TutorialProject\Proj\OPF\ZAA02\build.xml
deploy_war:
[java] weblogic.Deployer invoked with options: -upload -name ZAA02 -user developer -adminurl t3://localhost:7001/ -targets AdminServer -deploy package/ZAA02.war
[java] javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:121)
[java] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:84)
[java] at weblogic.deploy.api.tools.SessionHelper.getRemoteDeploymentManager(SessionHelper.java:482)
[java] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:297)
[java] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[java] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[java] at weblogic.Deployer.run(Deployer.java:70)
[java] at weblogic.Deployer.main(Deployer.java:54)
[java] Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:143)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:148)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:118)
[java] ... 9 more
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: failed to unmarshal class weblogic.security.acl.internal.AuthenticatedUser; nested exception is:
[java] java.io.StreamCorruptedException: invalid type code: 31]
[java] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
[java] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:32)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:673)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:466)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
[java] at weblogic.jndi.Environment.getContext(Environment.java:307)
[java] at weblogic.jndi.Environment.getContext(Environment.java:277)
[java] at weblogic.jndi.Environment.createInitialContext(Environment.java:200)
[java] at weblogic.jndi.Environment.getInitialContext(Environment.java:184)
[java] at weblogic.jndi.Environment.getInitialContext(Environment.java:162)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getContext(ServerConnectionImpl.java:330)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getEnvironment(ServerConnectionImpl.java:302)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:141)
[java] ... 11 more
[java] Caused by: java.rmi.UnmarshalException: failed to unmarshal class weblogic.security.acl.internal.AuthenticatedUser; nested exception is:
[java] java.io.StreamCorruptedException: invalid type code: 31
[java] at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:225)
[java] at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
[java] at weblogic.common.internal.RMIBootServiceImpl_1000_WLStub.authenticate(Unknown Source)
[java] at weblogic.security.acl.internal.Security$1.run(Security.java:185)
[java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
[java] at weblogic.security.service.SecurityManager.runAs(Unknown Source)
[java] at weblogic.security.acl.internal.Security.authenticate(Security.java:181)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.authenticateRemotely(WLInitialContextFactoryDelegate.java:734)
[java] at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:667)
[java] ... 21 more
[java] Caused by: java.io.StreamCorruptedException: invalid type code: 31
[java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1356)
[java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
[java] at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
[java] at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
[java] at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
[java] at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
[java] at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:223)
[java] ... 29 more
[java] Unable to connect to 't3://localhost:7001/': invalid type code: 31. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.
[java] Java Result: 1
deploy:
BUILD SUCCESSFUL
Total time: 4 seconds
1 个解决方案
#1
ant时候使用的jdk和你开发环境的有关系
#1
ant时候使用的jdk和你开发环境的有关系